diff --git a/src/App.svelte b/src/App.svelte index 6d5d376..e4e989d 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -12,7 +12,6 @@ import GlassBar from "./components/GlassBar.svelte"; import { previewUi } from "./lib/preview/previewSession.svelte.js"; import Home from "./views/Home.svelte"; - import Soulseek from "./views/Soulseek.svelte"; import Community from "./views/Community.svelte"; import Library from "./views/Library.svelte"; import Settings from "./views/Settings.svelte"; @@ -48,9 +47,12 @@ // their ids stay routable so the download ring, "get on soulseek" // hand-offs, history entries and restored sessions all land on the // hub's right tab (the alias → tab sync lives in Soulseek.svelte). - soulseek: Soulseek, - search: Soulseek, - downloads: Soulseek, + // The hub is fused into Community (2026-09-02); its ids still route + // so the download ring, "get on soulseek" hand-offs and restored + // sessions land on the right pill (Community reads the alias). + soulseek: Community, + search: Community, + downloads: Community, community: Community, library: Library, settings: Settings, diff --git a/src/components/Sidebar.svelte b/src/components/Sidebar.svelte index 35296d6..958303c 100644 --- a/src/components/Sidebar.svelte +++ b/src/components/Sidebar.svelte @@ -190,15 +190,15 @@ // lights up for them too. const items = [ { id: "home", label: "Home", icon: "home" }, - { id: "soulseek", label: "Soulseek", icon: "globe" }, { id: "community", label: "Community", icon: "users" }, { id: "library", label: "Your Library", icon: "library" }, { id: "settings", label: "Settings", icon: "settings" }, { id: "playlists", label: "Playlists", icon: "playlist" }, ]; - const HUB_ALIASES = new Set(["soulseek", "search", "downloads"]); + // The Soulseek hub is fused into Community; its ids light that entry. + const HUB_ALIASES = new Set(["community", "soulseek", "search", "downloads"]); const itemActive = (item) => - item.id === "soulseek" ? HUB_ALIASES.has(ui.view) : ui.view === item.id; + item.id === "community" ? HUB_ALIASES.has(ui.view) : ui.view === item.id; // ---- the Soulseek status, moved here out of the title bar ---- function statusClick() { @@ -373,13 +373,13 @@ + + + @@ -462,8 +494,12 @@ + + {#if hubOpen} + + - {#if community.section === "inbox"} + {:else if community.section === "inbox"} {#if !convos.length}
diff --git a/src/views/Soulseek.svelte b/src/views/Soulseek.svelte index 1541f2a..aad6c4a 100644 --- a/src/views/Soulseek.svelte +++ b/src/views/Soulseek.svelte @@ -42,12 +42,27 @@ import Icon from "../components/Icon.svelte"; import PlaylistMenu from "../components/PlaylistMenu.svelte"; + // Fused into the Community area (2026-09-02): the page renders this hub + // EMBEDDED for its Search / Transfers / Browse pills and owns the pill + // row itself; Rooms, Chat and Users below are the retired originals of + // Community's Rooms, Inbox and People (same stores), left in place for + // the standalone shape. `onsection` reports every tab change so a + // "message this user" from a search result lands on Community's Inbox. + let { embedded = false, section = null, onsection = null } = $props(); const aliasTab = (v) => v === "downloads" ? "transfers" : v === "search" ? "search" : null; - let tab = $state(aliasTab(ui.view) ?? "transfers"); + let tab = $state(untrack(() => section) ?? aliasTab(ui.view) ?? "transfers"); $effect(() => { const t = aliasTab(ui.view); - if (t) untrack(() => (tab = t)); + if (t && !embedded) untrack(() => (tab = t)); + }); + $effect(() => { + const s = section; + if (embedded && s) untrack(() => (tab = s)); + }); + $effect(() => { + const t = tab; + if (embedded) untrack(() => onsection?.(t)); }); // ---- transfers ---------------------------------------------------- @@ -348,7 +363,8 @@ }; -
+
+ {#if !embedded}
+ {/if} {#if tab === "transfers"} @@ -828,6 +845,12 @@ padding-top: calc(var(--bar-h) + 18px); padding-bottom: 40px; } + /* Inside the Community page the shell is the page's; the hub is only + the tab body. */ + .slsk.embedded { + padding-top: 0; + padding-bottom: 0; + } /* ── the Qt tab row ── */ .qtabs {