This commit is contained in:
Donald Zou
2025-08-16 17:21:08 +08:00
parent 9936038603
commit 7db0f7ec35
42 changed files with 49 additions and 74 deletions

View File

@@ -6,37 +6,12 @@
<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="/static/app/dist/json/manifest.json">
<link rel="icon" href="/static/app/dist/img/Logo-2-512x512.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WGDashboard</title>
<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()
console.log(detectedBase)
if (currentBase !== detectedBase) {
const baseTag = document.querySelector('base') || document.createElement('base')
baseTag.href = detectedBase
if (!document.querySelector('base')) {
document.head.appendChild(baseTag)
}
}
</script>
<script type="module" crossorigin src="/assets/index-oURtqLKc.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DYkLcIXF.css">
<script type="module" crossorigin src="/static/app/dist/assets/index-B-jc5mKC.js"></script>
<link rel="stylesheet" crossorigin href="/static/app/dist/assets/index-C4LstPme.css">
</head>
<body>
<div id="app"></div>