2020-01-21 15:51:51 +01:00
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<slot />
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2022-08-03 18:40:05 +02:00
|
|
|
import { getCurrentInstance } from 'vue'
|
2023-08-01 20:21:31 +02:00
|
|
|
import { useState } from '~/store'
|
2020-01-21 15:51:51 +01:00
|
|
|
|
|
|
|
|
export default {
|
2021-11-19 21:44:36 +01:00
|
|
|
name: 'ThemedLayout',
|
2022-08-03 18:40:05 +02:00
|
|
|
setup() {
|
|
|
|
|
const instance = getCurrentInstance()
|
2023-08-01 20:21:31 +02:00
|
|
|
const state = useState()
|
2022-08-03 18:40:05 +02:00
|
|
|
if (instance) {
|
2023-08-01 20:21:31 +02:00
|
|
|
instance.proxy.$vuetify.theme.dark = state.darkMode
|
2022-08-03 18:40:05 +02:00
|
|
|
}
|
2020-01-21 15:51:51 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|