]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Add description to menu items on mobile navigation
authorSebastian Krah <skrah@suse.com>
Tue, 29 Jan 2019 15:30:03 +0000 (16:30 +0100)
committerSebastian Krah <skrah@suse.com>
Tue, 5 Feb 2019 12:47:47 +0000 (13:47 +0100)
Adds the title of the icons as description right next to it if the resolution
of the browser is below 768px.
Adds a couple of scss variable which define the different breakpoints of
bootstrap. Those variables should be used in media query expressions.

Fixes: https://tracker.ceph.com/issues/37789
Signed-off-by: Sebastian Krah <skrah@suse.com>
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/administration/administration.component.html
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/dashboard-help/dashboard-help.component.html
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/identity/identity.component.html
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.scss
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notifications/notifications.component.html
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/task-manager/task-manager.component.html
src/pybind/mgr/dashboard/frontend/src/defaults.scss
src/pybind/mgr/dashboard/frontend/src/locale/messages.xlf

index 1eacdae1f7c3c32eab007527befb1c9f4c0ee352..1dd555563f38ce5b74626061fad7bd8319a59794 100644 (file)
@@ -5,7 +5,9 @@
      data-toggle="dropdown"
      i18n-title
      title="Dashboard Settings">
-    <i class="fa fa-cog"></i>
+    <i class="fa fa-fw fa-cog"></i>
+    <span i18n
+          class="visible-xs-inline-block">Dashboard Settings</span>
     <span class="caret"></span>
   </a>
   <ul *dropdownMenu
index 5eac6e3c7a02c4769aca70e475b69cca26889ad8..02c7ad9c827071f55c15d9ad3bce783f0a14af5b 100644 (file)
@@ -8,7 +8,9 @@
      data-toggle="dropdown"
      i18n-title
      title="Help">
-    <i class="fa fa-question-circle-o"></i>
+    <i class="fa fa-fw fa-question-circle-o"></i>
+    <span i18n
+          class="visible-xs-inline-block">Help</span>
     <span class="caret"></span>
   </a>
   <ul *dropdownMenu
index 678a4f87f39f5549981d60a87ca3a5b05a09a34a..ad62aaf386847fef037d0a2edb408737705982cb 100644 (file)
@@ -4,7 +4,9 @@
      data-toggle="dropdown"
      i18n-title
      title="Logged in user">
-    <i class="fa fa-user fa-fw"></i>
+    <i class="fa fa-fw fa-user"></i>
+    <span i18n
+          class="visible-xs-inline-block">Logged in user</span>
     <span class="caret"></span>
   </a>
   <ul *dropdownMenu
index 831014545ca5fdbb6c712b946391bf8b50bd5314..fcb4b0b5f5e81c5b560cdf8f1ea48cdb405466b7 100644 (file)
     border-color: transparent;
     background-color: transparent;
   }
-  @media (min-width: 768px) {
+  @media (min-width: $screen-sm-min) {
     .navbar-primary > li > a {
       border-bottom: 4px solid transparent;
     }
       top: 0;
     }
   }
-  @media (max-width: 767px) {
+  @media (max-width: $screen-xs-max) {
     .navbar-nav {
       margin: 0;
+
+      .fa {
+        margin-right: 0.5em;
+      }
     }
 
     .navbar-collapse,
 
     .navbar-utility {
       border-top: 1px solid $color-nav-border-top-collapse;
+
+      a {
+        font-size: 1em;
+      }
     }
 
     .navbar-primary > .active > a,
index fe9faa54cf45fde087dc02b54d2ded1855b7705e..9e73409d99850849e59c3499bc855d82fd659101 100644 (file)
@@ -51,5 +51,7 @@
    outsideClick="true"
    i18n-title
    title="Recent Notifications">
-  <i class="fa fa-bell fa-fw"></i>
+  <i class="fa fa-fw fa-bell"></i>
+  <span i18n
+        class="visible-xs-inline-block">Recent Notifications</span>
 </a>
index 37941ecd41c50dfcab72238acd1f3917ebeb2fb6..dae5758080321cc525b737c97635576ec4651764 100644 (file)
@@ -79,5 +79,7 @@
    title="Background Tasks">
   <i class="fa fa-fw"
      [ngClass]="icon"></i>
+  <span i18n
+        class="visible-xs-inline-block">Background Tasks</span>
   <span *ngIf="executingTasks.length > 0"> ({{ executingTasks.length }})</span>
 </a>
index a6224e7d341c4e263e361bedce19b2e7a169bc98..9cf30b3901db29d52838bb78b8b537e1a3374cc5 100644 (file)
@@ -2,6 +2,14 @@
 
 @import 'vendor.variables';
 
+$screen-sm-min: 768px !default;
+$screen-md-min: 992px !default;
+$screen-lg-min: 1200px !default;
+
+$screen-xs-max: calc(#{$screen-sm-min} - 1px);
+$screen-sm-max: calc(#{$screen-md-min} - 1px);
+$screen-md-max: calc(#{$screen-lg-min} - 1px);
+
 $color-solid-red: #ff0000 !default;
 $color-pink: #a94442 !default;
 $color-light-red: #f2dede !default;
index 416e730353ff4ae915de868ff0b6dd8049b11976..7997169c0ba2f359e3dc2656830588979878f9b0 100644 (file)
         </context-group>
       </trans-unit><trans-unit id="1d65cc22d5842c06d33b244fc67de9db4003537e" datatype="html">
         <source>Recent Notifications</source>
+        <context-group purpose="location">
+          <context context-type="sourcefile">app/core/navigation/notifications/notifications.component.html</context>
+          <context context-type="linenumber">56</context>
+        </context-group>
         <context-group purpose="location">
           <context context-type="sourcefile">app/core/navigation/notifications/notifications.component.html</context>
           <context context-type="linenumber">53</context>
         </context-group>
       </trans-unit><trans-unit id="ea94e7754983d80af8acb958a5d49d93bacd721c" datatype="html">
         <source>Background Tasks</source>
+        <context-group purpose="location">
+          <context context-type="sourcefile">app/core/navigation/task-manager/task-manager.component.html</context>
+          <context context-type="linenumber">83</context>
+        </context-group>
         <context-group purpose="location">
           <context context-type="sourcefile">app/core/navigation/task-manager/task-manager.component.html</context>
           <context context-type="linenumber">79</context>
         </context-group>
       </trans-unit><trans-unit id="85b79c9064aed1ead31ace985f31aa1363f6bdaf" datatype="html">
         <source>Help</source>
+        <context-group purpose="location">
+          <context context-type="sourcefile">app/core/navigation/dashboard-help/dashboard-help.component.html</context>
+          <context context-type="linenumber">13</context>
+        </context-group>
         <context-group purpose="location">
           <context context-type="sourcefile">app/core/navigation/dashboard-help/dashboard-help.component.html</context>
           <context context-type="linenumber">10</context>
         <source>Documentation</source>
         <context-group purpose="location">
           <context context-type="sourcefile">app/core/navigation/dashboard-help/dashboard-help.component.html</context>
-          <context context-type="linenumber">21</context>
+          <context context-type="linenumber">23</context>
         </context-group>
       </trans-unit><trans-unit id="e351b40b3869a5c7d19c3d4918cb1ac7aaab95c4" datatype="html">
         <source>API</source>
         <context-group purpose="location">
           <context context-type="sourcefile">app/core/navigation/dashboard-help/dashboard-help.component.html</context>
-          <context context-type="linenumber">26</context>
+          <context context-type="linenumber">28</context>
         </context-group>
       </trans-unit><trans-unit id="004b222ff9ef9dd4771b777950ca1d0e4cd4348a" datatype="html">
         <source>About</source>
         <context-group purpose="location">
           <context context-type="sourcefile">app/core/navigation/dashboard-help/dashboard-help.component.html</context>
-          <context context-type="linenumber">31</context>
+          <context context-type="linenumber">33</context>
         </context-group>
       </trans-unit><trans-unit id="1481ecd21e760ac919a24e26cf790acd82e40199" datatype="html">
         <source>Dashboard Settings</source>
+        <context-group purpose="location">
+          <context context-type="sourcefile">app/core/navigation/administration/administration.component.html</context>
+          <context context-type="linenumber">10</context>
+        </context-group>
         <context-group purpose="location">
           <context context-type="sourcefile">app/core/navigation/administration/administration.component.html</context>
           <context context-type="linenumber">7</context>
         <source>User management</source>
         <context-group purpose="location">
           <context context-type="sourcefile">app/core/navigation/administration/administration.component.html</context>
-          <context context-type="linenumber">16</context>
+          <context context-type="linenumber">18</context>
         </context-group>
       </trans-unit><trans-unit id="049dfd9fe6c78914ad58cf89ac6a631fca28ec74" datatype="html">
         <source>Logged in user</source>
+        <context-group purpose="location">
+          <context context-type="sourcefile">app/core/navigation/identity/identity.component.html</context>
+          <context context-type="linenumber">9</context>
+        </context-group>
         <context-group purpose="location">
           <context context-type="sourcefile">app/core/navigation/identity/identity.component.html</context>
           <context context-type="linenumber">6</context>
       <x id="START_TAG_STRONG" ctype="x-strong" equiv-text="&lt;strong&gt;"/><x id="INTERPOLATION" equiv-text="{{ username }}"/><x id="CLOSE_TAG_STRONG" ctype="x-strong" equiv-text="&lt;/strong&gt;"/></source>
         <context-group purpose="location">
           <context context-type="sourcefile">app/core/navigation/identity/identity.component.html</context>
-          <context context-type="linenumber">17</context>
+          <context context-type="linenumber">19</context>
         </context-group>
       </trans-unit><trans-unit id="5d22c795daf43877a5f708dca2bccd549eb0471d" datatype="html">
         <source>Sign out</source>
         <context-group purpose="location">
           <context context-type="sourcefile">app/core/navigation/identity/identity.component.html</context>
-          <context context-type="linenumber">25</context>
+          <context context-type="linenumber">27</context>
         </context-group>
       </trans-unit><trans-unit id="eeba399c4dae8d4890c27b7a2cd2dc28fcf8b5f9" datatype="html">
         <source>Performance Counters</source>