2023-04-20 12:01:38 +00:00
|
|
|
<!-- App -->
|
2023-11-07 09:37:33 +00:00
|
|
|
<script setup lang="ts">
|
|
|
|
import { defineAsyncComponent, onBeforeMount } from 'vue'
|
|
|
|
// Import notification and alert components
|
|
|
|
import Alert from '@/components/alert/Alert.vue'
|
|
|
|
import Info from '@/components/alert/Info.vue'
|
|
|
|
|
|
|
|
// Import human verification component
|
|
|
|
const Capture = defineAsyncComponent(
|
|
|
|
() => import('@/components/capture/Capture.vue')
|
|
|
|
)
|
|
|
|
|
|
|
|
import { useKUNGalgameSettingsStore } from '@/store/modules/settings'
|
|
|
|
import { storeToRefs } from 'pinia'
|
|
|
|
|
|
|
|
// Use the settings panel store
|
|
|
|
const { showKUNGalgameMode, showKUNGalgameFontStyle } = storeToRefs(
|
|
|
|
useKUNGalgameSettingsStore()
|
|
|
|
)
|
|
|
|
|
|
|
|
// Lifecycle functions must be called here to initialize the theme and font
|
|
|
|
onBeforeMount(() => {
|
|
|
|
const theme = showKUNGalgameMode.value
|
|
|
|
const font = showKUNGalgameFontStyle.value
|
|
|
|
|
|
|
|
// restore saved theme status
|
|
|
|
if (theme) {
|
|
|
|
document.documentElement.className = theme
|
|
|
|
}
|
|
|
|
// restore saved font settings
|
|
|
|
if (font) {
|
|
|
|
document.documentElement.style.fontFamily = font
|
|
|
|
}
|
|
|
|
})
|
|
|
|
</script>
|
2023-04-14 13:58:13 +00:00
|
|
|
|
|
|
|
<template>
|
2023-11-07 09:37:33 +00:00
|
|
|
<!-- Global alert component -->
|
|
|
|
<Alert />
|
|
|
|
|
|
|
|
<!-- Global info component -->
|
|
|
|
<Info />
|
|
|
|
|
|
|
|
<!-- Global capture component -->
|
|
|
|
<Capture />
|
|
|
|
|
2023-05-02 09:44:23 +00:00
|
|
|
<RouterView />
|
2023-04-14 13:58:13 +00:00
|
|
|
</template>
|
|
|
|
|
2023-10-19 17:45:29 +00:00
|
|
|
<style lang="scss" scoped></style>
|