mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-10-03 07:46:18 +00:00
Build
This commit is contained in:
33
src/static/app/dist/index.html
vendored
33
src/static/app/dist/index.html
vendored
@@ -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>
|
||||
|
Reference in New Issue
Block a user