pack: prettier now use space instead of tab

This commit is contained in:
leejooy96 committed 2022-11-13 11:21:33 +09:00
1 parent 2f55889ef8
commit ab7df03aa3
31 files changed
+705 -706

No files matched your search

+8 -8
View File
@@ -3,23 +3,23 @@ import { DefaultLayout } from '@/renderer/components/layout'
</script>
<template>
<DefaultLayout>
<router-view />
</DefaultLayout>
<DefaultLayout>
<router-view />
</DefaultLayout>
</template>
<style>
html {
overflow-y: auto !important;
user-select: none;
overflow-y: auto !important;
user-select: none;
}
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>
+25 -25
View File
@@ -6,41 +6,41 @@ const route = useRoute()
const titleKey: string = (route?.meta?.titleKey || 'title.main') as string
const handleRoute = (path: string): void => {
router.push(path)
router.push(path)
}
const isCurrentRoute = (path: string): boolean => {
return path === route.path
return path === route.path
}
</script>
<template>
<v-app-bar color="primary" density="compact">
<v-app-bar-title>{{ $t(titleKey) }}</v-app-bar-title>
<template #append>
<v-btn
prepend-icon="mdi-home"
variant="text"
:class="{ active: isCurrentRoute('/') }"
@click="handleRoute('/')"
>
{{ $t('title.main') }}
</v-btn>
<v-btn
prepend-icon="mdi-fit-to-screen-outline"
variant="text"
:class="{ active: isCurrentRoute('/second') }"
@click="handleRoute('/second')"
>
{{ $t('title.second') }}
</v-btn>
</template>
</v-app-bar>
<v-app-bar color="primary" density="compact">
<v-app-bar-title>{{ $t(titleKey) }}</v-app-bar-title>
<template #append>
<v-btn
prepend-icon="mdi-home"
variant="text"
:class="{ active: isCurrentRoute('/') }"
@click="handleRoute('/')"
>
{{ $t('title.main') }}
</v-btn>
<v-btn
prepend-icon="mdi-fit-to-screen-outline"
variant="text"
:class="{ active: isCurrentRoute('/second') }"
@click="handleRoute('/second')"
>
{{ $t('title.second') }}
</v-btn>
</template>
</v-app-bar>
</template>
<style scoped>
.v-btn {
opacity: 0.4;
opacity: 0.4;
}
.active {
opacity: 1 !important;
opacity: 1 !important;
}
</style>
+7 -7
View File
@@ -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>
+17 -17
View File
@@ -1,19 +1,19 @@
{
"desc": {
"welcome-title": "Hello Vutron! Everything is ready.",
"welcome-desc": "You can now write cross-platform web applications. See changes in real time and build to multiple platforms with one command. If you're not already familiar with it, you can get help from the documentation page below, or run some pre-written example code.",
"second-desc": "You have moved to the second screen! There is nothing here!"
},
"title": {
"main": "Main Screen",
"second": "Second Screen",
"error": "Unknown Error"
},
"menu": {
"change-theme": "Change Theme",
"change-language": "Change Language",
"increase-count": "Count 1 increment",
"documentation": "Documentation",
"github": "Source Code"
}
"desc": {
"welcome-title": "Hello Vutron! Everything is ready.",
"welcome-desc": "You can now write cross-platform web applications. See changes in real time and build to multiple platforms with one command. If you're not already familiar with it, you can get help from the documentation page below, or run some pre-written example code.",
"second-desc": "You have moved to the second screen! There is nothing here!"
},
"title": {
"main": "Main Screen",
"second": "Second Screen",
"error": "Unknown Error"
},
"menu": {
"change-theme": "Change Theme",
"change-language": "Change Language",
"increase-count": "Count 1 increment",
"documentation": "Documentation",
"github": "Source Code"
}
}
+17 -17
View File
@@ -1,19 +1,19 @@
{
"desc": {
"welcome-title": "안녕 Vutron! 모든 준비를 마쳤습니다.",
"welcome-desc": "이제 크로스플랫폼 웹 애플리케이션을 작성할 수 있습니다. 변경사항을 실시간으로 확인하고 한 번의 명령으로 여러 플랫폼으로 빌드하세요. 아직 익숙하지 않다면, 아래 문서 페이지에서 도움을 받아보거나 사전에 작성된 예제 코드를 실행해볼 수 있습니다.",
"second-desc": "두번째 화면으로 이동하였습니다! 여기는 아무 것도 없습니다!"
},
"title": {
"main": "메인 화면",
"second": "두번째 화면",
"error": "에러 발생"
},
"menu": {
"change-theme": "테마 변경",
"change-language": "언어 변경",
"increase-count": "카운트 1 증가",
"documentation": "문서",
"github": "소스코드"
}
"desc": {
"welcome-title": "안녕 Vutron! 모든 준비를 마쳤습니다.",
"welcome-desc": "이제 크로스플랫폼 웹 애플리케이션을 작성할 수 있습니다. 변경사항을 실시간으로 확인하고 한 번의 명령으로 여러 플랫폼으로 빌드하세요. 아직 익숙하지 않다면, 아래 문서 페이지에서 도움을 받아보거나 사전에 작성된 예제 코드를 실행해볼 수 있습니다.",
"second-desc": "두번째 화면으로 이동하였습니다! 여기는 아무 것도 없습니다!"
},
"title": {
"main": "메인 화면",
"second": "두번째 화면",
"error": "에러 발생"
},
"menu": {
"change-theme": "테마 변경",
"change-language": "언어 변경",
"increase-count": "카운트 1 증가",
"documentation": "문서",
"github": "소스코드"
}
}
+17 -17
View File
@@ -1,19 +1,19 @@
{
"desc": {
"welcome-title": "你好武特龙! 一切都准备好了。",
"welcome-desc": "您现在可以编写跨平台的 Web 应用程序。 实时查看更改并使用一个命令构建到多个平台。 如果您还不熟悉它,可以从下面的文档页面获得帮助,或者运行一些预先编写的示例代码。",
"second-desc": "您已移至第二个屏幕! 这里什么都没有!"
},
"title": {
"main": "主屏幕",
"second": "第二屏",
"error": "未知错误"
},
"menu": {
"change-theme": "改变主题",
"change-language": "改变语言",
"increase-count": "计数 1 个增量",
"documentation": "文档",
"github": "源代码"
}
"desc": {
"welcome-title": "你好武特龙! 一切都准备好了。",
"welcome-desc": "您现在可以编写跨平台的 Web 应用程序。 实时查看更改并使用一个命令构建到多个平台。 如果您还不熟悉它,可以从下面的文档页面获得帮助,或者运行一些预先编写的示例代码。",
"second-desc": "您已移至第二个屏幕! 这里什么都没有!"
},
"title": {
"main": "主屏幕",
"second": "第二屏",
"error": "未知错误"
},
"menu": {
"change-theme": "改变主题",
"change-language": "改变语言",
"increase-count": "计数 1 个增量",
"documentation": "文档",
"github": "源代码"
}
}
+17 -17
View File
@@ -1,19 +1,19 @@
{
"desc": {
"welcome-title": "你好武特龍! 一切都準備好了。",
"welcome-desc": "您現在可以編寫跨平台的 Web 應用程序。 實時查看更改並使用一個命令構建到多個平台。 如果您還不熟悉它,可以從下面的文檔頁面獲得幫助,或者運行一些預先編寫的示例代碼。",
"second-desc": "您已移至第二個屏幕! 這裡什麼都沒有!"
},
"title": {
"main": "主屏幕",
"second": "第二屏",
"error": "未知錯誤"
},
"menu": {
"change-theme": "改變主題",
"change-language": "改變語言",
"increase-count": "計數 1 個增量",
"documentation": "文檔",
"github": "源代碼"
}
"desc": {
"welcome-title": "你好武特龍! 一切都準備好了。",
"welcome-desc": "您現在可以編寫跨平台的 Web 應用程序。 實時查看更改並使用一個命令構建到多個平台。 如果您還不熟悉它,可以從下面的文檔頁面獲得幫助,或者運行一些預先編寫的示例代碼。",
"second-desc": "您已移至第二個屏幕! 這裡什麼都沒有!"
},
"title": {
"main": "主屏幕",
"second": "第二屏",
"error": "未知錯誤"
},
"menu": {
"change-theme": "改變主題",
"change-language": "改變語言",
"increase-count": "計數 1 個增量",
"documentation": "文檔",
"github": "源代碼"
}
}
+10 -10
View File
@@ -6,14 +6,14 @@ import zhHant from '@/renderer/locales/zh-hant.json'
import { getCurrentLocale } from '@/renderer/utils'
export default createI18n({
legacy: false,
locale: getCurrentLocale(),
fallbackLocale: 'en',
globalInjection: true,
messages: {
en,
ko,
zhHans,
zhHant
}
legacy: false,
locale: getCurrentLocale(),
fallbackLocale: 'en',
globalInjection: true,
messages: {
en,
ko,
zhHans,
zhHant
}
})
+28 -28
View File
@@ -7,32 +7,32 @@ import '@mdi/font/css/materialdesignicons.min.css'
import colors from 'vuetify/lib/util/colors.mjs'
export default createVuetify({
locale: {
messages: { ko, en, zhHans, zhHant },
locale: 'en',
fallback: '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, zhHans, zhHant },
locale: 'en',
fallback: '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
}
}
}
}
})
+28 -28
View File
@@ -2,32 +2,32 @@ import { createRouter, createWebHashHistory } from 'vue-router/dist/vue-router.e
import { MainScreen, ErrorScreen, SecondScreen } from '@/renderer/screens'
export default createRouter({
history: createWebHashHistory(),
routes: [
{
path: '/',
component: MainScreen,
meta: {
titleKey: 'title.main'
}
},
{
path: '/second',
component: SecondScreen,
meta: {
titleKey: 'title.second'
}
},
{
path: '/error',
component: ErrorScreen,
meta: {
titleKey: 'title.error'
}
},
{
path: '/:pathMatch(.*)*',
redirect: '/'
}
]
history: createWebHashHistory(),
routes: [
{
path: '/',
component: MainScreen,
meta: {
titleKey: 'title.main'
}
},
{
path: '/second',
component: SecondScreen,
meta: {
titleKey: 'title.second'
}
},
{
path: '/error',
component: ErrorScreen,
meta: {
titleKey: 'title.error'
}
},
{
path: '/:pathMatch(.*)*',
redirect: '/'
}
]
})
+1 -1
View File
@@ -1,5 +1,5 @@
<script setup lang="tsx"></script>
<template>
<div>Unknown error occurred</div>
<div>Unknown error occurred</div>
</template>
+68 -68
View File
@@ -15,88 +15,88 @@ const languages = ref(['en'])
languages.value = availableLocales
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 = (val): void => {
locale.value = val
locale.value = val
}
const handleDocument = async (): Promise<void> => {
await openExternal('https://vutron.jooy2.com')
await openExternal('https://vutron.jooy2.com')
}
const handleGitHub = 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 no-gutters align="center" class="text-center">
<v-col cols="12" md="5">
<img
alt="logo"
draggable="false"
class="ma-auto h-auto w-75"
src="/images/vutron-logo.webp"
/>
</v-col>
<v-col cols="12" md="7">
<h2 class="my-4">{{ $t('desc.welcome-title') }}</h2>
<p>{{ $t('desc.welcome-desc') }}</p>
<v-row class="my-4">
<v-col cols="3">
<v-btn icon color="primary" @click="handleChangeTheme">
<v-icon icon="mdi-brightness-6" />
<v-tooltip activator="parent" location="bottom">
{{ $t('menu.change-theme') }}
</v-tooltip>
</v-btn>
</v-col>
<v-col cols="3">
<v-badge color="blue" :content="counter">
<v-btn icon color="primary" @click="handleCountIncrease">
<v-icon icon="mdi-plus-circle" />
<v-tooltip activator="parent" location="bottom">
{{ $t('menu.increase-count') }}
</v-tooltip>
</v-btn>
</v-badge>
</v-col>
<v-col cols="3">
<v-btn icon color="primary" @click="handleDocument">
<v-icon icon="mdi-file-document" />
<v-tooltip activator="parent" location="bottom">
{{ $t('menu.documentation') }}
</v-tooltip>
</v-btn>
</v-col>
<v-col cols="3">
<v-btn icon color="primary" @click="handleGitHub">
<v-icon icon="mdi-github" />
<v-tooltip activator="parent" location="bottom">
{{ $t('menu.github') }}
</v-tooltip>
</v-btn>
</v-col>
<v-col cols="12">
<v-select
:model-value="locale"
density="compact"
:label="$t('menu.change-language')"
:items="languages"
@update:model-value="handleChangeLanguage"
>
{{ $t('menu.change-language') }}
</v-select>
</v-col>
</v-row>
</v-col>
</v-row>
</v-container>
<v-container>
<v-row no-gutters align="center" class="text-center">
<v-col cols="12" md="5">
<img
alt="logo"
draggable="false"
class="ma-auto h-auto w-75"
src="/images/vutron-logo.webp"
/>
</v-col>
<v-col cols="12" md="7">
<h2 class="my-4">{{ $t('desc.welcome-title') }}</h2>
<p>{{ $t('desc.welcome-desc') }}</p>
<v-row class="my-4">
<v-col cols="3">
<v-btn icon color="primary" @click="handleChangeTheme">
<v-icon icon="mdi-brightness-6" />
<v-tooltip activator="parent" location="bottom">
{{ $t('menu.change-theme') }}
</v-tooltip>
</v-btn>
</v-col>
<v-col cols="3">
<v-badge color="blue" :content="counter">
<v-btn icon color="primary" @click="handleCountIncrease">
<v-icon icon="mdi-plus-circle" />
<v-tooltip activator="parent" location="bottom">
{{ $t('menu.increase-count') }}
</v-tooltip>
</v-btn>
</v-badge>
</v-col>
<v-col cols="3">
<v-btn icon color="primary" @click="handleDocument">
<v-icon icon="mdi-file-document" />
<v-tooltip activator="parent" location="bottom">
{{ $t('menu.documentation') }}
</v-tooltip>
</v-btn>
</v-col>
<v-col cols="3">
<v-btn icon color="primary" @click="handleGitHub">
<v-icon icon="mdi-github" />
<v-tooltip activator="parent" location="bottom">
{{ $t('menu.github') }}
</v-tooltip>
</v-btn>
</v-col>
<v-col cols="12">
<v-select
:model-value="locale"
density="compact"
:label="$t('menu.change-language')"
:items="languages"
@update:model-value="handleChangeLanguage"
>
{{ $t('menu.change-language') }}
</v-select>
</v-col>
</v-row>
</v-col>
</v-row>
</v-container>
</template>
+8 -8
View File
@@ -1,12 +1,12 @@
<script setup lang="tsx"></script>
<template>
<v-container>
<v-row no-gutters align="center" class="text-center">
<v-col cols="12">
<v-icon icon="mdi-emoticon-cool-outline" size="250" color="#009f57" />
</v-col>
<v-col cols="12" class="my-4">{{ $t('desc.second-desc') }}</v-col>
</v-row>
</v-container>
<v-container>
<v-row no-gutters align="center" class="text-center">
<v-col cols="12">
<v-icon icon="mdi-emoticon-cool-outline" size="250" color="#009f57" />
</v-col>
<v-col cols="12" class="my-4">{{ $t('desc.second-desc') }}</v-col>
</v-row>
</v-container>
</template>
+11 -11
View File
@@ -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
}
}
})
+6 -6
View File
@@ -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