voelin-ui: the phone's bottom navigation shows where you are
Home could be on screen while the bar marked Chats and the top bar named the server: opening Home other than by its tab (the desktop's logo before the window narrowed, VOELIN_OPEN=home) left the phone's tab where it was. Nav.show now keeps the tab and the page together, also while the window is wide, so the tab is right when it narrows. The tabs go through Nav.show-tab, which also closes the pins, topics or members page that was over the last tab, instead of leaving it over the next one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ef976cf31e
commit
5da3f94479
2 files changed
+22
-7
No files matched your search
@@ -265,34 +265,34 @@ export component MobileShell inherits Rectangle {
|
||||
icon: Icons.home;
|
||||
text: @tr("Home");
|
||||
selected: Nav.mobile-tab == MobileTab.home && Nav.page != Page.settings;
|
||||
clicked => { Nav.show(Page.home); Nav.mobile-tab = MobileTab.home; }
|
||||
clicked => { Nav.show-tab(MobileTab.home); }
|
||||
}
|
||||
NavTab {
|
||||
icon: Icons.server;
|
||||
text: @tr("Servers");
|
||||
selected: Nav.mobile-tab == MobileTab.servers && Nav.page != Page.settings;
|
||||
dot: Bridge.voice-connected;
|
||||
clicked => { Nav.show(Page.server); Nav.mobile-tab = MobileTab.servers; }
|
||||
clicked => { Nav.show-tab(MobileTab.servers); }
|
||||
}
|
||||
NavTab {
|
||||
icon: Icons.message-circle;
|
||||
text: @tr("Chats");
|
||||
selected: Nav.mobile-tab == MobileTab.chat && Nav.page != Page.settings;
|
||||
badge: root.unread;
|
||||
clicked => { Nav.show(Page.server); Nav.mobile-tab = MobileTab.chat; }
|
||||
clicked => { Nav.show-tab(MobileTab.chat); }
|
||||
}
|
||||
NavTab {
|
||||
icon: Icons.activity;
|
||||
text: @tr("Activity");
|
||||
selected: Nav.mobile-tab == MobileTab.activity && Nav.page != Page.settings;
|
||||
badge: Bridge.share-requests;
|
||||
clicked => { Nav.show(Page.server); Nav.mobile-tab = MobileTab.activity; }
|
||||
clicked => { Nav.show-tab(MobileTab.activity); }
|
||||
}
|
||||
NavTab {
|
||||
icon: Icons.user;
|
||||
text: @tr("You");
|
||||
selected: Nav.mobile-tab == MobileTab.you || Nav.page == Page.settings;
|
||||
clicked => { Nav.show(Page.server); Nav.mobile-tab = MobileTab.you; }
|
||||
clicked => { Nav.show-tab(MobileTab.you); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user