@termix-ssh/plugin-sdk 1.0.20 → 1.0.22
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/CHANGELOG.md +29 -0
- package/PLUGIN-GUIDE.md +66 -4
- package/cli/commands/build.mjs +55 -36
- package/cli/commands/validate.mjs +4 -0
- package/dist/backend.d.ts +32 -7
- package/dist/frontend.d.ts +7 -0
- package/dist/host/{PluginsTab-ZSMTJ5C5.js → PluginsTab-CM2B33BD.js} +26 -16
- package/dist/host/chunk-7J4QNGFM.js +345 -0
- package/dist/host/{chunk-J3ZQPBDK.js → chunk-HQ6NNFSX.js} +115 -1575
- package/dist/host/chunk-I5F2PSMR.js +1526 -0
- package/dist/host/{chunk-2MU6WNSX.js → chunk-JRV2HIDK.js} +1 -1
- package/dist/host/{chunk-7LEJ3HYF.js → chunk-P26QKKU5.js} +41 -10
- package/dist/host/{chunk-CITUENSU.js → chunk-ROB2SH5Q.js} +77 -49
- package/dist/host/chunk-TK3Y437H.js +53 -0
- package/dist/host/{chunk-EYONBBRJ.js → chunk-VKNGNEF3.js} +34650 -34968
- package/dist/host/core-classes.json +1 -1
- package/dist/host/frame-host.css +2 -0
- package/dist/host/frame-host.js +242 -0
- package/dist/host/{linked-server-OUF3POT7.js → linked-server-J5G457OA.js} +1 -1
- package/dist/host/{rbac-api-LZVENREG.js → rbac-api-PY22W5UY.js} +5 -1
- package/dist/host/testing-host.js +9 -6
- package/dist/host/types/src/types/host-sidebar-preferences.d.ts +2 -0
- package/dist/host/types/src/types/index.d.ts +8 -0
- package/dist/host/types/src/ui/api/look-api.d.ts +2 -0
- package/dist/host/types/src/ui/api/plugins-api.d.ts +3 -2
- package/dist/host/types/src/ui/api/rbac-api.d.ts +19 -1
- package/dist/host/types/src/ui/components/data-view.d.ts +1 -1
- package/dist/host/types/src/ui/lib/app-return.d.ts +13 -0
- package/dist/host/types/src/ui/main-axios.d.ts +1 -1
- package/dist/host/types/src/ui/plugin-host/loader.d.ts +6 -0
- package/dist/host/types/src/ui/plugin-host/sdk-ui.d.ts +1 -1
- package/dist/host/types/src/ui/plugins/plugin-model.d.ts +1 -1
- package/dist/host/types/src/ui/plugins/use-plugins-manager.d.ts +1 -1
- package/dist/host/types/src/ui/shell/tab-registry.d.ts +2 -0
- package/dist/host/ui.js +418 -388
- package/dist/host/{use-permissions-BYCDS5PD.js → use-permissions-EWRI3WLT.js} +1 -1
- package/dist/host-commands.d.ts +9 -6
- package/dist/host-commands.js +38 -11
- package/dist/host-scripts/docker.d.ts +137 -0
- package/dist/host-scripts/docker.js +345 -0
- package/dist/host-scripts/index.d.ts +15 -0
- package/dist/host-scripts/index.js +15 -0
- package/dist/host-scripts/journal.d.ts +45 -0
- package/dist/host-scripts/journal.js +194 -0
- package/dist/host-scripts/metrics.d.ts +134 -0
- package/dist/host-scripts/metrics.js +320 -0
- package/dist/host-scripts/openrc.d.ts +6 -0
- package/dist/host-scripts/openrc.js +90 -0
- package/dist/host-scripts/shell.d.ts +43 -0
- package/dist/host-scripts/shell.js +95 -0
- package/dist/host-scripts/systemd.d.ts +73 -0
- package/dist/host-scripts/systemd.js +320 -0
- package/dist/host-scripts/text.d.ts +23 -0
- package/dist/host-scripts/text.js +111 -0
- package/dist/manifest.d.ts +28 -1
- package/dist/manifest.js +108 -1
- package/package.json +9 -1
- package/schema/manifest.schema.json +42 -0
package/dist/host/ui.js
CHANGED
|
@@ -1,26 +1,43 @@
|
|
|
1
1
|
const __termixNoGlob = () => ({});
|
|
2
2
|
import {
|
|
3
|
-
ACCENT_PRESET_COLORS,
|
|
4
3
|
ActionSlot,
|
|
5
|
-
BUILTIN_THEMES,
|
|
6
4
|
Checkbox,
|
|
7
5
|
ComponentSlot,
|
|
6
|
+
HostFeatureFields,
|
|
7
|
+
HostPluginSections,
|
|
8
|
+
PasswordInput,
|
|
9
|
+
PluginViewPlaceholder,
|
|
10
|
+
SettingsFieldRow,
|
|
11
|
+
Textarea,
|
|
12
|
+
clearLocalAdaptivePreferences,
|
|
13
|
+
getAdaptiveResourceBudget,
|
|
14
|
+
getPreferredHostAction,
|
|
15
|
+
markAdaptiveResourceUsed,
|
|
16
|
+
markTabSurfaceUsed,
|
|
17
|
+
preloadTabSurface,
|
|
18
|
+
recordHostActionPreference,
|
|
19
|
+
runAdaptiveBackgroundTask,
|
|
20
|
+
tabIcon,
|
|
21
|
+
useInstalledPlugins,
|
|
22
|
+
usePluginHostSections,
|
|
23
|
+
useTabHandlesVersion
|
|
24
|
+
} from "./chunk-I5F2PSMR.js";
|
|
25
|
+
import {
|
|
26
|
+
Toaster
|
|
27
|
+
} from "./chunk-TK3Y437H.js";
|
|
28
|
+
import {
|
|
29
|
+
ACCENT_PRESET_COLORS,
|
|
30
|
+
BUILTIN_THEMES,
|
|
8
31
|
DASHBOARD_CARDS,
|
|
9
32
|
FOLDER_COLORS,
|
|
10
33
|
FONT_SIZES,
|
|
11
|
-
HostFeatureFields,
|
|
12
|
-
HostPluginSections,
|
|
13
34
|
LANGUAGES,
|
|
14
35
|
MANAGE_REQUEST_EVENT,
|
|
15
36
|
MAX_PANES,
|
|
16
|
-
PasswordInput,
|
|
17
37
|
PluginComponent,
|
|
18
|
-
PluginViewPlaceholder,
|
|
19
38
|
SPLIT_PRESETS,
|
|
20
39
|
SYSTEM_THEME,
|
|
21
|
-
SettingsFieldRow,
|
|
22
40
|
ShellConfirmCapture,
|
|
23
|
-
Textarea,
|
|
24
41
|
UI_FONTS,
|
|
25
42
|
actionOrder,
|
|
26
43
|
applyAccentColor,
|
|
@@ -31,7 +48,6 @@ import {
|
|
|
31
48
|
canJoinSplit,
|
|
32
49
|
challengeSecondFactor,
|
|
33
50
|
changeAppLanguage,
|
|
34
|
-
clearLocalAdaptivePreferences,
|
|
35
51
|
createPluginApp,
|
|
36
52
|
createQuickConnectHost,
|
|
37
53
|
defaultConnectAction,
|
|
@@ -41,14 +57,12 @@ import {
|
|
|
41
57
|
endSplitDrag,
|
|
42
58
|
filterPaletteItems,
|
|
43
59
|
findMatchingKeybinding,
|
|
44
|
-
getAdaptiveResourceBudget,
|
|
45
60
|
getDefaultConnectionTab,
|
|
46
61
|
getHostEditorSection,
|
|
47
62
|
getLiveHostStatus,
|
|
48
63
|
getLoginMethods,
|
|
49
64
|
getPanel,
|
|
50
65
|
getPollingEnvironmentMultiplier,
|
|
51
|
-
getPreferredHostAction,
|
|
52
66
|
getRegisteredDashboardCard,
|
|
53
67
|
getRememberDeviceAllowed,
|
|
54
68
|
getStatusClasses,
|
|
@@ -78,8 +92,6 @@ import {
|
|
|
78
92
|
makeHostSshSubTabs,
|
|
79
93
|
makeHostTabs,
|
|
80
94
|
mapCredentials,
|
|
81
|
-
markAdaptiveResourceUsed,
|
|
82
|
-
markTabSurfaceUsed,
|
|
83
95
|
moveDivider,
|
|
84
96
|
moveRailItem,
|
|
85
97
|
moveSplitDrag,
|
|
@@ -88,13 +100,11 @@ import {
|
|
|
88
100
|
paletteEntriesFor,
|
|
89
101
|
paneNavHotkeyLabel,
|
|
90
102
|
pluginWsUrl,
|
|
91
|
-
preloadTabSurface,
|
|
92
103
|
promotableIds,
|
|
93
104
|
protocolEnabled,
|
|
94
105
|
protocolPort,
|
|
95
106
|
quickConnectTargets,
|
|
96
107
|
railItemLabel,
|
|
97
|
-
recordHostActionPreference,
|
|
98
108
|
registerHostEditorSection,
|
|
99
109
|
registerLayout,
|
|
100
110
|
registerTabCloseGuard,
|
|
@@ -107,7 +117,6 @@ import {
|
|
|
107
117
|
resetUserSecondFactors,
|
|
108
118
|
resolveHostTabType,
|
|
109
119
|
rightDockableIds,
|
|
110
|
-
runAdaptiveBackgroundTask,
|
|
111
120
|
runAdaptivePolling,
|
|
112
121
|
runHostAction,
|
|
113
122
|
setPluginLayouts,
|
|
@@ -118,7 +127,6 @@ import {
|
|
|
118
127
|
sshHostToHost,
|
|
119
128
|
startLoginRedirect,
|
|
120
129
|
submitLoginMethod,
|
|
121
|
-
tabIcon,
|
|
122
130
|
tabJumpHotkeyKeys,
|
|
123
131
|
takePendingManageRequest,
|
|
124
132
|
themeLabel,
|
|
@@ -133,7 +141,6 @@ import {
|
|
|
133
141
|
useHostProtocols,
|
|
134
142
|
useHostStatus,
|
|
135
143
|
useHostStatusIndicators,
|
|
136
|
-
useInstalledPlugins,
|
|
137
144
|
useIsMobile,
|
|
138
145
|
useKeybindingActions,
|
|
139
146
|
useKeybindingDefaults,
|
|
@@ -142,7 +149,6 @@ import {
|
|
|
142
149
|
usePaletteEntries,
|
|
143
150
|
usePaletteGroups,
|
|
144
151
|
usePanels,
|
|
145
|
-
usePluginHostSections,
|
|
146
152
|
useRailItems,
|
|
147
153
|
useRegisteredDashboardCards,
|
|
148
154
|
useSecondFactors,
|
|
@@ -154,16 +160,15 @@ import {
|
|
|
154
160
|
useSshAuthEditors,
|
|
155
161
|
useSshAuthProviders,
|
|
156
162
|
useStatusColorScheme,
|
|
157
|
-
useTabHandlesVersion,
|
|
158
163
|
useTabStageStore,
|
|
159
164
|
useTheme,
|
|
160
165
|
useThemes,
|
|
161
166
|
verifySecondFactor,
|
|
162
167
|
withProtocolSettings
|
|
163
|
-
} from "./chunk-
|
|
168
|
+
} from "./chunk-HQ6NNFSX.js";
|
|
164
169
|
import {
|
|
165
170
|
usePermissions
|
|
166
|
-
} from "./chunk-
|
|
171
|
+
} from "./chunk-JRV2HIDK.js";
|
|
167
172
|
import {
|
|
168
173
|
AddButton,
|
|
169
174
|
Card,
|
|
@@ -184,7 +189,24 @@ import {
|
|
|
184
189
|
isPrerelease,
|
|
185
190
|
reportBetaFeedbackUrl,
|
|
186
191
|
reportCoreIssueUrl
|
|
187
|
-
} from "./chunk-
|
|
192
|
+
} from "./chunk-ROB2SH5Q.js";
|
|
193
|
+
import {
|
|
194
|
+
Button,
|
|
195
|
+
DefaultsOnly,
|
|
196
|
+
FakeSwitch,
|
|
197
|
+
HostDefaultBadge,
|
|
198
|
+
HostDefaultsContext,
|
|
199
|
+
HostOnly,
|
|
200
|
+
Input,
|
|
201
|
+
PluginIcon,
|
|
202
|
+
SectionCard,
|
|
203
|
+
SettingRow,
|
|
204
|
+
buttonVariants,
|
|
205
|
+
cva,
|
|
206
|
+
hasVisibleFields,
|
|
207
|
+
isFieldShown,
|
|
208
|
+
useIsDefaultsEditor
|
|
209
|
+
} from "./chunk-7J4QNGFM.js";
|
|
188
210
|
import {
|
|
189
211
|
Action,
|
|
190
212
|
Activity,
|
|
@@ -198,7 +220,6 @@ import {
|
|
|
198
220
|
Bug,
|
|
199
221
|
Building,
|
|
200
222
|
BuildingComplex,
|
|
201
|
-
Button,
|
|
202
223
|
Cancel,
|
|
203
224
|
Check,
|
|
204
225
|
ChevronDown,
|
|
@@ -219,7 +240,6 @@ import {
|
|
|
219
240
|
Corner,
|
|
220
241
|
Cpu,
|
|
221
242
|
Database,
|
|
222
|
-
DefaultsOnly,
|
|
223
243
|
Description2,
|
|
224
244
|
Dialog,
|
|
225
245
|
DialogContent,
|
|
@@ -232,7 +252,6 @@ import {
|
|
|
232
252
|
Eye,
|
|
233
253
|
EyeOff,
|
|
234
254
|
Facts,
|
|
235
|
-
FakeSwitch,
|
|
236
255
|
Flag,
|
|
237
256
|
Flame,
|
|
238
257
|
FlaskConical,
|
|
@@ -246,12 +265,8 @@ import {
|
|
|
246
265
|
GroupHeading,
|
|
247
266
|
Hammer,
|
|
248
267
|
HardDrive,
|
|
249
|
-
HostDefaultBadge,
|
|
250
|
-
HostDefaultsContext,
|
|
251
|
-
HostOnly,
|
|
252
268
|
House,
|
|
253
269
|
InlineView,
|
|
254
|
-
Input,
|
|
255
270
|
Key,
|
|
256
271
|
KeyRound,
|
|
257
272
|
Layers,
|
|
@@ -275,7 +290,6 @@ import {
|
|
|
275
290
|
PanePrompt,
|
|
276
291
|
PanelSearch,
|
|
277
292
|
PanelShell,
|
|
278
|
-
PluginIcon,
|
|
279
293
|
PluginSettingsValidationError,
|
|
280
294
|
Plus,
|
|
281
295
|
Portal,
|
|
@@ -293,7 +307,6 @@ import {
|
|
|
293
307
|
ScrollAreaScrollbar,
|
|
294
308
|
ScrollAreaThumb,
|
|
295
309
|
Search,
|
|
296
|
-
SectionCard,
|
|
297
310
|
Segmented,
|
|
298
311
|
Select,
|
|
299
312
|
SelectContent,
|
|
@@ -308,7 +321,6 @@ import {
|
|
|
308
321
|
Separator,
|
|
309
322
|
Server,
|
|
310
323
|
ServerCog,
|
|
311
|
-
SettingRow,
|
|
312
324
|
Settings,
|
|
313
325
|
Shield,
|
|
314
326
|
ShieldCheck,
|
|
@@ -341,21 +353,17 @@ import {
|
|
|
341
353
|
Wrench,
|
|
342
354
|
X,
|
|
343
355
|
Zap,
|
|
344
|
-
buttonVariants,
|
|
345
356
|
cn,
|
|
346
357
|
composeRefs,
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
dist_exports3,
|
|
358
|
+
dist_exports2 as dist_exports,
|
|
359
|
+
dist_exports3 as dist_exports2,
|
|
360
|
+
dist_exports4 as dist_exports3,
|
|
351
361
|
docsUrl,
|
|
352
362
|
getDeveloperMode,
|
|
353
363
|
getPluginAdminSettings,
|
|
354
364
|
getPluginHostSettings,
|
|
355
365
|
getPluginUserSettings,
|
|
356
366
|
getPlugins,
|
|
357
|
-
hasVisibleFields,
|
|
358
|
-
isFieldShown,
|
|
359
367
|
pluginKey,
|
|
360
368
|
pluginName,
|
|
361
369
|
setAllPluginChannels,
|
|
@@ -368,13 +376,12 @@ import {
|
|
|
368
376
|
useAreaPreferences,
|
|
369
377
|
useConfirm,
|
|
370
378
|
useId,
|
|
371
|
-
useIsDefaultsEditor,
|
|
372
379
|
usePluginDocsUrl,
|
|
373
380
|
useSurfaceClose,
|
|
374
381
|
useSurfaceKind,
|
|
375
382
|
useUiPreference,
|
|
376
383
|
useUiPreferencesContext
|
|
377
|
-
} from "./chunk-
|
|
384
|
+
} from "./chunk-VKNGNEF3.js";
|
|
378
385
|
import {
|
|
379
386
|
CREDENTIAL_ROW_FIELD_KEYS,
|
|
380
387
|
PRESETS,
|
|
@@ -434,6 +441,7 @@ import {
|
|
|
434
441
|
getErrorMessage,
|
|
435
442
|
getExternalAutoProvision,
|
|
436
443
|
getFolderAccess,
|
|
444
|
+
getFolderAuthOverride,
|
|
437
445
|
getHostAccess,
|
|
438
446
|
getHostAuthOverride,
|
|
439
447
|
getHostPassword,
|
|
@@ -506,6 +514,7 @@ import {
|
|
|
506
514
|
saveCredentialSidebarPreferences,
|
|
507
515
|
saveHostSidebarPreferences,
|
|
508
516
|
saveUserPreferences,
|
|
517
|
+
setFolderAuthOverride,
|
|
509
518
|
setFrontendState,
|
|
510
519
|
setHostAuthOverride,
|
|
511
520
|
setPluginSummaries,
|
|
@@ -535,7 +544,7 @@ import {
|
|
|
535
544
|
useTabs,
|
|
536
545
|
useTabsSafe,
|
|
537
546
|
verifyPasswordResetCode
|
|
538
|
-
} from "./chunk-
|
|
547
|
+
} from "./chunk-P26QKKU5.js";
|
|
539
548
|
import {
|
|
540
549
|
define_import_meta_env_default,
|
|
541
550
|
init_define_import_meta_env
|
|
@@ -3327,6 +3336,39 @@ function isInElectronWebView() {
|
|
|
3327
3336
|
}
|
|
3328
3337
|
return false;
|
|
3329
3338
|
}
|
|
3339
|
+
function isEmbeddedAuthFrame() {
|
|
3340
|
+
return isInMobileWebView() || isInElectronWebView();
|
|
3341
|
+
}
|
|
3342
|
+
|
|
3343
|
+
// src/ui/lib/app-return.ts
|
|
3344
|
+
init_define_import_meta_env();
|
|
3345
|
+
var STORAGE_KEY = "termix-app-return";
|
|
3346
|
+
var APP_RETURN = /^termix-mobile:\/\/[A-Za-z0-9._~/-]*$/;
|
|
3347
|
+
function isAppReturn(value) {
|
|
3348
|
+
return typeof value === "string" && APP_RETURN.test(value);
|
|
3349
|
+
}
|
|
3350
|
+
function pendingAppReturn() {
|
|
3351
|
+
try {
|
|
3352
|
+
const value = sessionStorage.getItem(STORAGE_KEY);
|
|
3353
|
+
return isAppReturn(value) ? value : null;
|
|
3354
|
+
} catch {
|
|
3355
|
+
return null;
|
|
3356
|
+
}
|
|
3357
|
+
}
|
|
3358
|
+
function appReturnUrl(base2, params) {
|
|
3359
|
+
const query = new URLSearchParams(params).toString();
|
|
3360
|
+
return query ? `${base2}?${query}` : base2;
|
|
3361
|
+
}
|
|
3362
|
+
function handOffToApp(params) {
|
|
3363
|
+
const base2 = pendingAppReturn();
|
|
3364
|
+
if (!base2) return false;
|
|
3365
|
+
try {
|
|
3366
|
+
sessionStorage.removeItem(STORAGE_KEY);
|
|
3367
|
+
} catch {
|
|
3368
|
+
}
|
|
3369
|
+
window.location.replace(appReturnUrl(base2, params));
|
|
3370
|
+
return true;
|
|
3371
|
+
}
|
|
3330
3372
|
|
|
3331
3373
|
// src/ui/auth/Auth.tsx
|
|
3332
3374
|
import { useState as useState7, useEffect as useEffect6, useCallback as useCallback5, useRef as useRef4 } from "react";
|
|
@@ -3846,12 +3888,30 @@ function assetUrl(summary, file) {
|
|
|
3846
3888
|
function absolute(url) {
|
|
3847
3889
|
return new URL(url, window.location.href).href;
|
|
3848
3890
|
}
|
|
3891
|
+
var IMPORT_RETRY_DELAYS_MS = [500, 1500, 3e3];
|
|
3892
|
+
async function importWithRetry(url, load, sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms))) {
|
|
3893
|
+
for (let attempt = 0; ; attempt++) {
|
|
3894
|
+
const next = attempt === 0 ? url : `${url}${url.includes("?") ? "&" : "?"}retry=${attempt}`;
|
|
3895
|
+
try {
|
|
3896
|
+
return await load(next);
|
|
3897
|
+
} catch (error) {
|
|
3898
|
+
const fetchFailed = error instanceof TypeError && /dynamically imported module|importing a module script/i.test(
|
|
3899
|
+
error.message
|
|
3900
|
+
);
|
|
3901
|
+
if (!fetchFailed || attempt >= IMPORT_RETRY_DELAYS_MS.length) throw error;
|
|
3902
|
+
await sleep(IMPORT_RETRY_DELAYS_MS[attempt]);
|
|
3903
|
+
}
|
|
3904
|
+
}
|
|
3905
|
+
}
|
|
3849
3906
|
var defaultDeps = {
|
|
3850
3907
|
fetchPlugins: getPlugins,
|
|
3851
3908
|
async importFrontend(summary) {
|
|
3852
|
-
return
|
|
3853
|
-
|
|
3854
|
-
|
|
3909
|
+
return importWithRetry(
|
|
3910
|
+
absolute(assetUrl(summary, "frontend.js")),
|
|
3911
|
+
(url) => import(
|
|
3912
|
+
/* @vite-ignore */
|
|
3913
|
+
url
|
|
3914
|
+
)
|
|
3855
3915
|
);
|
|
3856
3916
|
},
|
|
3857
3917
|
async loadLocale(summary, file) {
|
|
@@ -3878,7 +3938,7 @@ function currentDeps() {
|
|
|
3878
3938
|
return deps ?? defaultDeps;
|
|
3879
3939
|
}
|
|
3880
3940
|
function serverAllowsFrontend(summary) {
|
|
3881
|
-
return summary.enabled && summary.state !== "failed" && summary.state !== "blocked" && !!summary.frontend;
|
|
3941
|
+
return summary.enabled && summary.state !== "failed" && summary.state !== "blocked" && summary.state !== "safe-mode" && !!summary.frontend;
|
|
3882
3942
|
}
|
|
3883
3943
|
function orderForActivation(summaries) {
|
|
3884
3944
|
const byId = new Map(summaries.map((summary) => [summary.id, summary]));
|
|
@@ -4252,7 +4312,7 @@ function LanguageRow({
|
|
|
4252
4312
|
)
|
|
4253
4313
|
] });
|
|
4254
4314
|
}
|
|
4255
|
-
var
|
|
4315
|
+
var STORAGE_KEY2 = "termix_auth";
|
|
4256
4316
|
function parseSecondFactorIds(value) {
|
|
4257
4317
|
const ids = (value ?? "").split(",").filter(Boolean);
|
|
4258
4318
|
return ids.map((id) => ({ id, pluginId: "", labelKey: "" }));
|
|
@@ -4266,10 +4326,15 @@ function hasDesktopManualLogout() {
|
|
|
4266
4326
|
}
|
|
4267
4327
|
function storeAuth(username) {
|
|
4268
4328
|
localStorage.setItem(
|
|
4269
|
-
|
|
4329
|
+
STORAGE_KEY2,
|
|
4270
4330
|
JSON.stringify({ loggedIn: true, username })
|
|
4271
4331
|
);
|
|
4272
4332
|
}
|
|
4333
|
+
async function handOffLogin(token) {
|
|
4334
|
+
if (!pendingAppReturn() || isEmbeddedAuthFrame()) return false;
|
|
4335
|
+
const value = token || await getCurrentToken();
|
|
4336
|
+
return handOffToApp(value ? { token: value } : { error: "no_token" });
|
|
4337
|
+
}
|
|
4273
4338
|
function PasswordInput2({
|
|
4274
4339
|
value,
|
|
4275
4340
|
onChange,
|
|
@@ -4407,8 +4472,9 @@ function Auth({ onLogin }) {
|
|
|
4407
4472
|
useEffect6(() => {
|
|
4408
4473
|
if (proxySigninHandledRef.current || isElectron()) return;
|
|
4409
4474
|
proxySigninHandledRef.current = true;
|
|
4410
|
-
requestTrustedProxyLogin().then((result) => {
|
|
4475
|
+
requestTrustedProxyLogin().then(async (result) => {
|
|
4411
4476
|
if (!result.enabled || !result.success) return;
|
|
4477
|
+
if (await handOffLogin()) return;
|
|
4412
4478
|
storeAuth(result.username || "");
|
|
4413
4479
|
onLogin(
|
|
4414
4480
|
result.username || "",
|
|
@@ -4625,21 +4691,24 @@ function Auth({ onLogin }) {
|
|
|
4625
4691
|
}
|
|
4626
4692
|
return;
|
|
4627
4693
|
}
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4694
|
+
void handOffLogin(urlParams.get("token")).then((handedOff) => {
|
|
4695
|
+
if (handedOff) return;
|
|
4696
|
+
getUserInfo().then((meRes) => {
|
|
4697
|
+
storeAuth(meRes.username || "");
|
|
4698
|
+
clearDesktopManualLogout();
|
|
4699
|
+
onLogin(
|
|
4700
|
+
meRes.username || "",
|
|
4701
|
+
meRes.userId || void 0,
|
|
4702
|
+
!!meRes.is_admin
|
|
4703
|
+
);
|
|
4704
|
+
window.history.replaceState(
|
|
4705
|
+
{},
|
|
4706
|
+
document.title,
|
|
4707
|
+
window.location.pathname
|
|
4708
|
+
);
|
|
4709
|
+
}).catch(() => {
|
|
4710
|
+
toast2.error(t3("errors.failedUserInfo"));
|
|
4711
|
+
});
|
|
4643
4712
|
});
|
|
4644
4713
|
}
|
|
4645
4714
|
}, [onLogin, t3]);
|
|
@@ -4721,6 +4790,7 @@ function Auth({ onLogin }) {
|
|
|
4721
4790
|
setWebviewAuthSuccess(true);
|
|
4722
4791
|
return;
|
|
4723
4792
|
}
|
|
4793
|
+
if (await handOffLogin(res?.token)) return;
|
|
4724
4794
|
const meRes = await getUserInfo();
|
|
4725
4795
|
const name2 = meRes.username || res.username || options.fallbackUsername || "";
|
|
4726
4796
|
storeAuth(name2);
|
|
@@ -5550,51 +5620,9 @@ function Auth({ onLogin }) {
|
|
|
5550
5620
|
] }) });
|
|
5551
5621
|
}
|
|
5552
5622
|
|
|
5553
|
-
// src/ui/components/sonner.tsx
|
|
5554
|
-
init_define_import_meta_env();
|
|
5555
|
-
import { Toaster as Sonner } from "sonner";
|
|
5556
|
-
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
5557
|
-
var Toaster = ({ ...props }) => {
|
|
5558
|
-
const { theme: theme2 = "system" } = useTheme();
|
|
5559
|
-
return /* @__PURE__ */ jsx29(
|
|
5560
|
-
Sonner,
|
|
5561
|
-
{
|
|
5562
|
-
theme: theme2,
|
|
5563
|
-
className: "toaster group",
|
|
5564
|
-
toastOptions: {
|
|
5565
|
-
classNames: {
|
|
5566
|
-
toast: "group toast group-[.toaster]:bg-card group-[.toaster]:text-card-foreground group-[.toaster]:border-border group-[.toaster]:rounded-none! group-[.toaster]:shadow-lg group-[.toaster]:font-mono",
|
|
5567
|
-
description: "group-[.toast]:text-muted-foreground",
|
|
5568
|
-
actionButton: "group-[.toast]:bg-accent-brand group-[.toast]:text-white group-[.toast]:font-semibold",
|
|
5569
|
-
cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
|
|
5570
|
-
success: "group-[.toast]:!text-accent-brand group-[.toast]:!border-accent-brand/30",
|
|
5571
|
-
info: "group-[.toast]:!text-accent-brand group-[.toast]:!border-accent-brand/30",
|
|
5572
|
-
error: "group-[.toast]:!text-destructive group-[.toast]:!border-destructive/30"
|
|
5573
|
-
}
|
|
5574
|
-
},
|
|
5575
|
-
style: {
|
|
5576
|
-
"--radius": "0px",
|
|
5577
|
-
"--normal-bg": "var(--card)",
|
|
5578
|
-
"--normal-border": "var(--border)",
|
|
5579
|
-
"--normal-text": "var(--card-foreground)",
|
|
5580
|
-
"--success-bg": "var(--card)",
|
|
5581
|
-
"--success-border": "var(--border)",
|
|
5582
|
-
"--success-text": "var(--color-accent-brand)",
|
|
5583
|
-
"--info-bg": "var(--card)",
|
|
5584
|
-
"--info-border": "var(--border)",
|
|
5585
|
-
"--info-text": "var(--color-accent-brand)",
|
|
5586
|
-
"--error-bg": "var(--card)",
|
|
5587
|
-
"--error-border": "var(--border)",
|
|
5588
|
-
"--error-text": "var(--destructive)"
|
|
5589
|
-
},
|
|
5590
|
-
...props
|
|
5591
|
-
}
|
|
5592
|
-
);
|
|
5593
|
-
};
|
|
5594
|
-
|
|
5595
5623
|
// src/ui/components/FullScreenAppWrapper.tsx
|
|
5596
5624
|
import { useTranslation as useTranslation9 } from "react-i18next";
|
|
5597
|
-
import { Fragment as Fragment4, jsx as
|
|
5625
|
+
import { Fragment as Fragment4, jsx as jsx29, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
5598
5626
|
var FullScreenAppWrapper = ({
|
|
5599
5627
|
hostId,
|
|
5600
5628
|
children
|
|
@@ -5698,17 +5726,17 @@ var FullScreenAppWrapper = ({
|
|
|
5698
5726
|
window.location.reload();
|
|
5699
5727
|
};
|
|
5700
5728
|
if (authLoading) {
|
|
5701
|
-
return /* @__PURE__ */
|
|
5729
|
+
return /* @__PURE__ */ jsx29("div", { className: "relative w-full h-screen overflow-hidden", children: /* @__PURE__ */ jsx29(ConnectionScreen, { status: "connecting", message: t3("common.loading") }) });
|
|
5702
5730
|
}
|
|
5703
5731
|
if (!isAuthenticated) {
|
|
5704
|
-
return /* @__PURE__ */
|
|
5732
|
+
return /* @__PURE__ */ jsx29(SidebarProvider, { children: /* @__PURE__ */ jsx29(TabProvider, { children: /* @__PURE__ */ jsx29(Fragment4, { children: /* @__PURE__ */ jsxs21(
|
|
5705
5733
|
"div",
|
|
5706
5734
|
{
|
|
5707
5735
|
className: "w-full h-screen overflow-hidden flex items-center justify-center",
|
|
5708
5736
|
style: { backgroundColor: "var(--bg-base)" },
|
|
5709
5737
|
children: [
|
|
5710
|
-
/* @__PURE__ */
|
|
5711
|
-
/* @__PURE__ */
|
|
5738
|
+
/* @__PURE__ */ jsx29(Auth, { onLogin: handleAuthSuccess }),
|
|
5739
|
+
/* @__PURE__ */ jsx29(
|
|
5712
5740
|
Toaster,
|
|
5713
5741
|
{
|
|
5714
5742
|
position: "bottom-right",
|
|
@@ -5723,7 +5751,7 @@ var FullScreenAppWrapper = ({
|
|
|
5723
5751
|
) }) }) });
|
|
5724
5752
|
}
|
|
5725
5753
|
const phase = loading ? "loading" : !hostConfig && hostId ? "not-found" : "ready";
|
|
5726
|
-
return /* @__PURE__ */
|
|
5754
|
+
return /* @__PURE__ */ jsx29(SidebarProvider, { children: /* @__PURE__ */ jsx29(TabProvider, { children: /* @__PURE__ */ jsx29(Fragment4, { children: /* @__PURE__ */ jsx29(
|
|
5727
5755
|
"div",
|
|
5728
5756
|
{
|
|
5729
5757
|
className: "w-full h-screen overflow-hidden",
|
|
@@ -5737,7 +5765,7 @@ var FullScreenAppWrapper = ({
|
|
|
5737
5765
|
init_define_import_meta_env();
|
|
5738
5766
|
import { useEffect as useEffect8, useState as useState9 } from "react";
|
|
5739
5767
|
import { useTranslation as useTranslation10 } from "react-i18next";
|
|
5740
|
-
import { jsx as
|
|
5768
|
+
import { jsx as jsx30, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5741
5769
|
var CODE_INPUT = "rounded-none bg-muted/50 border-border text-center text-sm tracking-widest";
|
|
5742
5770
|
function TOTPDialog({
|
|
5743
5771
|
isOpen,
|
|
@@ -5777,24 +5805,24 @@ function TOTPDialog({
|
|
|
5777
5805
|
};
|
|
5778
5806
|
const title = isPush ? t3("sshAuth.mfaPushRequired") : isPassword ? t3("common.password") : isMenu ? t3("sshAuth.mfaPromptRequired") : t3("sshAuth.totpRequired");
|
|
5779
5807
|
const label = prompt || (isTotp ? t3("sshAuth.totpCodeLabel") : void 0);
|
|
5780
|
-
const cancel = /* @__PURE__ */
|
|
5781
|
-
return /* @__PURE__ */
|
|
5808
|
+
const cancel = /* @__PURE__ */ jsx30("button", { type: "button", onClick: onCancel, className: PROMPT_BUTTON, children: t3("common.cancel") });
|
|
5809
|
+
return /* @__PURE__ */ jsx30(
|
|
5782
5810
|
PanePrompt,
|
|
5783
5811
|
{
|
|
5784
5812
|
open: true,
|
|
5785
5813
|
layer: "connection",
|
|
5786
5814
|
backgroundColor,
|
|
5787
|
-
icon: /* @__PURE__ */
|
|
5815
|
+
icon: /* @__PURE__ */ jsx30(Shield, { className: "size-4" }),
|
|
5788
5816
|
title,
|
|
5789
5817
|
description: label,
|
|
5790
5818
|
children: showWaiting ? /* @__PURE__ */ jsxs22("div", { className: "flex flex-col gap-3", children: [
|
|
5791
5819
|
/* @__PURE__ */ jsxs22("div", { className: "flex items-center gap-3 py-1", children: [
|
|
5792
|
-
/* @__PURE__ */
|
|
5793
|
-
/* @__PURE__ */
|
|
5820
|
+
/* @__PURE__ */ jsx30(LoaderCircle, { className: "size-4 animate-spin text-accent-brand shrink-0" }),
|
|
5821
|
+
/* @__PURE__ */ jsx30("p", { className: "text-xs text-muted-foreground", children: t3("sshAuth.mfaWaitingApproval") })
|
|
5794
5822
|
] }),
|
|
5795
|
-
/* @__PURE__ */
|
|
5823
|
+
/* @__PURE__ */ jsx30("div", { className: "flex justify-end gap-2", children: cancel })
|
|
5796
5824
|
] }) : /* @__PURE__ */ jsxs22("form", { onSubmit: handleSubmit, className: "flex flex-col gap-3", children: [
|
|
5797
|
-
isPush ? null : isPassword ? /* @__PURE__ */
|
|
5825
|
+
isPush ? null : isPassword ? /* @__PURE__ */ jsx30(
|
|
5798
5826
|
Input,
|
|
5799
5827
|
{
|
|
5800
5828
|
id: "totpCode",
|
|
@@ -5805,7 +5833,7 @@ function TOTPDialog({
|
|
|
5805
5833
|
placeholder: t3("placeholders.enterPassword"),
|
|
5806
5834
|
className: "rounded-none bg-muted/50 border-border text-sm"
|
|
5807
5835
|
}
|
|
5808
|
-
) : isMenu ? /* @__PURE__ */
|
|
5836
|
+
) : isMenu ? /* @__PURE__ */ jsx30(
|
|
5809
5837
|
Input,
|
|
5810
5838
|
{
|
|
5811
5839
|
id: "totpCode",
|
|
@@ -5815,7 +5843,7 @@ function TOTPDialog({
|
|
|
5815
5843
|
placeholder: t3("sshAuth.mfaMenuPlaceholder"),
|
|
5816
5844
|
className: CODE_INPUT
|
|
5817
5845
|
}
|
|
5818
|
-
) : allowsPushKeyword ? /* @__PURE__ */
|
|
5846
|
+
) : allowsPushKeyword ? /* @__PURE__ */ jsx30(
|
|
5819
5847
|
Input,
|
|
5820
5848
|
{
|
|
5821
5849
|
id: "totpCode",
|
|
@@ -5825,7 +5853,7 @@ function TOTPDialog({
|
|
|
5825
5853
|
placeholder: t3("sshAuth.mfaCodeOrPushPlaceholder"),
|
|
5826
5854
|
className: CODE_INPUT
|
|
5827
5855
|
}
|
|
5828
|
-
) : /* @__PURE__ */
|
|
5856
|
+
) : /* @__PURE__ */ jsx30(
|
|
5829
5857
|
Input,
|
|
5830
5858
|
{
|
|
5831
5859
|
id: "totpCode",
|
|
@@ -5841,7 +5869,7 @@ function TOTPDialog({
|
|
|
5841
5869
|
),
|
|
5842
5870
|
/* @__PURE__ */ jsxs22("div", { className: "flex justify-end gap-2", children: [
|
|
5843
5871
|
cancel,
|
|
5844
|
-
/* @__PURE__ */
|
|
5872
|
+
/* @__PURE__ */ jsx30("button", { type: "submit", className: PROMPT_PRIMARY_BUTTON, children: isPush ? t3("sshAuth.mfaSendRequest") : isPassword ? t3("common.connect") : t3("sshAuth.totpVerify") })
|
|
5845
5873
|
] })
|
|
5846
5874
|
] })
|
|
5847
5875
|
}
|
|
@@ -5854,12 +5882,12 @@ import { useState as useState11 } from "react";
|
|
|
5854
5882
|
|
|
5855
5883
|
// src/ui/components/tabs.tsx
|
|
5856
5884
|
init_define_import_meta_env();
|
|
5857
|
-
import { jsx as
|
|
5885
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
5858
5886
|
function Tabs({
|
|
5859
5887
|
className,
|
|
5860
5888
|
...props
|
|
5861
5889
|
}) {
|
|
5862
|
-
return /* @__PURE__ */
|
|
5890
|
+
return /* @__PURE__ */ jsx31(
|
|
5863
5891
|
Root23,
|
|
5864
5892
|
{
|
|
5865
5893
|
"data-slot": "tabs",
|
|
@@ -5872,7 +5900,7 @@ function TabsList({
|
|
|
5872
5900
|
className,
|
|
5873
5901
|
...props
|
|
5874
5902
|
}) {
|
|
5875
|
-
return /* @__PURE__ */
|
|
5903
|
+
return /* @__PURE__ */ jsx31(
|
|
5876
5904
|
List,
|
|
5877
5905
|
{
|
|
5878
5906
|
"data-slot": "tabs-list",
|
|
@@ -5888,7 +5916,7 @@ function TabsTrigger({
|
|
|
5888
5916
|
className,
|
|
5889
5917
|
...props
|
|
5890
5918
|
}) {
|
|
5891
|
-
return /* @__PURE__ */
|
|
5919
|
+
return /* @__PURE__ */ jsx31(
|
|
5892
5920
|
Trigger3,
|
|
5893
5921
|
{
|
|
5894
5922
|
"data-slot": "tabs-trigger",
|
|
@@ -5904,7 +5932,7 @@ function TabsContent({
|
|
|
5904
5932
|
className,
|
|
5905
5933
|
...props
|
|
5906
5934
|
}) {
|
|
5907
|
-
return /* @__PURE__ */
|
|
5935
|
+
return /* @__PURE__ */ jsx31(
|
|
5908
5936
|
Content,
|
|
5909
5937
|
{
|
|
5910
5938
|
"data-slot": "tabs-content",
|
|
@@ -29229,7 +29257,7 @@ ReactCodeMirror.displayName = "CodeMirror";
|
|
|
29229
29257
|
var esm_default = ReactCodeMirror;
|
|
29230
29258
|
|
|
29231
29259
|
// src/ui/ssh/dialogs/SSHAuthDialog.tsx
|
|
29232
|
-
import { jsx as
|
|
29260
|
+
import { jsx as jsx32, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
29233
29261
|
function SSHAuthDialog({
|
|
29234
29262
|
isOpen,
|
|
29235
29263
|
reason,
|
|
@@ -29300,15 +29328,15 @@ function SSHAuthDialog({
|
|
|
29300
29328
|
}
|
|
29301
29329
|
}
|
|
29302
29330
|
};
|
|
29303
|
-
return /* @__PURE__ */
|
|
29331
|
+
return /* @__PURE__ */ jsx32(
|
|
29304
29332
|
PanePrompt,
|
|
29305
29333
|
{
|
|
29306
29334
|
open: true,
|
|
29307
29335
|
layer: "connection",
|
|
29308
29336
|
backgroundColor,
|
|
29309
|
-
icon: /* @__PURE__ */
|
|
29337
|
+
icon: /* @__PURE__ */ jsx32(Shield, { className: "size-4" }),
|
|
29310
29338
|
title: t3("auth.sshAuthenticationRequired"),
|
|
29311
|
-
description: /* @__PURE__ */
|
|
29339
|
+
description: /* @__PURE__ */ jsx32("span", { className: "font-mono", children: hostDisplay }),
|
|
29312
29340
|
className: "max-w-xl",
|
|
29313
29341
|
children: /* @__PURE__ */ jsxs23("form", { onSubmit: handleSubmit, children: [
|
|
29314
29342
|
/* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-3", children: [
|
|
@@ -29317,21 +29345,21 @@ function SSHAuthDialog({
|
|
|
29317
29345
|
{
|
|
29318
29346
|
className: `flex items-start gap-3 p-3 border ${reason === "auth_failed" ? "border-destructive/20 bg-destructive/10" : "border-border bg-muted/10"}`,
|
|
29319
29347
|
children: [
|
|
29320
|
-
/* @__PURE__ */
|
|
29348
|
+
/* @__PURE__ */ jsx32(
|
|
29321
29349
|
CircleAlert,
|
|
29322
29350
|
{
|
|
29323
29351
|
className: `size-4 shrink-0 mt-0.5 ${reason === "auth_failed" ? "text-destructive" : "text-accent-brand"}`
|
|
29324
29352
|
}
|
|
29325
29353
|
),
|
|
29326
29354
|
/* @__PURE__ */ jsxs23("div", { children: [
|
|
29327
|
-
/* @__PURE__ */
|
|
29355
|
+
/* @__PURE__ */ jsx32(
|
|
29328
29356
|
"p",
|
|
29329
29357
|
{
|
|
29330
29358
|
className: `text-[10px] font-bold uppercase tracking-widest ${reason === "auth_failed" ? "text-destructive" : ""}`,
|
|
29331
29359
|
children: getReasonMessage()
|
|
29332
29360
|
}
|
|
29333
29361
|
),
|
|
29334
|
-
/* @__PURE__ */
|
|
29362
|
+
/* @__PURE__ */ jsx32(
|
|
29335
29363
|
"p",
|
|
29336
29364
|
{
|
|
29337
29365
|
className: `text-xs mt-1 ${reason === "auth_failed" ? "text-destructive/80" : "text-muted-foreground"}`,
|
|
@@ -29349,7 +29377,7 @@ function SSHAuthDialog({
|
|
|
29349
29377
|
onValueChange: (v) => setAuthTab(v),
|
|
29350
29378
|
children: [
|
|
29351
29379
|
/* @__PURE__ */ jsxs23(TabsList, { className: "w-full rounded-none", children: [
|
|
29352
|
-
/* @__PURE__ */
|
|
29380
|
+
/* @__PURE__ */ jsx32(
|
|
29353
29381
|
TabsTrigger,
|
|
29354
29382
|
{
|
|
29355
29383
|
value: "password",
|
|
@@ -29357,7 +29385,7 @@ function SSHAuthDialog({
|
|
|
29357
29385
|
children: t3("credentials.password")
|
|
29358
29386
|
}
|
|
29359
29387
|
),
|
|
29360
|
-
/* @__PURE__ */
|
|
29388
|
+
/* @__PURE__ */ jsx32(
|
|
29361
29389
|
TabsTrigger,
|
|
29362
29390
|
{
|
|
29363
29391
|
value: "key",
|
|
@@ -29367,8 +29395,8 @@ function SSHAuthDialog({
|
|
|
29367
29395
|
)
|
|
29368
29396
|
] }),
|
|
29369
29397
|
/* @__PURE__ */ jsxs23(TabsContent, { value: "password", className: "mt-3 flex flex-col gap-2", children: [
|
|
29370
|
-
/* @__PURE__ */
|
|
29371
|
-
/* @__PURE__ */
|
|
29398
|
+
/* @__PURE__ */ jsx32(Label, { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: t3("credentials.password") }),
|
|
29399
|
+
/* @__PURE__ */ jsx32(
|
|
29372
29400
|
PasswordInput,
|
|
29373
29401
|
{
|
|
29374
29402
|
placeholder: t3("placeholders.enterPassword"),
|
|
@@ -29378,13 +29406,13 @@ function SSHAuthDialog({
|
|
|
29378
29406
|
className: "rounded-none bg-muted/50 border-border text-xs"
|
|
29379
29407
|
}
|
|
29380
29408
|
),
|
|
29381
|
-
/* @__PURE__ */
|
|
29409
|
+
/* @__PURE__ */ jsx32("p", { className: "text-[10px] text-muted-foreground", children: t3("auth.sshPasswordDescription") })
|
|
29382
29410
|
] }),
|
|
29383
29411
|
/* @__PURE__ */ jsxs23(TabsContent, { value: "key", className: "mt-3 flex flex-col gap-3", children: [
|
|
29384
29412
|
/* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-2", children: [
|
|
29385
|
-
/* @__PURE__ */
|
|
29413
|
+
/* @__PURE__ */ jsx32(Label, { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: t3("credentials.sshPrivateKey") }),
|
|
29386
29414
|
/* @__PURE__ */ jsxs23("div", { className: "relative", children: [
|
|
29387
|
-
/* @__PURE__ */
|
|
29415
|
+
/* @__PURE__ */ jsx32(
|
|
29388
29416
|
"input",
|
|
29389
29417
|
{
|
|
29390
29418
|
id: "key-upload",
|
|
@@ -29401,13 +29429,13 @@ function SSHAuthDialog({
|
|
|
29401
29429
|
variant: "outline",
|
|
29402
29430
|
className: "w-full justify-start rounded-none text-[10px] font-bold uppercase tracking-widest border-border",
|
|
29403
29431
|
children: [
|
|
29404
|
-
/* @__PURE__ */
|
|
29405
|
-
/* @__PURE__ */
|
|
29432
|
+
/* @__PURE__ */ jsx32(Upload, { className: "size-3.5 mr-2" }),
|
|
29433
|
+
/* @__PURE__ */ jsx32("span", { className: "truncate", children: t3("credentials.uploadPrivateKeyFile") })
|
|
29406
29434
|
]
|
|
29407
29435
|
}
|
|
29408
29436
|
)
|
|
29409
29437
|
] }),
|
|
29410
|
-
/* @__PURE__ */
|
|
29438
|
+
/* @__PURE__ */ jsx32(
|
|
29411
29439
|
esm_default,
|
|
29412
29440
|
{
|
|
29413
29441
|
value: sshKey,
|
|
@@ -29444,7 +29472,7 @@ function SSHAuthDialog({
|
|
|
29444
29472
|
t3("common.optional"),
|
|
29445
29473
|
")"
|
|
29446
29474
|
] }),
|
|
29447
|
-
/* @__PURE__ */
|
|
29475
|
+
/* @__PURE__ */ jsx32(
|
|
29448
29476
|
PasswordInput,
|
|
29449
29477
|
{
|
|
29450
29478
|
placeholder: t3("placeholders.keyPassword"),
|
|
@@ -29453,7 +29481,7 @@ function SSHAuthDialog({
|
|
|
29453
29481
|
className: "rounded-none bg-muted/50 border-border text-xs"
|
|
29454
29482
|
}
|
|
29455
29483
|
),
|
|
29456
|
-
/* @__PURE__ */
|
|
29484
|
+
/* @__PURE__ */ jsx32("p", { className: "text-[10px] text-muted-foreground", children: t3("auth.sshKeyPasswordDescription") })
|
|
29457
29485
|
] }),
|
|
29458
29486
|
/* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-2", children: [
|
|
29459
29487
|
/* @__PURE__ */ jsxs23(Label, { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: [
|
|
@@ -29462,7 +29490,7 @@ function SSHAuthDialog({
|
|
|
29462
29490
|
t3("common.optional"),
|
|
29463
29491
|
")"
|
|
29464
29492
|
] }),
|
|
29465
|
-
/* @__PURE__ */
|
|
29493
|
+
/* @__PURE__ */ jsx32(
|
|
29466
29494
|
PasswordInput,
|
|
29467
29495
|
{
|
|
29468
29496
|
placeholder: t3("placeholders.enterPassword"),
|
|
@@ -29478,7 +29506,7 @@ function SSHAuthDialog({
|
|
|
29478
29506
|
)
|
|
29479
29507
|
] }),
|
|
29480
29508
|
/* @__PURE__ */ jsxs23("div", { className: "flex justify-end gap-2 pt-3", children: [
|
|
29481
|
-
/* @__PURE__ */
|
|
29509
|
+
/* @__PURE__ */ jsx32(
|
|
29482
29510
|
"button",
|
|
29483
29511
|
{
|
|
29484
29512
|
type: "button",
|
|
@@ -29488,7 +29516,7 @@ function SSHAuthDialog({
|
|
|
29488
29516
|
children: t3("common.cancel")
|
|
29489
29517
|
}
|
|
29490
29518
|
),
|
|
29491
|
-
/* @__PURE__ */
|
|
29519
|
+
/* @__PURE__ */ jsx32(
|
|
29492
29520
|
"button",
|
|
29493
29521
|
{
|
|
29494
29522
|
type: "submit",
|
|
@@ -29508,7 +29536,7 @@ init_define_import_meta_env();
|
|
|
29508
29536
|
import { useState as useState12 } from "react";
|
|
29509
29537
|
import { useTranslation as useTranslation12 } from "react-i18next";
|
|
29510
29538
|
import { toast as toast3 } from "sonner";
|
|
29511
|
-
import { jsx as
|
|
29539
|
+
import { jsx as jsx33, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
29512
29540
|
function BrowserSignInDialog({
|
|
29513
29541
|
isOpen,
|
|
29514
29542
|
label,
|
|
@@ -29532,24 +29560,24 @@ function BrowserSignInDialog({
|
|
|
29532
29560
|
toast3.error(t3("common.copyFailed"));
|
|
29533
29561
|
}
|
|
29534
29562
|
};
|
|
29535
|
-
return /* @__PURE__ */
|
|
29563
|
+
return /* @__PURE__ */ jsx33(
|
|
29536
29564
|
PanePrompt,
|
|
29537
29565
|
{
|
|
29538
29566
|
open: true,
|
|
29539
29567
|
layer: "connection",
|
|
29540
29568
|
backgroundColor,
|
|
29541
|
-
icon: /* @__PURE__ */
|
|
29569
|
+
icon: /* @__PURE__ */ jsx33(Shield, { className: "size-4" }),
|
|
29542
29570
|
title: t3("sshAuth.browserSignInRequired", { provider: label }),
|
|
29543
29571
|
className: "max-w-md",
|
|
29544
29572
|
children: /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-3", children: [
|
|
29545
29573
|
code2 && code2 !== "N/A" && /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-1.5", children: [
|
|
29546
|
-
/* @__PURE__ */
|
|
29547
|
-
/* @__PURE__ */
|
|
29574
|
+
/* @__PURE__ */ jsx33("p", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: t3("sshAuth.browserSignInCode") }),
|
|
29575
|
+
/* @__PURE__ */ jsx33("div", { className: "border border-border bg-muted/10 p-4 text-center", children: /* @__PURE__ */ jsx33("div", { className: "text-2xl font-mono font-bold tracking-wider text-accent-brand", children: code2 }) })
|
|
29548
29576
|
] }),
|
|
29549
29577
|
/* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-1.5", children: [
|
|
29550
|
-
/* @__PURE__ */
|
|
29578
|
+
/* @__PURE__ */ jsx33("p", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: t3("sshAuth.browserSignInUrl") }),
|
|
29551
29579
|
/* @__PURE__ */ jsxs24("div", { className: "flex gap-2", children: [
|
|
29552
|
-
/* @__PURE__ */
|
|
29580
|
+
/* @__PURE__ */ jsx33(
|
|
29553
29581
|
Input,
|
|
29554
29582
|
{
|
|
29555
29583
|
type: "text",
|
|
@@ -29558,7 +29586,7 @@ function BrowserSignInDialog({
|
|
|
29558
29586
|
className: "rounded-none bg-muted/50 border-border text-xs font-mono flex-1"
|
|
29559
29587
|
}
|
|
29560
29588
|
),
|
|
29561
|
-
/* @__PURE__ */
|
|
29589
|
+
/* @__PURE__ */ jsx33(
|
|
29562
29590
|
"button",
|
|
29563
29591
|
{
|
|
29564
29592
|
type: "button",
|
|
@@ -29566,13 +29594,13 @@ function BrowserSignInDialog({
|
|
|
29566
29594
|
className: `${PROMPT_BUTTON} h-9 w-9 shrink-0 px-0`,
|
|
29567
29595
|
title: t3("common.copy"),
|
|
29568
29596
|
"aria-label": t3("common.copy"),
|
|
29569
|
-
children: copied ? /* @__PURE__ */
|
|
29597
|
+
children: copied ? /* @__PURE__ */ jsx33(Check, { className: "size-4 text-accent-brand" }) : /* @__PURE__ */ jsx33(Copy, { className: "size-4" })
|
|
29570
29598
|
}
|
|
29571
29599
|
)
|
|
29572
29600
|
] })
|
|
29573
29601
|
] }),
|
|
29574
29602
|
/* @__PURE__ */ jsxs24("div", { className: "flex flex-wrap justify-end gap-2", children: [
|
|
29575
|
-
/* @__PURE__ */
|
|
29603
|
+
/* @__PURE__ */ jsx33(
|
|
29576
29604
|
"button",
|
|
29577
29605
|
{
|
|
29578
29606
|
type: "button",
|
|
@@ -29581,7 +29609,7 @@ function BrowserSignInDialog({
|
|
|
29581
29609
|
children: t3("common.cancel")
|
|
29582
29610
|
}
|
|
29583
29611
|
),
|
|
29584
|
-
/* @__PURE__ */
|
|
29612
|
+
/* @__PURE__ */ jsx33("button", { type: "button", onClick: onContinue, className: PROMPT_BUTTON, children: t3("sshAuth.browserSignInContinue") }),
|
|
29585
29613
|
/* @__PURE__ */ jsxs24(
|
|
29586
29614
|
"button",
|
|
29587
29615
|
{
|
|
@@ -29589,7 +29617,7 @@ function BrowserSignInDialog({
|
|
|
29589
29617
|
onClick: onOpenUrl,
|
|
29590
29618
|
className: PROMPT_PRIMARY_BUTTON,
|
|
29591
29619
|
children: [
|
|
29592
|
-
/* @__PURE__ */
|
|
29620
|
+
/* @__PURE__ */ jsx33(ExternalLink, { className: "size-3.5" }),
|
|
29593
29621
|
t3("sshAuth.browserSignInOpen")
|
|
29594
29622
|
]
|
|
29595
29623
|
}
|
|
@@ -29608,7 +29636,7 @@ import { useRef as useRef7 } from "react";
|
|
|
29608
29636
|
init_define_import_meta_env();
|
|
29609
29637
|
import React9, { memo, useCallback as useCallback7, useEffect as useEffect10, useRef as useRef6, useState as useState13 } from "react";
|
|
29610
29638
|
import { useTranslation as useTranslation13 } from "react-i18next";
|
|
29611
|
-
import { Fragment as Fragment5, jsx as
|
|
29639
|
+
import { Fragment as Fragment5, jsx as jsx34, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
29612
29640
|
var DRAG_THRESHOLD = 5;
|
|
29613
29641
|
function tabLabel(tab) {
|
|
29614
29642
|
return tab.customLabel || tab.label;
|
|
@@ -29682,7 +29710,7 @@ function PaneHeader({
|
|
|
29682
29710
|
onLostPointerCapture: () => finishDrag(false),
|
|
29683
29711
|
className: `flex h-7 shrink-0 items-center gap-1 border-b pl-1 pr-0.5 text-xs select-none ${focused ? "border-accent-brand/40 bg-accent-brand/10" : "border-border bg-sidebar"} ${tab && !ctx.isMobile ? "cursor-grab active:cursor-grabbing" : ""}`,
|
|
29684
29712
|
children: [
|
|
29685
|
-
/* @__PURE__ */
|
|
29713
|
+
/* @__PURE__ */ jsx34(
|
|
29686
29714
|
"span",
|
|
29687
29715
|
{
|
|
29688
29716
|
className: `flex h-4 min-w-4 shrink-0 items-center justify-center px-1 font-mono text-[10px] ${focused ? "bg-accent-brand text-background" : "bg-muted text-muted-foreground"}`,
|
|
@@ -29690,42 +29718,42 @@ function PaneHeader({
|
|
|
29690
29718
|
}
|
|
29691
29719
|
),
|
|
29692
29720
|
/* @__PURE__ */ jsxs25(DropdownMenu, { children: [
|
|
29693
|
-
/* @__PURE__ */
|
|
29721
|
+
/* @__PURE__ */ jsx34(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs25(
|
|
29694
29722
|
"button",
|
|
29695
29723
|
{
|
|
29696
29724
|
type: "button",
|
|
29697
29725
|
className: `flex min-w-0 items-center gap-1.5 px-1 py-0.5 hover:bg-muted ${focused ? "text-accent-brand" : "text-foreground"}`,
|
|
29698
29726
|
title: t3("splitScreen.showHere"),
|
|
29699
29727
|
children: [
|
|
29700
|
-
tab && /* @__PURE__ */
|
|
29701
|
-
/* @__PURE__ */
|
|
29728
|
+
tab && /* @__PURE__ */ jsx34("span", { className: focused ? "" : "text-muted-foreground", children: tabIcon(tab.type) }),
|
|
29729
|
+
/* @__PURE__ */ jsx34(
|
|
29702
29730
|
"span",
|
|
29703
29731
|
{
|
|
29704
29732
|
className: `truncate ${tab ? "font-medium" : "text-muted-foreground"}`,
|
|
29705
29733
|
children: label
|
|
29706
29734
|
}
|
|
29707
29735
|
),
|
|
29708
|
-
/* @__PURE__ */
|
|
29736
|
+
/* @__PURE__ */ jsx34(ChevronDown, { className: "size-3 shrink-0 opacity-60" })
|
|
29709
29737
|
]
|
|
29710
29738
|
}
|
|
29711
29739
|
) }),
|
|
29712
29740
|
/* @__PURE__ */ jsxs25(DropdownMenuContent, { align: "start", className: "w-60", children: [
|
|
29713
|
-
/* @__PURE__ */
|
|
29714
|
-
ctx.freeTabs.length === 0 && /* @__PURE__ */
|
|
29741
|
+
/* @__PURE__ */ jsx34(DropdownMenuLabel, { className: "text-[10px] font-semibold uppercase tracking-wider text-muted-foreground", children: t3("splitScreen.showHere") }),
|
|
29742
|
+
ctx.freeTabs.length === 0 && /* @__PURE__ */ jsx34(DropdownMenuItem, { disabled: true, children: t3("splitScreen.noOpenTabs") }),
|
|
29715
29743
|
ctx.freeTabs.map((free) => /* @__PURE__ */ jsxs25(
|
|
29716
29744
|
DropdownMenuItem,
|
|
29717
29745
|
{
|
|
29718
29746
|
onSelect: () => actions.showInPane(pane.id, free.id),
|
|
29719
29747
|
children: [
|
|
29720
29748
|
tabIcon(free.type),
|
|
29721
|
-
/* @__PURE__ */
|
|
29749
|
+
/* @__PURE__ */ jsx34("span", { className: "truncate", children: tabLabel(free) })
|
|
29722
29750
|
]
|
|
29723
29751
|
},
|
|
29724
29752
|
free.id
|
|
29725
29753
|
)),
|
|
29726
29754
|
tab && /* @__PURE__ */ jsxs25(Fragment5, { children: [
|
|
29727
|
-
/* @__PURE__ */
|
|
29728
|
-
/* @__PURE__ */
|
|
29755
|
+
/* @__PURE__ */ jsx34(DropdownMenuSeparator, {}),
|
|
29756
|
+
/* @__PURE__ */ jsx34(
|
|
29729
29757
|
DropdownMenuItem,
|
|
29730
29758
|
{
|
|
29731
29759
|
onSelect: () => actions.showInPane(pane.id, null),
|
|
@@ -29737,7 +29765,7 @@ function PaneHeader({
|
|
|
29737
29765
|
] }),
|
|
29738
29766
|
/* @__PURE__ */ jsxs25("div", { className: "ml-auto flex shrink-0 items-center", children: [
|
|
29739
29767
|
!ctx.isMobile && /* @__PURE__ */ jsxs25(Fragment5, { children: [
|
|
29740
|
-
/* @__PURE__ */
|
|
29768
|
+
/* @__PURE__ */ jsx34(
|
|
29741
29769
|
"button",
|
|
29742
29770
|
{
|
|
29743
29771
|
type: "button",
|
|
@@ -29746,10 +29774,10 @@ function PaneHeader({
|
|
|
29746
29774
|
title: fullTitle ?? t3("splitScreen.splitRight"),
|
|
29747
29775
|
"aria-label": t3("splitScreen.splitRight"),
|
|
29748
29776
|
onClick: () => actions.splitPane(pane.id, "right"),
|
|
29749
|
-
children: /* @__PURE__ */
|
|
29777
|
+
children: /* @__PURE__ */ jsx34(Columns2, { className: "size-3.5" })
|
|
29750
29778
|
}
|
|
29751
29779
|
),
|
|
29752
|
-
/* @__PURE__ */
|
|
29780
|
+
/* @__PURE__ */ jsx34(
|
|
29753
29781
|
"button",
|
|
29754
29782
|
{
|
|
29755
29783
|
type: "button",
|
|
@@ -29758,10 +29786,10 @@ function PaneHeader({
|
|
|
29758
29786
|
title: fullTitle ?? t3("splitScreen.splitDown"),
|
|
29759
29787
|
"aria-label": t3("splitScreen.splitDown"),
|
|
29760
29788
|
onClick: () => actions.splitPane(pane.id, "bottom"),
|
|
29761
|
-
children: /* @__PURE__ */
|
|
29789
|
+
children: /* @__PURE__ */ jsx34(Rows2, { className: "size-3.5" })
|
|
29762
29790
|
}
|
|
29763
29791
|
),
|
|
29764
|
-
panes.length > 1 && /* @__PURE__ */
|
|
29792
|
+
panes.length > 1 && /* @__PURE__ */ jsx34(
|
|
29765
29793
|
"button",
|
|
29766
29794
|
{
|
|
29767
29795
|
type: "button",
|
|
@@ -29770,36 +29798,36 @@ function PaneHeader({
|
|
|
29770
29798
|
"aria-label": zoomed ? t3("splitScreen.unzoom") : t3("splitScreen.zoom"),
|
|
29771
29799
|
"aria-pressed": zoomed,
|
|
29772
29800
|
onClick: () => actions.toggleZoom(pane.id),
|
|
29773
|
-
children: zoomed ? /* @__PURE__ */
|
|
29801
|
+
children: zoomed ? /* @__PURE__ */ jsx34(Minimize2, { className: "size-3.5" }) : /* @__PURE__ */ jsx34(Maximize2, { className: "size-3.5" })
|
|
29774
29802
|
}
|
|
29775
29803
|
)
|
|
29776
29804
|
] }),
|
|
29777
29805
|
/* @__PURE__ */ jsxs25(DropdownMenu, { children: [
|
|
29778
|
-
/* @__PURE__ */
|
|
29806
|
+
/* @__PURE__ */ jsx34(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx34(
|
|
29779
29807
|
"button",
|
|
29780
29808
|
{
|
|
29781
29809
|
type: "button",
|
|
29782
29810
|
className: buttonClass,
|
|
29783
29811
|
title: t3("splitScreen.paneActions"),
|
|
29784
29812
|
"aria-label": t3("splitScreen.paneActions"),
|
|
29785
|
-
children: /* @__PURE__ */
|
|
29813
|
+
children: /* @__PURE__ */ jsx34(Ellipsis, { className: "size-3.5" })
|
|
29786
29814
|
}
|
|
29787
29815
|
) }),
|
|
29788
29816
|
/* @__PURE__ */ jsxs25(DropdownMenuContent, { align: "end", className: "w-52", children: [
|
|
29789
29817
|
tab && /* @__PURE__ */ jsxs25(Fragment5, { children: [
|
|
29790
|
-
/* @__PURE__ */
|
|
29791
|
-
/* @__PURE__ */
|
|
29818
|
+
/* @__PURE__ */ jsx34(DropdownMenuItem, { onSelect: () => actions.moveToTab(pane.id), children: t3("splitScreen.moveToTab") }),
|
|
29819
|
+
/* @__PURE__ */ jsx34(DropdownMenuItem, { onSelect: () => actions.closeSession(tab.id), children: t3("splitScreen.closeSession") })
|
|
29792
29820
|
] }),
|
|
29793
29821
|
otherPanes.length > 0 && /* @__PURE__ */ jsxs25(DropdownMenuSub, { children: [
|
|
29794
|
-
/* @__PURE__ */
|
|
29795
|
-
/* @__PURE__ */
|
|
29822
|
+
/* @__PURE__ */ jsx34(DropdownMenuSubTrigger, { children: t3("splitScreen.swapWith") }),
|
|
29823
|
+
/* @__PURE__ */ jsx34(DropdownMenuSubContent, { className: "w-56", children: otherPanes.map((other) => {
|
|
29796
29824
|
const otherTab = other.tabId ? tabsById.get(other.tabId) : void 0;
|
|
29797
29825
|
const otherIndex = paneIndexById.get(other.id) ?? 0;
|
|
29798
|
-
return /* @__PURE__ */
|
|
29826
|
+
return /* @__PURE__ */ jsx34(
|
|
29799
29827
|
DropdownMenuItem,
|
|
29800
29828
|
{
|
|
29801
29829
|
onSelect: () => actions.swapPanes(pane.id, other.id),
|
|
29802
|
-
children: /* @__PURE__ */
|
|
29830
|
+
children: /* @__PURE__ */ jsx34("span", { className: "truncate", children: otherTab ? t3("splitScreen.paneItem", {
|
|
29803
29831
|
index: otherIndex,
|
|
29804
29832
|
label: tabLabel(otherTab)
|
|
29805
29833
|
}) : t3("splitScreen.paneEmptyItem", {
|
|
@@ -29810,8 +29838,8 @@ function PaneHeader({
|
|
|
29810
29838
|
);
|
|
29811
29839
|
}) })
|
|
29812
29840
|
] }),
|
|
29813
|
-
(tab || otherPanes.length > 0) && /* @__PURE__ */
|
|
29814
|
-
/* @__PURE__ */
|
|
29841
|
+
(tab || otherPanes.length > 0) && /* @__PURE__ */ jsx34(DropdownMenuSeparator, {}),
|
|
29842
|
+
/* @__PURE__ */ jsx34(
|
|
29815
29843
|
DropdownMenuItem,
|
|
29816
29844
|
{
|
|
29817
29845
|
variant: "destructive",
|
|
@@ -29859,12 +29887,12 @@ var PaneView = memo(function PaneView2({
|
|
|
29859
29887
|
"data-split-pane-id": pane.id,
|
|
29860
29888
|
className: "relative flex size-full min-h-0 min-w-0 flex-col overflow-hidden bg-background",
|
|
29861
29889
|
children: [
|
|
29862
|
-
/* @__PURE__ */
|
|
29890
|
+
/* @__PURE__ */ jsx34(PaneHeader, { pane, tab, focused, ctx }),
|
|
29863
29891
|
/* @__PURE__ */ jsxs25("div", { className: "relative min-h-0 flex-1 overflow-hidden", children: [
|
|
29864
|
-
tab ? /* @__PURE__ */
|
|
29865
|
-
ctx.resizing && /* @__PURE__ */
|
|
29892
|
+
tab ? /* @__PURE__ */ jsx34("div", { ref: contentRef, className: "absolute inset-0" }) : ctx.renderEmptyPane(pane.id, ctx.paneIndexById.get(pane.id) ?? 0),
|
|
29893
|
+
ctx.resizing && /* @__PURE__ */ jsx34("div", { className: "absolute inset-0 z-10" })
|
|
29866
29894
|
] }),
|
|
29867
|
-
focused && ctx.paneCount > 1 && /* @__PURE__ */
|
|
29895
|
+
focused && ctx.paneCount > 1 && /* @__PURE__ */ jsx34("div", { className: "pointer-events-none absolute inset-0 z-30 border border-accent-brand/70" })
|
|
29868
29896
|
]
|
|
29869
29897
|
}
|
|
29870
29898
|
);
|
|
@@ -29904,11 +29932,11 @@ function Divider({
|
|
|
29904
29932
|
ctx.setResizing(false);
|
|
29905
29933
|
ctx.actions.resizeEnd();
|
|
29906
29934
|
}
|
|
29907
|
-
return /* @__PURE__ */
|
|
29935
|
+
return /* @__PURE__ */ jsx34(
|
|
29908
29936
|
"div",
|
|
29909
29937
|
{
|
|
29910
29938
|
className: `relative z-20 shrink-0 bg-border ${row ? "w-px" : "h-px"}`,
|
|
29911
|
-
children: /* @__PURE__ */
|
|
29939
|
+
children: /* @__PURE__ */ jsx34(
|
|
29912
29940
|
"div",
|
|
29913
29941
|
{
|
|
29914
29942
|
role: "separator",
|
|
@@ -29923,7 +29951,7 @@ function Divider({
|
|
|
29923
29951
|
ctx.actions.resizeEnd();
|
|
29924
29952
|
},
|
|
29925
29953
|
className: `group absolute flex touch-none items-center justify-center ${row ? "inset-y-0 -left-1.5 -right-1.5 cursor-col-resize" : "inset-x-0 -top-1.5 -bottom-1.5 cursor-row-resize"}`,
|
|
29926
|
-
children: /* @__PURE__ */
|
|
29954
|
+
children: /* @__PURE__ */ jsx34(
|
|
29927
29955
|
"div",
|
|
29928
29956
|
{
|
|
29929
29957
|
className: `pointer-events-none bg-transparent transition-colors group-hover:bg-accent-brand/60 ${row ? "h-full w-0.5" : "h-0.5 w-full"}`
|
|
@@ -29935,22 +29963,22 @@ function Divider({
|
|
|
29935
29963
|
);
|
|
29936
29964
|
}
|
|
29937
29965
|
function NodeView({ node, ctx }) {
|
|
29938
|
-
if (node.kind === "pane") return /* @__PURE__ */
|
|
29966
|
+
if (node.kind === "pane") return /* @__PURE__ */ jsx34(PaneView, { pane: node, ctx });
|
|
29939
29967
|
const row = node.direction === "row";
|
|
29940
|
-
return /* @__PURE__ */
|
|
29968
|
+
return /* @__PURE__ */ jsx34(
|
|
29941
29969
|
"div",
|
|
29942
29970
|
{
|
|
29943
29971
|
className: `flex size-full min-h-0 min-w-0 ${row ? "flex-row" : "flex-col"}`,
|
|
29944
29972
|
children: node.children.map((child, index) => /* @__PURE__ */ jsxs25(React9.Fragment, { children: [
|
|
29945
|
-
/* @__PURE__ */
|
|
29973
|
+
/* @__PURE__ */ jsx34(
|
|
29946
29974
|
"div",
|
|
29947
29975
|
{
|
|
29948
29976
|
className: "relative min-h-0 min-w-0 overflow-hidden",
|
|
29949
29977
|
style: { flex: `${node.sizes[index]} 1 0px` },
|
|
29950
|
-
children: /* @__PURE__ */
|
|
29978
|
+
children: /* @__PURE__ */ jsx34(NodeView, { node: child, ctx })
|
|
29951
29979
|
}
|
|
29952
29980
|
),
|
|
29953
|
-
index < node.children.length - 1 && /* @__PURE__ */
|
|
29981
|
+
index < node.children.length - 1 && /* @__PURE__ */ jsx34(Divider, { node, index, ctx })
|
|
29954
29982
|
] }, child.id))
|
|
29955
29983
|
}
|
|
29956
29984
|
);
|
|
@@ -29958,7 +29986,7 @@ function NodeView({ node, ctx }) {
|
|
|
29958
29986
|
function MobilePaneStrip({ ctx }) {
|
|
29959
29987
|
const { t: t3 } = useTranslation13();
|
|
29960
29988
|
const panes = listPanes(ctx.splitTab.split.root);
|
|
29961
|
-
return /* @__PURE__ */
|
|
29989
|
+
return /* @__PURE__ */ jsx34("div", { className: "flex h-9 shrink-0 items-stretch overflow-x-auto border-b border-border bg-sidebar", children: panes.map((pane) => {
|
|
29962
29990
|
const tab = pane.tabId ? ctx.tabsById.get(pane.tabId) : void 0;
|
|
29963
29991
|
const active2 = ctx.splitTab.split.focusedPaneId === pane.id;
|
|
29964
29992
|
const index = ctx.paneIndexById.get(pane.id) ?? 0;
|
|
@@ -29969,8 +29997,8 @@ function MobilePaneStrip({ ctx }) {
|
|
|
29969
29997
|
onClick: () => ctx.actions.focusPane(pane.id),
|
|
29970
29998
|
className: `flex min-w-0 max-w-40 shrink-0 items-center gap-1.5 border-r border-border px-3 text-xs ${active2 ? "bg-accent-brand/10 text-accent-brand" : "text-muted-foreground"}`,
|
|
29971
29999
|
children: [
|
|
29972
|
-
/* @__PURE__ */
|
|
29973
|
-
/* @__PURE__ */
|
|
30000
|
+
/* @__PURE__ */ jsx34("span", { className: "font-mono text-[10px]", children: index }),
|
|
30001
|
+
/* @__PURE__ */ jsx34("span", { className: "truncate", children: tab ? tabLabel(tab) : t3("splitScreen.emptyTitle") })
|
|
29974
30002
|
]
|
|
29975
30003
|
},
|
|
29976
30004
|
pane.id
|
|
@@ -30026,8 +30054,8 @@ function SplitView({
|
|
|
30026
30054
|
className: `flex size-full min-h-0 flex-col overflow-hidden ${resizing ? "select-none" : ""}`,
|
|
30027
30055
|
"data-split-view": splitTab.id,
|
|
30028
30056
|
children: [
|
|
30029
|
-
isMobile && panes.length > 1 && /* @__PURE__ */
|
|
30030
|
-
/* @__PURE__ */
|
|
30057
|
+
isMobile && panes.length > 1 && /* @__PURE__ */ jsx34(MobilePaneStrip, { ctx }),
|
|
30058
|
+
/* @__PURE__ */ jsx34("div", { className: "relative min-h-0 flex-1", children: single ? /* @__PURE__ */ jsx34(PaneView, { pane: single, ctx }, single.id) : /* @__PURE__ */ jsx34(NodeView, { node: splitTab.split.root, ctx }) })
|
|
30031
30059
|
]
|
|
30032
30060
|
}
|
|
30033
30061
|
);
|
|
@@ -30038,7 +30066,7 @@ init_define_import_meta_env();
|
|
|
30038
30066
|
import { useEffect as useEffect11 } from "react";
|
|
30039
30067
|
import { createPortal } from "react-dom";
|
|
30040
30068
|
import { useTranslation as useTranslation14 } from "react-i18next";
|
|
30041
|
-
import { jsx as
|
|
30069
|
+
import { jsx as jsx35, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
30042
30070
|
function SplitDropOverlay({
|
|
30043
30071
|
containerRef
|
|
30044
30072
|
}) {
|
|
@@ -30079,7 +30107,7 @@ function SplitDropOverlay({
|
|
|
30079
30107
|
const { hover } = drag;
|
|
30080
30108
|
return createPortal(
|
|
30081
30109
|
/* @__PURE__ */ jsxs26("div", { className: "pointer-events-none fixed inset-0 z-[9998]", children: [
|
|
30082
|
-
hover && /* @__PURE__ */
|
|
30110
|
+
hover && /* @__PURE__ */ jsx35(
|
|
30083
30111
|
"div",
|
|
30084
30112
|
{
|
|
30085
30113
|
className: "absolute flex items-center justify-center border-2 border-dashed border-accent-brand bg-accent-brand/15 transition-[left,top,width,height] duration-100",
|
|
@@ -30089,10 +30117,10 @@ function SplitDropOverlay({
|
|
|
30089
30117
|
width: hover.rect.width,
|
|
30090
30118
|
height: hover.rect.height
|
|
30091
30119
|
},
|
|
30092
|
-
children: /* @__PURE__ */
|
|
30120
|
+
children: /* @__PURE__ */ jsx35("span", { className: "bg-background/90 px-2 py-1 text-xs font-medium text-accent-brand", children: hover.target === "center" ? t3("splitScreen.dropHere") : t3("splitScreen.dropSplit") })
|
|
30093
30121
|
}
|
|
30094
30122
|
),
|
|
30095
|
-
/* @__PURE__ */
|
|
30123
|
+
/* @__PURE__ */ jsx35(
|
|
30096
30124
|
"div",
|
|
30097
30125
|
{
|
|
30098
30126
|
className: "absolute max-w-48 truncate border border-border bg-popover px-2 py-1 text-xs text-foreground shadow-lg",
|
|
@@ -30109,7 +30137,7 @@ function SplitDropOverlay({
|
|
|
30109
30137
|
init_define_import_meta_env();
|
|
30110
30138
|
import { useMemo as useMemo5, useState as useState14 } from "react";
|
|
30111
30139
|
import { useTranslation as useTranslation15 } from "react-i18next";
|
|
30112
|
-
import { jsx as
|
|
30140
|
+
import { jsx as jsx36, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
30113
30141
|
var HOST_LIMIT = 60;
|
|
30114
30142
|
function HostActionButton({
|
|
30115
30143
|
host,
|
|
@@ -30120,7 +30148,7 @@ function HostActionButton({
|
|
|
30120
30148
|
const Icon = action.icon;
|
|
30121
30149
|
const title = action.label?.(host) ?? t3(action.titleKey);
|
|
30122
30150
|
const items = action.items?.(host) ?? [];
|
|
30123
|
-
const button = /* @__PURE__ */
|
|
30151
|
+
const button = /* @__PURE__ */ jsx36(
|
|
30124
30152
|
"button",
|
|
30125
30153
|
{
|
|
30126
30154
|
type: "button",
|
|
@@ -30128,13 +30156,13 @@ function HostActionButton({
|
|
|
30128
30156
|
"aria-label": `${host.name}: ${title}`,
|
|
30129
30157
|
className: "flex size-6 shrink-0 items-center justify-center text-muted-foreground hover:bg-accent-brand/10 hover:text-accent-brand",
|
|
30130
30158
|
onClick: items.length > 1 ? void 0 : () => onPick({ action }),
|
|
30131
|
-
children: /* @__PURE__ */
|
|
30159
|
+
children: /* @__PURE__ */ jsx36(Icon, { className: "size-3.5" })
|
|
30132
30160
|
}
|
|
30133
30161
|
);
|
|
30134
30162
|
if (items.length <= 1) return button;
|
|
30135
30163
|
return /* @__PURE__ */ jsxs27(DropdownMenu, { children: [
|
|
30136
|
-
/* @__PURE__ */
|
|
30137
|
-
/* @__PURE__ */
|
|
30164
|
+
/* @__PURE__ */ jsx36(DropdownMenuTrigger, { asChild: true, children: button }),
|
|
30165
|
+
/* @__PURE__ */ jsx36(DropdownMenuContent, { align: "end", className: "w-48", children: items.map((item) => /* @__PURE__ */ jsx36(
|
|
30138
30166
|
DropdownMenuItem,
|
|
30139
30167
|
{
|
|
30140
30168
|
onSelect: () => onPick({ action, item }),
|
|
@@ -30164,7 +30192,7 @@ function EmptyPanePicker({
|
|
|
30164
30192
|
) : hosts;
|
|
30165
30193
|
return [...matches].sort((a, b) => a.name.localeCompare(b.name)).slice(0, HOST_LIMIT);
|
|
30166
30194
|
}, [hosts, query]);
|
|
30167
|
-
return /* @__PURE__ */
|
|
30195
|
+
return /* @__PURE__ */ jsx36(
|
|
30168
30196
|
"div",
|
|
30169
30197
|
{
|
|
30170
30198
|
className: "flex size-full justify-center overflow-y-auto bg-background p-4",
|
|
@@ -30173,29 +30201,29 @@ function EmptyPanePicker({
|
|
|
30173
30201
|
/* @__PURE__ */ jsxs27("div", { className: "flex flex-col gap-1", children: [
|
|
30174
30202
|
/* @__PURE__ */ jsxs27("span", { className: "text-sm font-semibold text-foreground", children: [
|
|
30175
30203
|
t3("splitScreen.emptyTitle"),
|
|
30176
|
-
/* @__PURE__ */
|
|
30204
|
+
/* @__PURE__ */ jsx36("span", { className: "ml-2 text-xs font-normal text-muted-foreground", children: t3("splitScreen.paneNumber", { index: paneIndex }) })
|
|
30177
30205
|
] }),
|
|
30178
|
-
/* @__PURE__ */
|
|
30206
|
+
/* @__PURE__ */ jsx36("span", { className: "text-xs text-muted-foreground", children: t3("splitScreen.emptyHint") })
|
|
30179
30207
|
] }),
|
|
30180
30208
|
/* @__PURE__ */ jsxs27("section", { className: "flex flex-col gap-1.5", children: [
|
|
30181
|
-
/* @__PURE__ */
|
|
30182
|
-
freeTabs.length === 0 ? /* @__PURE__ */
|
|
30209
|
+
/* @__PURE__ */ jsx36("span", { className: "text-[10px] font-semibold uppercase tracking-wider text-muted-foreground", children: t3("splitScreen.openTabs") }),
|
|
30210
|
+
freeTabs.length === 0 ? /* @__PURE__ */ jsx36("span", { className: "text-xs text-muted-foreground/70", children: t3("splitScreen.noOpenTabs") }) : /* @__PURE__ */ jsx36("div", { className: "flex flex-col border border-border", children: freeTabs.map((tab) => /* @__PURE__ */ jsxs27(
|
|
30183
30211
|
"button",
|
|
30184
30212
|
{
|
|
30185
30213
|
type: "button",
|
|
30186
30214
|
className: "flex items-center gap-2 border-b border-border px-2.5 py-1.5 text-left text-xs last:border-b-0 hover:bg-accent-brand/10 hover:text-accent-brand",
|
|
30187
30215
|
onClick: () => onPickTab(tab.id),
|
|
30188
30216
|
children: [
|
|
30189
|
-
/* @__PURE__ */
|
|
30190
|
-
/* @__PURE__ */
|
|
30217
|
+
/* @__PURE__ */ jsx36("span", { className: "shrink-0 text-muted-foreground", children: tabIcon(tab.type) }),
|
|
30218
|
+
/* @__PURE__ */ jsx36("span", { className: "truncate", children: tab.label })
|
|
30191
30219
|
]
|
|
30192
30220
|
},
|
|
30193
30221
|
tab.id
|
|
30194
30222
|
)) })
|
|
30195
30223
|
] }),
|
|
30196
30224
|
newTabOptions.length > 0 && /* @__PURE__ */ jsxs27("section", { className: "flex flex-col gap-1.5", children: [
|
|
30197
|
-
/* @__PURE__ */
|
|
30198
|
-
/* @__PURE__ */
|
|
30225
|
+
/* @__PURE__ */ jsx36("span", { className: "text-[10px] font-semibold uppercase tracking-wider text-muted-foreground", children: t3("splitScreen.newSession") }),
|
|
30226
|
+
/* @__PURE__ */ jsx36("div", { className: "flex flex-wrap gap-1.5", children: newTabOptions.map((option) => {
|
|
30199
30227
|
const Icon = option.icon;
|
|
30200
30228
|
return /* @__PURE__ */ jsxs27(
|
|
30201
30229
|
"button",
|
|
@@ -30204,7 +30232,7 @@ function EmptyPanePicker({
|
|
|
30204
30232
|
className: "flex items-center gap-1.5 border border-border px-2.5 py-1.5 text-xs hover:border-accent-brand/40 hover:bg-accent-brand/10 hover:text-accent-brand",
|
|
30205
30233
|
onClick: () => onOpenType(option.type),
|
|
30206
30234
|
children: [
|
|
30207
|
-
Icon && /* @__PURE__ */
|
|
30235
|
+
Icon && /* @__PURE__ */ jsx36(Icon, { className: "size-3.5" }),
|
|
30208
30236
|
option.label
|
|
30209
30237
|
]
|
|
30210
30238
|
},
|
|
@@ -30213,10 +30241,10 @@ function EmptyPanePicker({
|
|
|
30213
30241
|
}) })
|
|
30214
30242
|
] }),
|
|
30215
30243
|
/* @__PURE__ */ jsxs27("section", { className: "flex flex-col gap-1.5", children: [
|
|
30216
|
-
/* @__PURE__ */
|
|
30244
|
+
/* @__PURE__ */ jsx36("span", { className: "text-[10px] font-semibold uppercase tracking-wider text-muted-foreground", children: t3("splitScreen.hosts") }),
|
|
30217
30245
|
/* @__PURE__ */ jsxs27("div", { className: "relative", children: [
|
|
30218
|
-
/* @__PURE__ */
|
|
30219
|
-
/* @__PURE__ */
|
|
30246
|
+
/* @__PURE__ */ jsx36(Search, { className: "pointer-events-none absolute left-2 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground" }),
|
|
30247
|
+
/* @__PURE__ */ jsx36(
|
|
30220
30248
|
Input,
|
|
30221
30249
|
{
|
|
30222
30250
|
value: query,
|
|
@@ -30227,7 +30255,7 @@ function EmptyPanePicker({
|
|
|
30227
30255
|
}
|
|
30228
30256
|
)
|
|
30229
30257
|
] }),
|
|
30230
|
-
shownHosts.length === 0 ? /* @__PURE__ */
|
|
30258
|
+
shownHosts.length === 0 ? /* @__PURE__ */ jsx36("span", { className: "text-xs text-muted-foreground/70", children: t3("splitScreen.noHosts") }) : /* @__PURE__ */ jsx36("div", { className: "flex flex-col border border-border", children: shownHosts.map((host) => {
|
|
30231
30259
|
const actions = hostActionsFor(allActions, host);
|
|
30232
30260
|
const connect = actions.filter((action) => action.kind === "connect").sort((a, b) => (b.priority ?? 0) - (a.priority ?? 0));
|
|
30233
30261
|
const open = actions.filter((action) => action.kind === "open");
|
|
@@ -30245,7 +30273,7 @@ function EmptyPanePicker({
|
|
|
30245
30273
|
className: "flex min-w-0 flex-1 flex-col items-start text-left text-xs enabled:hover:text-accent-brand disabled:opacity-60",
|
|
30246
30274
|
onClick: () => primary && onPickHost(host, { action: primary }),
|
|
30247
30275
|
children: [
|
|
30248
|
-
/* @__PURE__ */
|
|
30276
|
+
/* @__PURE__ */ jsx36("span", { className: "w-full truncate font-medium", children: host.name }),
|
|
30249
30277
|
/* @__PURE__ */ jsxs27("span", { className: "w-full truncate text-[10px] text-muted-foreground", children: [
|
|
30250
30278
|
host.username ? `${host.username}@` : "",
|
|
30251
30279
|
host.ip
|
|
@@ -30253,7 +30281,7 @@ function EmptyPanePicker({
|
|
|
30253
30281
|
]
|
|
30254
30282
|
}
|
|
30255
30283
|
),
|
|
30256
|
-
/* @__PURE__ */
|
|
30284
|
+
/* @__PURE__ */ jsx36("div", { className: "flex shrink-0 items-center", children: [...connect, ...open].map((action) => /* @__PURE__ */ jsx36(
|
|
30257
30285
|
HostActionButton,
|
|
30258
30286
|
{
|
|
30259
30287
|
host,
|
|
@@ -30276,7 +30304,7 @@ function EmptyPanePicker({
|
|
|
30276
30304
|
className: "self-start rounded-none text-xs text-muted-foreground",
|
|
30277
30305
|
onClick: onClosePane,
|
|
30278
30306
|
children: [
|
|
30279
|
-
/* @__PURE__ */
|
|
30307
|
+
/* @__PURE__ */ jsx36(X, { className: "size-3" }),
|
|
30280
30308
|
t3("splitScreen.closePane")
|
|
30281
30309
|
]
|
|
30282
30310
|
}
|
|
@@ -30287,7 +30315,7 @@ function EmptyPanePicker({
|
|
|
30287
30315
|
}
|
|
30288
30316
|
|
|
30289
30317
|
// src/ui/shell/stage/TabStage.tsx
|
|
30290
|
-
import { jsx as
|
|
30318
|
+
import { jsx as jsx37, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
30291
30319
|
function TabStage({ className }) {
|
|
30292
30320
|
const shell2 = useShellController();
|
|
30293
30321
|
const store = useTabStageStore();
|
|
@@ -30303,7 +30331,7 @@ function TabStage({ className }) {
|
|
|
30303
30331
|
className
|
|
30304
30332
|
),
|
|
30305
30333
|
children: [
|
|
30306
|
-
activeSplit && /* @__PURE__ */
|
|
30334
|
+
activeSplit && /* @__PURE__ */ jsx37("div", { className: "motion-workspace-layout absolute inset-0 flex flex-col", children: /* @__PURE__ */ jsx37(
|
|
30307
30335
|
SplitView,
|
|
30308
30336
|
{
|
|
30309
30337
|
splitTab: activeSplit,
|
|
@@ -30311,7 +30339,7 @@ function TabStage({ className }) {
|
|
|
30311
30339
|
isMobile: shell2.isMobile,
|
|
30312
30340
|
actions: shell2.split.viewActions(activeSplit.id),
|
|
30313
30341
|
onPaneContentRef: store.setPaneEl,
|
|
30314
|
-
renderEmptyPane: (paneId, paneIndex) => /* @__PURE__ */
|
|
30342
|
+
renderEmptyPane: (paneId, paneIndex) => /* @__PURE__ */ jsx37(
|
|
30315
30343
|
EmptyPanePicker,
|
|
30316
30344
|
{
|
|
30317
30345
|
paneIndex,
|
|
@@ -30326,8 +30354,8 @@ function TabStage({ className }) {
|
|
|
30326
30354
|
)
|
|
30327
30355
|
}
|
|
30328
30356
|
) }),
|
|
30329
|
-
/* @__PURE__ */
|
|
30330
|
-
/* @__PURE__ */
|
|
30357
|
+
/* @__PURE__ */ jsx37(SplitDropOverlay, { containerRef: mainAreaRef }),
|
|
30358
|
+
/* @__PURE__ */ jsx37(
|
|
30331
30359
|
"div",
|
|
30332
30360
|
{
|
|
30333
30361
|
ref: store.setNormalView,
|
|
@@ -30343,7 +30371,7 @@ function TabStage({ className }) {
|
|
|
30343
30371
|
// src/ui/components/manager-card.tsx
|
|
30344
30372
|
init_define_import_meta_env();
|
|
30345
30373
|
import { useTranslation as useTranslation16 } from "react-i18next";
|
|
30346
|
-
import { jsx as
|
|
30374
|
+
import { jsx as jsx38, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
30347
30375
|
function ManagerCardShell({
|
|
30348
30376
|
title,
|
|
30349
30377
|
icon,
|
|
@@ -30356,7 +30384,7 @@ function ManagerCardShell({
|
|
|
30356
30384
|
headerExtra
|
|
30357
30385
|
}) {
|
|
30358
30386
|
const { t: t3 } = useTranslation16();
|
|
30359
|
-
return /* @__PURE__ */
|
|
30387
|
+
return /* @__PURE__ */ jsx38(
|
|
30360
30388
|
MetricCard,
|
|
30361
30389
|
{
|
|
30362
30390
|
title,
|
|
@@ -30364,21 +30392,21 @@ function ManagerCardShell({
|
|
|
30364
30392
|
scroll: true,
|
|
30365
30393
|
action: /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-1", children: [
|
|
30366
30394
|
headerExtra,
|
|
30367
|
-
/* @__PURE__ */
|
|
30395
|
+
/* @__PURE__ */ jsx38(
|
|
30368
30396
|
"button",
|
|
30369
30397
|
{
|
|
30370
30398
|
onClick: onRefresh,
|
|
30371
30399
|
className: "flex size-6 items-center justify-center text-muted-foreground transition-colors hover:text-foreground",
|
|
30372
30400
|
title: t3("managerCard.refresh"),
|
|
30373
|
-
children: /* @__PURE__ */
|
|
30401
|
+
children: /* @__PURE__ */ jsx38(RefreshCw, { className: `size-3 ${loading ? "animate-spin" : ""}` })
|
|
30374
30402
|
}
|
|
30375
30403
|
)
|
|
30376
30404
|
] }),
|
|
30377
30405
|
children: error ? /* @__PURE__ */ jsxs29("div", { className: "flex flex-col items-center gap-2 py-6 text-center", children: [
|
|
30378
|
-
/* @__PURE__ */
|
|
30379
|
-
/* @__PURE__ */
|
|
30380
|
-
error.code === "SUDO_REQUIRED" && /* @__PURE__ */
|
|
30381
|
-
/* @__PURE__ */
|
|
30406
|
+
/* @__PURE__ */ jsx38(TriangleAlert, { className: "size-6 text-warning" }),
|
|
30407
|
+
/* @__PURE__ */ jsx38("span", { className: "text-xs text-muted-foreground", children: error.message }),
|
|
30408
|
+
error.code === "SUDO_REQUIRED" && /* @__PURE__ */ jsx38("span", { className: "text-[10px] text-muted-foreground", children: t3("managerCard.sudoHint") }),
|
|
30409
|
+
/* @__PURE__ */ jsx38(
|
|
30382
30410
|
Button,
|
|
30383
30411
|
{
|
|
30384
30412
|
variant: "outline",
|
|
@@ -30388,7 +30416,7 @@ function ManagerCardShell({
|
|
|
30388
30416
|
children: t3("managerCard.retry")
|
|
30389
30417
|
}
|
|
30390
30418
|
)
|
|
30391
|
-
] }) : empty2 ? /* @__PURE__ */
|
|
30419
|
+
] }) : empty2 ? /* @__PURE__ */ jsx38("div", { className: "flex items-center justify-center py-8 text-xs text-muted-foreground/50", children: emptyMessage ?? t3("managerCard.noData") }) : children
|
|
30392
30420
|
}
|
|
30393
30421
|
);
|
|
30394
30422
|
}
|
|
@@ -30402,8 +30430,8 @@ function ManagerSearch({
|
|
|
30402
30430
|
const { t: t3 } = useTranslation16();
|
|
30403
30431
|
return /* @__PURE__ */ jsxs29("div", { className: "mb-2 flex items-center gap-1.5", children: [
|
|
30404
30432
|
/* @__PURE__ */ jsxs29("div", { className: "relative flex-1", children: [
|
|
30405
|
-
/* @__PURE__ */
|
|
30406
|
-
/* @__PURE__ */
|
|
30433
|
+
/* @__PURE__ */ jsx38(Search, { className: "pointer-events-none absolute left-2 top-1/2 size-3 -translate-y-1/2 text-muted-foreground/60" }),
|
|
30434
|
+
/* @__PURE__ */ jsx38(
|
|
30407
30435
|
"input",
|
|
30408
30436
|
{
|
|
30409
30437
|
value,
|
|
@@ -30413,7 +30441,7 @@ function ManagerSearch({
|
|
|
30413
30441
|
}
|
|
30414
30442
|
)
|
|
30415
30443
|
] }),
|
|
30416
|
-
count != null && /* @__PURE__ */
|
|
30444
|
+
count != null && /* @__PURE__ */ jsx38("span", { className: "shrink-0 text-[10px] tabular-nums text-muted-foreground", children: count }),
|
|
30417
30445
|
extra
|
|
30418
30446
|
] });
|
|
30419
30447
|
}
|
|
@@ -30465,13 +30493,13 @@ function useAdaptivePolling(poll, policy, enabled = true, options = {}) {
|
|
|
30465
30493
|
|
|
30466
30494
|
// src/ui/lib/widget-title.tsx
|
|
30467
30495
|
init_define_import_meta_env();
|
|
30468
|
-
import { jsx as
|
|
30496
|
+
import { jsx as jsx39, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
30469
30497
|
function WidgetTitle({ title, icon, fallback }) {
|
|
30470
30498
|
const label = title || fallback;
|
|
30471
30499
|
if (!label) return null;
|
|
30472
30500
|
return /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-1.5 px-2 py-1.5 border-b border-border/50 shrink-0", children: [
|
|
30473
|
-
icon && /* @__PURE__ */
|
|
30474
|
-
/* @__PURE__ */
|
|
30501
|
+
icon && /* @__PURE__ */ jsx39("span", { className: "text-accent-brand shrink-0", children: icon }),
|
|
30502
|
+
/* @__PURE__ */ jsx39("span", { className: "text-[10px] font-semibold text-muted-foreground uppercase tracking-wider truncate", children: label })
|
|
30475
30503
|
] });
|
|
30476
30504
|
}
|
|
30477
30505
|
|
|
@@ -30516,7 +30544,7 @@ function runVisibleInterval(tick, intervalMs) {
|
|
|
30516
30544
|
// src/ui/ssh/dialogs/PassphraseDialog.tsx
|
|
30517
30545
|
init_define_import_meta_env();
|
|
30518
30546
|
import { useTranslation as useTranslation17 } from "react-i18next";
|
|
30519
|
-
import { jsx as
|
|
30547
|
+
import { jsx as jsx40, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
30520
30548
|
function PassphraseDialog({
|
|
30521
30549
|
isOpen,
|
|
30522
30550
|
onSubmit,
|
|
@@ -30536,18 +30564,18 @@ function PassphraseDialog({
|
|
|
30536
30564
|
onSubmit(input.value);
|
|
30537
30565
|
}
|
|
30538
30566
|
};
|
|
30539
|
-
return /* @__PURE__ */
|
|
30567
|
+
return /* @__PURE__ */ jsx40(
|
|
30540
30568
|
PanePrompt,
|
|
30541
30569
|
{
|
|
30542
30570
|
open: true,
|
|
30543
30571
|
layer: "connection",
|
|
30544
30572
|
backgroundColor,
|
|
30545
|
-
icon: /* @__PURE__ */
|
|
30573
|
+
icon: /* @__PURE__ */ jsx40(KeyRound, { className: "size-4" }),
|
|
30546
30574
|
title: t3("auth.passphraseRequired"),
|
|
30547
|
-
description: /* @__PURE__ */
|
|
30575
|
+
description: /* @__PURE__ */ jsx40("span", { className: "font-mono", children: hostDisplay }),
|
|
30548
30576
|
children: /* @__PURE__ */ jsxs31("form", { onSubmit: handleSubmit, className: "flex flex-col gap-3", children: [
|
|
30549
30577
|
/* @__PURE__ */ jsxs31("div", { className: "flex flex-col gap-1.5", children: [
|
|
30550
|
-
/* @__PURE__ */
|
|
30578
|
+
/* @__PURE__ */ jsx40(
|
|
30551
30579
|
PasswordInput,
|
|
30552
30580
|
{
|
|
30553
30581
|
id: "passphrase",
|
|
@@ -30557,11 +30585,11 @@ function PassphraseDialog({
|
|
|
30557
30585
|
className: "rounded-none bg-muted/50 border-border text-xs"
|
|
30558
30586
|
}
|
|
30559
30587
|
),
|
|
30560
|
-
/* @__PURE__ */
|
|
30588
|
+
/* @__PURE__ */ jsx40("p", { className: "text-[10px] text-muted-foreground", children: t3("auth.passphraseRequiredDescription") })
|
|
30561
30589
|
] }),
|
|
30562
30590
|
/* @__PURE__ */ jsxs31("div", { className: "flex justify-end gap-2", children: [
|
|
30563
|
-
/* @__PURE__ */
|
|
30564
|
-
/* @__PURE__ */
|
|
30591
|
+
/* @__PURE__ */ jsx40("button", { type: "button", onClick: onCancel, className: PROMPT_BUTTON, children: t3("common.cancel") }),
|
|
30592
|
+
/* @__PURE__ */ jsx40("button", { type: "submit", className: PROMPT_PRIMARY_BUTTON, children: t3("common.connect") })
|
|
30565
30593
|
] })
|
|
30566
30594
|
] })
|
|
30567
30595
|
}
|
|
@@ -30972,7 +31000,7 @@ function hostKeyFingerprint(hex) {
|
|
|
30972
31000
|
}
|
|
30973
31001
|
|
|
30974
31002
|
// src/ui/ssh/dialogs/HostKeyVerificationDialog.tsx
|
|
30975
|
-
import { Fragment as Fragment6, jsx as
|
|
31003
|
+
import { Fragment as Fragment6, jsx as jsx41, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
30976
31004
|
function FingerprintRow({
|
|
30977
31005
|
label,
|
|
30978
31006
|
value,
|
|
@@ -30981,10 +31009,10 @@ function FingerprintRow({
|
|
|
30981
31009
|
}) {
|
|
30982
31010
|
const { t: t3 } = useTranslation18();
|
|
30983
31011
|
return /* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-1.5", children: [
|
|
30984
|
-
/* @__PURE__ */
|
|
31012
|
+
/* @__PURE__ */ jsx41("p", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: label }),
|
|
30985
31013
|
/* @__PURE__ */ jsxs32("div", { className: "flex items-stretch gap-2", children: [
|
|
30986
|
-
/* @__PURE__ */
|
|
30987
|
-
/* @__PURE__ */
|
|
31014
|
+
/* @__PURE__ */ jsx41("div", { className: "flex-1 bg-muted/50 border border-border p-3 font-mono text-xs break-all", children: value }),
|
|
31015
|
+
/* @__PURE__ */ jsx41(
|
|
30988
31016
|
"button",
|
|
30989
31017
|
{
|
|
30990
31018
|
type: "button",
|
|
@@ -30992,7 +31020,7 @@ function FingerprintRow({
|
|
|
30992
31020
|
title: t3("common.copy"),
|
|
30993
31021
|
"aria-label": t3("common.copy"),
|
|
30994
31022
|
className: "flex w-11 shrink-0 items-center justify-center border border-border text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-1 focus-visible:ring-ring",
|
|
30995
|
-
children: copied ? /* @__PURE__ */
|
|
31023
|
+
children: copied ? /* @__PURE__ */ jsx41(Check, { className: "size-4 text-accent-brand" }) : /* @__PURE__ */ jsx41(Copy, { className: "size-4" })
|
|
30996
31024
|
}
|
|
30997
31025
|
)
|
|
30998
31026
|
] })
|
|
@@ -31027,14 +31055,14 @@ function HostKeyVerificationDialog({
|
|
|
31027
31055
|
const changed = scenario === "changed";
|
|
31028
31056
|
const newPrint = hostKeyFingerprint(fingerprint);
|
|
31029
31057
|
const oldPrint = hostKeyFingerprint(oldFingerprint || "");
|
|
31030
|
-
return /* @__PURE__ */
|
|
31058
|
+
return /* @__PURE__ */ jsx41(
|
|
31031
31059
|
PanePrompt,
|
|
31032
31060
|
{
|
|
31033
31061
|
open: true,
|
|
31034
31062
|
layer: "connection",
|
|
31035
31063
|
backgroundColor,
|
|
31036
31064
|
tone: changed ? "destructive" : "default",
|
|
31037
|
-
icon: changed ? /* @__PURE__ */
|
|
31065
|
+
icon: changed ? /* @__PURE__ */ jsx41(TriangleAlert, { className: "size-4" }) : /* @__PURE__ */ jsx41(Shield, { className: "size-4" }),
|
|
31038
31066
|
title: changed ? t3("hostKey.keyChangedWarning") : t3("hostKey.verifyNewHost"),
|
|
31039
31067
|
description: /* @__PURE__ */ jsxs32("span", { className: "font-mono", children: [
|
|
31040
31068
|
hostname || ip,
|
|
@@ -31043,8 +31071,8 @@ function HostKeyVerificationDialog({
|
|
|
31043
31071
|
] }),
|
|
31044
31072
|
className: "max-w-lg",
|
|
31045
31073
|
actions: /* @__PURE__ */ jsxs32(Fragment6, { children: [
|
|
31046
|
-
/* @__PURE__ */
|
|
31047
|
-
/* @__PURE__ */
|
|
31074
|
+
/* @__PURE__ */ jsx41("button", { type: "button", onClick: onReject, className: PROMPT_BUTTON, children: t3("common.cancel") }),
|
|
31075
|
+
/* @__PURE__ */ jsx41(
|
|
31048
31076
|
"button",
|
|
31049
31077
|
{
|
|
31050
31078
|
type: "button",
|
|
@@ -31054,15 +31082,15 @@ function HostKeyVerificationDialog({
|
|
|
31054
31082
|
}
|
|
31055
31083
|
)
|
|
31056
31084
|
] }),
|
|
31057
|
-
children: /* @__PURE__ */
|
|
31085
|
+
children: /* @__PURE__ */ jsx41("div", { className: "flex flex-col gap-3", children: changed ? /* @__PURE__ */ jsxs32(Fragment6, { children: [
|
|
31058
31086
|
/* @__PURE__ */ jsxs32("div", { className: "flex items-start gap-3 p-3 border border-destructive/20 bg-destructive/10", children: [
|
|
31059
|
-
/* @__PURE__ */
|
|
31087
|
+
/* @__PURE__ */ jsx41(TriangleAlert, { className: "size-4 text-destructive shrink-0 mt-0.5" }),
|
|
31060
31088
|
/* @__PURE__ */ jsxs32("div", { children: [
|
|
31061
|
-
/* @__PURE__ */
|
|
31062
|
-
/* @__PURE__ */
|
|
31089
|
+
/* @__PURE__ */ jsx41("p", { className: "text-[10px] font-bold uppercase tracking-widest text-destructive", children: t3("hostKey.securityWarning") }),
|
|
31090
|
+
/* @__PURE__ */ jsx41("p", { className: "text-xs text-destructive/80 mt-1", children: t3("hostKey.keyChangedDescription") })
|
|
31063
31091
|
] })
|
|
31064
31092
|
] }),
|
|
31065
|
-
/* @__PURE__ */
|
|
31093
|
+
/* @__PURE__ */ jsx41(
|
|
31066
31094
|
FingerprintRow,
|
|
31067
31095
|
{
|
|
31068
31096
|
label: t3("hostKey.previousKey"),
|
|
@@ -31071,7 +31099,7 @@ function HostKeyVerificationDialog({
|
|
|
31071
31099
|
onCopy: () => copyFingerprint(oldPrint, true)
|
|
31072
31100
|
}
|
|
31073
31101
|
),
|
|
31074
|
-
/* @__PURE__ */
|
|
31102
|
+
/* @__PURE__ */ jsx41(
|
|
31075
31103
|
FingerprintRow,
|
|
31076
31104
|
{
|
|
31077
31105
|
label: t3("hostKey.newFingerprint"),
|
|
@@ -31082,13 +31110,13 @@ function HostKeyVerificationDialog({
|
|
|
31082
31110
|
)
|
|
31083
31111
|
] }) : /* @__PURE__ */ jsxs32(Fragment6, { children: [
|
|
31084
31112
|
/* @__PURE__ */ jsxs32("div", { className: "flex items-start gap-3 p-3 border border-border bg-muted/10", children: [
|
|
31085
|
-
/* @__PURE__ */
|
|
31113
|
+
/* @__PURE__ */ jsx41(Shield, { className: "size-4 text-accent-brand shrink-0 mt-0.5" }),
|
|
31086
31114
|
/* @__PURE__ */ jsxs32("div", { children: [
|
|
31087
|
-
/* @__PURE__ */
|
|
31088
|
-
/* @__PURE__ */
|
|
31115
|
+
/* @__PURE__ */ jsx41("p", { className: "text-[10px] font-bold uppercase tracking-widest", children: t3("hostKey.firstConnectionTitle") }),
|
|
31116
|
+
/* @__PURE__ */ jsx41("p", { className: "text-xs text-muted-foreground mt-1", children: t3("hostKey.firstConnectionDescription") })
|
|
31089
31117
|
] })
|
|
31090
31118
|
] }),
|
|
31091
|
-
/* @__PURE__ */
|
|
31119
|
+
/* @__PURE__ */ jsx41(
|
|
31092
31120
|
FingerprintRow,
|
|
31093
31121
|
{
|
|
31094
31122
|
label: t3("hostKey.fingerprint"),
|
|
@@ -31097,7 +31125,7 @@ function HostKeyVerificationDialog({
|
|
|
31097
31125
|
onCopy: () => copyFingerprint(newPrint)
|
|
31098
31126
|
}
|
|
31099
31127
|
),
|
|
31100
|
-
/* @__PURE__ */
|
|
31128
|
+
/* @__PURE__ */ jsx41("p", { className: "text-[10px] text-muted-foreground", children: t3("hostKey.verifyInstructions") })
|
|
31101
31129
|
] }) })
|
|
31102
31130
|
}
|
|
31103
31131
|
);
|
|
@@ -31160,10 +31188,10 @@ var RobustClipboardProvider = class {
|
|
|
31160
31188
|
// src/ui/components/kbd.tsx
|
|
31161
31189
|
init_define_import_meta_env();
|
|
31162
31190
|
import * as React10 from "react";
|
|
31163
|
-
import { jsx as
|
|
31191
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
31164
31192
|
var Kbd = React10.forwardRef(
|
|
31165
31193
|
({ className, ...props }, ref) => {
|
|
31166
|
-
return /* @__PURE__ */
|
|
31194
|
+
return /* @__PURE__ */ jsx42(
|
|
31167
31195
|
"kbd",
|
|
31168
31196
|
{
|
|
31169
31197
|
ref,
|
|
@@ -31180,12 +31208,12 @@ Kbd.displayName = "Kbd";
|
|
|
31180
31208
|
var KbdKey = ({
|
|
31181
31209
|
className,
|
|
31182
31210
|
...props
|
|
31183
|
-
}) => /* @__PURE__ */
|
|
31211
|
+
}) => /* @__PURE__ */ jsx42("span", { className: cn("", className), ...props });
|
|
31184
31212
|
KbdKey.displayName = "KbdKey";
|
|
31185
31213
|
var KbdSeparator = ({
|
|
31186
31214
|
className,
|
|
31187
31215
|
...props
|
|
31188
|
-
}) => /* @__PURE__ */
|
|
31216
|
+
}) => /* @__PURE__ */ jsx42("span", { className: cn("text-muted-foreground/50", className), ...props, children: "+" });
|
|
31189
31217
|
KbdSeparator.displayName = "KbdSeparator";
|
|
31190
31218
|
|
|
31191
31219
|
// src/ui/components/card-masonry.tsx
|
|
@@ -31199,7 +31227,7 @@ import {
|
|
|
31199
31227
|
useRef as useRef9,
|
|
31200
31228
|
useState as useState16
|
|
31201
31229
|
} from "react";
|
|
31202
|
-
import { jsx as
|
|
31230
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
31203
31231
|
var COLUMN_STEPS = {
|
|
31204
31232
|
1: [1, 1, 1, 1],
|
|
31205
31233
|
2: [1, 2, 2, 2],
|
|
@@ -31245,7 +31273,7 @@ function CardMasonry({
|
|
|
31245
31273
|
items.forEach((child, i2) => next[i2 % count].push(child));
|
|
31246
31274
|
return next;
|
|
31247
31275
|
}, [items, count]);
|
|
31248
|
-
return /* @__PURE__ */
|
|
31276
|
+
return /* @__PURE__ */ jsx43(
|
|
31249
31277
|
"div",
|
|
31250
31278
|
{
|
|
31251
31279
|
ref,
|
|
@@ -31253,7 +31281,7 @@ function CardMasonry({
|
|
|
31253
31281
|
count === 1 ? `flex flex-col ${PANEL.gap}` : `flex items-start ${PANEL.gap}`,
|
|
31254
31282
|
className
|
|
31255
31283
|
),
|
|
31256
|
-
children: count === 1 ? items : buckets2.map((bucket, i2) => /* @__PURE__ */
|
|
31284
|
+
children: count === 1 ? items : buckets2.map((bucket, i2) => /* @__PURE__ */ jsx43(
|
|
31257
31285
|
"div",
|
|
31258
31286
|
{
|
|
31259
31287
|
className: `flex min-w-0 flex-1 flex-col ${PANEL.gap}`,
|
|
@@ -31284,13 +31312,13 @@ function usageBarColor(percent) {
|
|
|
31284
31312
|
}
|
|
31285
31313
|
|
|
31286
31314
|
// src/ui/components/meter.tsx
|
|
31287
|
-
import { jsx as
|
|
31315
|
+
import { jsx as jsx44, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
31288
31316
|
function Meter({
|
|
31289
31317
|
percent,
|
|
31290
31318
|
className
|
|
31291
31319
|
}) {
|
|
31292
31320
|
const clamped = percent === null ? 0 : Math.min(100, Math.max(0, percent));
|
|
31293
|
-
return /* @__PURE__ */
|
|
31321
|
+
return /* @__PURE__ */ jsx44("div", { className: cn("h-1.5 w-full overflow-hidden bg-muted", className), children: /* @__PURE__ */ jsx44(
|
|
31294
31322
|
"div",
|
|
31295
31323
|
{
|
|
31296
31324
|
className: cn("motion-meter h-full", usageBarColor(percent)),
|
|
@@ -31305,9 +31333,9 @@ function UsagePair({
|
|
|
31305
31333
|
}) {
|
|
31306
31334
|
const clamped = Math.min(100, Math.max(0, percent));
|
|
31307
31335
|
return /* @__PURE__ */ jsxs33("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
31308
|
-
label && /* @__PURE__ */
|
|
31309
|
-
/* @__PURE__ */
|
|
31310
|
-
/* @__PURE__ */
|
|
31336
|
+
label && /* @__PURE__ */ jsx44("span", { className: "w-10 shrink-0 text-[10px] uppercase text-muted-foreground", children: label }),
|
|
31337
|
+
/* @__PURE__ */ jsx44(Meter, { percent: clamped, className: "flex-1" }),
|
|
31338
|
+
/* @__PURE__ */ jsx44(
|
|
31311
31339
|
"span",
|
|
31312
31340
|
{
|
|
31313
31341
|
className: cn(
|
|
@@ -31324,7 +31352,7 @@ function UsagePair({
|
|
|
31324
31352
|
init_define_import_meta_env();
|
|
31325
31353
|
import { useState as useState17 } from "react";
|
|
31326
31354
|
import { useTranslation as useTranslation19 } from "react-i18next";
|
|
31327
|
-
import { jsx as
|
|
31355
|
+
import { jsx as jsx45, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
31328
31356
|
function Field2({
|
|
31329
31357
|
label,
|
|
31330
31358
|
hint,
|
|
@@ -31336,7 +31364,7 @@ function Field2({
|
|
|
31336
31364
|
}) {
|
|
31337
31365
|
return /* @__PURE__ */ jsxs34("div", { "data-setting-row": "", className: cn("flex flex-col gap-1.5", className), children: [
|
|
31338
31366
|
(label || aside) && /* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-2", children: [
|
|
31339
|
-
/* @__PURE__ */
|
|
31367
|
+
/* @__PURE__ */ jsx45(
|
|
31340
31368
|
"label",
|
|
31341
31369
|
{
|
|
31342
31370
|
htmlFor,
|
|
@@ -31344,10 +31372,10 @@ function Field2({
|
|
|
31344
31372
|
children: label
|
|
31345
31373
|
}
|
|
31346
31374
|
),
|
|
31347
|
-
aside && /* @__PURE__ */
|
|
31375
|
+
aside && /* @__PURE__ */ jsx45("span", { className: "ml-auto", children: aside })
|
|
31348
31376
|
] }),
|
|
31349
31377
|
children,
|
|
31350
|
-
error ? /* @__PURE__ */
|
|
31378
|
+
error ? /* @__PURE__ */ jsx45("span", { className: "text-[10px] text-destructive", children: error }) : hint ? /* @__PURE__ */ jsx45("span", { className: "text-[10px] text-muted-foreground", children: hint }) : null
|
|
31351
31379
|
] });
|
|
31352
31380
|
}
|
|
31353
31381
|
function TextField({
|
|
@@ -31362,7 +31390,7 @@ function TextField({
|
|
|
31362
31390
|
mono,
|
|
31363
31391
|
className
|
|
31364
31392
|
}) {
|
|
31365
|
-
return /* @__PURE__ */
|
|
31393
|
+
return /* @__PURE__ */ jsx45(
|
|
31366
31394
|
Field2,
|
|
31367
31395
|
{
|
|
31368
31396
|
label,
|
|
@@ -31370,7 +31398,7 @@ function TextField({
|
|
|
31370
31398
|
error,
|
|
31371
31399
|
aside,
|
|
31372
31400
|
className,
|
|
31373
|
-
children: /* @__PURE__ */
|
|
31401
|
+
children: /* @__PURE__ */ jsx45(
|
|
31374
31402
|
Input,
|
|
31375
31403
|
{
|
|
31376
31404
|
value,
|
|
@@ -31396,7 +31424,7 @@ function NumberField({
|
|
|
31396
31424
|
disabled,
|
|
31397
31425
|
className
|
|
31398
31426
|
}) {
|
|
31399
|
-
return /* @__PURE__ */
|
|
31427
|
+
return /* @__PURE__ */ jsx45(Field2, { label, hint, error, className, children: /* @__PURE__ */ jsx45(
|
|
31400
31428
|
Input,
|
|
31401
31429
|
{
|
|
31402
31430
|
type: "number",
|
|
@@ -31434,14 +31462,14 @@ function SecretField({
|
|
|
31434
31462
|
}) {
|
|
31435
31463
|
const { t: t3 } = useTranslation19();
|
|
31436
31464
|
const saved = isSecretSentinel(value);
|
|
31437
|
-
return /* @__PURE__ */
|
|
31465
|
+
return /* @__PURE__ */ jsx45(
|
|
31438
31466
|
Field2,
|
|
31439
31467
|
{
|
|
31440
31468
|
label,
|
|
31441
31469
|
hint: saved ? t3("fields.secretSaved") : hint,
|
|
31442
31470
|
error,
|
|
31443
31471
|
className,
|
|
31444
|
-
children: /* @__PURE__ */
|
|
31472
|
+
children: /* @__PURE__ */ jsx45(
|
|
31445
31473
|
PasswordInput,
|
|
31446
31474
|
{
|
|
31447
31475
|
value: saved ? "" : value,
|
|
@@ -31466,15 +31494,15 @@ function SelectField({
|
|
|
31466
31494
|
placeholder: placeholder2
|
|
31467
31495
|
}) {
|
|
31468
31496
|
const EMPTY = "__empty__";
|
|
31469
|
-
return /* @__PURE__ */
|
|
31497
|
+
return /* @__PURE__ */ jsx45(Field2, { label, hint, error, className, children: /* @__PURE__ */ jsxs34(
|
|
31470
31498
|
Select,
|
|
31471
31499
|
{
|
|
31472
31500
|
value: value === "" ? EMPTY : value,
|
|
31473
31501
|
disabled,
|
|
31474
31502
|
onValueChange: (next) => onChange(next === EMPTY ? "" : next),
|
|
31475
31503
|
children: [
|
|
31476
|
-
/* @__PURE__ */
|
|
31477
|
-
/* @__PURE__ */
|
|
31504
|
+
/* @__PURE__ */ jsx45(SelectTrigger, { "aria-invalid": !!error, className: "h-8 w-full text-xs", children: /* @__PURE__ */ jsx45(SelectValue, { placeholder: placeholder2 }) }),
|
|
31505
|
+
/* @__PURE__ */ jsx45(SelectContent, { children: options.map((option) => /* @__PURE__ */ jsx45(
|
|
31478
31506
|
SelectItem,
|
|
31479
31507
|
{
|
|
31480
31508
|
value: option.value === "" ? EMPTY : option.value,
|
|
@@ -31500,7 +31528,7 @@ function TextAreaField({
|
|
|
31500
31528
|
disabled,
|
|
31501
31529
|
className
|
|
31502
31530
|
}) {
|
|
31503
|
-
return /* @__PURE__ */
|
|
31531
|
+
return /* @__PURE__ */ jsx45(
|
|
31504
31532
|
Field2,
|
|
31505
31533
|
{
|
|
31506
31534
|
label,
|
|
@@ -31508,7 +31536,7 @@ function TextAreaField({
|
|
|
31508
31536
|
error,
|
|
31509
31537
|
aside,
|
|
31510
31538
|
className,
|
|
31511
|
-
children: /* @__PURE__ */
|
|
31539
|
+
children: /* @__PURE__ */ jsx45(
|
|
31512
31540
|
"textarea",
|
|
31513
31541
|
{
|
|
31514
31542
|
rows,
|
|
@@ -31535,7 +31563,7 @@ function SwitchRow({
|
|
|
31535
31563
|
defaultKey,
|
|
31536
31564
|
rowId
|
|
31537
31565
|
}) {
|
|
31538
|
-
return /* @__PURE__ */
|
|
31566
|
+
return /* @__PURE__ */ jsx45(
|
|
31539
31567
|
SettingRow,
|
|
31540
31568
|
{
|
|
31541
31569
|
label,
|
|
@@ -31543,7 +31571,7 @@ function SwitchRow({
|
|
|
31543
31571
|
badge,
|
|
31544
31572
|
defaultKey,
|
|
31545
31573
|
rowId,
|
|
31546
|
-
children: /* @__PURE__ */
|
|
31574
|
+
children: /* @__PURE__ */ jsx45(FakeSwitch, { checked, onChange, disabled })
|
|
31547
31575
|
}
|
|
31548
31576
|
);
|
|
31549
31577
|
}
|
|
@@ -31560,7 +31588,7 @@ function Repeater({
|
|
|
31560
31588
|
const { t: t3 } = useTranslation19();
|
|
31561
31589
|
return /* @__PURE__ */ jsxs34("div", { className: "flex flex-col gap-2 py-3", children: [
|
|
31562
31590
|
/* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-2", children: [
|
|
31563
|
-
/* @__PURE__ */
|
|
31591
|
+
/* @__PURE__ */ jsx45("span", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: label }),
|
|
31564
31592
|
/* @__PURE__ */ jsxs34(
|
|
31565
31593
|
Button,
|
|
31566
31594
|
{
|
|
@@ -31570,24 +31598,24 @@ function Repeater({
|
|
|
31570
31598
|
className: "ml-auto",
|
|
31571
31599
|
onClick: () => onChange([...items, makeItem()]),
|
|
31572
31600
|
children: [
|
|
31573
|
-
/* @__PURE__ */
|
|
31601
|
+
/* @__PURE__ */ jsx45(Plus, { className: "mr-1 size-3" }),
|
|
31574
31602
|
addLabel
|
|
31575
31603
|
]
|
|
31576
31604
|
}
|
|
31577
31605
|
)
|
|
31578
31606
|
] }),
|
|
31579
|
-
hint && /* @__PURE__ */
|
|
31580
|
-
items.length === 0 ? /* @__PURE__ */
|
|
31607
|
+
hint && /* @__PURE__ */ jsx45("span", { className: "text-[10px] text-muted-foreground", children: hint }),
|
|
31608
|
+
items.length === 0 ? /* @__PURE__ */ jsx45("span", { className: "border border-dashed border-border px-3 py-2 text-[10px] text-muted-foreground", children: empty2 }) : /* @__PURE__ */ jsx45("div", { className: "flex flex-col gap-2", children: items.map((item, index) => /* @__PURE__ */ jsxs34(
|
|
31581
31609
|
"div",
|
|
31582
31610
|
{
|
|
31583
31611
|
className: "flex items-start gap-2 border border-border bg-muted/10 p-2",
|
|
31584
31612
|
children: [
|
|
31585
|
-
/* @__PURE__ */
|
|
31613
|
+
/* @__PURE__ */ jsx45("div", { className: "min-w-0 flex-1", children: renderItem(
|
|
31586
31614
|
item,
|
|
31587
31615
|
(next) => onChange(items.map((x, i2) => i2 === index ? next : x)),
|
|
31588
31616
|
index
|
|
31589
31617
|
) }),
|
|
31590
|
-
/* @__PURE__ */
|
|
31618
|
+
/* @__PURE__ */ jsx45(
|
|
31591
31619
|
"button",
|
|
31592
31620
|
{
|
|
31593
31621
|
type: "button",
|
|
@@ -31595,7 +31623,7 @@ function Repeater({
|
|
|
31595
31623
|
"aria-label": t3("common.remove"),
|
|
31596
31624
|
onClick: () => onChange(items.filter((_, i2) => i2 !== index)),
|
|
31597
31625
|
className: "mt-0.5 shrink-0 text-muted-foreground transition-colors hover:text-destructive focus-visible:ring-1 focus-visible:ring-ring",
|
|
31598
|
-
children: /* @__PURE__ */
|
|
31626
|
+
children: /* @__PURE__ */ jsx45(Trash, { className: "size-3.5" })
|
|
31599
31627
|
}
|
|
31600
31628
|
)
|
|
31601
31629
|
]
|
|
@@ -31619,21 +31647,21 @@ function TagInput({
|
|
|
31619
31647
|
className: "flex items-center gap-0.5 border border-border/60 bg-muted px-1.5 py-0.5 text-[10px] text-foreground",
|
|
31620
31648
|
children: [
|
|
31621
31649
|
tag,
|
|
31622
|
-
/* @__PURE__ */
|
|
31650
|
+
/* @__PURE__ */ jsx45(
|
|
31623
31651
|
"button",
|
|
31624
31652
|
{
|
|
31625
31653
|
type: "button",
|
|
31626
31654
|
"aria-label": t3("common.remove"),
|
|
31627
31655
|
onClick: () => onTagsChange(tags2.filter((tg) => tg !== tag)),
|
|
31628
31656
|
className: "ml-0.5 text-muted-foreground hover:text-destructive",
|
|
31629
|
-
children: /* @__PURE__ */
|
|
31657
|
+
children: /* @__PURE__ */ jsx45(X, { className: "size-2.5" })
|
|
31630
31658
|
}
|
|
31631
31659
|
)
|
|
31632
31660
|
]
|
|
31633
31661
|
},
|
|
31634
31662
|
tag
|
|
31635
31663
|
)),
|
|
31636
|
-
/* @__PURE__ */
|
|
31664
|
+
/* @__PURE__ */ jsx45(
|
|
31637
31665
|
"input",
|
|
31638
31666
|
{
|
|
31639
31667
|
className: "min-w-16 flex-1 bg-transparent text-xs outline-none placeholder:text-muted-foreground/50",
|
|
@@ -31655,7 +31683,7 @@ function TagInput({
|
|
|
31655
31683
|
] });
|
|
31656
31684
|
}
|
|
31657
31685
|
function FieldPair({ children }) {
|
|
31658
|
-
return /* @__PURE__ */
|
|
31686
|
+
return /* @__PURE__ */ jsx45("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children });
|
|
31659
31687
|
}
|
|
31660
31688
|
|
|
31661
31689
|
// src/ui/components/connection/ConnectionGate.tsx
|
|
@@ -31669,7 +31697,7 @@ import {
|
|
|
31669
31697
|
useState as useState18
|
|
31670
31698
|
} from "react";
|
|
31671
31699
|
import { useConnectionRetry } from "@termix-ssh/plugin-sdk/frontend";
|
|
31672
|
-
import { jsx as
|
|
31700
|
+
import { jsx as jsx46, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
31673
31701
|
function messageOf(err) {
|
|
31674
31702
|
return typeof err === "string" ? err : getErrorMessage(err);
|
|
31675
31703
|
}
|
|
@@ -31682,7 +31710,7 @@ function useConnectionGate() {
|
|
|
31682
31710
|
return gate;
|
|
31683
31711
|
}
|
|
31684
31712
|
function ConnectionGate(props) {
|
|
31685
|
-
return /* @__PURE__ */
|
|
31713
|
+
return /* @__PURE__ */ jsx46(ConnectionLogProvider, { children: /* @__PURE__ */ jsx46(Gate, { ...props }) });
|
|
31686
31714
|
}
|
|
31687
31715
|
function Gate({
|
|
31688
31716
|
connect,
|
|
@@ -31819,9 +31847,9 @@ function Gate({
|
|
|
31819
31847
|
gateRef.current = controller;
|
|
31820
31848
|
const up = status === "connected" && !unavailable;
|
|
31821
31849
|
const content2 = typeof children === "function" ? children(controller) : children;
|
|
31822
|
-
return /* @__PURE__ */
|
|
31850
|
+
return /* @__PURE__ */ jsx46(GateContext.Provider, { value: controller, children: /* @__PURE__ */ jsxs35("div", { className: `relative h-full w-full ${className ?? ""}`, children: [
|
|
31823
31851
|
(up || keepMounted) && content2,
|
|
31824
|
-
/* @__PURE__ */
|
|
31852
|
+
/* @__PURE__ */ jsx46(
|
|
31825
31853
|
ConnectionScreen,
|
|
31826
31854
|
{
|
|
31827
31855
|
status,
|
|
@@ -32412,8 +32440,8 @@ async function uploadTlsCertificate(payload) {
|
|
|
32412
32440
|
// src/ui/components/command.tsx
|
|
32413
32441
|
init_define_import_meta_env();
|
|
32414
32442
|
import * as React11 from "react";
|
|
32415
|
-
import { jsx as
|
|
32416
|
-
var Command = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
32443
|
+
import { jsx as jsx47, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
32444
|
+
var Command = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx47(
|
|
32417
32445
|
_e,
|
|
32418
32446
|
{
|
|
32419
32447
|
ref,
|
|
@@ -32426,8 +32454,8 @@ var Command = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
32426
32454
|
));
|
|
32427
32455
|
Command.displayName = "Command";
|
|
32428
32456
|
var CommandInput = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs36("div", { className: "flex items-center border-b border-border px-3", children: [
|
|
32429
|
-
/* @__PURE__ */
|
|
32430
|
-
/* @__PURE__ */
|
|
32457
|
+
/* @__PURE__ */ jsx47(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
32458
|
+
/* @__PURE__ */ jsx47(
|
|
32431
32459
|
_e.Input,
|
|
32432
32460
|
{
|
|
32433
32461
|
ref,
|
|
@@ -32440,7 +32468,7 @@ var CommandInput = React11.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
32440
32468
|
)
|
|
32441
32469
|
] }));
|
|
32442
32470
|
CommandInput.displayName = "CommandInput";
|
|
32443
|
-
var CommandList = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
32471
|
+
var CommandList = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx47(
|
|
32444
32472
|
_e.List,
|
|
32445
32473
|
{
|
|
32446
32474
|
ref,
|
|
@@ -32452,7 +32480,7 @@ var CommandList = React11.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
32452
32480
|
}
|
|
32453
32481
|
));
|
|
32454
32482
|
CommandList.displayName = "CommandList";
|
|
32455
|
-
var CommandGroup = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
32483
|
+
var CommandGroup = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx47(
|
|
32456
32484
|
_e.Group,
|
|
32457
32485
|
{
|
|
32458
32486
|
ref,
|
|
@@ -32464,7 +32492,7 @@ var CommandGroup = React11.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
32464
32492
|
}
|
|
32465
32493
|
));
|
|
32466
32494
|
CommandGroup.displayName = "CommandGroup";
|
|
32467
|
-
var CommandSeparator = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
32495
|
+
var CommandSeparator = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx47(
|
|
32468
32496
|
_e.Separator,
|
|
32469
32497
|
{
|
|
32470
32498
|
ref,
|
|
@@ -32473,7 +32501,7 @@ var CommandSeparator = React11.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
32473
32501
|
}
|
|
32474
32502
|
));
|
|
32475
32503
|
CommandSeparator.displayName = "CommandSeparator";
|
|
32476
|
-
var CommandItem = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
32504
|
+
var CommandItem = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx47(
|
|
32477
32505
|
_e.Item,
|
|
32478
32506
|
{
|
|
32479
32507
|
ref,
|
|
@@ -32485,7 +32513,7 @@ var CommandItem = React11.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
32485
32513
|
}
|
|
32486
32514
|
));
|
|
32487
32515
|
CommandItem.displayName = "CommandItem";
|
|
32488
|
-
var CommandEmpty = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
32516
|
+
var CommandEmpty = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx47(
|
|
32489
32517
|
_e.Empty,
|
|
32490
32518
|
{
|
|
32491
32519
|
ref,
|
|
@@ -32497,7 +32525,7 @@ CommandEmpty.displayName = "CommandEmpty";
|
|
|
32497
32525
|
var CommandShortcut = ({
|
|
32498
32526
|
className,
|
|
32499
32527
|
...props
|
|
32500
|
-
}) => /* @__PURE__ */
|
|
32528
|
+
}) => /* @__PURE__ */ jsx47(
|
|
32501
32529
|
"span",
|
|
32502
32530
|
{
|
|
32503
32531
|
className: cn(
|
|
@@ -32513,7 +32541,7 @@ CommandShortcut.displayName = "CommandShortcut";
|
|
|
32513
32541
|
init_define_import_meta_env();
|
|
32514
32542
|
import { useState as useState20 } from "react";
|
|
32515
32543
|
import { useTranslation as useTranslation20 } from "react-i18next";
|
|
32516
|
-
import { jsx as
|
|
32544
|
+
import { jsx as jsx48, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
32517
32545
|
var FOLDER_ICON_MAP = {
|
|
32518
32546
|
folder: Folder,
|
|
32519
32547
|
"folder-open": FolderOpen,
|
|
@@ -32589,7 +32617,7 @@ function FolderIconEl({
|
|
|
32589
32617
|
style
|
|
32590
32618
|
}) {
|
|
32591
32619
|
const Icon = FOLDER_ICON_MAP[icon ?? ""] ?? Folder;
|
|
32592
|
-
return /* @__PURE__ */
|
|
32620
|
+
return /* @__PURE__ */ jsx48(Icon, { className, style });
|
|
32593
32621
|
}
|
|
32594
32622
|
var HEX_RE = /^#([0-9a-fA-F]{6})$/;
|
|
32595
32623
|
function isValidHex(value) {
|
|
@@ -32602,7 +32630,7 @@ function HexColorPicker({
|
|
|
32602
32630
|
const safe = isValidHex(value) ? value : DEFAULT_FOLDER_COLOR;
|
|
32603
32631
|
return /* @__PURE__ */ jsxs37("div", { className: "flex flex-col gap-2", children: [
|
|
32604
32632
|
/* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-2", children: [
|
|
32605
|
-
/* @__PURE__ */
|
|
32633
|
+
/* @__PURE__ */ jsx48(
|
|
32606
32634
|
"input",
|
|
32607
32635
|
{
|
|
32608
32636
|
type: "color",
|
|
@@ -32611,7 +32639,7 @@ function HexColorPicker({
|
|
|
32611
32639
|
className: "h-8 w-10 shrink-0 cursor-pointer rounded-none border border-input bg-transparent p-0.5"
|
|
32612
32640
|
}
|
|
32613
32641
|
),
|
|
32614
|
-
/* @__PURE__ */
|
|
32642
|
+
/* @__PURE__ */ jsx48(
|
|
32615
32643
|
Input,
|
|
32616
32644
|
{
|
|
32617
32645
|
value,
|
|
@@ -32622,7 +32650,7 @@ function HexColorPicker({
|
|
|
32622
32650
|
}
|
|
32623
32651
|
)
|
|
32624
32652
|
] }),
|
|
32625
|
-
/* @__PURE__ */
|
|
32653
|
+
/* @__PURE__ */ jsx48("div", { className: "flex flex-wrap gap-1.5", children: SUGGESTED_FOLDER_COLORS.map((c) => /* @__PURE__ */ jsx48(
|
|
32626
32654
|
"button",
|
|
32627
32655
|
{
|
|
32628
32656
|
type: "button",
|
|
@@ -32646,8 +32674,8 @@ function IconPicker({
|
|
|
32646
32674
|
) : FOLDER_ICON_IDS;
|
|
32647
32675
|
return /* @__PURE__ */ jsxs37("div", { className: "flex flex-col gap-2", children: [
|
|
32648
32676
|
/* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-2 px-2.5 h-8 bg-muted/60 border border-border/60 rounded-none", children: [
|
|
32649
|
-
/* @__PURE__ */
|
|
32650
|
-
/* @__PURE__ */
|
|
32677
|
+
/* @__PURE__ */ jsx48(Search, { className: "size-3 text-muted-foreground/60 shrink-0" }),
|
|
32678
|
+
/* @__PURE__ */ jsx48(
|
|
32651
32679
|
"input",
|
|
32652
32680
|
{
|
|
32653
32681
|
value: query,
|
|
@@ -32657,14 +32685,14 @@ function IconPicker({
|
|
|
32657
32685
|
}
|
|
32658
32686
|
)
|
|
32659
32687
|
] }),
|
|
32660
|
-
/* @__PURE__ */
|
|
32688
|
+
/* @__PURE__ */ jsx48("div", { className: "grid grid-cols-8 gap-1.5 max-h-40 overflow-y-auto pr-1", children: filtered.map((id) => /* @__PURE__ */ jsx48(
|
|
32661
32689
|
"button",
|
|
32662
32690
|
{
|
|
32663
32691
|
type: "button",
|
|
32664
32692
|
onClick: () => onChange(id),
|
|
32665
32693
|
title: id,
|
|
32666
32694
|
className: `flex items-center justify-center h-9 border transition-colors ${value === id ? "border-accent-brand/50 bg-accent-brand/10" : "border-border text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,
|
|
32667
|
-
children: /* @__PURE__ */
|
|
32695
|
+
children: /* @__PURE__ */ jsx48(
|
|
32668
32696
|
FolderIconEl,
|
|
32669
32697
|
{
|
|
32670
32698
|
icon: id,
|
|
@@ -32681,7 +32709,7 @@ function IconPicker({
|
|
|
32681
32709
|
// src/ui/components/version-badge.tsx
|
|
32682
32710
|
init_define_import_meta_env();
|
|
32683
32711
|
import { useTranslation as useTranslation21 } from "react-i18next";
|
|
32684
|
-
import { jsx as
|
|
32712
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
32685
32713
|
function VersionBadge({
|
|
32686
32714
|
status,
|
|
32687
32715
|
releaseUrl,
|
|
@@ -32697,7 +32725,7 @@ function VersionBadge({
|
|
|
32697
32725
|
const label = status === "beta" ? t3("dashboard.beta").toUpperCase() : status === "requires_update" ? t3("dashboard.updateAvailable").toUpperCase() : t3("dashboardTab.stable");
|
|
32698
32726
|
if (status === "requires_update" && releaseUrl) {
|
|
32699
32727
|
const linkLabel = t3("versionCheck.updateLinkLabel");
|
|
32700
|
-
return /* @__PURE__ */
|
|
32728
|
+
return /* @__PURE__ */ jsx49(
|
|
32701
32729
|
"a",
|
|
32702
32730
|
{
|
|
32703
32731
|
href: releaseUrl,
|
|
@@ -32710,7 +32738,7 @@ function VersionBadge({
|
|
|
32710
32738
|
}
|
|
32711
32739
|
);
|
|
32712
32740
|
}
|
|
32713
|
-
return /* @__PURE__ */
|
|
32741
|
+
return /* @__PURE__ */ jsx49("span", { className: badgeClassName, children: label });
|
|
32714
32742
|
}
|
|
32715
32743
|
|
|
32716
32744
|
// src/ui/hooks/use-page-visible-interval.ts
|
|
@@ -32872,7 +32900,7 @@ function getDatabaseTransferUrl(operation, { electron, configuredServerUrl, loca
|
|
|
32872
32900
|
const serverUrl = configuredServerUrl || `http://localhost:${localBackendPort()}`;
|
|
32873
32901
|
return `${serverUrl.replace(/\/$/, "")}/database/${operation}`;
|
|
32874
32902
|
}
|
|
32875
|
-
const development =
|
|
32903
|
+
const development = location.port === "5173";
|
|
32876
32904
|
if (development) {
|
|
32877
32905
|
return `http://localhost:30001/database/${operation}`;
|
|
32878
32906
|
}
|
|
@@ -32940,7 +32968,7 @@ async function syncThemeChoice(themeId) {
|
|
|
32940
32968
|
init_define_import_meta_env();
|
|
32941
32969
|
import { useTranslation as useTranslation22 } from "react-i18next";
|
|
32942
32970
|
import { toast as toast4 } from "sonner";
|
|
32943
|
-
import { jsx as
|
|
32971
|
+
import { jsx as jsx50, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
32944
32972
|
var selectClass = "w-full px-2.5 py-1.5 text-xs bg-background border border-border text-foreground outline-none focus:ring-1 focus:ring-ring appearance-none pr-7";
|
|
32945
32973
|
function LookSettings({ isAdmin }) {
|
|
32946
32974
|
const { t: t3 } = useTranslation22();
|
|
@@ -32958,15 +32986,15 @@ function LookSettings({ isAdmin }) {
|
|
|
32958
32986
|
onChange: (e) => void chooseLayout(e.target.value || null).catch(failed),
|
|
32959
32987
|
className: selectClass,
|
|
32960
32988
|
children: [
|
|
32961
|
-
/* @__PURE__ */
|
|
32962
|
-
layouts.map((layout) => /* @__PURE__ */
|
|
32989
|
+
/* @__PURE__ */ jsx50("option", { value: "", children: t3("looks.followDefault") }),
|
|
32990
|
+
layouts.map((layout) => /* @__PURE__ */ jsx50("option", { value: layout.id, children: layoutLabel(layout, t3) }, layout.id))
|
|
32963
32991
|
]
|
|
32964
32992
|
}
|
|
32965
32993
|
),
|
|
32966
|
-
/* @__PURE__ */
|
|
32994
|
+
/* @__PURE__ */ jsx50("p", { className: "text-[11px] text-muted-foreground", children: t3("looks.layoutHint") }),
|
|
32967
32995
|
isAdmin && response && /* @__PURE__ */ jsxs38("div", { className: "flex flex-col gap-1.5 border border-border p-2", children: [
|
|
32968
|
-
/* @__PURE__ */
|
|
32969
|
-
/* @__PURE__ */
|
|
32996
|
+
/* @__PURE__ */ jsx50("span", { className: "text-[11px] font-medium text-foreground", children: t3("looks.defaultsLabel") }),
|
|
32997
|
+
/* @__PURE__ */ jsx50("p", { className: "text-[11px] text-muted-foreground", children: t3("looks.defaultsHint") }),
|
|
32970
32998
|
/* @__PURE__ */ jsxs38(
|
|
32971
32999
|
Select2,
|
|
32972
33000
|
{
|
|
@@ -32974,8 +33002,8 @@ function LookSettings({ isAdmin }) {
|
|
|
32974
33002
|
onChange: (e) => void chooseDefaultLook({ layout: e.target.value || null }).then(() => toast4.success(t3("looks.defaultSaved"))).catch(failed),
|
|
32975
33003
|
className: selectClass,
|
|
32976
33004
|
children: [
|
|
32977
|
-
/* @__PURE__ */
|
|
32978
|
-
layouts.map((layout) => /* @__PURE__ */
|
|
33005
|
+
/* @__PURE__ */ jsx50("option", { value: "", children: t3("looks.followDefault") }),
|
|
33006
|
+
layouts.map((layout) => /* @__PURE__ */ jsx50("option", { value: layout.id, children: layoutLabel(layout, t3) }, layout.id))
|
|
32979
33007
|
]
|
|
32980
33008
|
}
|
|
32981
33009
|
),
|
|
@@ -32986,8 +33014,8 @@ function LookSettings({ isAdmin }) {
|
|
|
32986
33014
|
onChange: (e) => void chooseDefaultLook({ theme: e.target.value || null }).then(() => toast4.success(t3("looks.defaultSaved"))).catch(failed),
|
|
32987
33015
|
className: selectClass,
|
|
32988
33016
|
children: [
|
|
32989
|
-
/* @__PURE__ */
|
|
32990
|
-
themes.map((theme2) => /* @__PURE__ */
|
|
33017
|
+
/* @__PURE__ */ jsx50("option", { value: "", children: t3("looks.followDefault") }),
|
|
33018
|
+
themes.map((theme2) => /* @__PURE__ */ jsx50("option", { value: theme2.id, children: themeLabel(theme2, t3) }, theme2.id))
|
|
32991
33019
|
]
|
|
32992
33020
|
}
|
|
32993
33021
|
)
|
|
@@ -32999,7 +33027,7 @@ function LookSettings({ isAdmin }) {
|
|
|
32999
33027
|
init_define_import_meta_env();
|
|
33000
33028
|
import { useRef as useRef13, useState as useState22 } from "react";
|
|
33001
33029
|
import { useTranslation as useTranslation23 } from "react-i18next";
|
|
33002
|
-
import { jsx as
|
|
33030
|
+
import { jsx as jsx51, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
33003
33031
|
var THEMES = [
|
|
33004
33032
|
{ id: SYSTEM_THEME, preview: "auto" },
|
|
33005
33033
|
...BUILTIN_THEMES.map((theme2) => ({
|
|
@@ -33031,7 +33059,7 @@ var DARK_SWATCH = BUILTIN_THEMES.find((theme2) => theme2.id === "dark").swatch;
|
|
|
33031
33059
|
// src/ui/plugin-host/NativeView.tsx
|
|
33032
33060
|
init_define_import_meta_env();
|
|
33033
33061
|
import { useEffect as useEffect16, useRef as useRef14 } from "react";
|
|
33034
|
-
import { Fragment as Fragment8, jsx as
|
|
33062
|
+
import { Fragment as Fragment8, jsx as jsx52 } from "react/jsx-runtime";
|
|
33035
33063
|
function embeddedViewApi() {
|
|
33036
33064
|
if (typeof window === "undefined") return null;
|
|
33037
33065
|
const api = window.electronAPI?.embeddedView;
|
|
@@ -33131,29 +33159,29 @@ function NativeView({
|
|
|
33131
33159
|
useEffect16(() => {
|
|
33132
33160
|
sync.current();
|
|
33133
33161
|
}, [hidden]);
|
|
33134
|
-
if (!api) return /* @__PURE__ */
|
|
33135
|
-
return /* @__PURE__ */
|
|
33162
|
+
if (!api) return /* @__PURE__ */ jsx52(Fragment8, { children: fallback ?? null });
|
|
33163
|
+
return /* @__PURE__ */ jsx52("div", { ref: host, className, style });
|
|
33136
33164
|
}
|
|
33137
33165
|
|
|
33138
33166
|
// src/ui/shell/split/SplitLayoutMenu.tsx
|
|
33139
33167
|
init_define_import_meta_env();
|
|
33140
33168
|
import { useMemo as useMemo9 } from "react";
|
|
33141
33169
|
import { useTranslation as useTranslation24 } from "react-i18next";
|
|
33142
|
-
import { jsx as
|
|
33170
|
+
import { jsx as jsx53, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
33143
33171
|
function NodeThumb({ node }) {
|
|
33144
33172
|
if (node.kind === "pane") {
|
|
33145
|
-
return /* @__PURE__ */
|
|
33173
|
+
return /* @__PURE__ */ jsx53("div", { className: "size-full border border-current" });
|
|
33146
33174
|
}
|
|
33147
|
-
return /* @__PURE__ */
|
|
33175
|
+
return /* @__PURE__ */ jsx53(
|
|
33148
33176
|
"div",
|
|
33149
33177
|
{
|
|
33150
33178
|
className: `flex size-full gap-0.5 ${node.direction === "row" ? "flex-row" : "flex-col"}`,
|
|
33151
|
-
children: node.children.map((child, index) => /* @__PURE__ */
|
|
33179
|
+
children: node.children.map((child, index) => /* @__PURE__ */ jsx53(
|
|
33152
33180
|
"div",
|
|
33153
33181
|
{
|
|
33154
33182
|
className: "min-w-0 min-h-0",
|
|
33155
33183
|
style: { flex: `${node.sizes[index]} 1 0px` },
|
|
33156
|
-
children: /* @__PURE__ */
|
|
33184
|
+
children: /* @__PURE__ */ jsx53(NodeThumb, { node: child })
|
|
33157
33185
|
},
|
|
33158
33186
|
child.id
|
|
33159
33187
|
))
|
|
@@ -33162,7 +33190,7 @@ function NodeThumb({ node }) {
|
|
|
33162
33190
|
}
|
|
33163
33191
|
function PresetThumb({ id }) {
|
|
33164
33192
|
const node = useMemo9(() => buildPreset(id), [id]);
|
|
33165
|
-
return /* @__PURE__ */
|
|
33193
|
+
return /* @__PURE__ */ jsx53(NodeThumb, { node });
|
|
33166
33194
|
}
|
|
33167
33195
|
function SplitLayoutMenu({
|
|
33168
33196
|
activeIsSplit,
|
|
@@ -33173,7 +33201,7 @@ function SplitLayoutMenu({
|
|
|
33173
33201
|
const { t: t3 } = useTranslation24();
|
|
33174
33202
|
const fullTitle = canAddPane ? void 0 : t3("splitScreen.maxPanes", { count: MAX_PANES });
|
|
33175
33203
|
return /* @__PURE__ */ jsxs40(DropdownMenu, { children: [
|
|
33176
|
-
/* @__PURE__ */
|
|
33204
|
+
/* @__PURE__ */ jsx53(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx53(
|
|
33177
33205
|
Button,
|
|
33178
33206
|
{
|
|
33179
33207
|
variant: "ghost",
|
|
@@ -33181,7 +33209,7 @@ function SplitLayoutMenu({
|
|
|
33181
33209
|
className: `h-full w-12.5 rounded-none ${activeIsSplit ? "text-accent-brand" : "text-muted-foreground hover:text-foreground"}`,
|
|
33182
33210
|
title: t3("splitScreen.title"),
|
|
33183
33211
|
"aria-label": t3("splitScreen.title"),
|
|
33184
|
-
children: /* @__PURE__ */
|
|
33212
|
+
children: /* @__PURE__ */ jsx53(LayoutPanelLeft, { className: "size-4" })
|
|
33185
33213
|
}
|
|
33186
33214
|
) }),
|
|
33187
33215
|
/* @__PURE__ */ jsxs40(
|
|
@@ -33198,9 +33226,9 @@ function SplitLayoutMenu({
|
|
|
33198
33226
|
title: fullTitle,
|
|
33199
33227
|
onSelect: () => onSplit("right"),
|
|
33200
33228
|
children: [
|
|
33201
|
-
/* @__PURE__ */
|
|
33229
|
+
/* @__PURE__ */ jsx53(Columns2, { className: "size-3.5" }),
|
|
33202
33230
|
t3("splitScreen.splitRight"),
|
|
33203
|
-
/* @__PURE__ */
|
|
33231
|
+
/* @__PURE__ */ jsx53(DropdownMenuShortcut, { children: "Ctrl+Shift+\\" })
|
|
33204
33232
|
]
|
|
33205
33233
|
}
|
|
33206
33234
|
),
|
|
@@ -33211,35 +33239,35 @@ function SplitLayoutMenu({
|
|
|
33211
33239
|
title: fullTitle,
|
|
33212
33240
|
onSelect: () => onSplit("bottom"),
|
|
33213
33241
|
children: [
|
|
33214
|
-
/* @__PURE__ */
|
|
33242
|
+
/* @__PURE__ */ jsx53(Rows2, { className: "size-3.5" }),
|
|
33215
33243
|
t3("splitScreen.splitDown"),
|
|
33216
|
-
/* @__PURE__ */
|
|
33244
|
+
/* @__PURE__ */ jsx53(DropdownMenuShortcut, { children: "Ctrl+Shift+-" })
|
|
33217
33245
|
]
|
|
33218
33246
|
}
|
|
33219
33247
|
),
|
|
33220
|
-
/* @__PURE__ */
|
|
33221
|
-
/* @__PURE__ */
|
|
33222
|
-
/* @__PURE__ */
|
|
33248
|
+
/* @__PURE__ */ jsx53(DropdownMenuSeparator, {}),
|
|
33249
|
+
/* @__PURE__ */ jsx53(DropdownMenuLabel, { className: "text-[10px] font-semibold uppercase tracking-wider text-muted-foreground", children: activeIsSplit ? t3("splitScreen.applyLayout") : t3("splitScreen.layouts") }),
|
|
33250
|
+
/* @__PURE__ */ jsx53("div", { className: "grid grid-cols-4 gap-1 p-1", children: SPLIT_PRESETS.map((preset) => /* @__PURE__ */ jsx53(
|
|
33223
33251
|
DropdownMenuItem,
|
|
33224
33252
|
{
|
|
33225
33253
|
className: "flex h-12 items-center justify-center p-1.5 text-muted-foreground focus:text-accent-brand",
|
|
33226
33254
|
title: t3(preset.titleKey),
|
|
33227
33255
|
"aria-label": t3(preset.titleKey),
|
|
33228
33256
|
onSelect: () => onPreset(preset.id),
|
|
33229
|
-
children: /* @__PURE__ */
|
|
33257
|
+
children: /* @__PURE__ */ jsx53("div", { className: "h-8 w-11", children: /* @__PURE__ */ jsx53(PresetThumb, { id: preset.id }) })
|
|
33230
33258
|
},
|
|
33231
33259
|
preset.id
|
|
33232
33260
|
)) }),
|
|
33233
|
-
/* @__PURE__ */
|
|
33234
|
-
/* @__PURE__ */
|
|
33261
|
+
/* @__PURE__ */ jsx53(DropdownMenuSeparator, {}),
|
|
33262
|
+
/* @__PURE__ */ jsx53(DropdownMenuLabel, { className: "text-[10px] font-semibold uppercase tracking-wider text-muted-foreground", children: t3("splitScreen.shortcuts") }),
|
|
33235
33263
|
/* @__PURE__ */ jsxs40("div", { className: "flex flex-col gap-1 px-2 pb-1.5 text-xs text-muted-foreground", children: [
|
|
33236
33264
|
/* @__PURE__ */ jsxs40("div", { className: "flex items-center justify-between gap-2", children: [
|
|
33237
|
-
/* @__PURE__ */
|
|
33238
|
-
/* @__PURE__ */
|
|
33265
|
+
/* @__PURE__ */ jsx53("span", { children: t3("splitScreen.shortcutNavigate") }),
|
|
33266
|
+
/* @__PURE__ */ jsx53("kbd", { className: "font-mono text-[10px]", children: paneNavHotkeyLabel() })
|
|
33239
33267
|
] }),
|
|
33240
33268
|
/* @__PURE__ */ jsxs40("div", { className: "flex items-center justify-between gap-2", children: [
|
|
33241
|
-
/* @__PURE__ */
|
|
33242
|
-
/* @__PURE__ */
|
|
33269
|
+
/* @__PURE__ */ jsx53("span", { children: t3("splitScreen.zoom") }),
|
|
33270
|
+
/* @__PURE__ */ jsx53("kbd", { className: "font-mono text-[10px]", children: "Ctrl+Shift+Enter" })
|
|
33243
33271
|
] })
|
|
33244
33272
|
] })
|
|
33245
33273
|
]
|
|
@@ -33251,7 +33279,7 @@ function SplitLayoutMenu({
|
|
|
33251
33279
|
// src/ui/sidebar/AuthEnrollmentSections.tsx
|
|
33252
33280
|
init_define_import_meta_env();
|
|
33253
33281
|
import { useTranslation as useTranslation25 } from "react-i18next";
|
|
33254
|
-
import { jsx as
|
|
33282
|
+
import { jsx as jsx54, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
33255
33283
|
function AuthEnrollmentSections({
|
|
33256
33284
|
factorsOnly = false
|
|
33257
33285
|
} = {}) {
|
|
@@ -33262,15 +33290,15 @@ function AuthEnrollmentSections({
|
|
|
33262
33290
|
(entry) => entry.enrollment
|
|
33263
33291
|
);
|
|
33264
33292
|
if (sections.length === 0) return null;
|
|
33265
|
-
return /* @__PURE__ */
|
|
33293
|
+
return /* @__PURE__ */ jsx54("div", { className: "flex flex-col gap-4", children: sections.map((entry) => {
|
|
33266
33294
|
const Enrollment = entry.enrollment;
|
|
33267
33295
|
return /* @__PURE__ */ jsxs41(
|
|
33268
33296
|
"div",
|
|
33269
33297
|
{
|
|
33270
33298
|
className: "flex flex-col gap-2",
|
|
33271
33299
|
children: [
|
|
33272
|
-
/* @__PURE__ */
|
|
33273
|
-
/* @__PURE__ */
|
|
33300
|
+
/* @__PURE__ */ jsx54("span", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: t3(entry.titleKey) }),
|
|
33301
|
+
/* @__PURE__ */ jsx54(Enrollment, {})
|
|
33274
33302
|
]
|
|
33275
33303
|
},
|
|
33276
33304
|
`${entry.pluginId}:${entry.id}`
|
|
@@ -33556,6 +33584,7 @@ export {
|
|
|
33556
33584
|
getErrorMessage,
|
|
33557
33585
|
getExternalAutoProvision,
|
|
33558
33586
|
getFolderAccess,
|
|
33587
|
+
getFolderAuthOverride,
|
|
33559
33588
|
getFolderDefaultsId,
|
|
33560
33589
|
getHostAccess,
|
|
33561
33590
|
getHostAuthOverride,
|
|
@@ -33697,6 +33726,7 @@ export {
|
|
|
33697
33726
|
saveUserPreferences,
|
|
33698
33727
|
setAllPluginChannels,
|
|
33699
33728
|
setDeveloperMode,
|
|
33729
|
+
setFolderAuthOverride,
|
|
33700
33730
|
setHostAuthOverride,
|
|
33701
33731
|
setNotificationPrivateEndpoints,
|
|
33702
33732
|
setPluginOptions,
|