2024-02-23 17:34:31 +01:00
|
|
|
<template>
|
|
|
|
<v-app-bar :elevation="12">
|
|
|
|
<!-- TODO: Ici je voudrai ouvrir un menu en cliquant sur le v-app-bar-nav-icon -->
|
2024-02-24 18:07:42 +01:00
|
|
|
<v-app-bar-nav-icon v-on:click="menu = !menu"></v-app-bar-nav-icon>
|
|
|
|
<v-menu v-model="menu">
|
2024-02-23 17:34:31 +01:00
|
|
|
<v-list>
|
|
|
|
<v-list-item>Item 1</v-list-item>
|
|
|
|
<v-list-item>Item 2</v-list-item>
|
|
|
|
</v-list>
|
|
|
|
</v-menu>
|
|
|
|
|
|
|
|
<v-app-bar-title>Brain Blast</v-app-bar-title>
|
|
|
|
|
|
|
|
<template v-slot:append>
|
|
|
|
<v-btn @click="toggleTheme" icon="mdi-theme-light-dark"></v-btn>
|
|
|
|
</template>
|
|
|
|
</v-app-bar>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
2024-02-24 18:07:42 +01:00
|
|
|
import { ref } from 'vue'
|
2024-02-23 17:34:31 +01:00
|
|
|
import { useTheme } from 'vuetify'
|
|
|
|
|
|
|
|
const theme = useTheme()
|
2024-02-24 18:07:42 +01:00
|
|
|
let menu = ref(false)
|
2024-02-23 17:34:31 +01:00
|
|
|
|
|
|
|
function toggleTheme () {
|
|
|
|
theme.global.name.value = theme.global.current.value.dark ? 'light' : 'dark'
|
|
|
|
}
|
2024-02-24 18:07:42 +01:00
|
|
|
|
2024-02-23 17:34:31 +01:00
|
|
|
</script>
|