fix(user-config): Validate device, keymap, and macro names (#543)
* fix(user-config): Validate device, keymap, and macro names * fix device name renaming
This commit is contained in:
committed by
László Monda
parent
13f064229f
commit
bbce1e0e0f
@@ -118,7 +118,11 @@ export class SideMenuComponent implements AfterContentInit, OnDestroy {
|
||||
this.store.dispatch(MacroActions.addMacro());
|
||||
}
|
||||
|
||||
editDeviceName(name): void {
|
||||
editDeviceName(name: string): void {
|
||||
if (!util.isValidName(name) || name.trim() === this.deviceNameValue) {
|
||||
this.setDeviceName();
|
||||
return;
|
||||
}
|
||||
this.store.dispatch(new RenameUserConfigurationAction(name));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user