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;
|
return;
|
||||||
}
|
}
|
||||||
setDeviceName(deviceName);
|
setDeviceName(deviceName);
|
||||||
|
document.title = deviceName;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -356,8 +357,9 @@ export default function SettingsSidebar() {
|
||||||
|
|
||||||
send("getDeviceName", {}, resp => {
|
send("getDeviceName", {}, resp => {
|
||||||
if ("error" in resp) return;
|
if ("error" in resp) return;
|
||||||
const result = resp.result as { deviceName: string };
|
const deviceName = resp.result as string;
|
||||||
setDeviceName(result.deviceName);
|
setDeviceName(deviceName);
|
||||||
|
document.title = deviceName;
|
||||||
});
|
});
|
||||||
|
|
||||||
send("getDevModeState", {}, resp => {
|
send("getDevModeState", {}, resp => {
|
||||||
|
@ -857,7 +859,7 @@ export default function SettingsSidebar() {
|
||||||
<SettingsItem title="Device Name" description="Set your device name">
|
<SettingsItem title="Device Name" description="Set your device name">
|
||||||
<InputFieldWithLabel
|
<InputFieldWithLabel
|
||||||
required
|
required
|
||||||
label="Device Name"
|
label=""
|
||||||
placeholder="Enter Device Name"
|
placeholder="Enter Device Name"
|
||||||
defaultValue={settings.deviceName}
|
defaultValue={settings.deviceName}
|
||||||
onChange={e => handleDeviceNameChange(e.target.value)}
|
onChange={e => handleDeviceNameChange(e.target.value)}
|
||||||
|
|
Loading…
Reference in New Issue