2024-02-23 17:34:31 +01:00
|
|
|
<template>
|
2024-04-01 13:16:47 +02:00
|
|
|
<v-app-bar :elevation="5" height="50">
|
2024-02-24 18:36:48 +01:00
|
|
|
<RouterMenu />
|
2024-04-05 15:14:28 +02:00
|
|
|
<v-app-bar-title v-if="$route.name !== 'Home'">Brain Blast</v-app-bar-title>
|
2024-02-23 17:34:31 +01:00
|
|
|
|
|
|
|
<template v-slot:append>
|
2024-02-25 11:30:42 +01:00
|
|
|
<v-btn icon @click="toggleTheme">
|
|
|
|
<v-icon>{{ darkTheme ? 'mdi-white-balance-sunny' : 'mdi-moon-waning-crescent' }}</v-icon>
|
|
|
|
</v-btn>
|
2024-02-23 17:34:31 +01:00
|
|
|
</template>
|
|
|
|
</v-app-bar>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
2024-02-25 11:30:42 +01:00
|
|
|
import { ref } from 'vue'
|
2024-02-23 17:34:31 +01:00
|
|
|
import { useTheme } from 'vuetify'
|
2024-02-24 18:36:48 +01:00
|
|
|
import RouterMenu from '@/components/RouterMenu.vue'
|
2024-02-23 17:34:31 +01:00
|
|
|
|
|
|
|
const theme = useTheme()
|
2024-02-25 11:30:42 +01:00
|
|
|
const darkTheme = ref(true)
|
2024-02-23 17:34:31 +01:00
|
|
|
|
2024-02-25 11:30:42 +01:00
|
|
|
function toggleTheme() {
|
|
|
|
darkTheme.value = !darkTheme.value
|
2024-03-17 15:47:42 +01:00
|
|
|
theme.global.name.value = theme.global.current.value.dark ? 'CustomThemeLight' : 'CustomThemeDark'
|
2024-02-23 17:34:31 +01:00
|
|
|
}
|
2024-02-25 11:30:42 +01:00
|
|
|
|
2024-02-23 17:34:31 +01:00
|
|
|
</script>
|