diff options
author | Vitalii Lysak <v.lysak@dunice.net> | 2022-07-11 19:12:52 +0300 |
---|---|---|
committer | Vitalii Lysak <v.lysak@dunice.net> | 2022-07-11 19:12:52 +0300 |
commit | 4b3d3eb37001207a9862d81e6d1ab0d3a423de3d (patch) | |
tree | 6ab378b4f22c3090ec5345b4232f46234c7d0811 /src/components/AppHeader | |
parent | b375e8e8fe12556e898d8b351de061dd4f950eb8 (diff) | |
download | webui-vue-4b3d3eb37001207a9862d81e6d1ab0d3a423de3d.tar.xz |
add template for critical logs
Diffstat (limited to 'src/components/AppHeader')
-rw-r--r-- | src/components/AppHeader/AppHeader.vue | 97 |
1 files changed, 69 insertions, 28 deletions
diff --git a/src/components/AppHeader/AppHeader.vue b/src/components/AppHeader/AppHeader.vue index b24fef86..3cb7adb0 100644 --- a/src/components/AppHeader/AppHeader.vue +++ b/src/components/AppHeader/AppHeader.vue @@ -126,7 +126,7 @@ <span class="responsive-text">{{ $t('appHeader.refresh') }}</span> </b-button> </li> - <li class="nav-item"> + <li class="nav-item notifications"> <b-dropdown id="app-notifications" variant="link" right> <template #button-content> <icon-notification :title="$t('appHeader.titleNotification')" /> @@ -135,8 +135,18 @@ id="dropdown-group-1" :header="$t('appHeader.titleCritical')" > - <b-dropdown-item v-for="(log, index) in okLogs" :key="index" - >{{ log.name }} + <b-dropdown-item v-for="(log, index) in okLogs" :key="index"> + <img + class="status-icon" + src="@/assets/images/notifications/critical.svg" + /> + <div class="notification-item"> + <span>{{ log.name | truncate(28, '...') }}</span> + <span class="notification-desc">{{ + log.description | truncate(28, '...') + }}</span> + </div> + <img src="@/assets/images/notifications/right-arrow.svg" /> </b-dropdown-item> </b-dropdown-group> <b-dropdown-divider></b-dropdown-divider> @@ -485,33 +495,64 @@ export default { } } -.dropdown-toggle::after { - display: none; -} +.notifications { + .dropdown-toggle::after { + display: none; + } -.dropdown-menu { - box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1); - border-radius: 8px; -} + .dropdown-menu { + box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1); + border-radius: 8px; + width: 256px; + } -.dropdown-header { - font-style: normal; - font-weight: 700; - font-size: 12px; - line-height: 16px; - text-transform: uppercase; - color: #0c1c29; - padding: 15px; -} -#dropdown-group-1 { - padding: 15px; -} + .dropdown-header { + font-style: normal; + font-weight: 700; + font-size: 12px; + line-height: 16px; + text-transform: uppercase; + color: #0c1c29; + padding: 15px 15px 0 15px; + } + #dropdown-group-1 { + padding: 15px; + } -.dropdown-item { - font-style: normal; - font-weight: 600; - font-size: 12px; - line-height: 16px; - color: #0c1c29; + .notification-item { + display: flex; + flex-direction: column; + font-style: normal; + font-weight: 600; + font-size: 12px; + line-height: 16px; + color: #0c1c29; + white-space: normal; + } + + .notification-desc { + font-style: normal; + font-weight: 300; + font-size: 12px; + line-height: 16px; + color: rgba(12, 28, 41, 0.6); + } + + .dropdown-item { + display: flex; + padding: 0.25rem; + } + + .list-unstyled { + li { + margin-bottom: 5px; + } + } + + .status-icon { + align-self: self-start; + padding-top: 3px; + margin-right: 6px; + } } </style> |