From 44cfa3e3e13856f7c341ccb89e9a51bdecd8fb47 Mon Sep 17 00:00:00 2001 From: zurdi Date: Tue, 13 May 2025 09:37:29 +0000 Subject: [PATCH] feat: change action bar on hover and add option to show it always (classic action bar) --- .../Settings/UserInterface/Interface.vue | 18 ++++++++ .../components/common/Game/Card/ActionBar.vue | 15 ++++++- .../src/components/common/Game/Card/Base.vue | 41 ++++++++++++++++--- frontend/src/locales/de_DE/settings.json | 4 +- frontend/src/locales/en_GB/settings.json | 2 + frontend/src/locales/en_US/settings.json | 2 + frontend/src/locales/es_ES/settings.json | 2 + frontend/src/locales/fr_FR/settings.json | 2 + frontend/src/locales/it_IT/settings.json | 2 + frontend/src/locales/ja_JP/settings.json | 2 + frontend/src/locales/ko_KR/settings.json | 2 + frontend/src/locales/pt_BR/settings.json | 2 + frontend/src/locales/ro_RO/settings.json | 2 + frontend/src/locales/ru_RU/settings.json | 2 + frontend/src/locales/zh_CN/settings.json | 2 + 15 files changed, 92 insertions(+), 8 deletions(-) diff --git a/frontend/src/components/Settings/UserInterface/Interface.vue b/frontend/src/components/Settings/UserInterface/Interface.vue index 312baa499..57ad0c696 100644 --- a/frontend/src/components/Settings/UserInterface/Interface.vue +++ b/frontend/src/components/Settings/UserInterface/Interface.vue @@ -68,6 +68,11 @@ const languagesRef = ref( const storedStatus = localStorage.getItem("settings.showStatus"); const statusRef = ref(isNull(storedStatus) ? true : storedStatus === "true"); +const storedActionBar = localStorage.getItem("settings.showActionBar"); +const actionBarRef = ref( + isNull(storedActionBar) ? false : storedActionBar === "true", +); + const homeOptions = computed(() => [ { title: t("settings.show-recently-added"), @@ -145,6 +150,14 @@ const galleryOptions = computed(() => [ model: statusRef, modelTrigger: toggleStatus, }, + { + title: t("settings.show-actionbar"), + description: t("settings.show-actionbar-desc"), + iconEnabled: "mdi-card", + iconDisabled: "mdi-card-outline", + model: actionBarRef, + modelTrigger: toggleActionBar, + }, ]); // Functions to update localStorage @@ -203,6 +216,11 @@ const toggleStatus = (value: boolean) => { statusRef.value = value; localStorage.setItem("settings.showStatus", value.toString()); }; + +const toggleActionBar = (value: boolean) => { + actionBarRef.value = value; + localStorage.setItem("settings.showActionBar", value.toString()); +};