Merge remote-tracking branch 'misskey/master' into feature/2024.9.0
This commit is contained in:
commit
f00576bce6
564 changed files with 19993 additions and 8169 deletions
|
|
@ -5,11 +5,11 @@
|
|||
|
||||
import { ref } from 'vue';
|
||||
import tinycolor from 'tinycolor2';
|
||||
import lightTheme from '@@/themes/_light.json5';
|
||||
import darkTheme from '@@/themes/_dark.json5';
|
||||
import { deepClone } from './clone.js';
|
||||
import type { BundledTheme } from 'shiki/themes';
|
||||
import { globalEvents } from '@/events.js';
|
||||
import lightTheme from '@/themes/_light.json5';
|
||||
import darkTheme from '@/themes/_dark.json5';
|
||||
import { miLocalStorage } from '@/local-storage.js';
|
||||
|
||||
export type Theme = {
|
||||
|
|
@ -54,7 +54,7 @@ export const getBuiltinThemes = () => Promise.all(
|
|||
'd-u0',
|
||||
'rosepine',
|
||||
'rosepine-dawn',
|
||||
].map(name => import(`@/themes/${name}.json5`).then(({ default: _default }): Theme => _default)),
|
||||
].map(name => import(`@@/themes/${name}.json5`).then(({ default: _default }): Theme => _default)),
|
||||
);
|
||||
|
||||
export const getBuiltinThemesRef = () => {
|
||||
|
|
@ -78,6 +78,8 @@ export function applyTheme(theme: Theme, persist = true) {
|
|||
|
||||
const colorScheme = theme.base === 'dark' ? 'dark' : 'light';
|
||||
|
||||
document.documentElement.dataset.colorScheme = colorScheme;
|
||||
|
||||
// Deep copy
|
||||
const _theme = deepClone(theme);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue