mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-28 21:38:52 +03:00
fix: update more public and explore links
This commit is contained in:
parent
fd1be3b86c
commit
04615e443e
4 changed files with 8 additions and 8 deletions
|
@ -18,14 +18,14 @@ const moreMenuVisible = ref(false)
|
||||||
<div i-ri:notification-4-line />
|
<div i-ri:notification-4-line />
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
</template>
|
</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 />
|
<div i-ri:hashtag />
|
||||||
</NuxtLink>
|
</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 />
|
<div i-ri:group-2-line />
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
<template v-if="!currentUser">
|
<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 />
|
<div i-ri:earth-line />
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -17,9 +17,9 @@ const { notifications } = useNotifications()
|
||||||
</template>
|
</template>
|
||||||
</NavSideItem>
|
</NavSideItem>
|
||||||
</template>
|
</template>
|
||||||
<NavSideItem :text="$t('nav_side.explore')" to="/explore" icon="i-ri:hashtag" />
|
<NavSideItem :text="$t('nav_side.explore')" :to="`/${currentServer}/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.local')" :to="`/${currentServer}/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.federated')" :to="`/${currentServer}/public`" icon="i-ri:earth-line" />
|
||||||
<template v-if="currentUser">
|
<template v-if="currentUser">
|
||||||
<NavSideItem :text="$t('nav_side.conversations')" to="/conversations" icon="i-ri:at-line" />
|
<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" />
|
<NavSideItem :text="$t('nav_side.favourites')" to="/favourites" icon="i-ri:heart-3-line" />
|
||||||
|
|
|
@ -23,7 +23,7 @@ const reload = async () => {
|
||||||
try {
|
try {
|
||||||
if (!useMasto())
|
if (!useMasto())
|
||||||
await loginTo(currentUser.value)
|
await loginTo(currentUser.value)
|
||||||
clearError({ redirect: currentUser.value ? '/home' : '/public' })
|
clearError({ redirect: currentUser.value ? '/home' : `/${currentServer.value}/public` })
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
state.value = 'error'
|
state.value = 'error'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
export default defineNuxtRouteMiddleware((to) => {
|
export default defineNuxtRouteMiddleware((to) => {
|
||||||
if (!currentUser.value)
|
if (!currentUser.value)
|
||||||
return navigateTo('/public')
|
return navigateTo(`/${currentServer.value}/public`)
|
||||||
if (to.path === '/')
|
if (to.path === '/')
|
||||||
return navigateTo('/home')
|
return navigateTo('/home')
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue