mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2026-01-12 13:36:17 +00:00
Recompiled frontend to support new changes in the app-prefix mechanism (WGDasboardClient fix and vite dev server support)
This commit is contained in:
15
src/static/dist/WGDashboardAdmin/index.html
vendored
15
src/static/dist/WGDashboardAdmin/index.html
vendored
@@ -6,13 +6,24 @@
|
|||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<meta name="application-name" content="WGDashboard">
|
<meta name="application-name" content="WGDashboard">
|
||||||
<meta name="apple-mobile-web-app-title" content="WGDashboard">
|
<meta name="apple-mobile-web-app-title" content="WGDashboard">
|
||||||
<base href="{{ APP_PREFIX if APP_PREFIX else '' }}/">
|
|
||||||
<link rel="manifest" href="./json/manifest.json">
|
<link rel="manifest" href="./json/manifest.json">
|
||||||
<link rel="icon" href="./img/Logo-2-512x512.png">
|
<link rel="icon" href="./img/Logo-2-512x512.png">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>WGDashboard</title>
|
<title>WGDashboard</title>
|
||||||
<script>
|
<script>
|
||||||
window.APP_PREFIX = "{{ APP_PREFIX if APP_PREFIX else '' }}";
|
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>
|
||||||
<script type="module" crossorigin src="./assets/index-Daf9JYJW.js"></script>
|
<script type="module" crossorigin src="./assets/index-Daf9JYJW.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="./assets/index-BJoKV7uo.css">
|
<link rel="stylesheet" crossorigin href="./assets/index-BJoKV7uo.css">
|
||||||
|
|||||||
15
src/static/dist/WGDashboardClient/client.html
vendored
15
src/static/dist/WGDashboardClient/client.html
vendored
@@ -2,7 +2,6 @@
|
|||||||
<html lang="">
|
<html lang="">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<base href="{{ APP_PREFIX if APP_PREFIX else '' }}/">
|
|
||||||
<link rel="icon" href="./img/Logo-2-128x128.png">
|
<link rel="icon" href="./img/Logo-2-128x128.png">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>WGDashboard Client</title>
|
<title>WGDashboard Client</title>
|
||||||
@@ -30,7 +29,19 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
window.APP_PREFIX = "{{ APP_PREFIX if APP_PREFIX else '' }}";
|
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 || '') + '/client/';
|
||||||
|
}
|
||||||
|
document.head.insertBefore(base, document.head.firstChild);
|
||||||
</script>
|
</script>
|
||||||
<script type="module" crossorigin src="./assets/index-Cvh_c-yQ.js"></script>
|
<script type="module" crossorigin src="./assets/index-Cvh_c-yQ.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="./assets/index-TPmsOMhK.css">
|
<link rel="stylesheet" crossorigin href="./assets/index-TPmsOMhK.css">
|
||||||
|
|||||||
Reference in New Issue
Block a user