feat: convert UdevRulesInfo to string enum (#921)
* feat: convert UdevRulesInfo to string enum For easier log reading better to use string enum. * fix typo
This commit is contained in:
committed by
László Monda
parent
3a1451a6a9
commit
f94b221ee9
@@ -3,14 +3,14 @@
|
|||||||
* Only on Linux need extra udev rules.
|
* Only on Linux need extra udev rules.
|
||||||
*/
|
*/
|
||||||
export enum UdevRulesInfo {
|
export enum UdevRulesInfo {
|
||||||
Unkonwn,
|
Unknown = 'Unknown',
|
||||||
Ok,
|
Ok = 'Ok',
|
||||||
/**
|
/**
|
||||||
* Udev rules not exists need to setup on Linux
|
* Udev rules not exists need to setup on Linux
|
||||||
*/
|
*/
|
||||||
NeedToSetup,
|
NeedToSetup = 'NeedToSetup',
|
||||||
/**
|
/**
|
||||||
* Udev rules exist but different than expected on Linux
|
* Udev rules exist but different than expected on Linux
|
||||||
*/
|
*/
|
||||||
Different
|
Different = 'Different'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export class UhkHidDevice {
|
|||||||
private _prevDevices = [];
|
private _prevDevices = [];
|
||||||
private _device: HID;
|
private _device: HID;
|
||||||
private _hasPermission = false;
|
private _hasPermission = false;
|
||||||
private _udevRulesInfo = UdevRulesInfo.Unkonwn;
|
private _udevRulesInfo = UdevRulesInfo.Unknown;
|
||||||
|
|
||||||
constructor(private logService: LogService,
|
constructor(private logService: LogService,
|
||||||
private options: CommandLineArgs,
|
private options: CommandLineArgs,
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export const initialState: State = {
|
|||||||
hasPermission: true,
|
hasPermission: true,
|
||||||
bootloaderActive: false,
|
bootloaderActive: false,
|
||||||
zeroInterfaceAvailable: true,
|
zeroInterfaceAvailable: true,
|
||||||
udevRuleInfo: UdevRulesInfo.Unkonwn,
|
udevRuleInfo: UdevRulesInfo.Unknown,
|
||||||
saveToKeyboard: initProgressButtonState,
|
saveToKeyboard: initProgressButtonState,
|
||||||
savingToKeyboard: false,
|
savingToKeyboard: false,
|
||||||
updatingFirmware: false,
|
updatingFirmware: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user