Skip to content

Commit 29782ae

Browse files
committed
$router.pushとtoにlocalePathを追加
1 parent 63eb6b2 commit 29782ae

20 files changed

+46
-44
lines changed

src/components/LessonSummaryCard.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export default Vue.extend({
8383
methods: {
8484
toLessonDetail() {
8585
const lesson = this.lesson as LessonWithId
86-
this.$router.push('/lesson/?lessonId=' + lesson.id)
86+
this.$router.push(this.localePath('/lesson/?lessonId=' + lesson.id))
8787
},
8888
},
8989
})

src/layouts/classes.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export default Vue.extend({
153153
async clickLogout() {
154154
await vxm.user.logout()
155155
await vxm.app.resetDate()
156-
await this.$router.push('/')
156+
await this.$router.push(this.localePath('/'))
157157
},
158158
},
159159
})

src/layouts/error.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<h1 v-else>
77
{{ otherError }}
88
</h1>
9-
<NuxtLink to="/">Home page</NuxtLink>
9+
<NuxtLink :to="localePath('/')">Home page</NuxtLink>
1010
</v-app>
1111
</template>
1212

src/layouts/protected.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
),
3131
action: () => {
3232
unloadClassData()
33-
$router.push('/user/classlist')
33+
$router.push(localePath('/user/classlist'))
3434
return false
3535
},
3636
},
@@ -78,7 +78,7 @@
7878
outlined
7979
rounded
8080
color="#0071C2"
81-
@click="$router.push('/user/editUserData')"
81+
@click="$router.push(localePath('/user/editUserData'))"
8282
>
8383
<v-icon>mdi-cog</v-icon>
8484
</v-btn>

src/pages/classes/terms.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
class="Button"
3535
theme="border"
3636
:text="$t('common.agree_terms.buttons.disagree')"
37-
@click="$router.push('/')"
37+
@click="$router.push(localePath('/'))"
3838
/>
3939
</div>
4040
</template>

src/pages/edit/index.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
</li>
3535

3636
<li>
37-
<nuxt-link class="white--text" to="terms">
37+
<nuxt-link class="white--text" :to="localePath('/terms')">
3838
{{ $t('common.footer.terms') }}
3939
</nuxt-link>
4040
</li>
@@ -67,7 +67,7 @@
6767
</li>
6868

6969
<li>
70-
<nuxt-link class="white--text" to="terms">
70+
<nuxt-link class="white--text" :to="localePath('/terms')">
7171
{{ $t('common.footer.terms') }}
7272
</nuxt-link>
7373
</li>
@@ -100,7 +100,7 @@
100100
</li>
101101

102102
<li>
103-
<nuxt-link class="white--text" to="terms">
103+
<nuxt-link class="white--text" :to="localePath('/terms')">
104104
{{ $t('common.footer.terms') }}
105105
</nuxt-link>
106106
</li>

src/pages/index.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,28 +42,28 @@
4242
v-if="isLoggedIn"
4343
:text="$t('pages.index.teachers.buttons.registerLessons')"
4444
class="registerButton"
45-
@click="$router.push('/user/classlist')"
45+
@click="$router.push(localePath('/user/classlist'))"
4646
/>
4747
<base-action-button
4848
v-else
4949
:text="$t('pages.index.teachers.buttons.signup')"
5050
class="registerButton"
51-
@click="$router.push('/user/agree')"
51+
@click="$router.push(localePath('/user/agree'))"
5252
/>
5353

5454
<base-action-button
5555
v-if="isLoggedIn"
5656
:text="$t('pages.index.teachers.buttons.logout')"
5757
class="loginButton"
5858
theme="secondary"
59-
@click="$router.push('/user/logout')"
59+
@click="$router.push(localePath('/user/logout'))"
6060
/>
6161
<base-action-button
6262
v-else
6363
:text="$t('pages.index.teachers.buttons.login')"
6464
class="loginButton"
6565
theme="secondary"
66-
@click="$router.push('/user/login')"
66+
@click="$router.push(localePath('/user/login'))"
6767
/>
6868

6969
<v-footer color="#004170" padless>
@@ -90,7 +90,7 @@
9090
</li>
9191

9292
<li>
93-
<nuxt-link class="white--text" to="terms">
93+
<nuxt-link class="white--text" :to="localePath('/terms')">
9494
{{ $t('common.footer.terms') }}
9595
</nuxt-link>
9696
</li>
@@ -167,7 +167,7 @@ export default Vue.extend({
167167
classId: this.classId,
168168
className,
169169
})
170-
await this.$router.push('/classes')
170+
await this.$router.push(this.localePath('/classes'))
171171
}
172172
} catch {
173173
this.loading = false

src/pages/user/agree.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,13 +302,13 @@
302302
class="Button"
303303
theme="primary"
304304
text="登録へ進む"
305-
@click="$router.push('/user/signup')"
305+
@click="$router.push(localePath('/user/signup'))"
306306
/>
307307
<base-action-button
308308
class="Button"
309309
theme="border"
310310
text="同意しない"
311-
@click="$router.push('/')"
311+
@click="$router.push(localePath('/'))"
312312
/>
313313
</div>
314314
</template>

src/pages/user/classlist.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<base-action-button
4343
:text="$t('pages.user_classlist.add_class')"
4444
theme="secondary"
45-
@click="$router.push('/user/registerClass')"
45+
@click="$router.push(localePath('/user/registerClass'))"
4646
/>
4747
</template>
4848
</base-bottom-sheet-layer>
@@ -113,7 +113,7 @@ export default Vue.extend({
113113
this.loading = true
114114
try {
115115
await vxm.classData.loadClassData(this.selectedClassId)
116-
await this.$router.push('/edit')
116+
await this.$router.push(this.localePath('/edit'))
117117
} catch {
118118
this.loading = false
119119
}

src/pages/user/editUserData.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
color="white"
1616
height="auto"
1717
class="ToEditNavButton"
18-
@click="$router.push('/user/editUserName')"
18+
@click="$router.push(localePath('/user/editUserName'))"
1919
>
2020
{{ name }}
2121
<v-icon right color="#0071C2"> mdi-chevron-right </v-icon>
@@ -30,7 +30,7 @@
3030
color="white"
3131
height="auto"
3232
class="ToEditNavButton"
33-
@click="$router.push('/user/editUserEmail')"
33+
@click="$router.push(localePath('/user/editUserEmail'))"
3434
>
3535
{{ email }}
3636
<v-icon right color="#0071C2"> mdi-chevron-right </v-icon>
@@ -45,7 +45,7 @@
4545
color="white"
4646
height="auto"
4747
class="ToEditNavButton"
48-
@click="$router.push('/user/editUserPassword')"
48+
@click="$router.push(localePath('/user/editUserPassword'))"
4949
>
5050
********
5151
<v-icon right color="#0071C2"> mdi-chevron-right </v-icon>
@@ -59,7 +59,7 @@
5959
theme="transparent"
6060
:text="$t('common.general.buttons.cancel')"
6161
class="SignUp-Button"
62-
@click="$router.push('/edit')"
62+
@click="$router.push(localePath('/edit'))"
6363
/>
6464
<v-btn
6565
:disabled="loading"
@@ -125,7 +125,7 @@ export default Vue.extend<Data, Methods, Computed, unknown>({
125125
try {
126126
await vxm.user.logout()
127127
await vxm.app.resetDate()
128-
await this.$router.push('/')
128+
await this.$router.push(this.localePath('/'))
129129
} catch {
130130
this.error = true
131131
}

0 commit comments

Comments
 (0)