fix: update more public and explore links

zio/stable
Daniel Roe 2022-12-04 20:05:11 +00:00
parent fd1be3b86c
commit 04615e443e
No known key found for this signature in database
GPG Key ID: 22D5008E4F5D9B55
4 changed files with 8 additions and 8 deletions

View File

@ -18,14 +18,14 @@ const moreMenuVisible = ref(false)
<div i-ri:notification-4-line />
</NuxtLink>
</template>
<NuxtLink to="/explore" :active-class="moreMenuVisible ? '' : 'text-primary'" flex flex-row items-center place-content-center h-full flex-1 @click="$scrollToTop">
<NuxtLink :to="`/${currentServer}/explore`" :active-class="moreMenuVisible ? '' : 'text-primary'" flex flex-row items-center place-content-center h-full flex-1 @click="$scrollToTop">
<div i-ri:hashtag />
</NuxtLink>
<NuxtLink group to="/public/local" :active-class="moreMenuVisible ? '' : 'text-primary'" flex flex-row items-center place-content-center h-full flex-1 @click="$scrollToTop">
<NuxtLink group :to="`/${currentServer}/public/local`" :active-class="moreMenuVisible ? '' : 'text-primary'" flex flex-row items-center place-content-center h-full flex-1 @click="$scrollToTop">
<div i-ri:group-2-line />
</NuxtLink>
<template v-if="!currentUser">
<NuxtLink to="/public" :active-class="moreMenuVisible ? '' : 'text-primary'" flex flex-row items-center place-content-center h-full flex-1 @click="$scrollToTop">
<NuxtLink :to="`/${currentServer}/public`" :active-class="moreMenuVisible ? '' : 'text-primary'" flex flex-row items-center place-content-center h-full flex-1 @click="$scrollToTop">
<div i-ri:earth-line />
</NuxtLink>
</template>

View File

@ -17,9 +17,9 @@ const { notifications } = useNotifications()
</template>
</NavSideItem>
</template>
<NavSideItem :text="$t('nav_side.explore')" to="/explore" icon="i-ri:hashtag" />
<NavSideItem :text="$t('nav_side.local')" to="/public/local" icon="i-ri:group-2-line " />
<NavSideItem :text="$t('nav_side.federated')" to="/public" icon="i-ri:earth-line" />
<NavSideItem :text="$t('nav_side.explore')" :to="`/${currentServer}/explore`" icon="i-ri:hashtag" />
<NavSideItem :text="$t('nav_side.local')" :to="`/${currentServer}/public/local`" icon="i-ri:group-2-line " />
<NavSideItem :text="$t('nav_side.federated')" :to="`/${currentServer}/public`" icon="i-ri:earth-line" />
<template v-if="currentUser">
<NavSideItem :text="$t('nav_side.conversations')" to="/conversations" icon="i-ri:at-line" />
<NavSideItem :text="$t('nav_side.favourites')" to="/favourites" icon="i-ri:heart-3-line" />

View File

@ -23,7 +23,7 @@ const reload = async () => {
try {
if (!useMasto())
await loginTo(currentUser.value)
clearError({ redirect: currentUser.value ? '/home' : '/public' })
clearError({ redirect: currentUser.value ? '/home' : `/${currentServer.value}/public` })
}
catch {
state.value = 'error'

View File

@ -1,6 +1,6 @@
export default defineNuxtRouteMiddleware((to) => {
if (!currentUser.value)
return navigateTo('/public')
return navigateTo(`/${currentServer.value}/public`)
if (to.path === '/')
return navigateTo('/home')
})