fix: webui-6

This commit is contained in:
手瓜一十雪 2024-05-05 13:40:54 +08:00
parent 8d5c736975
commit 9fce617c57
2 changed files with 14 additions and 15 deletions

View File

@ -4,8 +4,6 @@ import { SettingButton } from "./SettingButton";
import { SettingSwitch } from "./SettingSwitch";
import { SettingSelect } from "./SettingSelect";
// @ts-ignore 引入Css 能不能优雅点 神经这样写
import StyleRaw from "../assets/NapCat.css";
function aprilFoolsEgg(node: Element) {
async function onSettingWindowCreated(view: Element) {
const isEmpty = (value: any) => value === undefined || value === undefined || value === ''
@ -32,7 +30,6 @@ function aprilFoolsEgg(node: Element) {
const doc = parser.parseFromString(
[
'<div>',
`<style>${StyleRaw}</style>`,
`<setting-section id="llonebot-error">
<setting-panel><pre><code></code></pre></setting-panel>
</setting-section>`,

View File

@ -1,21 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="{ BASE_URL }" />
<link rel="stylesheet" href="/plugin/inject/color.css" />
<link rel="stylesheet" href="/plugin/inject/style.css" />
<link rel="stylesheet" href="/plugin/inject/webcomponents.css" />
<link rel="stylesheet" href="/assets/color.css" />
<link rel="stylesheet" href="/assets/style.css" />
<link rel="stylesheet" href="/assets/NapCat.css" />
<link rel="stylesheet" href="/assets/webcomponents.css" />
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script src="/plugin/inject/iframe.js"></script>
<title>Plugin iframe</title>
<title>NapCat-WebUi</title>
</head>
<body>
<script>
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.body.classList.add('q-theme-tokens-dark');
}
</script>
<script>
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.body.classList.add('q-theme-tokens-dark');
}
</script>
</body>
</html>