Theme key 'theme', storage keys in the cookie scanner, type in the cookie list
- Theme choice in localStorage under 'theme' (next-themes' key and values)
instead of 'ipal-theme'. ThemeScript moves an old choice before the first
paint and removes the old key; useTheme / ThemeSwitcher do the same
without the script. ipalKit({ theme: { storageKey } }) sets an own key,
which reaches ThemeScript through getSiteShell().theme and <html
data-theme-storage>.
- The cookie scanner declares the theme key (Theme choice: local storage,
necessary, until changed or site data is cleared) when the theme switch
is on, so Scan cookies finds it without a crawl.
- Cookies -> Cookie list rows get a Type (cookie / local storage / session
storage, default cookie, shared by every language), filled by scan, review
and approval. The detailed settings window and <CookieTable> show it with
English and Polish defaults; the approval page marks storage entries.
- Migration: adds cookie_settings_cookies.storage (DEFAULT 'cookie') and
cookie_settings_locales.detail_labels_storage, nothing else.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
6998b44431
commit
b5368cdc61
@@ -1,5 +1,8 @@
|
||||
import type { ConsentCategory } from './categories.js'
|
||||
|
||||
/** Where an entry of the cookie list is kept in the browser. */
|
||||
export type ConsentStorage = 'cookie' | 'localStorage' | 'sessionStorage'
|
||||
|
||||
export type ConsentTexts = {
|
||||
/** Badge next to the necessary category (e.g. "Always active"). Empty = no badge. */
|
||||
alwaysActiveLabel?: string
|
||||
@@ -26,6 +29,10 @@ export type ConsentTexts = {
|
||||
duration: string
|
||||
provider: string
|
||||
purpose: string
|
||||
/** Label of the type line, e.g. "Type" — shown for entries that are not cookies. */
|
||||
storage?: string
|
||||
/** Names of the types, e.g. { cookie: 'Cookie', localStorage: 'Local storage', … }. */
|
||||
storageTypes?: Record<ConsentStorage, string>
|
||||
}
|
||||
/** Small label above the banner title (e.g. "Privacy & cookies"). Empty = not shown. */
|
||||
eyebrow?: string
|
||||
@@ -48,4 +55,6 @@ export type CookieTableRow = {
|
||||
name: string
|
||||
provider?: string
|
||||
purpose?: string
|
||||
/** Cookie (default) or a browser-storage key. */
|
||||
storage?: ConsentStorage
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user