2023-02-06 04:34:02 +00:00
|
|
|
|
<script setup lang="ts">
|
2023-02-06 14:21:46 +00:00
|
|
|
|
import { useTheme } from 'vuetify'
|
|
|
|
|
import { useThemeConfig } from '@/plugins/vuetify/@core/composable/useThemeConfig'
|
|
|
|
|
import { hexToRgb } from '@/plugins/vuetify/@layouts/utils'
|
|
|
|
|
|
|
|
|
|
const { syncInitialLoaderTheme, syncVuetifyThemeWithTheme: syncConfigThemeWithVuetifyTheme, isAppRtl } = useThemeConfig()
|
|
|
|
|
|
|
|
|
|
const { global } = useTheme()
|
|
|
|
|
|
|
|
|
|
// ℹ️ Sync current theme with initial loader theme
|
|
|
|
|
syncInitialLoaderTheme()
|
|
|
|
|
syncConfigThemeWithVuetifyTheme()
|
2023-02-06 04:34:02 +00:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
2023-02-06 14:21:46 +00:00
|
|
|
|
<VLocaleProvider :rtl="isAppRtl">
|
|
|
|
|
<!-- ℹ️ This is required to set the background color of active nav link based on currently active global theme's primary -->
|
|
|
|
|
<VApp :style="`--v-global-theme-primary: ${hexToRgb(global.current.value.colors.primary)}`">
|
|
|
|
|
<RouterView />
|
|
|
|
|
</VApp>
|
|
|
|
|
</VLocaleProvider>
|
2023-02-06 04:34:02 +00:00
|
|
|
|
</template>
|