feat(quick-261016-0fm): manual theme switch on the rail
- the rail's top button cycles system, light and dark and names the current choice; light and dark ignore prefers-color-scheme - usePreferences applies the cached theme before the first await of boot, saves the choice through PUT /account/preferences and reverts with a toast when the save fails; me() applies the stored preference
This commit is contained in:
@@ -2,9 +2,10 @@
|
||||
// D-06, D-10). The section panel hides below about 1100px or when the admin
|
||||
// collapses it. The viewport only forces the collapse and never overwrites
|
||||
// the admin's own choice, which persists in localStorage as a boolean under
|
||||
// SIDEBAR_KEY. The only other writer of browser storage is listState.ts,
|
||||
// which keeps list query parameters per list; tokens and record data are
|
||||
// never stored (T-10-22, T-16.1-03).
|
||||
// SIDEBAR_KEY. The other writers of browser storage are listState.ts,
|
||||
// which keeps list query parameters per list, and usePreferences.ts, which
|
||||
// caches the theme and locale codes; tokens and record data are never stored
|
||||
// (T-10-22, T-16.1-03).
|
||||
import { computed, readonly, ref } from 'vue'
|
||||
|
||||
export const SIDEBAR_KEY = 'summer-admin.sidebar'
|
||||
|
||||
Reference in New Issue
Block a user