mirror of
https://github.com/volcengine/OpenViking.git
synced 2026-09-29 04:02:57 +08:00
76 lines
2.4 KiB
HTML
76 lines
2.4 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<link
|
|
rel="icon"
|
|
type="image/png"
|
|
sizes="32x32"
|
|
href="%BASE_URL%favicon-32.png"
|
|
/>
|
|
<link rel="apple-touch-icon" href="%BASE_URL%apple-touch-icon.png" />
|
|
<link rel="manifest" href="%BASE_URL%manifest.json" />
|
|
<meta
|
|
name="viewport"
|
|
content="width=device-width, initial-scale=1.0, viewport-fit=cover"
|
|
/>
|
|
<meta name="theme-color" content="#ffffff" />
|
|
<meta name="application-name" content="OpenViking Studio" />
|
|
<meta name="mobile-web-app-capable" content="yes" />
|
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
<meta name="apple-mobile-web-app-title" content="OpenViking" />
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
|
|
<!-- Runs before Vite's module graph so dependencies can safely call crypto.randomUUID. -->
|
|
<script>
|
|
;(() => {
|
|
const cryptoObject = globalThis.crypto
|
|
if (!cryptoObject || typeof cryptoObject.randomUUID === 'function') {
|
|
return
|
|
}
|
|
|
|
const createUuid = () => {
|
|
const bytes = new Uint8Array(16)
|
|
if (typeof cryptoObject.getRandomValues === 'function') {
|
|
cryptoObject.getRandomValues(bytes)
|
|
} else {
|
|
for (let index = 0; index < bytes.length; index += 1) {
|
|
bytes[index] = Math.floor(Math.random() * 256)
|
|
}
|
|
}
|
|
|
|
bytes[6] = (bytes[6] & 0x0f) | 0x40
|
|
bytes[8] = (bytes[8] & 0x3f) | 0x80
|
|
|
|
const hex = Array.from(bytes, (byte) =>
|
|
byte.toString(16).padStart(2, '0'),
|
|
)
|
|
|
|
return `${hex.slice(0, 4).join('')}-${hex
|
|
.slice(4, 6)
|
|
.join('')}-${hex.slice(6, 8).join('')}-${hex
|
|
.slice(8, 10)
|
|
.join('')}-${hex.slice(10, 16).join('')}`
|
|
}
|
|
|
|
try {
|
|
Object.defineProperty(cryptoObject, 'randomUUID', {
|
|
configurable: true,
|
|
value: createUuid,
|
|
})
|
|
} catch {
|
|
try {
|
|
cryptoObject.randomUUID = createUuid
|
|
} catch {
|
|
// Ignore browsers that expose a non-extensible Crypto object.
|
|
}
|
|
}
|
|
})()
|
|
</script>
|
|
<title>OpenViking Studio</title>
|
|
</head>
|
|
<body>
|
|
<div id="app"></div>
|
|
<script type="module" src="/src/main.tsx"></script>
|
|
</body>
|
|
</html>
|