feat:#20 added settings page

This commit is contained in:
Elmar Kresse
2024-07-01 19:54:09 +02:00
parent 95ed69783e
commit 5e0f26f24a
6 changed files with 81 additions and 15 deletions

View File

@@ -17,13 +17,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<script lang="ts" setup>
import { computed, ref } from "vue";
import { computed } from "vue";
import { useI18n } from "vue-i18n";
import LocaleSwitcher from "./LocaleSwitcher.vue";
import DarkModeSwitcher from "./DarkModeSwitcher.vue";
const { t } = useI18n({ useScope: "global" });
const isDark = ref(true);
const items = computed(() => [
{
@@ -86,13 +84,6 @@ const items = computed(() => [
url: "https://www.htwk-leipzig.de/hochschule/kontakt/datenschutzerklaerung/",
},
]);
function handleDarkModeToggled(isDarkVar: boolean) {
// Do something with isDark value
// For example, update the root isDark value
// Assuming the root component has an isDark ref
isDark.value = isDarkVar;
}
</script>
<template>
@@ -140,10 +131,10 @@ function handleDarkModeToggled(isDarkVar: boolean) {
</template>
<template #end>
<div class="flex align-items-stretch justify-content-center">
<DarkModeSwitcher
@dark-mode-toggled="handleDarkModeToggled"
></DarkModeSwitcher>
<LocaleSwitcher></LocaleSwitcher>
<!-- Settings Button with Gear Icon -->
<router-link v-slot="{ navigate }" :to="`/settings`" custom>
<Button icon="pi pi-cog" severity="secondary" rounded text size="large" aria-label="Settings" @click="navigate" />
</router-link>
</div>
</template>
</Menubar>