mirror of https://github.com/jetkvm/kvm.git
added device name setting
device name appears on browser tab
This commit is contained in:
parent
86addd92c7
commit
84c8018ff9
|
@ -185,6 +185,7 @@ export default function SettingsSidebar() {
|
|||
return;
|
||||
}
|
||||
setDeviceName(deviceName);
|
||||
document.title = deviceName;
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -356,8 +357,9 @@ export default function SettingsSidebar() {
|
|||
|
||||
send("getDeviceName", {}, resp => {
|
||||
if ("error" in resp) return;
|
||||
const result = resp.result as { deviceName: string };
|
||||
setDeviceName(result.deviceName);
|
||||
const deviceName = resp.result as string;
|
||||
setDeviceName(deviceName);
|
||||
document.title = deviceName;
|
||||
});
|
||||
|
||||
send("getDevModeState", {}, resp => {
|
||||
|
@ -857,7 +859,7 @@ export default function SettingsSidebar() {
|
|||
<SettingsItem title="Device Name" description="Set your device name">
|
||||
<InputFieldWithLabel
|
||||
required
|
||||
label="Device Name"
|
||||
label=""
|
||||
placeholder="Enter Device Name"
|
||||
defaultValue={settings.deviceName}
|
||||
onChange={e => handleDeviceNameChange(e.target.value)}
|
||||
|
|
Loading…
Reference in New Issue