Merge tag '2024.11.0' into feature/2024.10
This commit is contained in:
commit
bc816cb166
234 changed files with 6612 additions and 4634 deletions
|
|
@ -8,11 +8,13 @@ import * as Misskey from 'misskey-js';
|
|||
import { hemisphere } from '@@/js/intl-const.js';
|
||||
import lightTheme from '@@/themes/l-cherry.json5';
|
||||
import darkTheme from '@@/themes/d-ice.json5';
|
||||
import { miLocalStorage } from './local-storage.js';
|
||||
import { searchEngineMap } from './scripts/search-engine-map.js';
|
||||
import type { SoundType } from '@/scripts/sound.js';
|
||||
import type { FollowingFeedTab } from '@/scripts/following-feed-utils.js';
|
||||
import { DEFAULT_DEVICE_KIND, type DeviceKind } from '@/scripts/device-kind.js';
|
||||
import { miLocalStorage } from '@/local-storage.js';
|
||||
import { Storage } from '@/pizzax.js';
|
||||
import type { Ast } from '@syuilo/aiscript';
|
||||
|
||||
interface PostFormAction {
|
||||
title: string,
|
||||
|
|
@ -261,7 +263,7 @@ export const defaultStore = markRaw(new Storage('base', {
|
|||
|
||||
overridedDeviceKind: {
|
||||
where: 'device',
|
||||
default: null as null | 'smartphone' | 'tablet' | 'desktop',
|
||||
default: null as DeviceKind | null,
|
||||
},
|
||||
serverDisconnectedBehavior: {
|
||||
where: 'device',
|
||||
|
|
@ -329,11 +331,11 @@ export const defaultStore = markRaw(new Storage('base', {
|
|||
},
|
||||
useBlurEffectForModal: {
|
||||
where: 'device',
|
||||
default: !/mobile|iphone|android/.test(navigator.userAgent.toLowerCase()), // 循環参照するのでdevice-kind.tsは参照できない
|
||||
default: DEFAULT_DEVICE_KIND === 'desktop',
|
||||
},
|
||||
useBlurEffect: {
|
||||
where: 'device',
|
||||
default: !/mobile|iphone|android/.test(navigator.userAgent.toLowerCase()), // 循環参照するのでdevice-kind.tsは参照できない
|
||||
default: DEFAULT_DEVICE_KIND === 'desktop',
|
||||
},
|
||||
showFixedPostForm: {
|
||||
where: 'device',
|
||||
|
|
@ -611,7 +613,7 @@ export type Plugin = {
|
|||
token: string;
|
||||
src: string | null;
|
||||
version: string;
|
||||
ast: any[];
|
||||
ast: Ast.Node[];
|
||||
author?: string;
|
||||
description?: string;
|
||||
permissions?: string[];
|
||||
|
|
@ -649,13 +651,13 @@ export class ColdDeviceStorage {
|
|||
}
|
||||
|
||||
public static getAll(): Partial<typeof this.default> {
|
||||
return (Object.keys(this.default) as (keyof typeof this.default)[]).reduce((acc, key) => {
|
||||
return (Object.keys(this.default) as (keyof typeof this.default)[]).reduce<Partial<typeof this.default>>((acc, key) => {
|
||||
const value = localStorage.getItem(PREFIX + key);
|
||||
if (value != null) {
|
||||
acc[key] = JSON.parse(value);
|
||||
}
|
||||
return acc;
|
||||
}, {} as any);
|
||||
}, {});
|
||||
}
|
||||
|
||||
public static set<T extends keyof typeof ColdDeviceStorage.default>(key: T, value: typeof ColdDeviceStorage.default[T]): void {
|
||||
|
|
@ -700,7 +702,7 @@ export class ColdDeviceStorage {
|
|||
get: () => {
|
||||
return valueRef.value;
|
||||
},
|
||||
set: (value: unknown) => {
|
||||
set: (value: typeof ColdDeviceStorage.default[K]) => {
|
||||
const val = value;
|
||||
ColdDeviceStorage.set(key, val);
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue