mirror of https://github.com/jetkvm/kvm.git
formatting
This commit is contained in:
parent
e771051839
commit
ab6df78649
|
@ -621,36 +621,36 @@ export default function SettingsSidebar() {
|
||||||
/>
|
/>
|
||||||
</SettingsItem>
|
</SettingsItem>
|
||||||
{customEdidValue !== null && (
|
{customEdidValue !== null && (
|
||||||
<>
|
<>
|
||||||
<SettingsItem
|
<SettingsItem
|
||||||
title="Custom EDID"
|
title="Custom EDID"
|
||||||
description="EDID details video mode compatibility. Default settings works in most cases, but unique UEFI/BIOS might need adjustments."
|
description="EDID details video mode compatibility. Default settings works in most cases, but unique UEFI/BIOS might need adjustments."
|
||||||
|
/>
|
||||||
|
<TextAreaWithLabel
|
||||||
|
label="EDID File"
|
||||||
|
placeholder="00F..."
|
||||||
|
rows={3}
|
||||||
|
value={customEdidValue}
|
||||||
|
onChange={e => setCustomEdidValue(e.target.value)}
|
||||||
|
/>
|
||||||
|
<div className="flex justify-start gap-x-2">
|
||||||
|
<Button
|
||||||
|
size="MD"
|
||||||
|
theme="primary"
|
||||||
|
text="Set Custom EDID"
|
||||||
|
onClick={() => handleEDIDChange(customEdidValue)}
|
||||||
/>
|
/>
|
||||||
<TextAreaWithLabel
|
<Button
|
||||||
label="EDID File"
|
size="MD"
|
||||||
placeholder="00F..."
|
theme="light"
|
||||||
rows={3}
|
text="Restore to default"
|
||||||
value={customEdidValue}
|
onClick={() => {
|
||||||
onChange={e => setCustomEdidValue(e.target.value)}
|
setCustomEdidValue(null);
|
||||||
|
handleEDIDChange(defaultEdid);
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
<div className="flex justify-start gap-x-2">
|
</div>
|
||||||
<Button
|
</>
|
||||||
size="MD"
|
|
||||||
theme="primary"
|
|
||||||
text="Set Custom EDID"
|
|
||||||
onClick={() => handleEDIDChange(customEdidValue)}
|
|
||||||
/>
|
|
||||||
<Button
|
|
||||||
size="MD"
|
|
||||||
theme="light"
|
|
||||||
text="Restore to default"
|
|
||||||
onClick={() => {
|
|
||||||
setCustomEdidValue(null);
|
|
||||||
handleEDIDChange(defaultEdid);
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -708,109 +708,109 @@ export default function SettingsSidebar() {
|
||||||
</GridCard>
|
</GridCard>
|
||||||
|
|
||||||
{!isAdopted ? (
|
{!isAdopted ? (
|
||||||
<div>
|
<div>
|
||||||
<LinkButton
|
<LinkButton
|
||||||
to={
|
to={
|
||||||
CLOUD_APP +
|
CLOUD_APP +
|
||||||
"/signup?deviceId=" +
|
"/signup?deviceId=" +
|
||||||
deviceId +
|
deviceId +
|
||||||
`&returnTo=${location.href}adopt`
|
`&returnTo=${location.href}adopt`
|
||||||
}
|
}
|
||||||
size="MD"
|
size="MD"
|
||||||
theme="primary"
|
theme="primary"
|
||||||
text="Adopt KVM to Cloud account"
|
text="Adopt KVM to Cloud account"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div>
|
<div>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<p className="text-sm text-slate-600 dark:text-slate-300">
|
<p className="text-sm text-slate-600 dark:text-slate-300">
|
||||||
Your device is adopted to JetKVM Cloud
|
Your device is adopted to JetKVM Cloud
|
||||||
</p>
|
</p>
|
||||||
<div>
|
<div>
|
||||||
<Button
|
<Button
|
||||||
size="MD"
|
size="MD"
|
||||||
theme="light"
|
theme="light"
|
||||||
text="De-register from Cloud"
|
text="De-register from Cloud"
|
||||||
className="text-red-600"
|
className="text-red-600"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (deviceId) {
|
if (deviceId) {
|
||||||
if (
|
if (
|
||||||
window.confirm(
|
window.confirm(
|
||||||
"Are you sure you want to de-register this device?",
|
"Are you sure you want to de-register this device?",
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
deregisterDevice();
|
deregisterDevice();
|
||||||
}
|
|
||||||
} else {
|
|
||||||
notifications.error("No device ID available");
|
|
||||||
}
|
}
|
||||||
}}
|
} else {
|
||||||
/>
|
notifications.error("No device ID available");
|
||||||
</div>
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<div className="h-[1px] w-full bg-slate-800/10 dark:bg-slate-300/20"/>
|
<div className="h-[1px] w-full bg-slate-800/10 dark:bg-slate-300/20"/>
|
||||||
{isOnDevice ? (
|
{isOnDevice ? (
|
||||||
<>
|
<>
|
||||||
<div className="pb-2 space-y-4">
|
<div className="pb-2 space-y-4">
|
||||||
<SectionHeader
|
<SectionHeader
|
||||||
title="Local Access"
|
title="Local Access"
|
||||||
description="Manage the mode of local access to the device"
|
description="Manage the mode of local access to the device"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
<SettingsItem
|
<SettingsItem
|
||||||
title="Authentication Mode"
|
title="Authentication Mode"
|
||||||
description={`Current mode: ${localDevice?.authMode === "password" ? "Password protected" : "No password"}`}
|
description={`Current mode: ${localDevice?.authMode === "password" ? "Password protected" : "No password"}`}
|
||||||
>
|
>
|
||||||
{localDevice?.authMode === "password" ? (
|
{localDevice?.authMode === "password" ? (
|
||||||
<Button
|
<Button
|
||||||
size="SM"
|
size="SM"
|
||||||
theme="light"
|
theme="light"
|
||||||
text="Disable Protection"
|
text="Disable Protection"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setLocalAuthModalView("deletePassword");
|
setLocalAuthModalView("deletePassword");
|
||||||
setIsLocalAuthDialogOpen(true);
|
setIsLocalAuthDialogOpen(true);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<Button
|
<Button
|
||||||
size="SM"
|
size="SM"
|
||||||
theme="light"
|
theme="light"
|
||||||
text="Enable Password"
|
text="Enable Password"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setLocalAuthModalView("createPassword");
|
setLocalAuthModalView("createPassword");
|
||||||
setIsLocalAuthDialogOpen(true);
|
setIsLocalAuthDialogOpen(true);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
|
||||||
</SettingsItem>
|
|
||||||
|
|
||||||
{localDevice?.authMode === "password" && (
|
|
||||||
<SettingsItem
|
|
||||||
title="Change Password"
|
|
||||||
description="Update your device access password"
|
|
||||||
>
|
|
||||||
<Button
|
|
||||||
size="SM"
|
|
||||||
theme="light"
|
|
||||||
text="Change Password"
|
|
||||||
onClick={() => {
|
|
||||||
setLocalAuthModalView("updatePassword");
|
|
||||||
setIsLocalAuthDialogOpen(true);
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</SettingsItem>
|
|
||||||
)}
|
)}
|
||||||
</div>
|
</SettingsItem>
|
||||||
|
|
||||||
|
{localDevice?.authMode === "password" && (
|
||||||
|
<SettingsItem
|
||||||
|
title="Change Password"
|
||||||
|
description="Update your device access password"
|
||||||
|
>
|
||||||
|
<Button
|
||||||
|
size="SM"
|
||||||
|
theme="light"
|
||||||
|
text="Change Password"
|
||||||
|
onClick={() => {
|
||||||
|
setLocalAuthModalView("updatePassword");
|
||||||
|
setIsLocalAuthDialogOpen(true);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</SettingsItem>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="h-[1px] w-full bg-slate-800/10 dark:bg-slate-300/20"/>
|
</div>
|
||||||
</>
|
<div className="h-[1px] w-full bg-slate-800/10 dark:bg-slate-300/20"/>
|
||||||
|
</>
|
||||||
) : null}
|
) : null}
|
||||||
<div className="pb-2 space-y-4">
|
<div className="pb-2 space-y-4">
|
||||||
<SectionHeader
|
<SectionHeader
|
||||||
|
|
Loading…
Reference in New Issue