From 81c5b101015f7a8bf35b520a1261c7046df0229a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Gr=C3=B6ger?= Date: Sun, 18 Apr 2021 22:33:32 +0200 Subject: [PATCH 1/3] [core] change style of menulinks in drawer --- .../navigation/EssentialExpansionLink.vue | 46 +++++++++++++++++++ src/layouts/MainLayout.vue | 14 +++--- src/pages/Login.vue | 2 +- 3 files changed, 55 insertions(+), 7 deletions(-) create mode 100644 src/components/navigation/EssentialExpansionLink.vue diff --git a/src/components/navigation/EssentialExpansionLink.vue b/src/components/navigation/EssentialExpansionLink.vue new file mode 100644 index 0000000..2726583 --- /dev/null +++ b/src/components/navigation/EssentialExpansionLink.vue @@ -0,0 +1,46 @@ + + + diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index d70329f..c13be44 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -51,18 +51,18 @@ > - - - + flaschengeist?.menuLinks), mainLinks, notifications, noPermission, diff --git a/src/pages/Login.vue b/src/pages/Login.vue index e41400b..68bde36 100644 --- a/src/pages/Login.vue +++ b/src/pages/Login.vue @@ -95,7 +95,7 @@ export default defineComponent({ const status = await mainStore.login(userid.value, password.value); if (status === true) { - mainStore.user = (await useUserStore().getUser(userid.value)) || undefined; + mainStore.user = (await useUserStore().getUser(userid.value, true)) || undefined; const x = router.currentRoute.value.query['redirect']; void router.push(typeof x === 'string' ? { path: x } : mainRoute); } else { From 3c7d711f59e3f77c317c8a3c79c161ad644317c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Gr=C3=B6ger?= Date: Sun, 18 Apr 2021 23:26:54 +0200 Subject: [PATCH 2/3] [core] dynamic shortcutlinks --- .../navigation/EssentialExpansionLink.vue | 19 ++++--- src/components/navigation/ShortcutLink.vue | 22 ++++++-- src/layouts/MainLayout.vue | 51 ++++++++++++++----- src/stores/index.ts | 12 +++++ 4 files changed, 82 insertions(+), 22 deletions(-) diff --git a/src/components/navigation/EssentialExpansionLink.vue b/src/components/navigation/EssentialExpansionLink.vue index 2726583..778dd22 100644 --- a/src/components/navigation/EssentialExpansionLink.vue +++ b/src/components/navigation/EssentialExpansionLink.vue @@ -3,6 +3,9 @@
+ + + @@ -18,7 +21,7 @@ diff --git a/src/components/navigation/ShortcutLink.vue b/src/components/navigation/ShortcutLink.vue index 1a00c44..79f35f1 100644 --- a/src/components/navigation/ShortcutLink.vue +++ b/src/components/navigation/ShortcutLink.vue @@ -1,5 +1,9 @@ diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index c13be44..f6ec065 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -33,10 +33,17 @@
Keine neuen Benachrichtigungen
- --> + @@ -52,9 +59,10 @@ - {{ notifications.length }} + + + {{ notifications.length }} + Keine neuen Benachrichtigungen
- - + + + @@ -64,13 +59,6 @@ :entry="entry" @add-short-cut="addShortcut" /> -
draggable; const essentials: FG_Plugin.MenuLink[] = [ { title: 'Über Flaschengeist', @@ -106,7 +104,7 @@ const essentials: FG_Plugin.MenuLink[] = [ export default defineComponent({ name: 'MainLayout', - components: { EssentialExpansionLink, EssentialLink, ShortcutLink, Notification }, + components: { EssentialExpansionLink, EssentialLink, ShortcutLink, Notification, drag }, setup() { const router = useRouter(); const mainStore = useMainStore(); @@ -171,8 +169,8 @@ export default defineComponent({ const shortCuts = computed({ get: () => mainStore.shortcuts, set: (val: Array) => { - console.log('hier bin ich', val); mainStore.shortcuts = val; + void mainStore.setShortcuts(); }, }); @@ -185,7 +183,6 @@ export default defineComponent({ } function deleteShortcut(val: FG_Plugin.MenuLink) { - console.log('deleteShortcut'); const idx = shortCuts.value.findIndex((a: FG_Plugin.MenuLink) => a.link === val.link); if (idx > -1) { shortCuts.value.splice(idx, 1); @@ -212,3 +209,8 @@ export default defineComponent({ }, }); + diff --git a/src/pages/Login.vue b/src/pages/Login.vue index 68bde36..6ebd442 100644 --- a/src/pages/Login.vue +++ b/src/pages/Login.vue @@ -36,9 +36,15 @@
- +
- +
@@ -78,7 +84,7 @@ export default defineComponent({ const password = ref(''); const server = ref(api.defaults.baseURL); const visible = ref(false); - const $q = useQuasar() + const $q = useQuasar(); function openServerSettings() { visible.value = !visible.value; @@ -152,7 +158,7 @@ export default defineComponent({ server, userid, visible, - $q + $q, }; }, });