feat(header): move the sync status into a chip on the header
The rail spent a two-row block plus a divider on per-user sync status. It's global, not per-module, so it now rides the right end of the floating header as a pill: the headline count at a glance, an accent dot when something wants you (paused / missing history), and the counts, state, the channel-manager link and pause in a popover. Frees the rail's whole top block. Also drops SyncStatus's two now-dead layouts: "bar" was a leftover of the top bar removed in 0.42.0, and "rail" lost its only caller here — the component is chip-only, ~60 lines lighter, and the popover reuses useDismiss.
This commit is contained in:
@@ -34,7 +34,6 @@ import { useHoverFocusWithin } from "../lib/useHoverFocusWithin";
|
||||
import { type LangCode } from "../i18n";
|
||||
import AvatarImg from "./Avatar";
|
||||
import LanguageSwitcher from "./LanguageSwitcher";
|
||||
import SyncStatus from "./SyncStatus";
|
||||
|
||||
// Primary app navigation: a collapsible left rail with icon+label entries (Design C). The
|
||||
// modules used to hide under the avatar dropdown; they now live here. Collapsed, it becomes
|
||||
@@ -48,7 +47,6 @@ export default function NavSidebar({
|
||||
language,
|
||||
collapsed,
|
||||
onToggleCollapse,
|
||||
onGoToFullHistory,
|
||||
}: {
|
||||
me: Me;
|
||||
page: Page;
|
||||
@@ -60,7 +58,6 @@ export default function NavSidebar({
|
||||
// it and asks App to flip it.
|
||||
collapsed: boolean;
|
||||
onToggleCollapse: () => void;
|
||||
onGoToFullHistory: () => void;
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
// When unpinned, the rail sits slim (icons only) and peeks open into a labelled overlay on hover
|
||||
@@ -306,16 +303,6 @@ export default function NavSidebar({
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* Per-user sync status (video counts + live sync state), moved out of the old top bar. */}
|
||||
<div className="mb-3 pb-3 border-b border-border">
|
||||
<SyncStatus
|
||||
isAdmin={me.role === "admin"}
|
||||
onGoToFullHistory={onGoToFullHistory}
|
||||
variant="rail"
|
||||
collapsed={slim}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div
|
||||
ref={listFade.ref}
|
||||
className="flex-1 min-h-0 overflow-y-auto no-scrollbar flex flex-col gap-1"
|
||||
|
||||
Reference in New Issue
Block a user