coxpit 5.26.1 → 5.26.3
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/package.json +1 -1
- package/src/cockpit.ts +23 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coxpit",
|
|
3
|
-
"version": "5.26.
|
|
3
|
+
"version": "5.26.3",
|
|
4
4
|
"description": "Self-hosted cockpit for running a fleet of AI coding agents across your own machines — parallel worktree runs, live board, compare & merge, web terminal, design capture.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
package/src/cockpit.ts
CHANGED
|
@@ -30,6 +30,15 @@ export const COCKPIT_HTML = /* html */ `<!doctype html>
|
|
|
30
30
|
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--sans);font-size:14px;line-height:1.5;
|
|
31
31
|
-webkit-font-smoothing:antialiased;overflow:hidden;overscroll-behavior:none;touch-action:manipulation}
|
|
32
32
|
.term-host .xterm-viewport{overscroll-behavior:contain} /* 터미널 스크롤이 페이지로 안 번지게 */
|
|
33
|
+
/* 전역 스크롤바 테마 — 흰 네이티브 바를 어디서든 제거(얇은 다크 바 + 투명 트랙).
|
|
34
|
+
개별 overflow 영역마다 재선언할 필요 없이 여기서 한 번에. 특정 스트립(트리·탭·팔레트)은
|
|
35
|
+
아래에서 scrollbar-width:none 으로 바 자체를 숨긴다. */
|
|
36
|
+
*{scrollbar-width:thin;scrollbar-color:var(--line-hi) transparent}
|
|
37
|
+
::-webkit-scrollbar{width:8px;height:8px}
|
|
38
|
+
::-webkit-scrollbar-track{background:transparent}
|
|
39
|
+
::-webkit-scrollbar-thumb{background:var(--line-hi);border-radius:4px}
|
|
40
|
+
::-webkit-scrollbar-thumb:hover{background:var(--faint)}
|
|
41
|
+
::-webkit-scrollbar-corner{background:transparent}
|
|
33
42
|
button{font-family:var(--sans)}
|
|
34
43
|
:focus-visible{outline:2px solid rgba(78,201,176,.5);outline-offset:1px;border-radius:4px}
|
|
35
44
|
|
|
@@ -96,7 +105,8 @@ export const COCKPIT_HTML = /* html */ `<!doctype html>
|
|
|
96
105
|
.term-find button{font-family:var(--mono);font-size:13px;color:var(--muted);background:none;border:none;cursor:pointer;padding:2px 5px;border-radius:5px}
|
|
97
106
|
.term-find button:hover{color:var(--ink);background:var(--surface2)}
|
|
98
107
|
.tabbar{display:flex;align-items:stretch;height:38px;border-bottom:1px solid var(--line);background:var(--panel);font-family:var(--mono)}
|
|
99
|
-
.tabs{flex:1;display:flex;align-items:stretch;overflow-x:auto;overflow-y:hidden}
|
|
108
|
+
.tabs{flex:1;display:flex;align-items:stretch;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
|
|
109
|
+
.tabs::-webkit-scrollbar{width:0;height:0;display:none} /* 탭이 넘쳐도 흰 스크롤바 없이 스크롤만 */
|
|
100
110
|
.tab{display:inline-flex;align-items:center;gap:7px;padding:0 10px 0 12px;border-right:1px solid var(--line);font-size:12px;color:var(--muted);cursor:pointer;white-space:nowrap;max-width:220px;user-select:none;flex:none}
|
|
101
111
|
.tab:hover{background:var(--surface)}
|
|
102
112
|
.tab.shown{color:var(--ink);background:var(--bg);box-shadow:inset 0 -2px 0 var(--brand)}
|
|
@@ -766,9 +776,19 @@ export const COCKPIT_HTML = /* html */ `<!doctype html>
|
|
|
766
776
|
}catch(e){}
|
|
767
777
|
// 복사 배선: xterm 은 user-select:none 이라 네이티브 선택이 없다 → term.getSelection() 을 직접 클립보드로.
|
|
768
778
|
// ① 드래그 놓으면 자동 복사(select-to-copy) ② Cmd/Ctrl+C 로도 복사(선택 없으면 통과 → SIGINT).
|
|
779
|
+
// 복사: clipboard API 우선(HTTPS·PWA), 실패하면 execCommand 폴백(iOS 포함). 항상 토스트로 확인.
|
|
780
|
+
var copyFallback=function(s){ var ok=false;
|
|
781
|
+
try{ var ta=document.createElement('textarea'); ta.value=s; ta.setAttribute('readonly',''); ta.contentEditable='true';
|
|
782
|
+
ta.style.position='fixed'; ta.style.top='-9999px'; ta.style.opacity='0'; document.body.appendChild(ta);
|
|
783
|
+
var r=document.createRange(); r.selectNodeContents(ta); var sel=window.getSelection(); sel.removeAllRanges(); sel.addRange(r);
|
|
784
|
+
try{ ta.setSelectionRange(0, s.length); }catch(e){}
|
|
785
|
+
ok=document.execCommand('copy'); document.body.removeChild(ta);
|
|
786
|
+
}catch(e){ ok=false; }
|
|
787
|
+
toast(ok?('복사됨 · '+s.length+'자'):'복사 실패 — 브라우저가 클립보드를 막았어요'); };
|
|
769
788
|
var copySel=function(){ var s=''; try{ s=term.getSelection(); }catch(e){} if(!s) return false;
|
|
770
|
-
|
|
771
|
-
|
|
789
|
+
if(navigator.clipboard && navigator.clipboard.writeText){
|
|
790
|
+
navigator.clipboard.writeText(s).then(function(){ toast('복사됨 · '+s.length+'자'); }).catch(function(){ copyFallback(s); });
|
|
791
|
+
} else { copyFallback(s); }
|
|
772
792
|
return true; };
|
|
773
793
|
host.addEventListener('mouseup', function(){ copySel(); });
|
|
774
794
|
host.addEventListener('touchend', function(){ copySel(); });
|