glad-web 1.0.8 → 1.0.10

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,15 @@ async function webCommand(options) {
385
385
  });
386
386
 
387
387
  // Frontend routes
388
+ const logoPath = path.resolve(__dirname, '../../assets/logo.svg');
389
+ const gitgraphPath = path.join(__dirname, '../web/gitgraph.js');
390
+
391
+ const sendLogo = (req, res) => {
392
+ res.sendFile(logoPath, error => {
393
+ if (error && !res.headersSent) res.status(404).send('Not found');
394
+ });
395
+ };
396
+
388
397
  app.get('/', (req, res) => {
389
398
  try {
390
399
  const htmlPath = path.join(__dirname, '../web/index.html');
@@ -395,32 +404,31 @@ async function webCommand(options) {
395
404
  }
396
405
  });
397
406
 
398
- app.get('/gitgraph.js', (req, res) => {
407
+ app.get(['/gitgraph.js', /.*\/gitgraph\.js$/], (req, res) => {
399
408
  try {
400
- res.sendFile(path.join(__dirname, '../web/gitgraph.js'));
409
+ res.sendFile(gitgraphPath);
401
410
  } catch (e) {
402
411
  res.status(404).send('Not found');
403
412
  }
404
413
  });
405
414
 
406
- 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
- }
415
+ app.get(['/logo.svg', /.*\/logo\.svg$/], sendLogo);
416
+
417
+ app.get(['/favicon.ico', /.*\/favicon\.ico$/], (req, res) => {
418
+ res.type('image/svg+xml');
419
+ sendLogo(req, res);
412
420
  });
413
421
 
414
- app.get('/manifest.json', (req, res) => res.json({
422
+ app.get(['/manifest.json', /.*\/manifest\.json$/], (req, res) => res.json({
415
423
  name: "Glad Web",
416
424
  short_name: "Glad",
417
- start_url: "/",
425
+ start_url: ".",
418
426
  display: "standalone",
419
427
  background_color: "#000000",
420
428
  theme_color: "#007aff",
421
429
  icons: [
422
430
  {
423
- src: "/logo.svg",
431
+ src: "logo.svg",
424
432
  sizes: "any",
425
433
  type: "image/svg+xml"
426
434
  }
@@ -5,8 +5,9 @@
5
5
  <title>Glad - AI Sessions</title>
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
- <link rel="manifest" href="/manifest.json">
9
- <link rel="apple-touch-icon" href="/logo.svg">
8
+ <link rel="manifest" href="manifest.json">
9
+ <link rel="icon" type="image/svg+xml" href="logo.svg">
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>
12
13
  :root { --primary: #007aff; --bg: #000; --card-bg: #1c1c1e; --text: #fff; --text-dim: #8e8e93; --terminal-controls-rest-height: 108px; }
@@ -118,7 +119,7 @@
118
119
  <div id="lobby-view" class="view active">
119
120
  <div id="lobby">
120
121
  <div class="header">
121
- <h1><img class="header-logo" src="/logo.svg" alt="">Glad</h1>
122
+ <h1><img class="header-logo" src="logo.svg" alt="">Glad</h1>
122
123
  <div style="display:flex; gap:6px;">
123
124
  <button class="btn-new" onclick="showToolModal()" title="New session"><span>+</span><span>Session</span></button>
124
125
  <button class="btn-new" onclick="showScheduleModal()" title="New scheduler"><span>+</span><span>Sched</span></button>
@@ -305,7 +306,7 @@
305
306
 
306
307
  <script defer src="https://unpkg.com/xterm@5.3.0/lib/xterm.js"></script>
307
308
  <script defer src="https://unpkg.com/xterm-addon-fit@0.8.0/lib/xterm-addon-fit.js"></script>
308
- <script src="/gitgraph.js"></script>
309
+ <script src="gitgraph.js"></script>
309
310
  <script>
310
311
  let currentSocket = null, term = null, fitAddon = null, activeSessionId = null, activeToolKey = null;
311
312
  let appConfig = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glad-web",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
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": {