mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-06 13:05:09 +00:00
fix
This commit is contained in:
15
napcat.webui/src/utils/theme.ts
Normal file
15
napcat.webui/src/utils/theme.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { request } from './request'
|
||||
|
||||
const style = document.createElement('style')
|
||||
document.head.appendChild(style)
|
||||
|
||||
export function loadTheme() {
|
||||
request('/files/theme.css?_t=' + Date.now())
|
||||
.then((res) => res.data)
|
||||
.then((css) => {
|
||||
style.innerHTML = css
|
||||
})
|
||||
.catch(() => {
|
||||
console.error('Failed to load theme.css')
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user