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