glad-web 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commands/web.js +12 -5
- package/lib/web/index.html +1 -0
- package/package.json +1 -1
package/lib/commands/web.js
CHANGED
|
@@ -385,6 +385,8 @@ async function webCommand(options) {
|
|
|
385
385
|
});
|
|
386
386
|
|
|
387
387
|
// Frontend routes
|
|
388
|
+
const logoPath = path.resolve(__dirname, '../../assets/logo.svg');
|
|
389
|
+
|
|
388
390
|
app.get('/', (req, res) => {
|
|
389
391
|
try {
|
|
390
392
|
const htmlPath = path.join(__dirname, '../web/index.html');
|
|
@@ -404,11 +406,16 @@ async function webCommand(options) {
|
|
|
404
406
|
});
|
|
405
407
|
|
|
406
408
|
app.get('/logo.svg', (req, res) => {
|
|
407
|
-
|
|
408
|
-
res.
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
|
|
409
|
+
res.sendFile(logoPath, error => {
|
|
410
|
+
if (error && !res.headersSent) res.status(404).send('Not found');
|
|
411
|
+
});
|
|
412
|
+
});
|
|
413
|
+
|
|
414
|
+
app.get('/favicon.ico', (req, res) => {
|
|
415
|
+
res.type('image/svg+xml');
|
|
416
|
+
res.sendFile(logoPath, error => {
|
|
417
|
+
if (error && !res.headersSent) res.status(404).send('Not found');
|
|
418
|
+
});
|
|
412
419
|
});
|
|
413
420
|
|
|
414
421
|
app.get('/manifest.json', (req, res) => res.json({
|
package/lib/web/index.html
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
|
|
7
7
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
8
8
|
<link rel="manifest" href="/manifest.json">
|
|
9
|
+
<link rel="icon" type="image/svg+xml" href="/logo.svg">
|
|
9
10
|
<link rel="apple-touch-icon" href="/logo.svg">
|
|
10
11
|
<link rel="stylesheet" href="https://unpkg.com/xterm@5.3.0/css/xterm.css" />
|
|
11
12
|
<style>
|