このコミットが含まれているのは:
@@ -212,6 +212,15 @@ const LEGACY_GEKANATOR_BACKGROUND_MOTION_STORAGE_KEY =
|
||||
const LEGACY_MIGRATED_THEME_ID = 'custom:legacy-migrated'
|
||||
|
||||
|
||||
const createCustomThemeId = (): `custom:${ string }` => {
|
||||
const randomPart =
|
||||
globalThis.crypto?.randomUUID?.()
|
||||
?? `${ Date.now ().toString (36) }-${ Math.random ().toString (36).slice (2) }`
|
||||
|
||||
return `custom:${ randomPart }`
|
||||
}
|
||||
|
||||
|
||||
export const fetchUserSettings = async (): Promise<UserSettings> => {
|
||||
const raw = await apiGet<{
|
||||
theme: UserSettings['theme']
|
||||
@@ -567,7 +576,7 @@ export const createCustomThemeFromBase = (
|
||||
baseTheme: BuiltinThemeId,
|
||||
tokens?: ThemeTokens,
|
||||
): CustomClientTheme => {
|
||||
const id = `custom:${ crypto.randomUUID () }` as ThemeId
|
||||
const id = createCustomThemeId ()
|
||||
return {
|
||||
id,
|
||||
name: themeCopyName (baseTheme),
|
||||
|
||||
新しい課題から参照
ユーザをブロックする