Skip to content

Commit

Permalink
Merge pull request #622 from codeforjapan/development
Browse files Browse the repository at this point in the history
Release 1.1.1
  • Loading branch information
NEKOYASAN authored May 21, 2021
2 parents c9c124c + 62b6e26 commit bbc08e1
Show file tree
Hide file tree
Showing 27 changed files with 58 additions and 56 deletions.
4 changes: 2 additions & 2 deletions nuxt-i18n.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const defaultLocale = 'ja'

const options = {
strategy: 'no_prefix',
strategy: 'prefix_except_default',
detectBrowserLanguage: false,
defaultLocale,
vueI18n: {
Expand All @@ -24,7 +24,7 @@ const options = {
format: 'en',
},
{
code: 'zh-goyu',
code: 'zh-tw',
displayName: '台灣華語',
file: 'zh_TW.json',
format: 'zh-tw',
Expand Down
2 changes: 1 addition & 1 deletion src/components/EditLessonScreenInner1.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<v-color-picker
v-if="colorPickerOpen"
v-model="tempFormData.subjectColor"
disabled
hide-sliders
hide-canvas
hide-inputs
hide-mode-switch
Expand Down
2 changes: 1 addition & 1 deletion src/components/LessonSummaryCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export default Vue.extend({
methods: {
toLessonDetail() {
const lesson = this.lesson as LessonWithId
this.$router.push('/lesson/?lessonId=' + lesson.id)
this.$router.push(this.localePath('/lesson/?lessonId=' + lesson.id))
},
},
})
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/background.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="loader">Loading</div>
</v-overlay>
<v-app-bar fixed app class="bar" elevation="0">
<header-logo-zhtw v-if="$root.$i18n.locale === 'zh-goyu'" />
<header-logo-zhtw v-if="$root.$i18n.locale === 'zh-tw'" />
<header-logo v-else />
<AppLanguageSelector />
</v-app-bar>
Expand Down
4 changes: 2 additions & 2 deletions src/layouts/classes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<div class="loader">Loading</div>
</v-overlay>
<v-app-bar fixed app class="bar" elevation="0" extension-height="83">
<header-logo-zhtw v-if="$root.$i18n.locale === 'zh-goyu'" />
<header-logo-zhtw v-if="$root.$i18n.locale === 'zh-tw'" />
<header-logo v-else />
<AppLanguageSelector />
<v-spacer />
Expand Down Expand Up @@ -153,7 +153,7 @@ export default Vue.extend({
async clickLogout() {
await vxm.user.logout()
await vxm.app.resetDate()
await this.$router.push('/')
await this.$router.push(this.localePath('/'))
},
},
})
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="loader">Loading</div>
</v-overlay>
<v-app-bar fixed app class="bar" elevation="0">
<header-logo-zhtw v-if="$root.$i18n.locale === 'zh-goyu'" />
<header-logo-zhtw v-if="$root.$i18n.locale === 'zh-tw'" />
<header-logo v-else />
<AppLanguageSelector />
</v-app-bar>
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/error.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<h1 v-else>
{{ otherError }}
</h1>
<NuxtLink to="/">Home page</NuxtLink>
<NuxtLink :to="localePath('/')">Home page</NuxtLink>
</v-app>
</template>

Expand Down
2 changes: 1 addition & 1 deletion src/layouts/lesson.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="loader">Loading</div>
</v-overlay>
<v-app-bar fixed app class="bar" elevation="0">
<header-logo-zhtw v-if="$root.$i18n.locale === 'zh-goyu'" />
<header-logo-zhtw v-if="$root.$i18n.locale === 'zh-tw'" />
<header-logo v-else />
<AppLanguageSelector />
<v-spacer />
Expand Down
6 changes: 3 additions & 3 deletions src/layouts/protected.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
),
action: () => {
unloadClassData()
$router.push('/user/classlist')
$router.push(localePath('/user/classlist'))
return false
},
},
Expand All @@ -57,7 +57,7 @@
<div class="loader">Loading</div>
</v-overlay>
<v-app-bar fixed app class="bar" elevation="0" extension-height="83">
<header-logo-zhtw v-if="$root.$i18n.locale === 'zh-goyu'" />
<header-logo-zhtw v-if="$root.$i18n.locale === 'zh-tw'" />
<header-logo v-else />
<AppLanguageSelector />
<v-spacer />
Expand All @@ -78,7 +78,7 @@
outlined
rounded
color="#0071C2"
@click="$router.push('/user/editUserData')"
@click="$router.push(localePath('/user/editUserData'))"
>
<v-icon>mdi-cog</v-icon>
</v-btn>
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/simple.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="loader">Loading</div>
</v-overlay>
<v-app-bar fixed app class="bar" elevation="0">
<header-logo-zhtw v-if="$root.$i18n.locale === 'zh-goyu'" />
<header-logo-zhtw v-if="$root.$i18n.locale === 'zh-tw'" />
<header-logo v-else />
<AppLanguageSelector />
<v-spacer />
Expand Down
4 changes: 2 additions & 2 deletions src/pages/classes/terms.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="MainPage">
<div class="Logo-outer">
<prj-logo-zhtw v-if="$root.$i18n.locale === 'zh-goyu'" class="Logo" />
<prj-logo-zhtw v-if="$root.$i18n.locale === 'zh-tw'" class="Logo" />
<prj-logo v-else class="Logo" />
</div>
<div class="PolicyText-outer">
Expand Down Expand Up @@ -34,7 +34,7 @@
class="Button"
theme="border"
:text="$t('common.agree_terms.buttons.disagree')"
@click="$router.push('/')"
@click="$router.push(localePath('/'))"
/>
</div>
</template>
Expand Down
6 changes: 3 additions & 3 deletions src/pages/edit/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</li>

<li>
<nuxt-link class="white--text" to="terms">
<nuxt-link class="white--text" :to="localePath('/terms')">
{{ $t('common.footer.terms') }}
</nuxt-link>
</li>
Expand Down Expand Up @@ -67,7 +67,7 @@
</li>

<li>
<nuxt-link class="white--text" to="terms">
<nuxt-link class="white--text" :to="localePath('/terms')">
{{ $t('common.footer.terms') }}
</nuxt-link>
</li>
Expand Down Expand Up @@ -100,7 +100,7 @@
</li>

<li>
<nuxt-link class="white--text" to="terms">
<nuxt-link class="white--text" :to="localePath('/terms')">
{{ $t('common.footer.terms') }}
</nuxt-link>
</li>
Expand Down
12 changes: 6 additions & 6 deletions src/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,28 +42,28 @@
v-if="isLoggedIn"
:text="$t('pages.index.teachers.buttons.registerLessons')"
class="registerButton"
@click="$router.push('/user/classlist')"
@click="$router.push(localePath('/user/classlist'))"
/>
<base-action-button
v-else
:text="$t('pages.index.teachers.buttons.signup')"
class="registerButton"
@click="$router.push('/user/agree')"
@click="$router.push(localePath('/user/agree'))"
/>

<base-action-button
v-if="isLoggedIn"
:text="$t('pages.index.teachers.buttons.logout')"
class="loginButton"
theme="secondary"
@click="$router.push('/user/logout')"
@click="$router.push(localePath('/user/logout'))"
/>
<base-action-button
v-else
:text="$t('pages.index.teachers.buttons.login')"
class="loginButton"
theme="secondary"
@click="$router.push('/user/login')"
@click="$router.push(localePath('/user/login'))"
/>

<v-footer color="#004170" padless>
Expand All @@ -90,7 +90,7 @@
</li>

<li>
<nuxt-link class="white--text" to="terms">
<nuxt-link class="white--text" :to="localePath('/terms')">
{{ $t('common.footer.terms') }}
</nuxt-link>
</li>
Expand Down Expand Up @@ -167,7 +167,7 @@ export default Vue.extend({
classId: this.classId,
className,
})
await this.$router.push('/classes')
await this.$router.push(this.localePath('/classes'))
}
} catch {
this.loading = false
Expand Down
2 changes: 1 addition & 1 deletion src/pages/terms.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="MainPage">
<div class="Logo-outer">
<prj-logo-zhtw v-if="$root.$i18n.locale === 'zh-goyu'" class="Logo" />
<prj-logo-zhtw v-if="$root.$i18n.locale === 'zh-tw'" class="Logo" />
<prj-logo v-else class="Logo" />
</div>
<div class="PolicyText-outer">
Expand Down
6 changes: 3 additions & 3 deletions src/pages/user/agree.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="MainPage">
<div class="Logo-outer">
<prj-logo-zhtw v-if="$root.$i18n.locale === 'zh-goyu'" class="Logo" />
<prj-logo-zhtw v-if="$root.$i18n.locale === 'zh-tw'" class="Logo" />
<prj-logo v-else class="Logo" />
</div>
<div class="PolicyText-outer">
Expand Down Expand Up @@ -302,13 +302,13 @@
class="Button"
theme="primary"
text="登録へ進む"
@click="$router.push('/user/signup')"
@click="$router.push(localePath('/user/signup'))"
/>
<base-action-button
class="Button"
theme="border"
text="同意しない"
@click="$router.push('/')"
@click="$router.push(localePath('/'))"
/>
</div>
</template>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/user/classlist.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<base-action-button
:text="$t('pages.user_classlist.add_class')"
theme="secondary"
@click="$router.push('/user/registerClass')"
@click="$router.push(localePath('/user/registerClass'))"
/>
</template>
</base-bottom-sheet-layer>
Expand Down Expand Up @@ -113,7 +113,7 @@ export default Vue.extend({
this.loading = true
try {
await vxm.classData.loadClassData(this.selectedClassId)
await this.$router.push('/edit')
await this.$router.push(this.localePath('/edit'))
} catch {
this.loading = false
}
Expand Down
10 changes: 5 additions & 5 deletions src/pages/user/editUserData.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
color="white"
height="auto"
class="ToEditNavButton"
@click="$router.push('/user/editUserName')"
@click="$router.push(localePath('/user/editUserName'))"
>
{{ name }}
<v-icon right color="#0071C2"> mdi-chevron-right </v-icon>
Expand All @@ -30,7 +30,7 @@
color="white"
height="auto"
class="ToEditNavButton"
@click="$router.push('/user/editUserEmail')"
@click="$router.push(localePath('/user/editUserEmail'))"
>
{{ email }}
<v-icon right color="#0071C2"> mdi-chevron-right </v-icon>
Expand All @@ -45,7 +45,7 @@
color="white"
height="auto"
class="ToEditNavButton"
@click="$router.push('/user/editUserPassword')"
@click="$router.push(localePath('/user/editUserPassword'))"
>
********
<v-icon right color="#0071C2"> mdi-chevron-right </v-icon>
Expand All @@ -59,7 +59,7 @@
theme="transparent"
:text="$t('common.general.buttons.cancel')"
class="SignUp-Button"
@click="$router.push('/edit')"
@click="$router.push(localePath('/edit'))"
/>
<v-btn
:disabled="loading"
Expand Down Expand Up @@ -125,7 +125,7 @@ export default Vue.extend<Data, Methods, Computed, unknown>({
try {
await vxm.user.logout()
await vxm.app.resetDate()
await this.$router.push('/')
await this.$router.push(this.localePath('/'))
} catch {
this.error = true
}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/user/editUserEmail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
theme="transparent"
:text="$t('common.general.buttons.cancel')"
class="SignUp-Button"
@click="$router.push('/user/editUserData')"
@click="$router.push(localePath('/user/editUserData'))"
/>
<base-action-button
theme="primary"
Expand Down Expand Up @@ -100,7 +100,7 @@ export default Vue.extend<Data, Methods, Computed, unknown>({
await Auth.updateUserAttributes(user, {
email: this.email,
})
await this.$router.push('/user/verifyNewEmail')
await this.$router.push(this.localePath('/user/verifyNewEmail'))
} catch {
this.error = true
this.loading = false
Expand Down
4 changes: 2 additions & 2 deletions src/pages/user/editUserName.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
theme="transparent"
:text="$t('common.general.buttons.cancel')"
class="SignUp-Button"
@click="$router.push('/user/editUserData')"
@click="$router.push(localePath('/user/editUserData'))"
/>
<base-action-button
theme="primary"
Expand Down Expand Up @@ -99,7 +99,7 @@ export default Vue.extend<Data, Methods, Computed, unknown>({
await Auth.updateUserAttributes(user, {
name: this.name,
})
await this.$router.push('/user/editUserData')
await this.$router.push(this.localePath('/user/editUserData'))
} catch {
this.error = true
this.loading = false
Expand Down
4 changes: 2 additions & 2 deletions src/pages/user/editUserPassword.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
theme="transparent"
:text="$t('common.general.buttons.cancel')"
class="SignUp-Button"
@click="$router.push('/user/editUserData')"
@click="$router.push(localePath('/user/editUserData'))"
/>
<base-action-button
theme="primary"
Expand Down Expand Up @@ -154,7 +154,7 @@ export default Vue.extend<Data, Methods, Computed, unknown>({
this.currentPassword,
this.newPassword
)
await this.$router.push('/user/editUserData')
await this.$router.push(this.localePath('/user/editUserData'))
} catch {
this.error = true
this.loading = false
Expand Down
4 changes: 2 additions & 2 deletions src/pages/user/login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
color="#ffffff"
height="60px"
text
to="/"
:to="localePath('/')"
>
<span>{{ $t('common.general.buttons.go_back') }}</span>
</v-btn>
Expand Down Expand Up @@ -95,7 +95,7 @@ export default Vue.extend({
try {
await Auth.signIn(this.email, this.password)
// await vxm.user.login()
await this.$router.push('/user/classlist')
await this.$router.push(this.localePath('/user/classlist'))
} catch (err) {
this.loading = false
this.error = true
Expand Down
2 changes: 1 addition & 1 deletion src/pages/user/logout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default Vue.extend({
try {
await Auth.signOut()
await vxm.app.resetDate()
await this.$router.push('/')
await this.$router.push(this.localePath('/'))
} catch {
this.loading = false
this.error = true
Expand Down
Loading

0 comments on commit bbc08e1

Please sign in to comment.