trackers: lock icon after owner-only tracker names (header dropdown, mobile menu, home, /trackers, /start, error suggestions) from one locked flag in #lib/projects; drop the private: subtitle prefix
All checks were successful
Deploy production / deploy (push) Successful in 1m7s

This commit is contained in:
2026-10-25 16:22:25 +00:00
parent eff5a24985
commit 676ac2ad64
8 changed files with 95 additions and 20 deletions

View File

@@ -61,6 +61,7 @@ export type Suggestion = {
href: string;
kind: 'tracker' | 'project' | 'page';
subtitle: string;
locked?: boolean;
};
const pages: Suggestion[] = [
@@ -77,7 +78,13 @@ export function destinations(isOwner: boolean): Suggestion[] {
if (!p.external)
out.push({ name: p.name, href: p.href, kind: 'project', subtitle: p.subtitle });
for (const t of visibleTrackers(isOwner)) {
out.push({ name: t.name, href: t.href, kind: 'tracker', subtitle: t.subtitle });
out.push({
name: t.name,
href: t.href,
kind: 'tracker',
subtitle: t.subtitle,
...(t.locked ? { locked: true } : {})
});
for (const c of t.children ?? [])
out.push({ name: c.name, href: c.href, kind: 'tracker', subtitle: c.subtitle });
}