このコミットが含まれているのは:
@@ -112,6 +112,7 @@ export type ClientSettings = {
|
||||
thumbnailMode?: string }
|
||||
|
||||
export const CLIENT_SETTINGS_STORAGE_KEY = 'btrc_hub.client_settings'
|
||||
export const CLIENT_SETTINGS_EVENT = 'btrc-hub:client-settings-change'
|
||||
export const THEME_OPTIONS = ['system', 'light', 'dark'] as const
|
||||
export const LIST_LIMIT_OPTIONS = [20, 50, 100] as const
|
||||
export const POST_LIST_ORDER_OPTIONS = [
|
||||
@@ -297,6 +298,13 @@ export const loadClientSettings = (): ClientSettings =>
|
||||
|
||||
export const saveClientSettings = (settings: ClientSettings): void => {
|
||||
localStorage.setItem (CLIENT_SETTINGS_STORAGE_KEY, JSON.stringify (settings))
|
||||
|
||||
if (typeof window !== 'undefined')
|
||||
{
|
||||
window.dispatchEvent (new CustomEvent (CLIENT_SETTINGS_EVENT, {
|
||||
detail: settings,
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
新しい課題から参照
ユーザをブロックする