@powerhousedao/design-system 6.2.1-dev.0 → 6.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{command-CkitDMGP.d.ts → command-tFzjgzge.d.ts} +4 -4
- package/dist/command-tFzjgzge.d.ts.map +1 -0
- package/dist/connect/index.d.ts +2 -26
- package/dist/connect/index.d.ts.map +1 -1
- package/dist/connect/index.js +89 -236
- package/dist/connect/index.js.map +1 -1
- package/dist/{enum-field-B1ZGimK6.d.ts → enum-field-UxIet5Lp.d.ts} +2 -2
- package/dist/{enum-field-B1ZGimK6.d.ts.map → enum-field-UxIet5Lp.d.ts.map} +1 -1
- package/dist/{radio-group-field-qOD9_nWy.d.ts → radio-group-field-wlqeiLN3.d.ts} +2 -2
- package/dist/{radio-group-field-qOD9_nWy.d.ts.map → radio-group-field-wlqeiLN3.d.ts.map} +1 -1
- package/dist/ui/components/command/command.d.ts +1 -1
- package/dist/ui/components/enum-field/enum-field.d.ts +1 -1
- package/dist/ui/components/index.d.ts +3 -3
- package/dist/ui/components/radio-group-field/radio-group-field.d.ts +1 -1
- package/dist/ui/components/sidebar/subcomponents/status-icon.d.ts +1 -1
- package/dist/ui/components/sidebar/subcomponents/status-icon.d.ts.map +1 -1
- package/dist/ui/index.d.ts +3 -3
- package/package.json +4 -4
- package/dist/command-CkitDMGP.d.ts.map +0 -1
package/dist/connect/index.js
CHANGED
|
@@ -3853,47 +3853,6 @@ function AppFormInput(props) {
|
|
|
3853
3853
|
});
|
|
3854
3854
|
}
|
|
3855
3855
|
//#endregion
|
|
3856
|
-
//#region src/connect/components/toggle/toggle.tsx
|
|
3857
|
-
const Toggle = /* @__PURE__ */ forwardRef(function Toggle(props, ref) {
|
|
3858
|
-
return /* @__PURE__ */ jsxs("label", {
|
|
3859
|
-
className: "relative cursor-pointer items-center",
|
|
3860
|
-
htmlFor: props.id,
|
|
3861
|
-
children: [/* @__PURE__ */ jsx("input", {
|
|
3862
|
-
className: "peer sr-only",
|
|
3863
|
-
ref,
|
|
3864
|
-
type: "checkbox",
|
|
3865
|
-
value: "",
|
|
3866
|
-
...props
|
|
3867
|
-
}), /* @__PURE__ */ jsx("div", { className: "peer h-6 w-11 rounded-full bg-muted-foreground peer-checked:bg-info peer-focus:outline-none after:absolute after:inset-s-0.5 after:top-0.5 after:size-5 after:rounded-full after:border after:border-none after:bg-background after:transition-all peer-checked:after:translate-x-full" })]
|
|
3868
|
-
});
|
|
3869
|
-
});
|
|
3870
|
-
//#endregion
|
|
3871
|
-
//#region src/connect/components/form/inputs/available-offline-toggle.tsx
|
|
3872
|
-
const AvailableOfflineToggle = /* @__PURE__ */ forwardRef(function AvailableOfflineToggle(props, ref) {
|
|
3873
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
3874
|
-
className: "flex items-center rounded-md border border-border bg-background p-3 text-foreground",
|
|
3875
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
3876
|
-
className: "flex-1",
|
|
3877
|
-
children: [/* @__PURE__ */ jsx("label", {
|
|
3878
|
-
className: "font-medium text-foreground",
|
|
3879
|
-
htmlFor: "availableOffline",
|
|
3880
|
-
children: "Make available offline"
|
|
3881
|
-
}), /* @__PURE__ */ jsxs("p", {
|
|
3882
|
-
className: "text-xs text-foreground",
|
|
3883
|
-
children: [
|
|
3884
|
-
"Check this options if you keep a local backup",
|
|
3885
|
-
/* @__PURE__ */ jsx("br", {}),
|
|
3886
|
-
"available at all times."
|
|
3887
|
-
]
|
|
3888
|
-
})]
|
|
3889
|
-
}), /* @__PURE__ */ jsx(Toggle, {
|
|
3890
|
-
id: "availableOffline",
|
|
3891
|
-
ref,
|
|
3892
|
-
...props
|
|
3893
|
-
})]
|
|
3894
|
-
});
|
|
3895
|
-
});
|
|
3896
|
-
//#endregion
|
|
3897
3856
|
//#region src/connect/components/form/inputs/label.tsx
|
|
3898
3857
|
function Label(props) {
|
|
3899
3858
|
const { children, className, ...labelProps } = props;
|
|
@@ -3904,21 +3863,6 @@ function Label(props) {
|
|
|
3904
3863
|
});
|
|
3905
3864
|
}
|
|
3906
3865
|
//#endregion
|
|
3907
|
-
//#region src/connect/components/form/inputs/sharing-type-form-input.tsx
|
|
3908
|
-
function SharingTypeFormInput(props) {
|
|
3909
|
-
const { control, ...delegatedProps } = props;
|
|
3910
|
-
return /* @__PURE__ */ jsx(Controller, {
|
|
3911
|
-
control,
|
|
3912
|
-
name: "sharingType",
|
|
3913
|
-
render: ({ field }) => /* @__PURE__ */ jsx(ConnectSelect, {
|
|
3914
|
-
...delegatedProps,
|
|
3915
|
-
...field,
|
|
3916
|
-
id: "sharingType",
|
|
3917
|
-
items: sharingTypeOptions
|
|
3918
|
-
})
|
|
3919
|
-
});
|
|
3920
|
-
}
|
|
3921
|
-
//#endregion
|
|
3922
3866
|
//#region src/connect/components/form/add-local-drive-form.tsx
|
|
3923
3867
|
function AddLocalDriveForm(props) {
|
|
3924
3868
|
const { register, handleSubmit, control, formState: { errors } } = useForm({ defaultValues: {
|
|
@@ -3951,12 +3895,6 @@ function AddLocalDriveForm(props) {
|
|
|
3951
3895
|
control,
|
|
3952
3896
|
appOptions: props.appOptions
|
|
3953
3897
|
})] }),
|
|
3954
|
-
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Label, {
|
|
3955
|
-
htmlFor: "sharingType",
|
|
3956
|
-
className: "text-sm font-medium text-foreground",
|
|
3957
|
-
children: "Location"
|
|
3958
|
-
}), /* @__PURE__ */ jsx(SharingTypeFormInput, { control })] }),
|
|
3959
|
-
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(AvailableOfflineToggle, { ...register("availableOffline") }) }),
|
|
3960
3898
|
/* @__PURE__ */ jsx(PowerhouseButton, {
|
|
3961
3899
|
className: "mt-2 w-full",
|
|
3962
3900
|
type: "submit",
|
|
@@ -3967,6 +3905,47 @@ function AddLocalDriveForm(props) {
|
|
|
3967
3905
|
});
|
|
3968
3906
|
}
|
|
3969
3907
|
//#endregion
|
|
3908
|
+
//#region src/connect/components/toggle/toggle.tsx
|
|
3909
|
+
const Toggle = /* @__PURE__ */ forwardRef(function Toggle(props, ref) {
|
|
3910
|
+
return /* @__PURE__ */ jsxs("label", {
|
|
3911
|
+
className: "relative cursor-pointer items-center",
|
|
3912
|
+
htmlFor: props.id,
|
|
3913
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
3914
|
+
className: "peer sr-only",
|
|
3915
|
+
ref,
|
|
3916
|
+
type: "checkbox",
|
|
3917
|
+
value: "",
|
|
3918
|
+
...props
|
|
3919
|
+
}), /* @__PURE__ */ jsx("div", { className: "peer h-6 w-11 rounded-full bg-muted-foreground peer-checked:bg-info peer-focus:outline-none after:absolute after:inset-s-0.5 after:top-0.5 after:size-5 after:rounded-full after:border after:border-none after:bg-background after:transition-all peer-checked:after:translate-x-full" })]
|
|
3920
|
+
});
|
|
3921
|
+
});
|
|
3922
|
+
//#endregion
|
|
3923
|
+
//#region src/connect/components/form/inputs/available-offline-toggle.tsx
|
|
3924
|
+
const AvailableOfflineToggle = /* @__PURE__ */ forwardRef(function AvailableOfflineToggle(props, ref) {
|
|
3925
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
3926
|
+
className: "flex items-center rounded-md border border-border bg-background p-3 text-foreground",
|
|
3927
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
3928
|
+
className: "flex-1",
|
|
3929
|
+
children: [/* @__PURE__ */ jsx("label", {
|
|
3930
|
+
className: "font-medium text-foreground",
|
|
3931
|
+
htmlFor: "availableOffline",
|
|
3932
|
+
children: "Make available offline"
|
|
3933
|
+
}), /* @__PURE__ */ jsxs("p", {
|
|
3934
|
+
className: "text-xs text-foreground",
|
|
3935
|
+
children: [
|
|
3936
|
+
"Check this options if you keep a local backup",
|
|
3937
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
3938
|
+
"available at all times."
|
|
3939
|
+
]
|
|
3940
|
+
})]
|
|
3941
|
+
}), /* @__PURE__ */ jsx(Toggle, {
|
|
3942
|
+
id: "availableOffline",
|
|
3943
|
+
ref,
|
|
3944
|
+
...props
|
|
3945
|
+
})]
|
|
3946
|
+
});
|
|
3947
|
+
});
|
|
3948
|
+
//#endregion
|
|
3970
3949
|
//#region src/connect/components/form/inputs/drive-name.tsx
|
|
3971
3950
|
function DriveName(props) {
|
|
3972
3951
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -4836,6 +4815,21 @@ function DeleteDrive(props) {
|
|
|
4836
4815
|
] });
|
|
4837
4816
|
}
|
|
4838
4817
|
//#endregion
|
|
4818
|
+
//#region src/connect/components/form/inputs/sharing-type-form-input.tsx
|
|
4819
|
+
function SharingTypeFormInput(props) {
|
|
4820
|
+
const { control, ...delegatedProps } = props;
|
|
4821
|
+
return /* @__PURE__ */ jsx(Controller, {
|
|
4822
|
+
control,
|
|
4823
|
+
name: "sharingType",
|
|
4824
|
+
render: ({ field }) => /* @__PURE__ */ jsx(ConnectSelect, {
|
|
4825
|
+
...delegatedProps,
|
|
4826
|
+
...field,
|
|
4827
|
+
id: "sharingType",
|
|
4828
|
+
items: sharingTypeOptions
|
|
4829
|
+
})
|
|
4830
|
+
});
|
|
4831
|
+
}
|
|
4832
|
+
//#endregion
|
|
4839
4833
|
//#region src/connect/components/form/drive-settings-form.tsx
|
|
4840
4834
|
function DriveSettingsForm(props) {
|
|
4841
4835
|
const { drive, sharingType, availableOffline, systemInfo, onSubmit, handleDeleteDrive } = props;
|
|
@@ -6445,20 +6439,20 @@ function sortRemotes(remotes, sort) {
|
|
|
6445
6439
|
let bValue;
|
|
6446
6440
|
switch (sort.column) {
|
|
6447
6441
|
case "id":
|
|
6448
|
-
aValue = a.
|
|
6449
|
-
bValue = b.
|
|
6442
|
+
aValue = a.id;
|
|
6443
|
+
bValue = b.id;
|
|
6450
6444
|
break;
|
|
6451
6445
|
case "name":
|
|
6452
|
-
aValue = a.
|
|
6453
|
-
bValue = b.
|
|
6446
|
+
aValue = a.name;
|
|
6447
|
+
bValue = b.name;
|
|
6454
6448
|
break;
|
|
6455
6449
|
case "collectionId":
|
|
6456
|
-
aValue = a.
|
|
6457
|
-
bValue = b.
|
|
6450
|
+
aValue = a.collectionId.key;
|
|
6451
|
+
bValue = b.collectionId.key;
|
|
6458
6452
|
break;
|
|
6459
6453
|
case "filter":
|
|
6460
|
-
aValue = formatFilter(a.
|
|
6461
|
-
bValue = formatFilter(b.
|
|
6454
|
+
aValue = formatFilter(a.filter);
|
|
6455
|
+
bValue = formatFilter(b.filter);
|
|
6462
6456
|
break;
|
|
6463
6457
|
default: return 0;
|
|
6464
6458
|
}
|
|
@@ -6486,7 +6480,7 @@ function RemotesInspector({ getRemotes, removeRemote, addRemoteManual, triggerPu
|
|
|
6486
6480
|
}, [loadRemotes]);
|
|
6487
6481
|
const handleRefresh = useCallback(async () => {
|
|
6488
6482
|
await loadRemotes();
|
|
6489
|
-
if (selectedRemote) setSelectedRemote(remotes.find((r) => r.
|
|
6483
|
+
if (selectedRemote) setSelectedRemote(remotes.find((r) => r.id === selectedRemote.id));
|
|
6490
6484
|
}, [
|
|
6491
6485
|
loadRemotes,
|
|
6492
6486
|
selectedRemote,
|
|
@@ -6504,9 +6498,9 @@ function RemotesInspector({ getRemotes, removeRemote, addRemoteManual, triggerPu
|
|
|
6504
6498
|
};
|
|
6505
6499
|
const handleRemove = useCallback(async (remote) => {
|
|
6506
6500
|
if (!removeRemote) return;
|
|
6507
|
-
await removeRemote(remote.
|
|
6501
|
+
await removeRemote(remote.name);
|
|
6508
6502
|
await loadRemotes();
|
|
6509
|
-
if (selectedRemote?.
|
|
6503
|
+
if (selectedRemote?.id === remote.id) setSelectedRemote(void 0);
|
|
6510
6504
|
}, [
|
|
6511
6505
|
removeRemote,
|
|
6512
6506
|
loadRemotes,
|
|
@@ -6536,14 +6530,14 @@ function RemotesInspector({ getRemotes, removeRemote, addRemoteManual, triggerPu
|
|
|
6536
6530
|
loadRemotes
|
|
6537
6531
|
]);
|
|
6538
6532
|
const handlePull = useCallback((remote) => {
|
|
6539
|
-
triggerPull?.(remote.
|
|
6533
|
+
triggerPull?.(remote.name);
|
|
6540
6534
|
}, [triggerPull]);
|
|
6541
6535
|
if (selectedRemote) return /* @__PURE__ */ jsx(ChannelInspector, {
|
|
6542
6536
|
channel: selectedRemote.channel,
|
|
6543
|
-
connectionState: connectionStates?.get(selectedRemote.
|
|
6537
|
+
connectionState: connectionStates?.get(selectedRemote.name),
|
|
6544
6538
|
onBack: handleBack,
|
|
6545
6539
|
onRefresh: () => void handleRefresh(),
|
|
6546
|
-
remoteName: selectedRemote.
|
|
6540
|
+
remoteName: selectedRemote.name
|
|
6547
6541
|
});
|
|
6548
6542
|
const sortedRemotes = sortRemotes(remotes, sort);
|
|
6549
6543
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -6633,23 +6627,23 @@ function RemotesInspector({ getRemotes, removeRemote, addRemoteManual, triggerPu
|
|
|
6633
6627
|
className: "px-3 py-2 text-xs text-foreground",
|
|
6634
6628
|
children: /* @__PURE__ */ jsx("span", {
|
|
6635
6629
|
className: "block truncate",
|
|
6636
|
-
title: remote.
|
|
6637
|
-
children: truncateId(remote.
|
|
6630
|
+
title: remote.id,
|
|
6631
|
+
children: truncateId(remote.id)
|
|
6638
6632
|
})
|
|
6639
6633
|
}),
|
|
6640
6634
|
/* @__PURE__ */ jsx("td", {
|
|
6641
6635
|
className: "border-l border-border px-3 py-2 text-xs text-foreground",
|
|
6642
6636
|
children: /* @__PURE__ */ jsx("span", {
|
|
6643
6637
|
className: "block truncate",
|
|
6644
|
-
title: remote.
|
|
6645
|
-
children: remote.
|
|
6638
|
+
title: remote.name,
|
|
6639
|
+
children: remote.name
|
|
6646
6640
|
})
|
|
6647
6641
|
}),
|
|
6648
6642
|
/* @__PURE__ */ jsx("td", {
|
|
6649
6643
|
className: "border-l border-border px-3 py-2",
|
|
6650
|
-
children: connectionStates?.get(remote.
|
|
6651
|
-
failureCount: connectionStates.get(remote.
|
|
6652
|
-
state: connectionStates.get(remote.
|
|
6644
|
+
children: connectionStates?.get(remote.name) ? /* @__PURE__ */ jsx(ConnectionStateBadge, {
|
|
6645
|
+
failureCount: connectionStates.get(remote.name).failureCount,
|
|
6646
|
+
state: connectionStates.get(remote.name).state
|
|
6653
6647
|
}) : /* @__PURE__ */ jsx("span", {
|
|
6654
6648
|
className: "text-xs text-muted-foreground",
|
|
6655
6649
|
children: "-"
|
|
@@ -6659,16 +6653,16 @@ function RemotesInspector({ getRemotes, removeRemote, addRemoteManual, triggerPu
|
|
|
6659
6653
|
className: "border-l border-border px-3 py-2 text-xs text-foreground",
|
|
6660
6654
|
children: /* @__PURE__ */ jsx("span", {
|
|
6661
6655
|
className: "block truncate",
|
|
6662
|
-
title: remote.
|
|
6663
|
-
children: remote.
|
|
6656
|
+
title: remote.collectionId.key,
|
|
6657
|
+
children: remote.collectionId.key
|
|
6664
6658
|
})
|
|
6665
6659
|
}),
|
|
6666
6660
|
/* @__PURE__ */ jsx("td", {
|
|
6667
6661
|
className: "border-l border-border px-3 py-2 text-xs text-foreground",
|
|
6668
6662
|
children: /* @__PURE__ */ jsx("span", {
|
|
6669
6663
|
className: "block truncate",
|
|
6670
|
-
title: formatFilter(remote.
|
|
6671
|
-
children: formatFilter(remote.
|
|
6664
|
+
title: formatFilter(remote.filter),
|
|
6665
|
+
children: formatFilter(remote.filter)
|
|
6672
6666
|
})
|
|
6673
6667
|
}),
|
|
6674
6668
|
/* @__PURE__ */ jsx("td", {
|
|
@@ -6702,7 +6696,7 @@ function RemotesInspector({ getRemotes, removeRemote, addRemoteManual, triggerPu
|
|
|
6702
6696
|
})
|
|
6703
6697
|
})
|
|
6704
6698
|
]
|
|
6705
|
-
}, remote.
|
|
6699
|
+
}, remote.id)) })]
|
|
6706
6700
|
})
|
|
6707
6701
|
}),
|
|
6708
6702
|
/* @__PURE__ */ jsxs("div", {
|
|
@@ -6717,129 +6711,8 @@ function RemotesInspector({ getRemotes, removeRemote, addRemoteManual, triggerPu
|
|
|
6717
6711
|
});
|
|
6718
6712
|
}
|
|
6719
6713
|
//#endregion
|
|
6720
|
-
//#region src/connect/components/worker-inspector/worker-inspector.tsx
|
|
6721
|
-
function formatUptime(ms) {
|
|
6722
|
-
const totalSeconds = Math.max(0, Math.floor(ms / 1e3));
|
|
6723
|
-
const hours = Math.floor(totalSeconds / 3600);
|
|
6724
|
-
const minutes = Math.floor(totalSeconds % 3600 / 60);
|
|
6725
|
-
const seconds = totalSeconds % 60;
|
|
6726
|
-
const parts = [];
|
|
6727
|
-
if (hours > 0) parts.push(`${hours}h`);
|
|
6728
|
-
if (hours > 0 || minutes > 0) parts.push(`${minutes}m`);
|
|
6729
|
-
parts.push(`${seconds}s`);
|
|
6730
|
-
return parts.join(" ");
|
|
6731
|
-
}
|
|
6732
|
-
function Field({ label, value }) {
|
|
6733
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
6734
|
-
className: "flex flex-col gap-0.5",
|
|
6735
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
6736
|
-
className: "text-xs font-medium text-muted-foreground",
|
|
6737
|
-
children: label
|
|
6738
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
6739
|
-
className: "font-mono text-sm break-all text-foreground",
|
|
6740
|
-
children: value
|
|
6741
|
-
})]
|
|
6742
|
-
});
|
|
6743
|
-
}
|
|
6744
|
-
function WorkerInspector({ getInfo, onRestart }) {
|
|
6745
|
-
const [info, setInfo] = useState(null);
|
|
6746
|
-
const [error, setError] = useState(null);
|
|
6747
|
-
const [now, setNow] = useState(() => Date.now());
|
|
6748
|
-
const [restarting, setRestarting] = useState(false);
|
|
6749
|
-
const loadInfo = useCallback(async () => {
|
|
6750
|
-
try {
|
|
6751
|
-
setInfo(await getInfo());
|
|
6752
|
-
setError(null);
|
|
6753
|
-
} catch (e) {
|
|
6754
|
-
setError(e instanceof Error ? e.message : String(e));
|
|
6755
|
-
}
|
|
6756
|
-
}, [getInfo]);
|
|
6757
|
-
useEffect(() => {
|
|
6758
|
-
loadInfo();
|
|
6759
|
-
const interval = setInterval(() => {
|
|
6760
|
-
loadInfo();
|
|
6761
|
-
setNow(Date.now());
|
|
6762
|
-
}, 1e3);
|
|
6763
|
-
return () => clearInterval(interval);
|
|
6764
|
-
}, [loadInfo]);
|
|
6765
|
-
const handleRestart = useCallback(async () => {
|
|
6766
|
-
if (!window.confirm("Restart the reactor worker? All tabs sharing it will reload.")) return;
|
|
6767
|
-
setRestarting(true);
|
|
6768
|
-
try {
|
|
6769
|
-
await onRestart();
|
|
6770
|
-
} finally {
|
|
6771
|
-
setRestarting(false);
|
|
6772
|
-
}
|
|
6773
|
-
}, [onRestart]);
|
|
6774
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
6775
|
-
className: "flex h-full flex-col gap-3",
|
|
6776
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
6777
|
-
className: "flex shrink-0 items-center justify-between",
|
|
6778
|
-
children: [/* @__PURE__ */ jsx("h2", {
|
|
6779
|
-
className: "text-lg font-semibold text-foreground",
|
|
6780
|
-
children: "Worker Inspector"
|
|
6781
|
-
}), /* @__PURE__ */ jsxs("button", {
|
|
6782
|
-
className: twMerge("flex items-center gap-1 rounded-sm border px-3 py-1.5 text-sm", "border-warning bg-warning/10 text-warning hover:hover-effect disabled:disabled-effect"),
|
|
6783
|
-
disabled: restarting || !info,
|
|
6784
|
-
onClick: () => void handleRestart(),
|
|
6785
|
-
type: "button",
|
|
6786
|
-
children: [/* @__PURE__ */ jsx(Icon, {
|
|
6787
|
-
name: "Reload",
|
|
6788
|
-
size: 14
|
|
6789
|
-
}), restarting ? "Restarting..." : "Restart Worker"]
|
|
6790
|
-
})]
|
|
6791
|
-
}), error ? /* @__PURE__ */ jsx("div", {
|
|
6792
|
-
className: "rounded-lg bg-destructive/10 px-4 py-3 text-sm text-destructive",
|
|
6793
|
-
children: error
|
|
6794
|
-
}) : !info ? /* @__PURE__ */ jsx("div", {
|
|
6795
|
-
className: "rounded-lg bg-muted px-4 py-8 text-center text-sm text-muted-foreground",
|
|
6796
|
-
children: "Loading worker info..."
|
|
6797
|
-
}) : /* @__PURE__ */ jsxs("div", {
|
|
6798
|
-
className: "grid grid-cols-2 gap-4 rounded-lg border border-border p-4",
|
|
6799
|
-
children: [
|
|
6800
|
-
/* @__PURE__ */ jsx(Field, {
|
|
6801
|
-
label: "Worker name",
|
|
6802
|
-
value: info.namespace
|
|
6803
|
-
}),
|
|
6804
|
-
/* @__PURE__ */ jsx(Field, {
|
|
6805
|
-
label: "Owner ID (boot)",
|
|
6806
|
-
value: info.ownerId
|
|
6807
|
-
}),
|
|
6808
|
-
/* @__PURE__ */ jsx(Field, {
|
|
6809
|
-
label: "Uptime",
|
|
6810
|
-
value: formatUptime(now - info.bootedAtMs)
|
|
6811
|
-
}),
|
|
6812
|
-
/* @__PURE__ */ jsx(Field, {
|
|
6813
|
-
label: "Connected tabs",
|
|
6814
|
-
value: String(info.connectedClients)
|
|
6815
|
-
}),
|
|
6816
|
-
/* @__PURE__ */ jsx(Field, {
|
|
6817
|
-
label: "App build",
|
|
6818
|
-
value: info.appBuildId
|
|
6819
|
-
}),
|
|
6820
|
-
/* @__PURE__ */ jsx(Field, {
|
|
6821
|
-
label: "RPC protocol",
|
|
6822
|
-
value: String(info.rpcProtocolVersion)
|
|
6823
|
-
})
|
|
6824
|
-
]
|
|
6825
|
-
})]
|
|
6826
|
-
});
|
|
6827
|
-
}
|
|
6828
|
-
//#endregion
|
|
6829
6714
|
//#region src/connect/components/modal/inspector-modal/inspector-modal.tsx
|
|
6830
|
-
function
|
|
6831
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
6832
|
-
className: "flex h-full flex-col items-center justify-center gap-2 p-6 text-center",
|
|
6833
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
6834
|
-
className: "text-sm font-semibold text-muted-foreground",
|
|
6835
|
-
children: "Not available here"
|
|
6836
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
6837
|
-
className: "max-w-md text-sm text-muted-foreground",
|
|
6838
|
-
children: message
|
|
6839
|
-
})]
|
|
6840
|
-
});
|
|
6841
|
-
}
|
|
6842
|
-
function InspectorModal({ open, onOpenChange, modalProps, containerProps, dbExplorerProps, remotesInspectorProps, queueInspectorProps, processorsInspectorProps, integrityInspectorProps, workerInspectorProps, unavailableTabs, defaultTab = "Database" }) {
|
|
6715
|
+
function InspectorModal({ open, onOpenChange, modalProps, containerProps, dbExplorerProps, remotesInspectorProps, queueInspectorProps, processorsInspectorProps, integrityInspectorProps, defaultTab = "Database" }) {
|
|
6843
6716
|
return /* @__PURE__ */ jsx(Modal, {
|
|
6844
6717
|
...modalProps,
|
|
6845
6718
|
contentProps: {
|
|
@@ -6888,49 +6761,29 @@ function InspectorModal({ open, onOpenChange, modalProps, containerProps, dbExpl
|
|
|
6888
6761
|
children: /* @__PURE__ */ jsx(RemotesInspector, { ...remotesInspectorProps })
|
|
6889
6762
|
})
|
|
6890
6763
|
}),
|
|
6891
|
-
queueInspectorProps
|
|
6764
|
+
queueInspectorProps && /* @__PURE__ */ jsx(TabContent, {
|
|
6892
6765
|
description: "Queue inspector",
|
|
6893
6766
|
label: "Queue",
|
|
6894
6767
|
children: /* @__PURE__ */ jsx("div", {
|
|
6895
6768
|
className: "h-full",
|
|
6896
6769
|
children: /* @__PURE__ */ jsx(QueueInspector, { ...queueInspectorProps })
|
|
6897
6770
|
})
|
|
6898
|
-
})
|
|
6899
|
-
|
|
6900
|
-
label: "Queue",
|
|
6901
|
-
children: /* @__PURE__ */ jsx(InspectorUnavailable, { message: unavailableTabs.Queue })
|
|
6902
|
-
}) : null,
|
|
6903
|
-
processorsInspectorProps ? /* @__PURE__ */ jsx(TabContent, {
|
|
6771
|
+
}),
|
|
6772
|
+
processorsInspectorProps && /* @__PURE__ */ jsx(TabContent, {
|
|
6904
6773
|
description: "Processors inspector",
|
|
6905
6774
|
label: "Processors",
|
|
6906
6775
|
children: /* @__PURE__ */ jsx("div", {
|
|
6907
6776
|
className: "h-full",
|
|
6908
6777
|
children: /* @__PURE__ */ jsx(ProcessorsInspector, { ...processorsInspectorProps })
|
|
6909
6778
|
})
|
|
6910
|
-
})
|
|
6911
|
-
|
|
6912
|
-
label: "Processors",
|
|
6913
|
-
children: /* @__PURE__ */ jsx(InspectorUnavailable, { message: unavailableTabs.Processors })
|
|
6914
|
-
}) : null,
|
|
6915
|
-
integrityInspectorProps ? /* @__PURE__ */ jsx(TabContent, {
|
|
6779
|
+
}),
|
|
6780
|
+
integrityInspectorProps && /* @__PURE__ */ jsx(TabContent, {
|
|
6916
6781
|
description: "Integrity inspector",
|
|
6917
6782
|
label: "Integrity",
|
|
6918
6783
|
children: /* @__PURE__ */ jsx("div", {
|
|
6919
6784
|
className: "h-full",
|
|
6920
6785
|
children: /* @__PURE__ */ jsx(IntegrityInspector, { ...integrityInspectorProps })
|
|
6921
6786
|
})
|
|
6922
|
-
}) : unavailableTabs?.Integrity ? /* @__PURE__ */ jsx(TabContent, {
|
|
6923
|
-
description: "Integrity inspector",
|
|
6924
|
-
label: "Integrity",
|
|
6925
|
-
children: /* @__PURE__ */ jsx(InspectorUnavailable, { message: unavailableTabs.Integrity })
|
|
6926
|
-
}) : null,
|
|
6927
|
-
workerInspectorProps && /* @__PURE__ */ jsx(TabContent, {
|
|
6928
|
-
description: "Worker inspector",
|
|
6929
|
-
label: "Worker",
|
|
6930
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
6931
|
-
className: "h-full",
|
|
6932
|
-
children: /* @__PURE__ */ jsx(WorkerInspector, { ...workerInspectorProps })
|
|
6933
|
-
})
|
|
6934
6787
|
})
|
|
6935
6788
|
]
|
|
6936
6789
|
})
|
|
@@ -9145,6 +8998,6 @@ const removeSuccessFiles = (files) => {
|
|
|
9145
8998
|
return files.filter((file) => file.status !== "SUCCESS");
|
|
9146
8999
|
};
|
|
9147
9000
|
//#endregion
|
|
9148
|
-
export { About, AccountPopover, AddDriveModal, AddLocalDriveForm, AddRemoteDriveForm, AnimatedLoader, Breadcrumb, Breadcrumbs, CONFLICT, ChannelInspector, Combobox, ConnectConfirmationModal, ConnectDeleteDriveModal, ConnectDeleteItemModal, ConnectDropdownMenu, ConnectReplaceDuplicateModal, ConnectSearchBar, ConnectSelect, ConnectSidebar, ConnectSidebarFooter, ConnectSidebarHeader, ConnectTooltip, ConnectTooltipProvider, ConnectUpgradeDriveModal, ConnectionStateBadge, CookieBanner, CreateDocumentModal, DBExplorer, DangerZone, DebugInspector, DefaultEditor, DefaultEditorLoader, DefaultEditorSelect, DependencyVersions, Disclosure, Divider, DocumentStateViewer, DocumentTimeline, DocumentToolbar, DriveAuthGate, DriveSettingsModal, DropZone, DropZoneWrapper, ENSAvatar, ERROR, EditorActionButtons, EditorUndoRedoButtons, FileItem, FolderItem, Footer, FooterLink, FormInput, FormattedJsonViewer, HomeBackgroundImage, HomeScreen, HomeScreenAddDriveItem, HomeScreenItem, INITIAL_SYNC, InspectorModal, IntegrityInspector, LoadingScreen, LogoAnimation, MISSING, NodeInput, ObjectInspectorModal, PackageInstallModal, PackageManager, PackageManagerInput, PackageManagerList, PackageManagerListItem, ProcessorsInspector, QueueInspector, ReadRequiredModal, RemotesInspector, RevisionHistory, SUCCESS, SYNCING, SettingsModal, SidebarAddDriveItem, SidebarItem, SidebarLogin, SidebarUser, SyncStatusIcon, TabContent, Tabs, ThemeSwitch, Toggle, ToolbarButton, ToolbarCloseButton, ToolbarContainer, ToolbarControlsContainer, ToolbarDownloadButton, ToolbarHistoryButton, ToolbarInput, ToolbarName, ToolbarRedoButton, ToolbarSwitchboardButton, ToolbarUndoButton, UploadFileItem, UploadFileList, UploadFileListContainer,
|
|
9001
|
+
export { About, AccountPopover, AddDriveModal, AddLocalDriveForm, AddRemoteDriveForm, AnimatedLoader, Breadcrumb, Breadcrumbs, CONFLICT, ChannelInspector, Combobox, ConnectConfirmationModal, ConnectDeleteDriveModal, ConnectDeleteItemModal, ConnectDropdownMenu, ConnectReplaceDuplicateModal, ConnectSearchBar, ConnectSelect, ConnectSidebar, ConnectSidebarFooter, ConnectSidebarHeader, ConnectTooltip, ConnectTooltipProvider, ConnectUpgradeDriveModal, ConnectionStateBadge, CookieBanner, CreateDocumentModal, DBExplorer, DangerZone, DebugInspector, DefaultEditor, DefaultEditorLoader, DefaultEditorSelect, DependencyVersions, Disclosure, Divider, DocumentStateViewer, DocumentTimeline, DocumentToolbar, DriveAuthGate, DriveSettingsModal, DropZone, DropZoneWrapper, ENSAvatar, ERROR, EditorActionButtons, EditorUndoRedoButtons, FileItem, FolderItem, Footer, FooterLink, FormInput, FormattedJsonViewer, HomeBackgroundImage, HomeScreen, HomeScreenAddDriveItem, HomeScreenItem, INITIAL_SYNC, InspectorModal, IntegrityInspector, LoadingScreen, LogoAnimation, MISSING, NodeInput, ObjectInspectorModal, PackageInstallModal, PackageManager, PackageManagerInput, PackageManagerList, PackageManagerListItem, ProcessorsInspector, QueueInspector, ReadRequiredModal, RemotesInspector, RevisionHistory, SUCCESS, SYNCING, SettingsModal, SidebarAddDriveItem, SidebarItem, SidebarLogin, SidebarUser, SyncStatusIcon, TabContent, Tabs, ThemeSwitch, Toggle, ToolbarButton, ToolbarCloseButton, ToolbarContainer, ToolbarControlsContainer, ToolbarDownloadButton, ToolbarHistoryButton, ToolbarInput, ToolbarName, ToolbarRedoButton, ToolbarSwitchboardButton, ToolbarUndoButton, UploadFileItem, UploadFileList, UploadFileListContainer, debugNodeOptions, debugNodeOptionsMap, defaultDriveOptions, defaultNodeOptions, fileNodeDropdownOptions, folderNodeDropdownOptions, formatEthAddress, getFolderStatus, locationInfoByLocation, nodeOptions, normalNodeOptions, removeSuccessFiles, sharingTypeOptions, sortFilesByStatus, syncStatuses, useEns, verifyPackageJsonFields };
|
|
9149
9002
|
|
|
9150
9003
|
//# sourceMappingURL=index.js.map
|