Files
piik/index.html
AAA 7012e13ea3 fix(app): preserve runtime affinity across same-site invitations
Keep the established launch query contract for separately updated Apps and sites. Handle same-document room and invitation navigation inside the verified Windows workspace while preserving full navigation for real path, query and origin changes. This keeps active sharing and the selected App together without a second URL or compatibility parser.
2026-11-22 20:28:37 -05:00

33 lines
1.5 KiB
HTML

<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#171a20" media="(prefers-color-scheme: dark)" />
<meta name="theme-color" content="#f4f3ef" media="(prefers-color-scheme: light)" />
<link rel="icon" href="/favicon.ico" />
<link rel="icon" type="image/png" sizes="96x96" href="/favicon.png" />
<link rel="icon" type="image/svg+xml" sizes="any" href="/favicon.svg" />
<title>Piik</title>
<script>
var systemTheme = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
var theme;
try { theme = localStorage.getItem("piik:ui-theme"); } catch (e) {}
var launch = new URLSearchParams(location.hash.slice(1));
var launchTheme = launch.get("piik-theme");
var explicitTheme = (new URLSearchParams(location.search).get("piik-preferences") || "").split(",").includes("theme");
if (launch.get("piik-client") === "1" &&
(launchTheme === "light" || launchTheme === "dark" || launchTheme === "system") &&
(explicitTheme || (theme !== "light" && theme !== "dark"))) {
theme = launchTheme === "system" ? systemTheme : launchTheme;
}
document.documentElement.dataset.theme =
theme === "light" || theme === "dark" ? theme : systemTheme;
</script>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/client/main.tsx"></script>
</body>
</html>