31 行
1.2 KiB
HTML
31 行
1.2 KiB
HTML
|
|
<!doctype html>
|
||
|
|
<!--
|
||
|
|
The desktop pet's own entry point.
|
||
|
|
|
||
|
|
It exists so that `class="pet-view"` is present before anything paints. The
|
||
|
|
transparency rule in styles.css is gated on that class, and it used to be
|
||
|
|
added by an effect inside the lazily-imported pet chunk — over 5 MB, because
|
||
|
|
the spritesheet is inlined — so the transparent, undecorated pet window was
|
||
|
|
shown while the app's opaque `html, body, #root` background still won, and
|
||
|
|
appeared on the desktop as a solid dark rectangle until the chunk executed.
|
||
|
|
|
||
|
|
An inline script in index.html would not work: tauri-utils only nonces
|
||
|
|
`script[src^='http']` (html.rs:153), so under this app's `script-src 'self'`
|
||
|
|
an inline script is blocked in a release build while working fine in dev.
|
||
|
|
|
||
|
|
`data-astrbot-pet` is what src/App.tsx already reads to select the pet view,
|
||
|
|
so no routing change is needed.
|
||
|
|
-->
|
||
|
|
<html lang="zh-CN" class="pet-view" data-astrbot-pet="true">
|
||
|
|
<head>
|
||
|
|
<meta charset="UTF-8" />
|
||
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
|
|
<meta name="color-scheme" content="dark light" />
|
||
|
|
<title>AstrBot Pet</title>
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<div id="root"></div>
|
||
|
|
<script type="module" src="/src/main.tsx"></script>
|
||
|
|
</body>
|
||
|
|
</html>
|