feat(webui): add opt-in MaiBot appearance overlay

This commit is contained in:
DrSmoothl committed 2026-10-21 13:07:44 +08:00
1 parent 28f64113e7
commit 5cd4ae61dd
29 files changed
+1424 -315

No files matched your search

+15 -5
View File
@@ -2,9 +2,19 @@ import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import './index.css';
import App from './App.tsx';
import { prepareTargetAppearance } from './appearance/runtime';
createRoot(document.getElementById('root')!).render(
<StrictMode>
<App />
</StrictMode>,
);
const root = document.getElementById('root')!;
void prepareTargetAppearance()
.then(() => {
createRoot(root).render(
<StrictMode>
<App />
</StrictMode>,
);
})
.catch((error: unknown) => {
console.error('[SnowLuma appearance] Startup failed', error);
root.textContent = '界面外观加载失败,请刷新重试。详细原因见浏览器控制台。';
});