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.
@@ -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
- try {
408
- res.sendFile(path.resolve(__dirname, '../../assets/logo.svg'));
409
- } catch (e) {
410
- res.status(404).send('Not found');
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({
@@ -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>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glad-web",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Glad transforms terminal-based AI coding tools into a polished, mobile-friendly local Web interface.",
5
5
  "main": "index.js",
6
6
  "bin": {