renderer: add theme switcher, go to about page button in main screen

This commit is contained in:
leejooy96 committed 2022-07-12 09:24:25 +09:00
1 parent 72f2ef94a6
commit df3906c1cc
4 files changed
+62

No files matched your search

@@ -1,4 +1,22 @@
<script setup>
// import { useI18n } from 'vue-i18n'
import { useTheme } from 'vuetify'
import Utils from '../../assets/js/utils'
// const { locale } = useI18n()
const theme = useTheme()
const handleChangeTheme = () => {
theme.global.name.value = theme.global.current.value.dark ? 'light' : 'dark'
}
const handleChangeLanguage = () => {
// locale.value = 'en' // TODO
}
const handleAbout = async () => {
await Utils.openExternal('https://github.com/jooy2/vutron')
}
</script>
<template>
@@ -17,6 +35,34 @@
<v-col cols="12">
{{ $t('desc.welcome') }}
</v-col>
<v-col cols="4">
<v-btn
block
color="primary"
@click="handleChangeTheme"
>
{{ $t('menu.change-theme') }}
</v-btn>
</v-col>
<v-col cols="4">
<v-btn
block
disabled
color="primary"
@click="handleChangeLanguage"
>
{{ $t('menu.change-language') }}
</v-btn>
</v-col>
<v-col cols="4">
<v-btn
block
color="primary"
@click="handleAbout"
>
{{ $t('menu.about') }}
</v-btn>
</v-col>
</v-row>
</v-container>
</template>