From 07dccad5b1ae74b294bb40ab5643bc5d813eb6db Mon Sep 17 00:00:00 2001 From: syuilo <syuilotan@yahoo.co.jp> Date: Mon, 18 Feb 2019 11:20:20 +0900 Subject: [PATCH] Avoid dupulicated route name --- src/client/app/desktop/script.ts | 4 ++-- src/client/app/desktop/views/components/ui.header.nav.vue | 2 +- src/client/app/desktop/views/components/ui.sidebar.vue | 2 +- src/client/app/mobile/script.ts | 2 +- src/client/app/mobile/views/components/ui.nav.vue | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/client/app/desktop/script.ts b/src/client/app/desktop/script.ts index 9f4fbbc0e8..924ebed9ae 100644 --- a/src/client/app/desktop/script.ts +++ b/src/client/app/desktop/script.ts @@ -146,7 +146,7 @@ init(async (launch, os) => { { path: '/tags/:tag', name: 'tag', component: () => import('./views/deck/deck.hashtag-column.vue').then(m => m.default) }, { path: '/featured', name: 'featured', component: () => import('./views/deck/deck.featured-column.vue').then(m => m.default) }, { path: '/explore', name: 'explore', component: () => import('./views/deck/deck.explore-column.vue').then(m => m.default) }, - { path: '/explore/tags/:tag', props: true, component: () => import('./views/deck/deck.explore-column.vue').then(m => m.default) }, + { path: '/explore/tags/:tag', name: 'explore-tag', props: true, component: () => import('./views/deck/deck.explore-column.vue').then(m => m.default) }, { path: '/i/favorites', component: () => import('./views/deck/deck.favorites-column.vue').then(m => m.default) } ]} : { path: '/', component: MkHome, children: [ @@ -161,7 +161,7 @@ init(async (launch, os) => { { path: '/tags/:tag', name: 'tag', component: () => import('./views/home/tag.vue').then(m => m.default) }, { path: '/featured', name: 'featured', component: () => import('./views/home/featured.vue').then(m => m.default) }, { path: '/explore', name: 'explore', component: () => import('../common/views/pages/explore.vue').then(m => m.default) }, - { path: '/explore/tags/:tag', name: 'explore', props: true, component: () => import('../common/views/pages/explore.vue').then(m => m.default) }, + { path: '/explore/tags/:tag', name: 'explore-tag', props: true, component: () => import('../common/views/pages/explore.vue').then(m => m.default) }, { path: '/i/favorites', component: () => import('./views/home/favorites.vue').then(m => m.default) }, ]}, { path: '/i/messaging/:user', component: MkMessagingRoom }, diff --git a/src/client/app/desktop/views/components/ui.header.nav.vue b/src/client/app/desktop/views/components/ui.header.nav.vue index 08e8d47c66..2bd3cf8772 100644 --- a/src/client/app/desktop/views/components/ui.header.nav.vue +++ b/src/client/app/desktop/views/components/ui.header.nav.vue @@ -7,7 +7,7 @@ <li class="featured" :class="{ active: $route.name == 'featured' }"> <router-link to="/featured"><fa :icon="faNewspaper"/><p>{{ $t('@.featured-notes') }}</p></router-link> </li> - <li class="explore" :class="{ active: $route.name == 'explore' }"> + <li class="explore" :class="{ active: $route.name == 'explore' || $route.name == 'explore-tag' }"> <router-link to="/explore"><fa :icon="faHashtag"/><p>{{ $t('@.explore') }}</p></router-link> </li> <li class="game"> diff --git a/src/client/app/desktop/views/components/ui.sidebar.vue b/src/client/app/desktop/views/components/ui.sidebar.vue index 1f8e8ee7a4..2922b1873c 100644 --- a/src/client/app/desktop/views/components/ui.sidebar.vue +++ b/src/client/app/desktop/views/components/ui.sidebar.vue @@ -12,7 +12,7 @@ <div class="featured" :class="{ active: $route.name == 'featured' }"> <router-link to="/featured"><fa :icon="faNewspaper"/></router-link> </div> - <div class="explore" :class="{ active: $route.name == 'explore' }"> + <div class="explore" :class="{ active: $route.name == 'explore' || $route.name == 'explore-tag' }"> <router-link to="/explore"><fa :icon="faHashtag"/></router-link> </div> <div class="game"> diff --git a/src/client/app/mobile/script.ts b/src/client/app/mobile/script.ts index 9bec577d7b..fbe117c4ac 100644 --- a/src/client/app/mobile/script.ts +++ b/src/client/app/mobile/script.ts @@ -133,7 +133,7 @@ init((launch) => { { path: '/tags/:tag', component: MkTag }, { path: '/featured', name: 'featured', component: () => import('./views/pages/featured.vue').then(m => m.default) }, { path: '/explore', name: 'explore', component: () => import('./views/pages/explore.vue').then(m => m.default) }, - { path: '/explore/tags/:tag', name: 'explore', props: true, component: () => import('./views/pages/explore.vue').then(m => m.default) }, + { path: '/explore/tags/:tag', name: 'explore-tag', props: true, component: () => import('./views/pages/explore.vue').then(m => m.default) }, { path: '/share', component: MkShare }, { path: '/games/reversi/:game?', name: 'reversi', component: MkReversi }, { path: '/@:user', name: 'user', component: () => import('./views/pages/user/index.vue').then(m => m.default), children: [ diff --git a/src/client/app/mobile/views/components/ui.nav.vue b/src/client/app/mobile/views/components/ui.nav.vue index 16bde6030e..ba27b87a50 100644 --- a/src/client/app/mobile/views/components/ui.nav.vue +++ b/src/client/app/mobile/views/components/ui.nav.vue @@ -20,7 +20,7 @@ <li><router-link to="/i/messaging" :data-active="$route.name == 'messaging'"><i><fa :icon="['far', 'comments']" fixed-width/></i>{{ $t('@.messaging') }}<i v-if="hasUnreadMessagingMessage" class="circle"><fa icon="circle"/></i><i><fa icon="angle-right"/></i></router-link></li> <li v-if="$store.getters.isSignedIn && ($store.state.i.isLocked || $store.state.i.carefulBot)"><router-link to="/i/received-follow-requests" :data-active="$route.name == 'received-follow-requests'"><i><fa :icon="['far', 'envelope']" fixed-width/></i>{{ $t('follow-requests') }}<i v-if="$store.getters.isSignedIn && $store.state.i.pendingReceivedFollowRequestsCount" class="circle"><fa icon="circle"/></i><i><fa icon="angle-right"/></i></router-link></li> <li><router-link to="/featured" :data-active="$route.name == 'featured'"><i><fa :icon="faNewspaper" fixed-width/></i>{{ $t('@.featured-notes') }}<i><fa icon="angle-right"/></i></router-link></li> - <li><router-link to="/explore" :data-active="$route.name == 'explore'"><i><fa :icon="faHashtag" fixed-width/></i>{{ $t('@.explore') }}<i><fa icon="angle-right"/></i></router-link></li> + <li><router-link to="/explore" :data-active="$route.name == 'explore' || $route.name == 'explore-tag'"><i><fa :icon="faHashtag" fixed-width/></i>{{ $t('@.explore') }}<i><fa icon="angle-right"/></i></router-link></li> <li><router-link to="/games/reversi" :data-active="$route.name == 'reversi'"><i><fa icon="gamepad" fixed-width/></i>{{ $t('game') }}<i v-if="hasGameInvitation" class="circle"><fa icon="circle"/></i><i><fa icon="angle-right"/></i></router-link></li> </ul> <ul>