Files
Ydisks-Xianyu-Helper/frontend/components/sidebarState.ts
T
Christ 67d7214930 feat: add account automation and isolated chat
- add account-level auto rating and daily polish tasks\n- add cached historical chat, media, emoji, and per-account realtime sync\n- add SQLite, MySQL, and PostgreSQL migrations and regression coverage\n- align account, sidebar, and chat interfaces with the new workflows
2026-08-08 22:16:35 +08:00

19 lines
480 B
TypeScript

const storageKey = 'ydisks.sidebar.v1';
export const readSidebarCollapsed = (): boolean => {
try {
return window.localStorage.getItem(storageKey) === 'collapsed';
} catch {
return false;
}
};
export const writeSidebarCollapsed = (collapsed: boolean): void => {
try {
window.localStorage.setItem(storageKey, collapsed ? 'collapsed' : 'expanded');
} catch {
// Storage can be unavailable in hardened browsers; the in-memory state
// remains fully functional.
}
};