renderer: use named import for util class
This commit is contained in:
1 parent
ce22d55026
commit
b8f0700e0d
3 files changed
+6
-4
No files matched your search
@@ -1,11 +1,11 @@
|
|||||||
import { createI18n } from 'vue-i18n'
|
import { createI18n } from 'vue-i18n'
|
||||||
import en from '@/renderer/locales/en.json'
|
import en from '@/renderer/locales/en.json'
|
||||||
import ko from '@/renderer/locales/ko.json'
|
import ko from '@/renderer/locales/ko.json'
|
||||||
import Utils from '@/renderer/utils'
|
import { getCurrentLocale } from '@/renderer/utils'
|
||||||
|
|
||||||
export default createI18n({
|
export default createI18n({
|
||||||
legacy: false,
|
legacy: false,
|
||||||
locale: Utils.getCurrentLocale(),
|
locale: getCurrentLocale(),
|
||||||
fallbackLocale: 'en',
|
fallbackLocale: 'en',
|
||||||
globalInjection: true,
|
globalInjection: true,
|
||||||
messages: {
|
messages: {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script setup lang="tsx">
|
<script setup lang="tsx">
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import { useTheme } from 'vuetify'
|
import { useTheme } from 'vuetify'
|
||||||
import Utils from '@/renderer/utils'
|
import { openExternal } from '@/renderer/utils'
|
||||||
import { useTempStore } from '@/renderer/store/temp'
|
import { useTempStore } from '@/renderer/store/temp'
|
||||||
import { storeToRefs } from 'pinia'
|
import { storeToRefs } from 'pinia'
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ const handleChangeLanguage = (): void => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleAbout = async (): Promise<void> => {
|
const handleAbout = async (): Promise<void> => {
|
||||||
await Utils.openExternal('https://github.com/jooy2/vutron')
|
await openExternal('https://github.com/jooy2/vutron')
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleCountIncrease = (): void => {
|
const handleCountIncrease = (): void => {
|
||||||
|
|||||||
@@ -9,3 +9,5 @@ export default class Utils {
|
|||||||
await shell.openExternal(url)
|
await shell.openExternal(url)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const { getCurrentLocale, openExternal } = Utils
|
||||||
Reference in new issue
Block a user