feat(frontend): スリープ無効化機能

Resolve #11853
This commit is contained in:
syuilo
2023-09-20 10:02:39 +09:00
parent bb0b2df37e
commit bb460a1785
6 changed files with 60 additions and 37 deletions

View File

@@ -5,6 +5,7 @@
import { markRaw, ref } from 'vue';
import * as Misskey from 'misskey-js';
import { miLocalStorage } from './local-storage';
import { Storage } from '@/pizzax.js';
interface PostFormAction {
@@ -356,6 +357,10 @@ export const defaultStore = markRaw(new Storage('base', {
where: 'device',
default: {} as Record<string, Record<string, string[]>>,
},
keepScreenOn: {
where: 'device',
default: false,
},
}));
// TODO: 他のタブと永続化されたstateを同期
@@ -382,7 +387,6 @@ interface Watcher {
/**
* 常にメモリにロードしておく必要がないような設定情報を保管するストレージ(非リアクティブ)
*/
import { miLocalStorage } from './local-storage';
import lightTheme from '@/themes/l-light.json5';
import darkTheme from '@/themes/d-green-lime.json5';