mirror of
https://github.com/purocean/yn.git
synced 2026-09-24 15:46:02 +08:00
fix: lint
This commit is contained in:
@@ -23,7 +23,7 @@ export function getColorScheme () {
|
||||
return theme
|
||||
}
|
||||
|
||||
export function setTheme(name: 'system' | 'dark' | 'light') {
|
||||
export function setTheme (name: 'system' | 'dark' | 'light') {
|
||||
document.documentElement.setAttribute('app-theme', name)
|
||||
bus.emit('theme.change', name)
|
||||
storage.set('app.theme', name)
|
||||
@@ -39,4 +39,4 @@ window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', ()
|
||||
if (getThemeName() === 'system') {
|
||||
setTheme('system')
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
@@ -28,7 +28,7 @@ const EChartsPlugin = (md: Markdown) => {
|
||||
|
||||
let charts: {[key: string]: any} = {}
|
||||
|
||||
const update = (theme: string | null = null, animation: boolean | undefined = undefined, renderImg = false) => {
|
||||
const update = (theme: string | undefined = undefined, animation: boolean | undefined = undefined, renderImg = false) => {
|
||||
theme ??= getColorScheme()
|
||||
|
||||
Object.values(charts).forEach(x => x.chart.dispose())
|
||||
|
||||
@@ -46,10 +46,14 @@ if (FLAG_DEMO) {
|
||||
const method = (init && init.method) || 'GET'
|
||||
|
||||
if (uri.startsWith('/api/settings')) {
|
||||
return Promise.resolve({ status: 'ok', message: '获取成功', data: {
|
||||
repositories: { test: '/path_test' },
|
||||
shell: 'bash'
|
||||
} })
|
||||
return Promise.resolve({
|
||||
status: 'ok',
|
||||
message: '获取成功',
|
||||
data: {
|
||||
repositories: { test: '/path_test' },
|
||||
shell: 'bash'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (uri.startsWith('/api/mark')) {
|
||||
|
||||
Reference in New Issue
Block a user