pack: add .editorconfig and use tab instead of space
This commit is contained in:
1 parent
be3638b9d3
commit
be7a8ac3ea
27 files changed
+571
-560
No files matched your search
@@ -3,22 +3,22 @@ import { DefaultLayout } from '@/renderer/components/layout'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<DefaultLayout>
|
||||
<router-view />
|
||||
</DefaultLayout>
|
||||
<DefaultLayout>
|
||||
<router-view />
|
||||
</DefaultLayout>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
html {
|
||||
overflow-y: auto !important;
|
||||
overflow-y: auto !important;
|
||||
}
|
||||
html,
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
/* Do not force capitalization of button text */
|
||||
.v-btn {
|
||||
text-transform: unset !important;
|
||||
text-transform: unset !important;
|
||||
}
|
||||
</style>
|
||||
@@ -3,12 +3,12 @@ import HeaderLayout from '@/renderer/components/layout/HeaderLayout.vue'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<v-app>
|
||||
<v-layout>
|
||||
<HeaderLayout />
|
||||
<v-main>
|
||||
<slot />
|
||||
</v-main>
|
||||
</v-layout>
|
||||
</v-app>
|
||||
<v-app>
|
||||
<v-layout>
|
||||
<HeaderLayout />
|
||||
<v-main>
|
||||
<slot />
|
||||
</v-main>
|
||||
</v-layout>
|
||||
</v-app>
|
||||
</template>
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<v-app-bar color="primary" density="compact">
|
||||
<v-app-bar-title>{{ $route.meta.title }}</v-app-bar-title>
|
||||
</v-app-bar>
|
||||
<v-app-bar color="primary" density="compact">
|
||||
<v-app-bar-title>{{ $route.meta.title }}</v-app-bar-title>
|
||||
</v-app-bar>
|
||||
</template>
|
||||
@@ -1,10 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
<script type="module" src="./main.ts"></script>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
<script type="module" src="./main.ts"></script>
|
||||
</html>
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"desc": {
|
||||
"welcome": "Thank you for using Vutron. This cool template makes it easy to create a variety of cross-platform applications."
|
||||
},
|
||||
"menu": {
|
||||
"change-theme": "Change Theme",
|
||||
"change-language": "Change Language",
|
||||
"about": "About Vutron"
|
||||
}
|
||||
"desc": {
|
||||
"welcome": "Thank you for using Vutron. This cool template makes it easy to create a variety of cross-platform applications."
|
||||
},
|
||||
"menu": {
|
||||
"change-theme": "Change Theme",
|
||||
"change-language": "Change Language",
|
||||
"about": "About Vutron"
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"desc": {
|
||||
"welcome": "Vutron을 이용해주셔서 감사드립니다. 이 멋진 템플릿을 활용하면 다양한 크로스플랫폼 애플리케이션을 손쉽게 제작할 수 있습니다."
|
||||
},
|
||||
"menu": {
|
||||
"change-theme": "테마 변경",
|
||||
"change-language": "언어 변경",
|
||||
"about": "Vutron 정보"
|
||||
}
|
||||
"desc": {
|
||||
"welcome": "Vutron을 이용해주셔서 감사드립니다. 이 멋진 템플릿을 활용하면 다양한 크로스플랫폼 애플리케이션을 손쉽게 제작할 수 있습니다."
|
||||
},
|
||||
"menu": {
|
||||
"change-theme": "테마 변경",
|
||||
"change-language": "언어 변경",
|
||||
"about": "Vutron 정보"
|
||||
}
|
||||
}
|
||||
@@ -4,12 +4,12 @@ import ko from '@/renderer/locales/ko.json'
|
||||
import { getCurrentLocale } from '@/renderer/utils'
|
||||
|
||||
export default createI18n({
|
||||
legacy: false,
|
||||
locale: getCurrentLocale(),
|
||||
fallbackLocale: 'en',
|
||||
globalInjection: true,
|
||||
messages: {
|
||||
en,
|
||||
ko
|
||||
}
|
||||
legacy: false,
|
||||
locale: getCurrentLocale(),
|
||||
fallbackLocale: 'en',
|
||||
globalInjection: true,
|
||||
messages: {
|
||||
en,
|
||||
ko
|
||||
}
|
||||
})
|
||||
@@ -5,32 +5,32 @@ import { aliases, mdi } from 'vuetify/iconsets/mdi'
|
||||
import colors from 'vuetify/lib/util/colors.mjs'
|
||||
|
||||
export default createVuetify({
|
||||
locale: {
|
||||
messages: { ko, en },
|
||||
defaultLocale: 'en',
|
||||
fallbackLocale: 'en'
|
||||
},
|
||||
icons: {
|
||||
defaultSet: 'mdi',
|
||||
aliases,
|
||||
sets: {
|
||||
mdi
|
||||
}
|
||||
},
|
||||
theme: {
|
||||
themes: {
|
||||
light: {
|
||||
dark: false,
|
||||
colors: {
|
||||
primary: colors.green.darken2
|
||||
}
|
||||
},
|
||||
dark: {
|
||||
dark: true,
|
||||
colors: {
|
||||
primary: colors.green.darken4
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
locale: {
|
||||
messages: { ko, en },
|
||||
defaultLocale: 'en',
|
||||
fallbackLocale: 'en'
|
||||
},
|
||||
icons: {
|
||||
defaultSet: 'mdi',
|
||||
aliases,
|
||||
sets: {
|
||||
mdi
|
||||
}
|
||||
},
|
||||
theme: {
|
||||
themes: {
|
||||
light: {
|
||||
dark: false,
|
||||
colors: {
|
||||
primary: colors.green.darken2
|
||||
}
|
||||
},
|
||||
dark: {
|
||||
dark: true,
|
||||
colors: {
|
||||
primary: colors.green.darken4
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -2,25 +2,25 @@ import { createRouter, createWebHashHistory } from 'vue-router/dist/vue-router.e
|
||||
import { MainScreen, ErrorScreen } from '@/renderer/screens'
|
||||
|
||||
export default createRouter({
|
||||
history: createWebHashHistory(),
|
||||
routes: [
|
||||
{
|
||||
path: '/',
|
||||
component: MainScreen,
|
||||
meta: {
|
||||
title: 'Main'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/error',
|
||||
component: ErrorScreen,
|
||||
meta: {
|
||||
title: 'Unknown error occurred'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/:pathMatch(.*)*',
|
||||
redirect: '/'
|
||||
}
|
||||
]
|
||||
history: createWebHashHistory(),
|
||||
routes: [
|
||||
{
|
||||
path: '/',
|
||||
component: MainScreen,
|
||||
meta: {
|
||||
title: 'Main'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/error',
|
||||
component: ErrorScreen,
|
||||
meta: {
|
||||
title: 'Unknown error occurred'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/:pathMatch(.*)*',
|
||||
redirect: '/'
|
||||
}
|
||||
]
|
||||
})
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="tsx"></script>
|
||||
|
||||
<template>
|
||||
<div>Unknown error occurred</div>
|
||||
<div>Unknown error occurred</div>
|
||||
</template>
|
||||
@@ -11,54 +11,54 @@ const { counterIncrease } = useTempStore()
|
||||
const { counter } = storeToRefs(useTempStore())
|
||||
|
||||
const handleChangeTheme = (): void => {
|
||||
theme.global.name.value = theme.global.current.value.dark ? 'light' : 'dark'
|
||||
theme.global.name.value = theme.global.current.value.dark ? 'light' : 'dark'
|
||||
}
|
||||
|
||||
const handleChangeLanguage = (): void => {
|
||||
if (locale.value === 'en') {
|
||||
locale.value = 'ko'
|
||||
} else {
|
||||
locale.value = 'en'
|
||||
}
|
||||
if (locale.value === 'en') {
|
||||
locale.value = 'ko'
|
||||
} else {
|
||||
locale.value = 'en'
|
||||
}
|
||||
}
|
||||
|
||||
const handleAbout = async (): Promise<void> => {
|
||||
await openExternal('https://github.com/jooy2/vutron')
|
||||
await openExternal('https://github.com/jooy2/vutron')
|
||||
}
|
||||
|
||||
const handleCountIncrease = (): void => {
|
||||
counterIncrease(1)
|
||||
counterIncrease(1)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<v-container>
|
||||
<v-row align="center" class="text-center">
|
||||
<v-col cols="12">
|
||||
<img alt="logo" class="ma-auto h-auto w-75" src="/images/vutron-logo.webp" />
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
{{ $t('desc.welcome') }}
|
||||
</v-col>
|
||||
<v-col cols="12"> Counter: {{ counter }} </v-col>
|
||||
<v-col cols="3">
|
||||
<v-btn block color="primary" @click="handleChangeTheme">
|
||||
{{ $t('menu.change-theme') }}
|
||||
</v-btn>
|
||||
</v-col>
|
||||
<v-col cols="3">
|
||||
<v-btn block color="primary" @click="handleChangeLanguage">
|
||||
{{ $t('menu.change-language') }}
|
||||
</v-btn>
|
||||
</v-col>
|
||||
<v-col cols="3">
|
||||
<v-btn block color="primary" @click="handleAbout">
|
||||
{{ $t('menu.about') }}
|
||||
</v-btn>
|
||||
</v-col>
|
||||
<v-col cols="3">
|
||||
<v-btn block color="primary" @click="handleCountIncrease">Count + 1</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
<v-container>
|
||||
<v-row align="center" class="text-center">
|
||||
<v-col cols="12">
|
||||
<img alt="logo" class="ma-auto h-auto w-75" src="/images/vutron-logo.webp" />
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
{{ $t('desc.welcome') }}
|
||||
</v-col>
|
||||
<v-col cols="12"> Counter: {{ counter }} </v-col>
|
||||
<v-col cols="3">
|
||||
<v-btn block color="primary" @click="handleChangeTheme">
|
||||
{{ $t('menu.change-theme') }}
|
||||
</v-btn>
|
||||
</v-col>
|
||||
<v-col cols="3">
|
||||
<v-btn block color="primary" @click="handleChangeLanguage">
|
||||
{{ $t('menu.change-language') }}
|
||||
</v-btn>
|
||||
</v-col>
|
||||
<v-col cols="3">
|
||||
<v-btn block color="primary" @click="handleAbout">
|
||||
{{ $t('menu.about') }}
|
||||
</v-btn>
|
||||
</v-col>
|
||||
<v-col cols="3">
|
||||
<v-btn block color="primary" @click="handleCountIncrease">Count + 1</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</template>
|
||||
+11
-11
@@ -1,15 +1,15 @@
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
export const useTempStore = defineStore('temp', {
|
||||
state: () => ({
|
||||
counter: 0
|
||||
}),
|
||||
getters: {
|
||||
getCounter: (state): number => state.counter
|
||||
},
|
||||
actions: {
|
||||
counterIncrease(amount: number) {
|
||||
this.counter += amount
|
||||
}
|
||||
}
|
||||
state: () => ({
|
||||
counter: 0
|
||||
}),
|
||||
getters: {
|
||||
getCounter: (state): number => state.counter
|
||||
},
|
||||
actions: {
|
||||
counterIncrease(amount: number) {
|
||||
this.counter += amount
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -1,13 +1,13 @@
|
||||
import { shell } from 'electron'
|
||||
|
||||
export default class Utils {
|
||||
static getCurrentLocale(): string {
|
||||
return navigator?.language?.split('-')[0] || 'en'
|
||||
}
|
||||
static getCurrentLocale(): string {
|
||||
return navigator?.language?.split('-')[0] || 'en'
|
||||
}
|
||||
|
||||
static async openExternal(url: string): Promise<void> {
|
||||
await shell.openExternal(url)
|
||||
}
|
||||
static async openExternal(url: string): Promise<void> {
|
||||
await shell.openExternal(url)
|
||||
}
|
||||
}
|
||||
|
||||
export const { getCurrentLocale, openExternal } = Utils
|
||||
Reference in new issue
Block a user