feat: change navbar to dock
This commit is contained in:
1 parent
4dab003ae2
commit
e51c4530f0
7 files changed
+99
-83
No files matched your search
@@ -34,6 +34,23 @@
|
||||
)
|
||||
})
|
||||
|
||||
afterNavigate(() => {
|
||||
if ($profile) {
|
||||
let favs = $profile?.favorites ?? []
|
||||
if (favs.map((fav) => fav.url.toString()).includes($page.url.toString()))
|
||||
return
|
||||
|
||||
if (favs.length >= 3) favs.pop()
|
||||
favs.push({
|
||||
avatar: data.community.community_view.community.icon,
|
||||
id: data.community.community_view.community.id,
|
||||
url: $page.url,
|
||||
name: data.community.community_view.community.title,
|
||||
})
|
||||
$profile.favorites = favs
|
||||
}
|
||||
})
|
||||
|
||||
onDestroy(() => {
|
||||
if (browser) {
|
||||
if ($navigating?.to?.route?.id == '/create/post') return
|
||||
|
||||
Reference in new issue
Block a user