mirror of https://github.com/jetkvm/kvm.git
feat(ui): Only show Cloud API URL Change on device mode
This commit is contained in:
parent
44ea0201b1
commit
58a05f7b94
|
@ -994,35 +994,37 @@ export default function SettingsSidebar() {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-4 space-y-4">
|
{isOnDevice && (
|
||||||
<SettingsItem
|
<div className="mt-4 space-y-4">
|
||||||
title="Cloud API URL"
|
<SettingsItem
|
||||||
description="Connect to a custom JetKVM Cloud API"
|
title="Cloud API URL"
|
||||||
/>
|
description="Connect to a custom JetKVM Cloud API"
|
||||||
|
|
||||||
<InputFieldWithLabel
|
|
||||||
size="SM"
|
|
||||||
label="Cloud URL"
|
|
||||||
value={cloudUrl}
|
|
||||||
onChange={e => setCloudUrl(e.target.value)}
|
|
||||||
placeholder="https://api.jetkvm.com"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<div className="flex items-center gap-x-2">
|
|
||||||
<Button
|
|
||||||
size="SM"
|
|
||||||
theme="primary"
|
|
||||||
text="Save Cloud URL"
|
|
||||||
onClick={() => handleCloudUrlChange(cloudUrl)}
|
|
||||||
/>
|
/>
|
||||||
<Button
|
|
||||||
|
<InputFieldWithLabel
|
||||||
size="SM"
|
size="SM"
|
||||||
theme="light"
|
label="Cloud URL"
|
||||||
text="Restore to default"
|
value={cloudUrl}
|
||||||
onClick={handleResetCloudUrl}
|
onChange={e => setCloudUrl(e.target.value)}
|
||||||
|
placeholder="https://api.jetkvm.com"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<div className="flex items-center gap-x-2">
|
||||||
|
<Button
|
||||||
|
size="SM"
|
||||||
|
theme="primary"
|
||||||
|
text="Save Cloud URL"
|
||||||
|
onClick={() => handleCloudUrlChange(cloudUrl)}
|
||||||
|
/>
|
||||||
|
<Button
|
||||||
|
size="SM"
|
||||||
|
theme="light"
|
||||||
|
text="Restore to default"
|
||||||
|
onClick={handleResetCloudUrl}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<SettingsItem
|
<SettingsItem
|
||||||
|
|
Loading…
Reference in New Issue