Skip to content

Commit 45177e9

Browse files
authored
Merge branch 'development' into translations_src-assets-locales-ja-json--development_zh_TW
2 parents ce67fdf + 44c06f7 commit 45177e9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+5055
-5519
lines changed

.eslintrc.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,20 @@ module.exports = {
55
'@nuxtjs/eslint-config-typescript',
66
'plugin:prettier/recommended',
77
'prettier',
8-
'prettier/vue',
98
],
109
rules: {
1110
'require-await': 'off',
1211
'nuxt/no-cjs-in-config': 'off',
1312
'vue/max-attributes-per-line': 'off',
13+
'vue/experimental-script-setup-vars': 'off',
14+
'vue/no-arrow-functions-in-watch': 'off',
15+
'vue/no-custom-modifiers-on-v-model': 'off',
16+
'vue/no-dupe-v-else-if': 'off',
17+
'vue/no-multiple-template-root': 'off',
18+
'vue/no-mutating-props': 'off',
19+
'vue/no-v-for-template-key': 'off',
20+
'vue/no-v-model-argument': 'off',
21+
'vue/one-component-per-file': 'off',
1422
'vue/html-self-closing': [
1523
'error',
1624
{

.github/dependabot.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: npm
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "20:00"
8+
open-pull-requests-limit: 10
9+
ignore:
10+
- dependency-name: "@types/node"
11+
versions:
12+
- 14.14.22
13+
- 14.14.25
14+
- 14.14.27
15+
- 14.14.28
16+
- 14.14.31
17+
- 14.14.32
18+
- 14.14.33
19+
- 14.14.34
20+
- 14.14.35
21+
- 14.14.36
22+
- 14.14.37
23+
- 14.14.39
24+
- 14.14.41
25+
- 15.0.0
26+
- dependency-name: "@babel/core"
27+
versions:
28+
- 7.12.10
29+
- 7.12.13
30+
- 7.12.16
31+
- 7.12.17
32+
- 7.13.1
33+
- 7.13.10
34+
- 7.13.14
35+
- 7.13.15
36+
- 7.13.16
37+
- 7.13.8
38+
- dependency-name: eslint-config-prettier
39+
versions:
40+
- 7.2.0
41+
- 8.0.0
42+
- 8.1.0
43+
- 8.2.0
44+
- dependency-name: nuxt-i18n
45+
versions:
46+
- 6.18.0
47+
- 6.19.0
48+
- 6.20.0
49+
- 6.20.1
50+
- 6.20.2
51+
- 6.20.3
52+
- 6.20.4
53+
- 6.20.6
54+
- 6.21.0
55+
- 6.21.1
56+
- 6.22.1
57+
- 6.22.2
58+
- 6.22.3
59+
- 6.23.0
60+
- 6.24.0
61+
- 6.25.0
62+
- dependency-name: y18n
63+
versions:
64+
- 4.0.1
65+
- dependency-name: "@types/jest"
66+
versions:
67+
- 26.0.20
68+
- 26.0.21
69+
- 26.0.22
70+
- dependency-name: node-notifier
71+
versions:
72+
- 8.0.1
73+
- dependency-name: lint-staged
74+
versions:
75+
- 10.5.3

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn lint-staged

nuxt-i18n.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,19 @@ const options = {
1515
code: 'ja',
1616
displayName: '日本語',
1717
file: 'ja.json',
18+
format: 'ja',
1819
},
1920
{
2021
code: 'en',
2122
displayName: 'English',
2223
file: 'en.json',
24+
format: 'en',
2325
},
2426
{
2527
code: 'zh-goyu',
2628
displayName: '台灣華語',
2729
file: 'zh_TW.json',
30+
format: 'zh-tw',
2831
},
2932
],
3033
}

nuxt.config.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import Sass from 'sass'
2+
import Fiber from 'fibers'
13
import i18nConfig from './nuxt-i18n.config.js'
24
const environment = process.env.NODE_ENV || 'development'
35

@@ -122,7 +124,14 @@ export default {
122124
'nuxt-svg-loader',
123125
['nuxt-i18n', i18nConfig],
124126
['@nuxtjs/google-analytics', { id: process.env.GAID }],
127+
'@nuxtjs/dayjs',
125128
],
129+
dayjs: {
130+
locales: ['ja', 'en', 'zh-tw'],
131+
defaultLocale: 'ja',
132+
defaultTimeZone: 'Asia/Tokyo',
133+
plugins: ['utc', 'timezone', 'minMax', 'isToday', 'localizedFormat'],
134+
},
126135
/*
127136
** Axios module configuration
128137
** See https://axios.nuxtjs.org/options
@@ -152,6 +161,14 @@ export default {
152161
*/
153162
build: {
154163
publicPath: '/assets/',
164+
loaders: {
165+
scss: {
166+
implementation: Sass,
167+
sassOptions: {
168+
fiber: Fiber,
169+
},
170+
},
171+
},
155172
babel: {
156173
presets({ isServer }) {
157174
return [

package.json

Lines changed: 54 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
{
2-
"name": "StudyAtHome",
2+
"name": "study-at-home",
33
"version": "1.0.0",
44
"description": "Ouchi De Jikanwari Web Version",
55
"author": "Nekoya3",
66
"private": true,
77
"scripts": {
8-
"dev": "cross-env NODE_ENV=development nuxt-ts",
9-
"build": "nuxt-ts build",
8+
"dev": "cross-env NODE_ENV=development nuxt",
9+
"build": "nuxt build",
1010
"test:unit": "jest --config jest.config.js",
11-
"start": "nuxt-ts start",
12-
"generate": "nuxt-ts generate",
13-
"lint": "eslint --ext .js,.vue,.ts --ignore-path .eslintignore ."
11+
"start": "nuxt start",
12+
"generate": "nuxt generate",
13+
"lint": "eslint --ext .js,.vue,.ts --ignore-path .eslintignore .",
14+
"prepare": "husky install"
1415
},
1516
"lint-staged": {
1617
"*.{js,ts,css,vue}": [
@@ -24,68 +25,71 @@
2425
}
2526
},
2627
"dependencies": {
27-
"@aws-amplify/api": "^3.2.7",
28-
"@babel/core": "^7.12.1",
29-
"@babel/runtime-corejs3": "^7.12.1",
30-
"@nuxt/typescript-runtime": "^2.0.0",
31-
"@nuxtjs/axios": "^5.12.2",
28+
"@aws-amplify/api": "^4.0.0",
29+
"@babel/core": "^7.14.3",
30+
"@babel/runtime-corejs3": "^7.14.0",
31+
"@nuxtjs/axios": "^5.13.4",
32+
"@nuxtjs/dayjs": "^1.4.0",
3233
"@nuxtjs/dotenv": "^1.4.1",
3334
"@nuxtjs/google-analytics": "^2.4.0",
34-
"@nuxtjs/pwa": "^3.2.2",
35+
"@nuxtjs/pwa": "^3.3.5",
3536
"@nuxtjs/style-resources": "^1.0.0",
36-
"@types/node": "^14.11.8",
37-
"aws-amplify": "^3.3.4",
38-
"core-js": "^3.6.5",
39-
"cross-env": "^7.0.2",
40-
"date-fns": "^2.16.1",
41-
"dayjs": "^1.9.3",
37+
"@types/node": "^15.3.0",
38+
"aws-amplify": "^4.0.2",
39+
"core-js": "^3.12.1",
40+
"cross-env": "^7.0.3",
4241
"express": "^4.17.1",
43-
"nuxt": "^2.14.7",
44-
"nuxt-i18n": "^6.15.3",
45-
"nuxt-property-decorator": "^2.8.8",
42+
"nuxt": "^2.15.6",
43+
"nuxt-i18n": "^6.27.0",
44+
"nuxt-property-decorator": "^2.9.1",
4645
"nuxt-svg-loader": "^1.2.0",
4746
"nuxt-webfontloader": "^1.1.0",
48-
"uuid": "^8.3.1",
49-
"vue-property-decorator": "^9.0.2",
50-
"vuetify": "^2.3.14",
51-
"vuex": "^3.5.1",
47+
"uuid": "^8.3.2",
48+
"vue-property-decorator": "^9.1.2",
49+
"vuetify": "^2.5.0",
50+
"vuex": "^3.6.2",
5251
"vuex-class-component": "^2.3.5"
5352
},
5453
"devDependencies": {
55-
"@mdi/font": "^5.7.55",
56-
"@nuxt/types": "^2.14.7",
57-
"@nuxt/typescript-build": "^2.0.3",
58-
"@nuxtjs/eslint-config-typescript": "^3.0.0",
54+
"@mdi/font": "^5.9.55",
55+
"@nuxt/types": "^2.15.6",
56+
"@nuxt/typescript-build": "^2.1.0",
57+
"@nuxtjs/eslint-config-typescript": "^6.0.0",
5958
"@nuxtjs/stylelint-module": "^4.0.0",
60-
"@types/jest": "^26.0.14",
61-
"@vue/test-utils": "^1.1.0",
59+
"@types/jest": "^26.0.23",
60+
"@vue/test-utils": "^1.2.0",
6261
"babel-core": "^6.26.3",
6362
"babel-eslint": "^10.1.0",
64-
"babel-jest": "^26.5.2",
63+
"babel-jest": "^26.6.3",
64+
"consola": "^2.15.3",
6565
"cpx": "^1.5.0",
66-
"eslint": "^7.11.0",
67-
"eslint-config-prettier": "^6.12.0",
66+
"eslint": "^7.26.0",
67+
"eslint-config-prettier": "^8.3.0",
6868
"eslint-loader": "^4.0.2",
69-
"eslint-plugin-nuxt": "^1.0.0",
70-
"eslint-plugin-prettier": "^3.1.4",
71-
"eslint-plugin-tsdoc": "^0.2.7",
72-
"husky": "^4.3.0",
73-
"jest": "^26.5.3",
74-
"lint-staged": "^10.4.0",
75-
"node-sass": "^4.14.1",
76-
"nodemon": "^2.0.5",
77-
"prettier": "^2.1.2",
69+
"eslint-plugin-nuxt": "^2.0.0",
70+
"eslint-plugin-prettier": "^3.4.0",
71+
"eslint-plugin-tsdoc": "^0.2.14",
72+
"fibers": "^5.0.0",
73+
"husky": "^6.0.0",
74+
"jest": "^26.6.3",
75+
"lint-staged": "^11.0.0",
76+
"nodemon": "^2.0.7",
77+
"prettier": "^2.3.0",
7878
"rimraf": "^3.0.2",
79-
"sass-loader": "^10.0.3",
80-
"stylelint": "^13.7.2",
79+
"sass": "^1.32.13",
80+
"sass-loader": "10.1.1",
81+
"stylelint": "^13.13.1",
8182
"stylelint-config-prettier": "^8.0.2",
82-
"stylelint-config-standard": "^20.0.0",
83-
"stylelint-scss": "^3.18.0",
84-
"ts-jest": "^26.4.1",
85-
"ts-loader": "^8.0.5",
83+
"stylelint-config-standard": "^22.0.0",
84+
"stylelint-scss": "^3.19.0",
85+
"ts-jest": "^26.5.6",
86+
"ts-loader": "^8.2.0",
87+
"typescript": "4.0.5",
8688
"vue": "^2.6.12",
89+
"vue-class-component": "^7.2.6",
8790
"vue-jest": "^3.0.7",
8891
"vue-server-renderer": "^2.6.12",
89-
"vue-template-compiler": "^2.6.12"
92+
"vue-template-compiler": "^2.6.12",
93+
"webpack": "4.46.0"
9094
}
9195
}

src/components/AppLanguageSelector.vue

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,29 @@
1515
<script lang="ts">
1616
import Vue from 'vue'
1717
18-
type LocaleListItem = { text: string; value: string }
18+
type LocaleListItem = { text: string; value: string; format: string }
1919
type LocalData = {
2020
locales: LocaleListItem[]
2121
}
2222
2323
export default Vue.extend({
2424
data(): LocalData {
2525
if (!this.$root.$i18n.locales)
26-
return { locales: [{ text: 'N/A', value: '' }] }
26+
return { locales: [{ text: 'N/A', value: '', format: '' }] }
2727
2828
return {
29+
// @ts-ignore
2930
locales: this.$root.$i18n.locales.map((l) => {
30-
if (typeof l === 'string') return { text: l, value: l }
31-
else return { text: l.displayName, value: l.code }
31+
if (typeof l === 'string') return { text: l, value: l, format: l }
32+
else return { text: l.displayName, value: l.code, format: l.format }
3233
}),
3334
}
3435
},
36+
watch: {
37+
'$root.$i18n.locale'(locale) {
38+
this.$dayjs.locale(this.locales?.find((v) => v.value === locale)?.format)
39+
},
40+
},
3541
})
3642
</script>
3743

src/components/BaseInputField.vue

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@
1414
outlined
1515
@input="$emit('input', $event)"
1616
>
17-
<template v-slot:prepend-inner>
18-
<v-icon :color="prependIconColor">{{ prependIcon }}</v-icon>
17+
<template #prepend-inner>
18+
<v-icon :color="prependIconColor">
19+
{{ prependIcon }}
20+
</v-icon>
1921
</template>
20-
<template v-slot:append>
22+
<template #append>
2123
<v-icon
2224
color="blue"
2325
@click="show = !show"
@@ -40,8 +42,10 @@
4042
outlined
4143
@input="$emit('input', $event)"
4244
>
43-
<template v-slot:prepend-inner>
44-
<v-icon :color="prependIconColor">{{ prependIcon }}</v-icon>
45+
<template #prepend-inner>
46+
<v-icon :color="prependIconColor">
47+
{{ prependIcon }}
48+
</v-icon>
4549
</template>
4650
</v-text-field>
4751
<v-text-field
@@ -59,8 +63,10 @@
5963
outlined
6064
@input="$emit('input', $event)"
6165
>
62-
<template v-slot:prepend-inner>
63-
<v-icon :color="prependIconColor">{{ prependIcon }}</v-icon>
66+
<template #prepend-inner>
67+
<v-icon :color="prependIconColor">
68+
{{ prependIcon }}
69+
</v-icon>
6470
</template>
6571
</v-text-field>
6672
<v-text-field
@@ -78,8 +84,10 @@
7884
outlined
7985
@input="$emit('input', $event)"
8086
>
81-
<template v-slot:prepend-inner>
82-
<v-icon :color="prependIconColor">{{ prependIcon }}</v-icon>
87+
<template #prepend-inner>
88+
<v-icon :color="prependIconColor">
89+
{{ prependIcon }}
90+
</v-icon>
8391
</template>
8492
</v-text-field>
8593
</template>

0 commit comments

Comments
 (0)