Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Make admin sub-navs, selects, buttons responsive (#2702)

Kim7a03209d28f3
diff --git a/client/src/app/+admin/plugins/plugins.component.scss b/client/src/app/+admin/plugins/plugins.component.scss
index 9f61bcf7a4..04ca8126ac 100644
--- a/client/src/app/+admin/plugins/plugins.component.scss
+++ b/client/src/app/+admin/plugins/plugins.component.scss
@@ -5,3 +5,29 @@
flex-grow: 0;
margin-right: 30px;
}
+
+@media screen and (max-width: $small-view) {
+ ::ng-deep .plugins .plugin .first-row {
+ flex-wrap: wrap;
+
+ .plugin-name,
+ .plugin-version,
+ .plugin-icon {
+ margin-bottom: 10px;
+ }
+
+ .buttons {
+ my-edit-button,
+ my-delete-button,
+ my-button {
+ .action-button {
+ padding: 0 13px;
+ }
+
+ .button-label {
+ display: none;
+ }
+ }
+ }
+ }
+}
diff --git a/client/src/app/+admin/system/jobs/jobs.component.scss b/client/src/app/+admin/system/jobs/jobs.component.scss
index 4a3de92740..c33e14292f 100644
--- a/client/src/app/+admin/system/jobs/jobs.component.scss
+++ b/client/src/app/+admin/system/jobs/jobs.component.scss
@@ -18,6 +18,7 @@
}
.admin-sub-header {
+ flex-direction: row !important;
justify-content: flex-end;
.select-filter-block {
diff --git a/client/src/app/+admin/system/logs/logs.component.scss b/client/src/app/+admin/system/logs/logs.component.scss
index c4690ac9ea..0871552545 100644
--- a/client/src/app/+admin/system/logs/logs.component.scss
+++ b/client/src/app/+admin/system/logs/logs.component.scss
@@ -57,3 +57,38 @@
}
}
+@media screen and (max-width: $small-view) {
+ .header {
+ flex-direction: column;
+
+ .peertube-select-container,
+ my-button {
+ width: 100% !important;
+ margin-left: 0px !important;
+ margin-bottom: 10px !important;
+ }
+
+ my-button {
+ text-align: center;
+ }
+ }
+}
+
+@media screen and (max-width: #{$small-view + $menu-width}) {
+ :host-context(.main-col:not(.expanded)) {
+ .header {
+ flex-direction: column;
+
+ .peertube-select-container,
+ my-button {
+ width: 100% !important;
+ margin-left: 0px !important;
+ margin-bottom: 10px !important;
+ }
+
+ my-button {
+ text-align: center;
+ }
+ }
+ }
+}
diff --git a/client/src/sass/application.scss b/client/src/sass/application.scss
index b62c91384e..ab0bf0a08a 100644
--- a/client/src/sass/application.scss
+++ b/client/src/sass/application.scss
@@ -322,6 +322,10 @@ table {
margin-bottom: $sub-menu-margin-bottom-small-view;
}
+ .admin-sub-header {
+ @include admin-sub-header-responsive(15px*2);
+ }
+
my-markdown-textarea {
.root {
max-width: 100% !important;
@@ -338,3 +342,13 @@ table {
}
}
}
+
+@media screen and (min-width: $small-view) and (max-width: #{$small-view + $menu-width}) {
+ .main-col {
+ &:not(.expanded) {
+ .admin-sub-header {
+ @include admin-sub-header-responsive($menu-width/2 + $expanded-horizontal-margins/3);
+ }
+ }
+ }
+}
diff --git a/client/src/sass/include/_mixins.scss b/client/src/sass/include/_mixins.scss
index 75046798ce..cfb14ef65e 100644
--- a/client/src/sass/include/_mixins.scss
+++ b/client/src/sass/include/_mixins.scss
@@ -875,3 +875,26 @@
}
}
}
+
+@mixin admin-sub-header-responsive ($horizontal-margins) {
+ flex-direction: column;
+
+ .form-sub-title {
+ margin-right: 0px !important;
+ margin-bottom: 10px;
+ text-align: center;
+ }
+
+ .admin-sub-nav {
+ display: block;
+ overflow-x: auto;
+ white-space: nowrap;
+ height: 50px;
+ padding: 10px 0;
+ width: calc(100vw - #{$horizontal-margins*2});
+
+ a {
+ margin-left: 5px;
+ }
+ }
+}