2024-01-08 12:23:57 -05:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
2024-11-07 10:37:11 +08:00
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta name="mobile-web-app-capable" content="yes">
|
|
|
|
<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">
|
2025-04-21 15:59:42 +08:00
|
|
|
<link rel="icon" href="/img/Logo-2-512x512.png">
|
2024-11-07 10:37:11 +08:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<title>WGDashboard</title>
|
2025-08-16 17:02:21 +08:00
|
|
|
<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()
|
2025-08-16 17:04:36 +08:00
|
|
|
console.log(detectedBase)
|
2025-08-16 17:02:21 +08:00
|
|
|
if (currentBase !== detectedBase) {
|
|
|
|
const baseTag = document.querySelector('base') || document.createElement('base')
|
|
|
|
baseTag.href = detectedBase
|
|
|
|
if (!document.querySelector('base')) {
|
|
|
|
document.head.appendChild(baseTag)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
2025-08-16 17:05:25 +08:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="app"></div>
|
|
|
|
|
2024-11-07 10:37:11 +08:00
|
|
|
<script type="module" src="./src/main.js"></script>
|
|
|
|
</body>
|
2024-01-08 12:23:57 -05:00
|
|
|
</html>
|