]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Make admin sub-navs, selects, buttons responsive (#2702)
authorKim <1877318+kimsible@users.noreply.github.com>
Thu, 30 Apr 2020 22:51:09 +0000 (00:51 +0200)
committerGitHub <noreply@github.com>
Thu, 30 Apr 2020 22:51:09 +0000 (00:51 +0200)
client/src/app/+admin/plugins/plugins.component.scss
client/src/app/+admin/system/jobs/jobs.component.scss
client/src/app/+admin/system/logs/logs.component.scss
client/src/sass/application.scss
client/src/sass/include/_mixins.scss

index 9f61bcf7a4b1cbfbe8f7441a83f4cd03b69e86ed..04ca8126ac8d39ff75900af7819aff6efa52905a 100644 (file)
@@ -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;
+        }
+      }
+    }
+  }
+}
index 4a3de92740666fa0ed2fd34d0d40dbbcb96be171..c33e14292f71b63c6091c77177b307b6fd5e4b59 100644 (file)
@@ -18,6 +18,7 @@
 }
 
 .admin-sub-header {
+  flex-direction: row !important;
   justify-content: flex-end;
 
   .select-filter-block {
index c4690ac9ea8774ef869b0543aed7fff8f5e9e2c4..087155254541aee96f223b6c1868bd83bfd709f9 100644 (file)
   }
 }
 
+@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;
+      }
+    }
+  }
+}
index b62c91384e9fdd6cd965aa6cb5bf057ffb41ca24..ab0bf0a08a8d503a6ec8f675536d45727c4bf332 100644 (file)
@@ -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);
+      }
+    }
+  }
+}
index 75046798ce7ecf00f288e52ef7e78baadf07455a..cfb14ef65ee7208b394430ca3251fe2f77059440 100644 (file)
     }
   }
 }
+
+@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;
+    }
+  }
+}