forked from cerc-io/cosmos-explorer
36 lines
982 B
Vue
36 lines
982 B
Vue
<script setup lang="ts">
|
||
import { useTheme } from 'vuetify';
|
||
import { useThemeConfig } from '@/plugins/vuetify/@core/composable/useThemeConfig';
|
||
import { hexToRgb } from '@/plugins/vuetify/@layouts/utils';
|
||
import { themeChange } from 'theme-change';
|
||
import { onMounted } from 'vue';
|
||
import TxDialog from './components/TxDialog.vue';
|
||
const {
|
||
syncInitialLoaderTheme,
|
||
syncVuetifyThemeWithTheme: syncConfigThemeWithVuetifyTheme,
|
||
isAppRtl,
|
||
} = useThemeConfig();
|
||
|
||
const { global } = useTheme();
|
||
|
||
// ℹ️ Sync current theme with initial loader theme
|
||
syncInitialLoaderTheme();
|
||
syncConfigThemeWithVuetifyTheme();
|
||
|
||
onMounted(() => {
|
||
themeChange(false);
|
||
});
|
||
</script>
|
||
|
||
<template>
|
||
<!-- ℹ️ 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 />
|
||
<TxDialog />
|
||
</VApp>
|
||
</template>
|