From 5540cb852b623175deceab5f70d15eaab10e0412 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Bj=C3=A4reholt?= Date: Wed, 22 Nov 2023 11:47:53 +0100 Subject: [PATCH] fix: open edit modal when 'Add Category' clicked (add top-level category) --- src/stores/settings.ts | 5 ++--- src/views/settings/CategorizationSettings.vue | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/stores/settings.ts b/src/stores/settings.ts index 0432f692..52bc4d1d 100644 --- a/src/stores/settings.ts +++ b/src/stores/settings.ts @@ -95,15 +95,14 @@ export const useSettingsStore = defineStore('settings', { // Skip keys starting with underscore, as they are local to the vuex store. return !key.startsWith('_'); }); - console.log('all_keys', all_keys); const storage = {}; for (const key of all_keys) { // If key is set in server, use that value, otherwise use localStorage const set_in_server = server_settings[key] !== undefined; const value = set_in_server ? server_settings[key] : localStorage.getItem(key); - const locstr = set_in_server ? '[server]' : '[localStorage]'; - console.log(`${locstr} ${key}:`, value); + //const locstr = set_in_server ? '[server]' : '[localStorage]'; + //console.debug(`${locstr} ${key}:`, value); // Keys ending with 'Data' are JSON-serialized objects if (key.includes('Data') && !set_in_server) { diff --git a/src/views/settings/CategorizationSettings.vue b/src/views/settings/CategorizationSettings.vue index e86d68e7..818c7179 100644 --- a/src/views/settings/CategorizationSettings.vue +++ b/src/views/settings/CategorizationSettings.vue @@ -28,6 +28,8 @@ div | Discard div(v-for="_class in classes_hierarchy") CategoryEditTree(:_class="_class") + div(v-if="editingId !== null") + CategoryEditModal(:categoryId='editingId', @hidden="hideEditModal()") div.row div.col-sm-12 @@ -40,20 +42,25 @@ div