@phenx-inc/ctlsurf 0.3.3 → 0.3.5
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/electron-vite.config.ts +2 -0
- package/out/headless/index.mjs +5682 -13
- package/out/headless/index.mjs.map +4 -4
- package/out/main/index.js +5962 -198
- package/out/preload/index.js +7 -0
- package/out/renderer/assets/{cssMode-BW-SuYuP.js → cssMode-DQW-brNd.js} +3 -3
- package/out/renderer/assets/{freemarker2-2YWYzawi.js → freemarker2-DxgOckH2.js} +1 -1
- package/out/renderer/assets/{handlebars-EwtUQRsf.js → handlebars-BX1Wpk_3.js} +1 -1
- package/out/renderer/assets/{html-BNZkIDb9.js → html-t-KXioI0.js} +1 -1
- package/out/renderer/assets/{htmlMode-C2dZKrOy.js → htmlMode-Dya7iUjr.js} +3 -3
- package/out/renderer/assets/{index-CrTu3Z4M.css → index-D6JBcQ20.css} +13 -0
- package/out/renderer/assets/{index-Bm_rbVP-.js → index-DNqZidnO.js} +49 -25
- package/out/renderer/assets/{javascript-busdVZMv.js → javascript-DZzW2adn.js} +2 -2
- package/out/renderer/assets/{jsonMode-BaVI6jAw.js → jsonMode-D_Wv7XH8.js} +3 -3
- package/out/renderer/assets/{liquid-DG08un1Q.js → liquid-BJAHAm2T.js} +1 -1
- package/out/renderer/assets/{lspLanguageFeatures-peGVtLxi.js → lspLanguageFeatures-BgMd-KJk.js} +1 -1
- package/out/renderer/assets/{mdx-DogBhUxZ.js → mdx-B6Zod3ry.js} +1 -1
- package/out/renderer/assets/{python-Bf-INYXh.js → python-Cgt13-KH.js} +1 -1
- package/out/renderer/assets/{razor-DLrZ2hsF.js → razor-BcwFJGYS.js} +1 -1
- package/out/renderer/assets/{tsMode-B4oEmliC.js → tsMode-BTjzM6fl.js} +1 -1
- package/out/renderer/assets/{typescript-CjkgfhVK.js → typescript-DZYDQEUb.js} +1 -1
- package/out/renderer/assets/{xml-0FAXmuVg.js → xml-CloiUoIW.js} +1 -1
- package/out/renderer/assets/{yaml-DWxnPuy8.js → yaml-CdKdpE-z.js} +1 -1
- package/out/renderer/index.html +2 -2
- package/package.json +3 -1
- package/src/main/bridge.ts +269 -20
- package/src/main/index.ts +76 -0
- package/src/main/orchestrator.ts +1 -1
- package/src/main/timeTracker.ts +47 -1
- package/src/main/workerWs.ts +7 -1
- package/src/main/xterm-headless.d.ts +3 -0
- package/src/preload/index.ts +9 -0
- package/src/renderer/App.tsx +21 -1
- package/src/renderer/components/StatusBar.tsx +26 -1
- package/src/renderer/styles.css +13 -0
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { useState } from 'react'
|
|
2
2
|
|
|
3
|
+
interface UpdateInfo {
|
|
4
|
+
current: string
|
|
5
|
+
latest: string | null
|
|
6
|
+
hasUpdate: boolean
|
|
7
|
+
checkedAt: number | null
|
|
8
|
+
}
|
|
9
|
+
|
|
3
10
|
interface StatusBarProps {
|
|
4
11
|
wsStatus: string
|
|
5
12
|
cwd: string | null
|
|
6
13
|
onChangeCwd: () => void
|
|
14
|
+
updateInfo: UpdateInfo | null
|
|
7
15
|
}
|
|
8
16
|
|
|
9
|
-
export function StatusBar({ wsStatus, cwd, onChangeCwd }: StatusBarProps) {
|
|
17
|
+
export function StatusBar({ wsStatus, cwd, onChangeCwd, updateInfo }: StatusBarProps) {
|
|
10
18
|
const [creating, setCreating] = useState(false)
|
|
11
19
|
|
|
12
20
|
const wsLabel = {
|
|
@@ -44,6 +52,9 @@ export function StatusBar({ wsStatus, cwd, onChangeCwd }: StatusBarProps) {
|
|
|
44
52
|
const home = '/Users/' + (cwd?.split('/')[2] || '')
|
|
45
53
|
const displayPath = cwd?.replace(home, '~') || ''
|
|
46
54
|
|
|
55
|
+
const versionLabel = updateInfo?.current ? `v${updateInfo.current}` : ''
|
|
56
|
+
const hasUpdate = !!updateInfo?.hasUpdate && !!updateInfo.latest
|
|
57
|
+
|
|
47
58
|
return (
|
|
48
59
|
<div className="statusbar">
|
|
49
60
|
<div className="statusbar-section">
|
|
@@ -67,6 +78,20 @@ export function StatusBar({ wsStatus, cwd, onChangeCwd }: StatusBarProps) {
|
|
|
67
78
|
) : (
|
|
68
79
|
<span>ctlsurf: {wsLabel}</span>
|
|
69
80
|
)}
|
|
81
|
+
{versionLabel && (
|
|
82
|
+
<span
|
|
83
|
+
className={`statusbar-version${hasUpdate ? ' has-update' : ''}`}
|
|
84
|
+
title={
|
|
85
|
+
hasUpdate
|
|
86
|
+
? `Update available: ${updateInfo!.latest}\nRun: npm i -g @phenx-inc/ctlsurf`
|
|
87
|
+
: '@phenx-inc/ctlsurf'
|
|
88
|
+
}
|
|
89
|
+
>
|
|
90
|
+
{hasUpdate
|
|
91
|
+
? `${versionLabel} → ${updateInfo!.latest} available`
|
|
92
|
+
: versionLabel}
|
|
93
|
+
</span>
|
|
94
|
+
)}
|
|
70
95
|
</div>
|
|
71
96
|
</div>
|
|
72
97
|
)
|
package/src/renderer/styles.css
CHANGED
|
@@ -518,6 +518,19 @@ html, body, #root {
|
|
|
518
518
|
.status-dot.idle { background: #565f89; }
|
|
519
519
|
.status-dot.pending { background: #e0af68; }
|
|
520
520
|
|
|
521
|
+
.statusbar-version {
|
|
522
|
+
margin-left: 12px;
|
|
523
|
+
color: #565f89;
|
|
524
|
+
font-size: 11px;
|
|
525
|
+
white-space: nowrap;
|
|
526
|
+
cursor: help;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
.statusbar-version.has-update {
|
|
530
|
+
color: #e0af68;
|
|
531
|
+
font-weight: 500;
|
|
532
|
+
}
|
|
533
|
+
|
|
521
534
|
.tracking-dot {
|
|
522
535
|
width: 6px;
|
|
523
536
|
height: 6px;
|