enhance(frontend): deckをpreferences管理に
This commit is contained in:
@@ -9,6 +9,7 @@ import type { Theme } from '@/theme.js';
|
||||
import type { SoundType } from '@/utility/sound.js';
|
||||
import type { Plugin } from '@/plugin.js';
|
||||
import type { DeviceKind } from '@/utility/device-kind.js';
|
||||
import type { Column, DeckProfile } from '@/deck.js';
|
||||
import { DEFAULT_DEVICE_KIND } from '@/utility/device-kind.js';
|
||||
|
||||
/** サウンド設定 */
|
||||
@@ -45,6 +46,14 @@ export const PREF_DEF = {
|
||||
data: Record<string, any>;
|
||||
}[],
|
||||
},
|
||||
'deck.profile': {
|
||||
accountDependent: true,
|
||||
default: null as string | null,
|
||||
},
|
||||
'deck.profiles': {
|
||||
accountDependent: true,
|
||||
default: [] as DeckProfile[],
|
||||
},
|
||||
|
||||
overridedDeviceKind: {
|
||||
default: null as DeviceKind | null,
|
||||
|
||||
@@ -42,6 +42,8 @@ export type PreferencesProfile = {
|
||||
syncByAccount: [Account, keyof PREF][],
|
||||
};
|
||||
|
||||
// TODO: 任意のプロパティをデバイス間で同期できるようにする?
|
||||
|
||||
export class ProfileManager extends EventEmitter<{
|
||||
updated: (ctx: {
|
||||
profile: PreferencesProfile
|
||||
|
||||
Reference in New Issue
Block a user