community absorbs the hub: search, transfers and browse ride the same pills, one entry in the sidebar

This commit is contained in:
KeelrLeek committed 2026-09-02 13:46:57 -05:00
1 parent 8c25f93afe
commit 64a7561750
7 files changed
+91 -22

No files matched your search

+1 -1
View File
@@ -29,7 +29,7 @@ function writeJson(key, value) {
}
}
export const SECTIONS = ["inbox", "rooms", "people", "discover", "spaces", "you"];
export const SECTIONS = ["search", "transfers", "browse", "inbox", "rooms", "people", "discover", "spaces", "you"];
export const community = $state({
section: SECTIONS.includes(readJson(LS_SECTION, "")) ? readJson(LS_SECTION, "") : "inbox",
+14 -6
View File
@@ -293,6 +293,9 @@ export const ui = $state({
windowActive: true,
// Fullscreen lyrics overlay (LyricsOverlay.svelte) over the content pane.
lyricsFull: false,
// Bumped on every jump to a hub id (search/downloads) so the Community
// page switches its pill even when ui.view did not change.
hubJump: 0,
});
export function toggleNowPlaying() {
@@ -1714,6 +1717,9 @@ const identityWarmupDone = new Set();
export function goToView(view, opts = {}) {
captureScroll();
ui.view = view;
// The hub's routable ids are pills on the Community page; a repeat jump
// to one (already on that view) still has to switch the pill.
if (view === "search" || view === "downloads") ui.hubJump += 1;
if (opts.albumId !== undefined) ui.albumId = opts.albumId;
if (opts.playlistId !== undefined) ui.playlistId = opts.playlistId;
recordVisit({ view, label: opts.label ?? VIEW_LABELS[view] ?? view, glyph: VIEW_GLYPHS[view] ?? null, ...opts });
@@ -1721,11 +1727,13 @@ export function goToView(view, opts = {}) {
const VIEW_LABELS = {
home: "Home",
soulseek: "Soulseek",
// The hub is fused into Community (2026-09-02): its three routable ids
// land on that page's pills and read as that page in the trail.
soulseek: "Community",
community: "Community",
search: "Search",
search: "Community",
library: "Your Library",
downloads: "Downloads",
downloads: "Community",
settings: "Settings",
playlists: "Playlists",
playlist: "Playlist",
@@ -1733,11 +1741,11 @@ const VIEW_LABELS = {
};
const VIEW_GLYPHS = {
home: "home",
soulseek: "globe",
soulseek: "users",
community: "users",
search: "search",
search: "users",
library: "library",
downloads: "download",
downloads: "users",
settings: "settings",
playlists: "playlist",
playlist: "music",