tmux-weblink 1.1.0 → 1.1.2
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/dist/lib/mobile-toolbar.js +49 -161
- package/dist/lib/pages/terminal.js +29 -30
- package/package.json +1 -1
|
@@ -19,11 +19,33 @@ import{icon as e}from"./icons.js";function n(){return`
|
|
|
19
19
|
#mobile-toolbar button:hover { color: var(--panel-accent); background: color-mix(in srgb, var(--panel-accent) 8%, transparent); }
|
|
20
20
|
#mobile-toolbar button:focus-visible { box-shadow: 0 0 0 2px var(--panel-accent); outline: none; }
|
|
21
21
|
#mobile-toolbar button svg { width: 22px; height: 22px; fill: currentColor; }
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
|
|
23
|
+
#mobile-toolbar .tb-input {
|
|
24
|
+
flex: 1; display: flex; align-items: stretch; gap: 6px; min-width: 0;
|
|
25
|
+
}
|
|
26
|
+
#mobile-toolbar .tb-input textarea {
|
|
27
|
+
flex: 1; resize: none; box-sizing: border-box;
|
|
28
|
+
min-height: 38px; max-height: 96px;
|
|
29
|
+
background: var(--terminal-bg, rgba(0,0,0,0.28));
|
|
30
|
+
color: var(--page-fg);
|
|
31
|
+
border: 1px solid var(--panel-border);
|
|
32
|
+
border-radius: 8px; padding: 6px 10px;
|
|
33
|
+
font-family: var(--font-mono); font-size: var(--text-base); line-height: 1.4;
|
|
34
|
+
outline: none;
|
|
25
35
|
}
|
|
26
|
-
|
|
36
|
+
#mobile-toolbar .tb-input textarea:focus {
|
|
37
|
+
border-color: var(--panel-accent);
|
|
38
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, var(--panel-accent) 12%, transparent);
|
|
39
|
+
}
|
|
40
|
+
#mobile-toolbar .tb-input textarea::placeholder { color: var(--panel-muted); opacity: 0.6; }
|
|
41
|
+
#mobile-toolbar .tb-input button {
|
|
42
|
+
flex: 0 0 auto; min-width: 44px;
|
|
43
|
+
border: 1px solid var(--panel-success); color: var(--panel-success);
|
|
44
|
+
}
|
|
45
|
+
#mobile-toolbar .tb-input button:hover {
|
|
46
|
+
background: color-mix(in srgb, var(--panel-success) 12%, transparent);
|
|
47
|
+
}
|
|
48
|
+
#mobile-toolbar #tb-kb-btn { flex: 0 0 auto; min-width: 44px; }
|
|
27
49
|
|
|
28
50
|
#type-backdrop {
|
|
29
51
|
position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 1001;
|
|
@@ -128,61 +150,13 @@ import{icon as e}from"./icons.js";function n(){return`
|
|
|
128
150
|
border-color: var(--panel-success); color: var(--panel-success);
|
|
129
151
|
}
|
|
130
152
|
|
|
131
|
-
/* \u2500\u2500 Floating input bar (narrow-screen voice-input helper) \u2500\u2500 */
|
|
132
|
-
#float-bar { display: none; }
|
|
133
|
-
@media (max-width: 767px) {
|
|
134
|
-
#float-bar {
|
|
135
|
-
display: flex; align-items: flex-end; gap: 6px;
|
|
136
|
-
flex-shrink: 0;
|
|
137
|
-
padding: 8px 10px;
|
|
138
|
-
padding-bottom: calc(8px + env(safe-area-inset-bottom));
|
|
139
|
-
background: var(--panel-bg);
|
|
140
|
-
border-top: 1px solid var(--panel-border);
|
|
141
|
-
}
|
|
142
|
-
#float-bar textarea {
|
|
143
|
-
flex: 1; resize: none; box-sizing: border-box;
|
|
144
|
-
min-height: 38px; max-height: 120px;
|
|
145
|
-
background: var(--terminal-bg, rgba(0,0,0,0.28));
|
|
146
|
-
color: var(--page-fg);
|
|
147
|
-
border: 1px solid var(--panel-border);
|
|
148
|
-
border-radius: 8px; padding: 8px 10px;
|
|
149
|
-
font-family: var(--font-mono); font-size: var(--text-base); line-height: 1.4;
|
|
150
|
-
outline: none;
|
|
151
|
-
}
|
|
152
|
-
#float-bar textarea:focus {
|
|
153
|
-
border-color: var(--panel-accent);
|
|
154
|
-
box-shadow: 0 0 0 2px color-mix(in srgb, var(--panel-accent) 12%, transparent);
|
|
155
|
-
}
|
|
156
|
-
#float-bar textarea::placeholder { color: var(--panel-muted); opacity: 0.6; }
|
|
157
|
-
#float-bar .float-bar-actions {
|
|
158
|
-
display: flex; flex-direction: column; gap: 4px; flex-shrink: 0;
|
|
159
|
-
}
|
|
160
|
-
#float-bar .float-bar-actions button {
|
|
161
|
-
display: flex; align-items: center; justify-content: center;
|
|
162
|
-
min-width: 38px; min-height: 38px;
|
|
163
|
-
background: none; border: 1px solid var(--panel-border);
|
|
164
|
-
border-radius: 8px; color: var(--panel-muted); cursor: pointer;
|
|
165
|
-
font-size: var(--text-sm); font-family: var(--font-mono);
|
|
166
|
-
transition: color 0.15s, background 0.15s, border-color 0.15s;
|
|
167
|
-
}
|
|
168
|
-
#float-bar .float-bar-actions button:hover,
|
|
169
|
-
#float-bar .float-bar-actions button:focus-visible {
|
|
170
|
-
color: var(--panel-accent); border-color: var(--panel-accent);
|
|
171
|
-
background: color-mix(in srgb, var(--panel-accent) 8%, transparent);
|
|
172
|
-
}
|
|
173
|
-
#float-bar .float-bar-actions #float-send {
|
|
174
|
-
color: var(--panel-success); border-color: var(--panel-success);
|
|
175
|
-
}
|
|
176
|
-
#float-bar .float-bar-actions #float-send:hover {
|
|
177
|
-
background: color-mix(in srgb, var(--panel-success) 12%, transparent);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
153
|
`}function a(){return`
|
|
181
154
|
<div id="mobile-toolbar">
|
|
182
|
-
<
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
155
|
+
<div class="tb-input">
|
|
156
|
+
<textarea id="tb-input" placeholder="Type or voice input\u2026" autocapitalize="off" autocomplete="off" autocorrect="off" spellcheck="false" rows="1"></textarea>
|
|
157
|
+
<button id="tb-send" type="button" title="Send (Enter)">⏎</button>
|
|
158
|
+
</div>
|
|
159
|
+
<button id="type-toggle" type="button" title="Advanced keys" aria-label="Advanced keys">
|
|
186
160
|
${e("keyboard")}
|
|
187
161
|
</button>
|
|
188
162
|
</div>
|
|
@@ -198,20 +172,13 @@ import{icon as e}from"./icons.js";function n(){return`
|
|
|
198
172
|
<label><input type="radio" name="type-modifier" value="Tab" /><span class="type-modal-modifier-label">Tab</span></label>
|
|
199
173
|
<label><input type="radio" name="type-modifier" value="Ctrl" /><span class="type-modal-modifier-label">Ctrl</span></label>
|
|
200
174
|
</div>
|
|
201
|
-
<textarea id="type-input" placeholder="Type a command
|
|
175
|
+
<textarea id="type-input" placeholder="Type a command\u2026" autocapitalize="off" autocomplete="off" autocorrect="off" spellcheck="false"></textarea>
|
|
202
176
|
<div id="type-status"></div>
|
|
203
177
|
<div class="type-modal-footer">
|
|
204
178
|
<button id="type-send" type="button">Send</button>
|
|
205
179
|
<button id="type-send-enter" type="button">Send ⏎</button>
|
|
206
180
|
</div>
|
|
207
|
-
</div>`}function r(){return`
|
|
208
|
-
<div id="float-bar">
|
|
209
|
-
<textarea id="float-input" placeholder="Type or voice input\u2026" autocapitalize="off" autocomplete="off" autocorrect="off" spellcheck="false" rows="1"></textarea>
|
|
210
|
-
<div class="float-bar-actions">
|
|
211
|
-
<button id="float-send" type="button" title="Send (Enter)">⏎</button>
|
|
212
|
-
</div>
|
|
213
|
-
</div>`}function i(t){return`(function() {
|
|
214
|
-
const micBtn = document.getElementById('mic-toggle');
|
|
181
|
+
</div>`}function r(t){return`(function() {
|
|
215
182
|
const typeBtn = document.getElementById('type-toggle');
|
|
216
183
|
const modal = document.getElementById('type-modal');
|
|
217
184
|
const backdrop = document.getElementById('type-backdrop');
|
|
@@ -240,7 +207,6 @@ import{icon as e}from"./icons.js";function n(){return`
|
|
|
240
207
|
function closeModal() {
|
|
241
208
|
modal.classList.remove('open');
|
|
242
209
|
backdrop.classList.remove('open');
|
|
243
|
-
stopRecognition();
|
|
244
210
|
}
|
|
245
211
|
|
|
246
212
|
function getActiveModifier() {
|
|
@@ -298,113 +264,35 @@ import{icon as e}from"./icons.js";function n(){return`
|
|
|
298
264
|
sendBtn.addEventListener('click', () => send(false));
|
|
299
265
|
sendEnterBtn.addEventListener('click', () => send(true));
|
|
300
266
|
|
|
301
|
-
// \u2500\u2500
|
|
302
|
-
const
|
|
303
|
-
|
|
304
|
-
let listening = false;
|
|
305
|
-
|
|
306
|
-
if (!SR) {
|
|
307
|
-
// Unsupported browser \u2014 hide the mic entirely.
|
|
308
|
-
micBtn.style.display = 'none';
|
|
309
|
-
} else {
|
|
310
|
-
micBtn.addEventListener('click', () => {
|
|
311
|
-
if (listening) { stopRecognition(); return; }
|
|
312
|
-
startRecognition();
|
|
313
|
-
});
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
function startRecognition() {
|
|
317
|
-
if (!SR) return;
|
|
318
|
-
recognition = new SR();
|
|
319
|
-
recognition.lang = navigator.language || 'en-US';
|
|
320
|
-
recognition.interimResults = true;
|
|
321
|
-
recognition.continuous = false;
|
|
322
|
-
const baseText = input.value ? input.value + ' ' : '';
|
|
323
|
-
|
|
324
|
-
recognition.onstart = () => {
|
|
325
|
-
listening = true;
|
|
326
|
-
micBtn.classList.add('listening');
|
|
327
|
-
openModal();
|
|
328
|
-
setStatus('Listening\u2026');
|
|
329
|
-
};
|
|
330
|
-
recognition.onresult = (event) => {
|
|
331
|
-
let transcript = '';
|
|
332
|
-
for (let i = 0; i < event.results.length; i++) {
|
|
333
|
-
transcript += event.results[i][0].transcript;
|
|
334
|
-
}
|
|
335
|
-
input.value = baseText + transcript;
|
|
336
|
-
};
|
|
337
|
-
recognition.onerror = (event) => {
|
|
338
|
-
const code = event && event.error;
|
|
339
|
-
if (code === 'not-allowed' || code === 'service-not-allowed') {
|
|
340
|
-
setStatus('Microphone permission denied', true);
|
|
341
|
-
} else if (code === 'no-speech') {
|
|
342
|
-
setStatus('No speech detected', true);
|
|
343
|
-
} else {
|
|
344
|
-
setStatus('Voice input error', true);
|
|
345
|
-
}
|
|
346
|
-
};
|
|
347
|
-
recognition.onend = () => {
|
|
348
|
-
listening = false;
|
|
349
|
-
micBtn.classList.remove('listening');
|
|
350
|
-
if (!status.textContent || status.textContent === 'Listening\u2026') {
|
|
351
|
-
setStatus(input.value ? 'Review and send' : '');
|
|
352
|
-
}
|
|
353
|
-
recognition = null;
|
|
354
|
-
};
|
|
355
|
-
|
|
356
|
-
try {
|
|
357
|
-
recognition.start();
|
|
358
|
-
} catch (e) {
|
|
359
|
-
setStatus('Voice input unavailable', true);
|
|
360
|
-
listening = false;
|
|
361
|
-
micBtn.classList.remove('listening');
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
function stopRecognition() {
|
|
366
|
-
if (recognition) {
|
|
367
|
-
try { recognition.stop(); } catch (e) { /* ignore */ }
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
// \u2500\u2500 Floating input bar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
372
|
-
const floatInput = document.getElementById('float-input');
|
|
373
|
-
const floatSend = document.getElementById('float-send');
|
|
267
|
+
// \u2500\u2500 Inline toolbar input \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
268
|
+
const tbInput = document.getElementById('tb-input');
|
|
269
|
+
const tbSend = document.getElementById('tb-send');
|
|
374
270
|
|
|
375
|
-
if (
|
|
376
|
-
function
|
|
377
|
-
const text =
|
|
271
|
+
if (tbInput && tbSend) {
|
|
272
|
+
function sendTb() {
|
|
273
|
+
const text = tbInput.value;
|
|
378
274
|
if (text && window.tmuxWeb && window.tmuxWeb.sendInput) {
|
|
379
275
|
window.tmuxWeb.sendInput(text + '\r');
|
|
380
276
|
}
|
|
381
|
-
|
|
382
|
-
|
|
277
|
+
tbInput.value = '';
|
|
278
|
+
tbInput.rows = 1;
|
|
383
279
|
if (window.tmuxWeb && window.tmuxWeb.focusTerminal) window.tmuxWeb.focusTerminal();
|
|
384
280
|
}
|
|
385
281
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
const lines = floatInput.value.split('
|
|
282
|
+
tbInput.addEventListener('input', () => {
|
|
283
|
+
tbInput.rows = 1;
|
|
284
|
+
const lines = tbInput.value.split('
|
|
390
285
|
').length;
|
|
391
|
-
|
|
286
|
+
tbInput.rows = Math.min(lines, 4);
|
|
392
287
|
});
|
|
393
288
|
|
|
394
|
-
|
|
395
|
-
floatInput.addEventListener('keydown', (e) => {
|
|
289
|
+
tbInput.addEventListener('keydown', (e) => {
|
|
396
290
|
if (e.key === 'Enter' && !e.shiftKey) {
|
|
397
291
|
e.preventDefault();
|
|
398
|
-
|
|
292
|
+
sendTb();
|
|
399
293
|
}
|
|
400
294
|
});
|
|
401
295
|
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
// Focus the float input when bar becomes visible (narrow screen)
|
|
405
|
-
const narrowMq = window.matchMedia('(max-width: 767px)');
|
|
406
|
-
narrowMq.addEventListener('change', (e) => {
|
|
407
|
-
if (e.matches) setTimeout(() => floatInput.focus(), 100);
|
|
408
|
-
});
|
|
296
|
+
tbSend.addEventListener('click', sendTb);
|
|
409
297
|
}
|
|
410
|
-
})();`}export{
|
|
298
|
+
})();`}export{n as mobileToolbarCSS,a as mobileToolbarHTML,r as mobileToolbarScript};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{cssVarsStyle as w}from"../theme.js";import{escapeHtml as i,escapeAttr as c}from"../html.js";import{notesDrawerCSS as v,notesDrawerHTML as y,notesDrawerScript as $}from"../notes-drawer.js";import{schedulerDrawerCSS as k,schedulerDrawerHTML as S,schedulerDrawerScript as L}from"../scheduler-drawer.js";import{windowsDrawerCSS as D,windowsDrawerHTML as E,windowsDrawerScript as F}from"../windows-drawer.js";import{sessionsDrawerCSS as M,sessionsDrawerHTML as I,sessionsDrawerScript as T}from"../sessions-drawer.js";import{mobileToolbarCSS as
|
|
1
|
+
import{cssVarsStyle as w}from"../theme.js";import{escapeHtml as i,escapeAttr as c}from"../html.js";import{notesDrawerCSS as v,notesDrawerHTML as y,notesDrawerScript as $}from"../notes-drawer.js";import{schedulerDrawerCSS as k,schedulerDrawerHTML as S,schedulerDrawerScript as L}from"../scheduler-drawer.js";import{windowsDrawerCSS as D,windowsDrawerHTML as E,windowsDrawerScript as F}from"../windows-drawer.js";import{sessionsDrawerCSS as M,sessionsDrawerHTML as I,sessionsDrawerScript as T}from"../sessions-drawer.js";import{mobileToolbarCSS as C,mobileToolbarHTML as B,mobileToolbarScript as O}from"../mobile-toolbar.js";import{icon as m,extIcon as W}from"../icons.js";import{commandbarButtonHTML as z,commandbarCSS as H,commandbarHTML as P,commandbarScript as R}from"../commandbar.js";import{drawerResizeCSS as A,drawerResizeHandleHTML as h,drawerResizeScript as x}from"../drawer-resize.js";import{themeSwitcherButtonHTML as j,themeSwitcherScript as J}from"../shared-layout.js";function _(){return`
|
|
2
2
|
.ext-backdrop {
|
|
3
3
|
position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 999;
|
|
4
4
|
opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
|
|
@@ -18,7 +18,7 @@ import{cssVarsStyle as w}from"../theme.js";import{escapeHtml as i,escapeAttr as
|
|
|
18
18
|
transform: translateX(100%); transition: transform 0.25s ease;
|
|
19
19
|
}
|
|
20
20
|
.ext-panel.open { transform: translateX(0); }
|
|
21
|
-
${
|
|
21
|
+
${A()}
|
|
22
22
|
.ext-drawer .drawer-header,
|
|
23
23
|
.ext-panel .drawer-header {
|
|
24
24
|
display: flex; justify-content: space-between; align-items: center;
|
|
@@ -35,25 +35,25 @@ import{cssVarsStyle as w}from"../theme.js";import{escapeHtml as i,escapeAttr as
|
|
|
35
35
|
.ext-panel .drawer-header button:hover { color: var(--panel-accent); }
|
|
36
36
|
.ext-drawer iframe { flex: 1; border: none; width: 100%; height: 0; }
|
|
37
37
|
.ext-panel iframe { flex: 1; border: none; width: 100%; height: 100%; }
|
|
38
|
-
`}function
|
|
39
|
-
<div id="ext-${
|
|
40
|
-
<div id="ext-${
|
|
38
|
+
`}function U(e){const n=e.id;return`
|
|
39
|
+
<div id="ext-${n}-backdrop" class="ext-backdrop"></div>
|
|
40
|
+
<div id="ext-${n}-drawer" class="ext-drawer resizable-drawer">
|
|
41
41
|
${h()}
|
|
42
42
|
<div class="drawer-header">
|
|
43
43
|
<span>${i(e.icon)} ${i(e.name)}</span>
|
|
44
|
-
<button id="ext-${
|
|
44
|
+
<button id="ext-${n}-close">×</button>
|
|
45
45
|
</div>
|
|
46
|
-
<iframe id="ext-${
|
|
47
|
-
</div>`}function
|
|
48
|
-
<div id="ext-${
|
|
49
|
-
<div id="ext-${
|
|
46
|
+
<iframe id="ext-${n}-frame" src="/ext/${n}/ui/index.html"></iframe>
|
|
47
|
+
</div>`}function X(e){const n=e.id,t=e.panel;if(!t)return"";const r=t.title??e.name;return`
|
|
48
|
+
<div id="ext-${n}-panel-backdrop" class="ext-backdrop"></div>
|
|
49
|
+
<div id="ext-${n}-panel" class="ext-panel resizable-drawer">
|
|
50
50
|
${h()}
|
|
51
51
|
<div class="drawer-header">
|
|
52
52
|
<span>${i(e.icon)} ${i(r)}</span>
|
|
53
|
-
<button id="ext-${
|
|
53
|
+
<button id="ext-${n}-panel-close">×</button>
|
|
54
54
|
</div>
|
|
55
|
-
<iframe id="ext-${
|
|
56
|
-
</div>`}function
|
|
55
|
+
<iframe id="ext-${n}-panel-frame" src="/ext/${n}/ui/${c(t.entry)}"></iframe>
|
|
56
|
+
</div>`}function V(e,n){const t=e.id,r=JSON.stringify(e.config),o=e.panel?.entry??null,d=e.panel?.defaultWidth??960;return`
|
|
57
57
|
${x(`ext-${t}-drawer`,`tmux-web:drawer-width:ext:${t}`,360)}
|
|
58
58
|
${o?x(`ext-${t}-panel`,`tmux-web:panel-width:ext:${t}`,d):""}
|
|
59
59
|
(function() {
|
|
@@ -113,7 +113,7 @@ ${o?x(`ext-${t}-panel`,`tmux-web:panel-width:ext:${t}`,d):""}
|
|
|
113
113
|
|
|
114
114
|
function sendMessages(targetFrame) {
|
|
115
115
|
if (!targetFrame || !targetFrame.contentWindow) return;
|
|
116
|
-
targetFrame.contentWindow.postMessage({ type: 'ext:context', context: { session: ${JSON.stringify(
|
|
116
|
+
targetFrame.contentWindow.postMessage({ type: 'ext:context', context: { session: ${JSON.stringify(n)}, host: location.origin } }, '*');
|
|
117
117
|
targetFrame.contentWindow.postMessage({ type: 'ext:config', config: cfg }, '*');
|
|
118
118
|
}
|
|
119
119
|
|
|
@@ -150,7 +150,7 @@ ${o?x(`ext-${t}-panel`,`tmux-web:panel-width:ext:${t}`,d):""}
|
|
|
150
150
|
sendMessages(panelFrame);
|
|
151
151
|
}
|
|
152
152
|
});
|
|
153
|
-
}());`}function
|
|
153
|
+
}());`}function re(e,n=[],t){const r=n.filter(a=>a.slot==="sidebar"),{commandbarEnabled:o=!1,commandbarSessions:d=[],quickCommands:g=[],agentsEnabled:b=!1,theme:s,renderer:f="xterm"}=t,l=t.terminal??{initialLines:1e3,historyChunk:500,syncIdleMs:200,syncMaxMs:3e3},u=l.initialLines+2*l.historyChunk,p=[{label:"Switch window",meta:`Windows in ${e}`,subView:"windows"},{label:"Quick Commands",meta:"Paste configured command",subView:"quickCommands"},{label:"Send Command",meta:"Send input to active window",clickTargetId:"type-toggle"},{label:"Open sessions sidebar",meta:"Recent and pinned sessions",clickTargetId:"sessions-toggle"},{label:"Open notes",meta:`Notes for ${e}`,clickTargetId:"notes-toggle"},{label:"Open scheduler",meta:`Schedule command in ${e}`,clickTargetId:"sched-toggle"}];return b&&p.push({label:"View All Agents",meta:"Running agents",href:"/agents"}),`<!DOCTYPE html>
|
|
154
154
|
<html lang="en">
|
|
155
155
|
<head>
|
|
156
156
|
<meta charset="UTF-8" />
|
|
@@ -266,13 +266,13 @@ ${o?x(`ext-${t}-panel`,`tmux-web:panel-width:ext:${t}`,d):""}
|
|
|
266
266
|
@media (max-width: 380px) {
|
|
267
267
|
header .status { display: none; }
|
|
268
268
|
}
|
|
269
|
-
${o?
|
|
269
|
+
${o?H():""}
|
|
270
270
|
${v()}
|
|
271
271
|
${k()}
|
|
272
272
|
${D()}
|
|
273
273
|
${M()}
|
|
274
|
-
${
|
|
275
|
-
${
|
|
274
|
+
${C()}
|
|
275
|
+
${_()}
|
|
276
276
|
@media (prefers-reduced-motion: reduce) {
|
|
277
277
|
*, *::before, *::after {
|
|
278
278
|
animation-duration: 0.01ms !important;
|
|
@@ -287,33 +287,32 @@ ${o?x(`ext-${t}-panel`,`tmux-web:panel-width:ext:${t}`,d):""}
|
|
|
287
287
|
<header>
|
|
288
288
|
<div class="brand"><a href="/" aria-label="Go to home">tmux<span>-weblink</span></a></div>
|
|
289
289
|
<span class="session">${i(e)}</span>
|
|
290
|
-
${o?
|
|
290
|
+
${o?z("Sessions"):""}
|
|
291
291
|
<button class="notes-btn" id="notes-toggle" title="Session notes" aria-label="Session notes">
|
|
292
292
|
${m("notes")}
|
|
293
293
|
</button>
|
|
294
294
|
<button class="sched-btn" id="sched-toggle" title="Schedule command" aria-label="Schedule command">
|
|
295
295
|
${m("schedule")}
|
|
296
296
|
</button>
|
|
297
|
-
${r.map(
|
|
297
|
+
${r.map(a=>`<button class="ext-btn" id="ext-${a.id}-toggle" title="${c(a.name)}" aria-label="${c(a.name)}">${W(a.id,a.icon)}</button>`).join(`
|
|
298
298
|
`)}
|
|
299
|
-
${
|
|
299
|
+
${j(s.template)}
|
|
300
300
|
<div class="status">
|
|
301
301
|
<div class="dot" id="status-dot"></div>
|
|
302
302
|
<span id="status-text">connecting</span>
|
|
303
303
|
</div>
|
|
304
304
|
</header>
|
|
305
|
-
<script>${
|
|
305
|
+
<script>${J()}</script>
|
|
306
306
|
<div id="terminal-container" class="terminal-pending"></div>
|
|
307
|
-
${
|
|
308
|
-
${
|
|
309
|
-
${o?R():""}
|
|
307
|
+
${B()}
|
|
308
|
+
${o?P():""}
|
|
310
309
|
${y(`Notes - ${e}`)}
|
|
311
310
|
${S(`Scheduler - ${e}`)}
|
|
312
311
|
${E(`Windows - ${e}`)}
|
|
313
312
|
${I()}
|
|
314
|
-
${r.map(
|
|
313
|
+
${r.map(a=>U(a)).join(`
|
|
315
314
|
`)}
|
|
316
|
-
${r.map(
|
|
315
|
+
${r.map(a=>X(a)).join(`
|
|
317
316
|
`)}
|
|
318
317
|
|
|
319
318
|
<script type="module">
|
|
@@ -349,7 +348,7 @@ ${T(e)}
|
|
|
349
348
|
${O(e)}
|
|
350
349
|
|
|
351
350
|
// ========== COMMANDBAR ==========
|
|
352
|
-
${o?
|
|
351
|
+
${o?R(d,p,{sessionName:e},g):""}
|
|
353
352
|
|
|
354
353
|
// ========== NOTES ==========
|
|
355
354
|
// (notes and scheduler scripts already included above; extensions below)
|
|
@@ -358,8 +357,8 @@ ${o?A(d,p,{sessionName:e},g):""}
|
|
|
358
357
|
${r.length>0?`<script>
|
|
359
358
|
// Extension bootstrap: plain script (not module) so it runs before the module
|
|
360
359
|
// awaits terminal-client import, avoiding a race where iframes load during that await.
|
|
361
|
-
${r.map(
|
|
360
|
+
${r.map(a=>V(a,e)).join(`
|
|
362
361
|
`)}
|
|
363
362
|
</script>`:""}
|
|
364
363
|
</body>
|
|
365
|
-
</html>`}export{
|
|
364
|
+
</html>`}export{re as renderTerminal};
|