community absorbs the hub: search, transfers and browse ride the same pills, one entry in the sidebar
This commit is contained in:
1 parent
8c25f93afe
commit
64a7561750
7 files changed
+91
-22
No files matched your search
@@ -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 @@
|
||||
<button
|
||||
class="nav-item"
|
||||
class:active={itemActive(item)}
|
||||
class:has-count={item.id === "downloads" && downloadCount > 0}
|
||||
class:has-count={item.id === "community" && downloadCount > 0}
|
||||
title={ui.sidebarCollapsed ? item.label : null}
|
||||
onclick={() => navigate(item.id)}
|
||||
>
|
||||
<span class="ic"><Icon name={item.icon} size={22} /></span>
|
||||
<span class="lbl">{item.label}</span>
|
||||
{#if item.id === "downloads" && downloadCount > 0}
|
||||
{#if item.id === "community" && downloadCount > 0}
|
||||
<span class="bdg">{downloadCount > 99 ? "99+" : downloadCount}</span>
|
||||
{/if}
|
||||
{#if item.id === "playlists"}
|
||||
|
||||
@@ -575,7 +575,7 @@
|
||||
title={dlFlash
|
||||
? "Downloads finished"
|
||||
: `${dl.active} downloading — open Downloads`}
|
||||
onclick={() => (ui.view = "downloads")}
|
||||
onclick={() => { ui.view = "downloads"; ui.hubJump += 1; }}
|
||||
>
|
||||
<svg width="26" height="26" viewBox="0 0 26 26">
|
||||
<circle class="track" cx="13" cy="13" r="9" />
|
||||
|
||||
Reference in new issue
Block a user