diff --git a/server/ui-src/App.vue b/server/ui-src/App.vue index 79a9bca..d9d4aba 100644 --- a/server/ui-src/App.vue +++ b/server/ui-src/App.vue @@ -13,7 +13,7 @@ export default { beforeMount() { document.title = document.title + ' - ' + location.hostname - mailbox.showTagColors = localStorage.getItem('showTagsColors') == '1' + mailbox.showTagColors = !localStorage.getItem('hideTagColors') == '1' // load global config this.get(this.resolve('/api/v1/webui'), false, function (response) { diff --git a/server/ui-src/stores/mailbox.js b/server/ui-src/stores/mailbox.js index eb81279..eed9ab3 100644 --- a/server/ui-src/stores/mailbox.js +++ b/server/ui-src/stores/mailbox.js @@ -17,7 +17,7 @@ export const mailbox = reactive({ count: 0, // total in mailbox or search messages: [], // current messages tags: [], // all tags - showTagColors: false, // show tag colors? + showTagColors: true, // show/hide tag colors selected: [], // currently selected connected: false, // websocket connection searching: false, // current search, false for none @@ -51,9 +51,9 @@ watch( () => mailbox.showTagColors, (v) => { if (v) { - localStorage.setItem('showTagsColors', '1') + localStorage.removeItem('hideTagColors') } else { - localStorage.removeItem('showTagsColors') + localStorage.setItem('hideTagColors', '1') } } )