feat: publish HoloLake model-native living system source
This commit is contained in:
parent
6ad10edde1
commit
c395dd3a99
2467 changed files with 615073 additions and 0 deletions
154
product-source/hololake-platform/index.html
Normal file
154
product-source/hololake-platform/index.html
Normal file
|
|
@ -0,0 +1,154 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/png" href="/favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Inter:wght@400;500;600;700&family=JetBrains+Mono&display=swap" rel="stylesheet" />
|
||||
<script>
|
||||
(function () {
|
||||
function isResizeObserverLoopMessage(message) {
|
||||
return typeof message === 'string'
|
||||
&& (
|
||||
message.indexOf('ResizeObserver loop completed with undelivered notifications') !== -1
|
||||
|| message.indexOf('ResizeObserver loop limit exceeded') !== -1
|
||||
);
|
||||
}
|
||||
window.addEventListener('error', function (event) {
|
||||
if (isResizeObserverLoopMessage(event.message)) {
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
window.addEventListener('unhandledrejection', function (event) {
|
||||
var reason = event.reason && (event.reason.stack || event.reason.message || String(event.reason));
|
||||
if (isResizeObserverLoopMessage(reason)) {
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
if (new URLSearchParams(window.location.search).get('window') === 'ai-workspace') {
|
||||
document.documentElement.classList.add('ai-workspace-native-window');
|
||||
}
|
||||
} catch {
|
||||
// Leave the normal app chrome untouched if URL parsing is unavailable.
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<style>
|
||||
:root {
|
||||
color-scheme: light;
|
||||
background: #FFFFFF;
|
||||
color: #37352F;
|
||||
}
|
||||
:root[data-theme="dark"] {
|
||||
color-scheme: dark;
|
||||
background: #1F1E1B;
|
||||
color: #E6E1D8;
|
||||
}
|
||||
body {
|
||||
background: inherit;
|
||||
color: inherit;
|
||||
}
|
||||
:root.ai-workspace-native-window,
|
||||
:root.ai-workspace-native-window body,
|
||||
:root.ai-workspace-native-window #root {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
}
|
||||
:root.ai-workspace-native-window #root {
|
||||
background: inherit;
|
||||
}
|
||||
</style>
|
||||
<title>HoloLake Era · 光湖语言世界</title>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
(function () {
|
||||
var key = 'tolaria-theme';
|
||||
var legacyKey = 'laputa-theme';
|
||||
var systemDarkQuery = '(prefers-color-scheme: dark)';
|
||||
function normalizeTheme(value) {
|
||||
return value === 'dark' || value === 'light' || value === 'system' ? value : null;
|
||||
}
|
||||
function prefersDarkTheme() {
|
||||
try {
|
||||
return typeof window.matchMedia === 'function' && window.matchMedia(systemDarkQuery).matches;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function resolveTheme(value) {
|
||||
var mode = normalizeTheme(value) || 'light';
|
||||
return mode === 'system' ? (prefersDarkTheme() ? 'dark' : 'light') : mode;
|
||||
}
|
||||
function applyTheme(value) {
|
||||
var mode = resolveTheme(value);
|
||||
document.documentElement.setAttribute('data-theme', mode);
|
||||
document.documentElement.classList.toggle('dark', mode === 'dark');
|
||||
}
|
||||
var mode;
|
||||
try {
|
||||
mode = normalizeTheme(localStorage.getItem(key));
|
||||
if (mode === null) {
|
||||
mode = normalizeTheme(localStorage.getItem(legacyKey));
|
||||
if (mode !== null) localStorage.setItem(key, mode);
|
||||
}
|
||||
applyTheme(mode);
|
||||
} catch {
|
||||
applyTheme('light');
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<script>
|
||||
(function () {
|
||||
var readyEventName = 'tolaria:frontend-ready';
|
||||
var reloadAttemptKey = 'tolaria:startup-reload-attempted';
|
||||
var startupTimeoutMs = 10000;
|
||||
var isTauri = '__TAURI__' in window || '__TAURI_INTERNALS__' in window;
|
||||
|
||||
if (!isTauri) return;
|
||||
|
||||
function hasReloadAttempted() {
|
||||
try {
|
||||
return sessionStorage.getItem(reloadAttemptKey) === '1';
|
||||
} catch {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function markReloadAttempted() {
|
||||
try {
|
||||
sessionStorage.setItem(reloadAttemptKey, '1');
|
||||
return true;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function clearReloadAttempt() {
|
||||
try {
|
||||
sessionStorage.removeItem(reloadAttemptKey);
|
||||
} catch {
|
||||
// Storage can be unavailable in hardened WebView/privacy modes.
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener(readyEventName, clearReloadAttempt, { once: true });
|
||||
window.setTimeout(function () {
|
||||
if (window.__tolariaFrontendReady === true) return;
|
||||
if (hasReloadAttempted()) return;
|
||||
if (!markReloadAttempted()) return;
|
||||
|
||||
window.location.reload();
|
||||
}, startupTimeoutMs);
|
||||
})();
|
||||
</script>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in a new issue