-
Notifications
You must be signed in to change notification settings - Fork 73
/
index.html
114 lines (108 loc) · 4.58 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Backend.AI">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="theme-color" content="#fff">
<base href="/">
<link rel="icon" href="manifest/favicon.ico">
<link rel="apple-touch-icon" sizes="256x256" href="manifest/backend-ai.iconset/[email protected]">
<link rel="icon" type="image/png" sizes="32x32" href="manifest/backend-ai.iconset/[email protected]">
<link rel="icon" type="image/png" sizes="16x16" href="manifest/backend-ai.iconset/[email protected]">
<link rel="manifest" href="manifest.json">
<link rel="stylesheet" href="resources/fonts/fonts.css">
<link rel="stylesheet" href="resources/webui.css">
<link rel="stylesheet" href="resources/custom.css">
<script src="manifest/app.js"></script>
<title>Backend.AI</title>
<script src="./src/lib/webcomponents-loader.js"></script>
<script src="./src/lib/web-animations-js/web-animations-next-lite.min.js"></script>
<script>
globalThis.isElectron = isElectron();
if (isElectron) {
globalThis.electronInitialHref = window.location.href;
}
globalThis.enableSW = true;
globalThis.process = {
env: {
NODE_ENV: 'production'
}
};
globalThis.packageVersion = "24.09.0-alpha.1";
globalThis.buildNumber = "6011";
</script>
<!-- DO NOT CHANGE BELOW LINE -->
<!-- REACT_BUNDLE_INJECTING FOR DEV-->
</head>
<body>
<script>
//To avoid flickering when first loading the page, we add a class to the body to indicate the theme.
const userPrefersDark = localStorage.getItem('backendaiwebui.settings.isDarkMode');
const systemPrefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
globalThis.isDarkMode = userPrefersDark === null || userPrefersDark === undefined ? systemPrefersDark : userPrefersDark === 'true';
if (globalThis.isDarkMode) {
document.body.classList.add('dark-theme');
}
</script>
<div>
<div id="react-root">
<div class="splash">
<div class="splash-header">
<!-- <img src="manifest/backend.ai-text.svg" style="height:50px;padding:35px 20px;"> -->
<div class="logo"></div>
</div>
<div class="splash-information">
<ul>
<li>Backend.AI Web UI <span id="version-detail" class="detail"></span></li>
<li><span id="license-detail"></span></li>
<li><span id="mode-detail" class="detail"></span> <span id="build-detail" class="detail"></span></li>
</ul>
<ul>
<li>Powered by open-source software</li>
<li class="copyright">Copyright © 2015-2024 Lablup Inc.</li>
</ul>
</div>
<div class="sk-folding-cube">
<div class="sk-cube1 sk-cube"></div>
<div class="sk-cube2 sk-cube"></div>
<div class="sk-cube4 sk-cube"></div>
<div class="sk-cube3 sk-cube"></div>
</div>
<div id="loading-message" class="loading-message">Loading components...</div>
</div>
</div>
<!-- <backend-ai-webui id="webui-shell" style="background-color:#222222;"> -->
<!-- </backend-ai-webui> -->
<noscript>
<p>Could not render Backend.AI Web UI. Check that JavaScript is enabled.</p>
</noscript>
<script src="./dist/components/backend-ai-webui.js" type="module"></script>
<script>
document.getElementById('version-detail').innerText = globalThis.packageVersion;
document.getElementById('build-detail').innerText = ' Build ' + globalThis.buildVersion;
document.getElementById('license-detail').innerText = '';
if (globalThis.isElectron) {
document.getElementById('mode-detail').innerText = 'App';
} else {
document.getElementById('mode-detail').innerText = 'WebServer';
}
if (globalThis.isIE) {
alert('Internet Explorer is not supported. Please visit with modern browsers.');
document.getElementById('loading-message').innerText = 'Not supported browser.';
document.getElementById('loading-message').style.color = 'red';
}
if (!['127.0.0.1', 'localhost'].includes(window.location.hostname) &&
'enableSW' in globalThis &&
globalThis.enableSW === true) {
// Service worker routine.
if ('serviceWorker' in navigator && globalThis.isElectron === false) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/sw.js');
});
}
}
</script>
</body>
</html>