From e77cfbeb8185c69c06b820afdb3af5f584c980f1 Mon Sep 17 00:00:00 2001 From: Timo Volkmann Date: Fri, 8 Oct 2021 11:38:27 +0200 Subject: [PATCH] UI: Add profile card and fix navigation layout #1175 --- frontend/src/component/navigation.vue | 59 +++++++++++++++++++-------- frontend/src/css/navigation.css | 19 +++++++++ 2 files changed, 62 insertions(+), 16 deletions(-) diff --git a/frontend/src/component/navigation.vue b/frontend/src/component/navigation.vue index 7f6611760..2579855a0 100644 --- a/frontend/src/component/navigation.vue +++ b/frontend/src/component/navigation.vue @@ -26,7 +26,7 @@ :width="270" :mobile-break-point="960" :mini-variant-width="80" - class="nav-sidebar navigation" + class="nav-sidebar navigation p-flex-nav" fixed dark app :right="rtl" > @@ -51,7 +51,7 @@ - + chevron_right @@ -415,18 +415,6 @@ - - - power_settings_new - - - - - Logout - - - - - + + + + + wifi_off @@ -451,7 +442,39 @@ + + + + {{ displayName.length >= 1 ? displayName[0].toUpperCase() : "E" }} + + + + + {{ displayName }} + + Profile + + + + + power_settings_new + + + + + + + power_settings_new + + + + + Logout + + + + @@ -500,6 +523,10 @@ export default { auth() { return this.session.auth || this.isPublic; }, + displayName() { + return this.$session.getUser().FullName ? this.$session.getUser().FullName : this.$session.getUser().UserName; + }, + }, created() { this.reload.subscription = Event.subscribe("dialog.reload", () => this.reload.dialog = true); diff --git a/frontend/src/css/navigation.css b/frontend/src/css/navigation.css index 35bc3ef0c..45621f85e 100644 --- a/frontend/src/css/navigation.css +++ b/frontend/src/css/navigation.css @@ -92,4 +92,23 @@ #photoprism .page-toolbar .input-category .v-select__selections .v-select__selection { white-space: nowrap; overflow: hidden; +} + +.p-user-box { + /*position: fixed;*/ + /*bottom: 0;*/ + width: 100%; + padding: 0; +} +.p-profile > a { + height: 64px; +} +.p-flex-nav { + display: flex; + flex-flow: column nowrap; + overflow-y: hidden; +} +.p-flex-menu { + overflow-y: scroll; + flex-grow: 1; } \ No newline at end of file