This commit is contained in:
Donald Zou
2025-08-16 17:02:21 +08:00
parent 24940886f6
commit 7b99441602
44 changed files with 109 additions and 56 deletions

View File

@@ -6,14 +6,39 @@
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="application-name" content="WGDashboard">
<meta name="apple-mobile-web-app-title" content="WGDashboard">
<link rel="manifest" href="./json/manifest.json">
<link rel="icon" href="./img/Logo-2-512x512.png">
<link rel="manifest" href="/json/manifest.json">
<link rel="icon" href="/img/Logo-2-512x512.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WGDashboard</title>
<script type="module" crossorigin src="./assets/index-CzqOJ-1c.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-CjwGNVZm.css">
<script type="module" crossorigin src="/assets/index-oURtqLKc.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DYkLcIXF.css">
</head>
<body>
<div id="app"></div>
<script type="javascript">
// Runtime base path detection
function getBasePath() {
const path = window.location.pathname
const segments = path.split('/')
const staticIndex = segments.indexOf('static')
if (staticIndex > 0) {
return segments.slice(0, staticIndex + 1).join('/') + '/app/dist/'
}
return '/static/app/dist/'
}
// Update document base if needed
const currentBase = document.querySelector('base')?.href || window.location.origin + '/'
const detectedBase = window.location.origin + getBasePath()
if (currentBase !== detectedBase) {
const baseTag = document.querySelector('base') || document.createElement('base')
baseTag.href = detectedBase
if (!document.querySelector('base')) {
document.head.appendChild(baseTag)
}
}
</script>
</body>
</html>