Update prefix issue

This commit is contained in:
Donald Zou
2025-12-25 16:49:32 +08:00
parent 53f7a32202
commit a0bbace7ee
157 changed files with 163 additions and 294 deletions
+35 -36
View File
@@ -1,36 +1,35 @@
<!DOCTYPE html>
<html lang="en">
<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">
<link rel="icon" href="./img/Logo-2-512x512.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WGDashboard</title>
<script>
let appPrefix = "{{ APP_PREFIX if APP_PREFIX else '' }}";
if (appPrefix.includes('{' + '{')) {
appPrefix = '';
}
window.APP_PREFIX = appPrefix;
const isViteDevMode = document.querySelector('script[src*="@vite/client"]') !== null;
const base = document.createElement('base');
if (isViteDevMode) {
base.href = '/';
} else {
base.href = (window.APP_PREFIX || '') + '/';
}
document.head.insertBefore(base, document.head.firstChild);
</script>
<script type="module" crossorigin src="./assets/index-Daf9JYJW.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-BJoKV7uo.css">
</head>
<body>
<div id="app"></div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<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">
<link rel="icon" href="./img/Logo-2-512x512.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WGDashboard</title>
<script>
let appPrefix = "{{ APP_PREFIX if APP_PREFIX else '' }}";
if (appPrefix.includes('{' + '{')) {
appPrefix = '';
}
window.APP_PREFIX = appPrefix;
const isViteDevMode = document.querySelector('script[src*="@vite/client"]') !== null;
const base = document.createElement('base');
if (isViteDevMode) {
base.href = '/';
} else {
base.href = (window.APP_PREFIX || '') + '/';
}
document.head.insertBefore(base, document.head.firstChild);
</script>
<script type="module" crossorigin src="./assets/index-DW-_CXHM.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-DOyBHXAH.css">
</head>
<body>
<div id="app"></div>
</body>
</html>