From b319e0deb09b50dc9847a4751ec67fc611176795 Mon Sep 17 00:00:00 2001 From: cstns Date: Tue, 16 Jul 2024 15:08:33 +0300 Subject: [PATCH 01/26] add uxStore and rightDrawer boilerplate --- frontend/src/store/index.js | 4 +++- frontend/src/store/ux.js | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 frontend/src/store/ux.js diff --git a/frontend/src/store/index.js b/frontend/src/store/index.js index 2893166bac..36ce0466a6 100644 --- a/frontend/src/store/index.js +++ b/frontend/src/store/index.js @@ -3,11 +3,13 @@ import { createStore } from 'vuex' import account from './account.js' import storagePlugin from './plugins/storage.plugin.js' import product from './product.js' +import ux from './ux.js' export default createStore({ modules: { account, - product + product, + ux }, plugins: [storagePlugin] }) diff --git a/frontend/src/store/ux.js b/frontend/src/store/ux.js new file mode 100644 index 0000000000..ec80111b4f --- /dev/null +++ b/frontend/src/store/ux.js @@ -0,0 +1,36 @@ +const state = () => ({ + rightDrawer: { + state: false, + component: null + } +}) + +const getters = {} + +const mutations = { + openRightDrawer (state, { component }) { + state.rightDrawer.state = true + state.rightDrawer.component = component + }, + closeRightDrawer (state) { + state.rightDrawer.state = false + state.rightDrawer.component = null + } +} + +const actions = { + openRightDrawer (state, { component }) { + state.commit('openRightDrawer', { component }) + }, + closeRightDrawer (state) { + state.commit('closeRightDrawer') + } +} + +export default { + namespaced: true, + state, + getters, + mutations, + actions +} From 424ba9fee378c89cae3f2dd77afdad29b5ef3fbe Mon Sep 17 00:00:00 2001 From: cstns Date: Tue, 16 Jul 2024 15:58:22 +0300 Subject: [PATCH 02/26] add a notification button to the top nav --- .../src/components/NotificationsButton.vue | 49 +++++++++++++++++++ frontend/src/components/PageHeader.vue | 6 ++- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 frontend/src/components/NotificationsButton.vue diff --git a/frontend/src/components/NotificationsButton.vue b/frontend/src/components/NotificationsButton.vue new file mode 100644 index 0000000000..3e31434c0a --- /dev/null +++ b/frontend/src/components/NotificationsButton.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/frontend/src/components/PageHeader.vue b/frontend/src/components/PageHeader.vue index d4373bfcf3..5ff1795cce 100644 --- a/frontend/src/components/PageHeader.vue +++ b/frontend/src/components/PageHeader.vue @@ -38,6 +38,7 @@