Skip to content

Commit

Permalink
リファクタリング
Browse files Browse the repository at this point in the history
  • Loading branch information
takusea committed Nov 8, 2024
1 parent dd0e3c9 commit cb71428
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/components/Dialog/HotkeySettingDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,11 @@ const lastRecord = ref(HotkeyCombination(""));
const recordCombination = (event: KeyboardEvent) => {
if (!isHotkeyDialogOpened.value) {
return;
} else {
const recordedCombo = eventToCombination(event);
lastRecord.value = recordedCombo;
event.preventDefault();
}
const recordedCombo = eventToCombination(event);
lastRecord.value = recordedCombo;
event.preventDefault();
};
// FIXME: HotkeyRecordingDialog内に移動する
Expand Down Expand Up @@ -215,13 +215,7 @@ const getHotkeyText = (action: string, combo: string) => {
const readonlyHotkeyKeys: string[] = [];
const checkHotkeyReadonly = (action: string) => {
let flag = false;
readonlyHotkeyKeys.forEach((key) => {
if (key == action) {
flag = true;
}
});
return flag;
return readonlyHotkeyKeys.includes(action);
};
const openHotkeyDialog = (action: string) => {
Expand Down

0 comments on commit cb71428

Please sign in to comment.