mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-01-17 05:40:35 +00:00
fix: webui-6
This commit is contained in:
parent
8d5c736975
commit
9fce617c57
@ -4,8 +4,6 @@ import { SettingButton } from "./SettingButton";
|
|||||||
import { SettingSwitch } from "./SettingSwitch";
|
import { SettingSwitch } from "./SettingSwitch";
|
||||||
import { SettingSelect } from "./SettingSelect";
|
import { SettingSelect } from "./SettingSelect";
|
||||||
|
|
||||||
// @ts-ignore 引入Css 能不能优雅点 神经这样写
|
|
||||||
import StyleRaw from "../assets/NapCat.css";
|
|
||||||
function aprilFoolsEgg(node: Element) {
|
function aprilFoolsEgg(node: Element) {
|
||||||
async function onSettingWindowCreated(view: Element) {
|
async function onSettingWindowCreated(view: Element) {
|
||||||
const isEmpty = (value: any) => value === undefined || value === undefined || value === ''
|
const isEmpty = (value: any) => value === undefined || value === undefined || value === ''
|
||||||
@ -32,7 +30,6 @@ function aprilFoolsEgg(node: Element) {
|
|||||||
const doc = parser.parseFromString(
|
const doc = parser.parseFromString(
|
||||||
[
|
[
|
||||||
'<div>',
|
'<div>',
|
||||||
`<style>${StyleRaw}</style>`,
|
|
||||||
`<setting-section id="llonebot-error">
|
`<setting-section id="llonebot-error">
|
||||||
<setting-panel><pre><code></code></pre></setting-panel>
|
<setting-panel><pre><code></code></pre></setting-panel>
|
||||||
</setting-section>`,
|
</setting-section>`,
|
||||||
|
|||||||
@ -1,21 +1,23 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<base href="{ BASE_URL }" />
|
<link rel="stylesheet" href="/assets/color.css" />
|
||||||
<link rel="stylesheet" href="/plugin/inject/color.css" />
|
<link rel="stylesheet" href="/assets/style.css" />
|
||||||
<link rel="stylesheet" href="/plugin/inject/style.css" />
|
<link rel="stylesheet" href="/assets/NapCat.css" />
|
||||||
<link rel="stylesheet" href="/plugin/inject/webcomponents.css" />
|
<link rel="stylesheet" href="/assets/webcomponents.css" />
|
||||||
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
|
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
|
||||||
<script src="/plugin/inject/iframe.js"></script>
|
<title>NapCat-WebUi</title>
|
||||||
<title>Plugin iframe</title>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<script>
|
<script>
|
||||||
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||||
document.body.classList.add('q-theme-tokens-dark');
|
document.body.classList.add('q-theme-tokens-dark');
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
Loading…
Reference in New Issue
Block a user