This commit is contained in:
@@ -96,7 +96,7 @@ export function AppShell({ children }: { children: React.ReactNode }) {
|
||||
const id = String(a?.id ?? a?.bookmarkId ?? '')
|
||||
if (!id || notifiedAlerts.current.has(id)) continue
|
||||
notifiedAlerts.current.add(id)
|
||||
new Notification('computer alert', { body: `${a?.title ?? 'Bookmark'} is due!`, icon: '/favicon.svg' })
|
||||
new Notification('superbrain alert', { body: `${a?.title ?? 'Bookmark'} is due!`, icon: '/favicon.svg' })
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -111,7 +111,7 @@ export function AppShell({ children }: { children: React.ReactNode }) {
|
||||
// an explicit user action (top-bar.tsx), not on every app mount.
|
||||
|
||||
const refreshPage = useCallback(() => {
|
||||
window.dispatchEvent(new Event('computer:bookmarks-changed'))
|
||||
window.dispatchEvent(new Event('superbrain:bookmarks-changed'))
|
||||
router.refresh()
|
||||
}, [router])
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ const viewItems = [
|
||||
// Section collapse state persists per browser. useSyncExternalStore keeps it
|
||||
// hydration-safe (server snapshot uses the default; the client snapshot reads
|
||||
// localStorage after mount) without setState inside an effect.
|
||||
const SECTION_STORE_EVENT = 'computer:sidebar-sections'
|
||||
const SECTION_STORE_EVENT = 'superbrain:sidebar-sections'
|
||||
|
||||
function readSection(key: string, fallback: boolean): boolean {
|
||||
try {
|
||||
@@ -81,7 +81,7 @@ export function Sidebar({ open, onToggle, onQuickFind, pathname, isAdmin = false
|
||||
<div className="flex h-6 w-6 shrink-0 items-center justify-center rounded bg-primary text-primary-foreground">
|
||||
<Link2 className="h-3.5 w-3.5" />
|
||||
</div>
|
||||
{open && <span className="truncate font-display text-sm font-bold tracking-tight">computer</span>}
|
||||
{open && <span className="truncate font-display text-sm font-bold tracking-tight">superbrain</span>}
|
||||
</Link>
|
||||
</div>
|
||||
<Suspense fallback={<div className="flex-1" />}>
|
||||
@@ -147,8 +147,8 @@ function SidebarNav({ open, pathname, isAdmin = false }: { open: boolean; pathna
|
||||
const router = useRouter()
|
||||
const searchParams = useSearchParams()
|
||||
const [pages, setPages] = useState<PageSummary[]>([])
|
||||
const [pagesExpanded, setPagesExpanded] = usePersistentState('computer:sidebar:pages', true)
|
||||
const [viewsExpanded, setViewsExpanded] = usePersistentState('computer:sidebar:views', true)
|
||||
const [pagesExpanded, setPagesExpanded] = usePersistentState('superbrain:sidebar:pages', true)
|
||||
const [viewsExpanded, setViewsExpanded] = usePersistentState('superbrain:sidebar:views', true)
|
||||
const [renamingId, setRenamingId] = useState<string | null>(null)
|
||||
const [renameValue, setRenameValue] = useState('')
|
||||
const [pageDrop, setPageDrop] = useState<{ id: string; after: boolean } | null>(null)
|
||||
|
||||
@@ -86,7 +86,7 @@ export function TopBar({ user, alerts, onDismissAlert, onAddBookmark, onToggleSi
|
||||
return () => document.removeEventListener('mousedown', handler)
|
||||
}, [])
|
||||
|
||||
const section = SECTION_LABELS[pathname] ?? 'computer'
|
||||
const section = SECTION_LABELS[pathname] ?? 'superbrain'
|
||||
const isMac = mounted && typeof navigator !== 'undefined' && /mac|iphone|ipad/i.test(navigator.userAgent)
|
||||
const quickFindHint = !mounted ? '⌘K' : isMac ? '⌘K' : 'Ctrl K'
|
||||
|
||||
@@ -122,7 +122,7 @@ export function TopBar({ user, alerts, onDismissAlert, onAddBookmark, onToggleSi
|
||||
<BreadcrumbList className="flex-nowrap">
|
||||
<BreadcrumbItem>
|
||||
<BreadcrumbLink asChild className="font-medium">
|
||||
<Link href="/pages">computer</Link>
|
||||
<Link href="/pages">superbrain</Link>
|
||||
</BreadcrumbLink>
|
||||
</BreadcrumbItem>
|
||||
<BreadcrumbSeparator />
|
||||
|
||||
Reference in New Issue
Block a user