From 79b485f3304b17450c2dc7493efc58a462cdce7e Mon Sep 17 00:00:00 2001 From: Uladzislau_Kutarkin Date: Tue, 24 Dec 2024 12:04:03 +0400 Subject: [PATCH 1/2] UIU-3026: Remove duplicates from the keyboard shortcut modal --- CHANGELOG.md | 1 + src/commands.js | 4 ++++ src/index.js | 3 +-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 977217ac5..ec304dc1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * `useUserTenantRoles` supplies `tenantId` in all its queries. Refs UIU-3279. * Leverage API supported sorting of columns on pre-registrations records list. Refs UIU-3249. * Fix issue with `Proxy borrower` field value. Refs UIU-3290. +* Remove duplicates from the keyboard shortcut modal. Refs UIU-3026. ## [11.0.9](https://github.com/folio-org/ui-users/tree/v11.0.9) (2024-12-13) [Full Changelog](https://github.com/folio-org/ui-users/compare/v11.0.8...v11.0.9) diff --git a/src/commands.js b/src/commands.js index b293c76f7..7230bcb03 100644 --- a/src/commands.js +++ b/src/commands.js @@ -36,6 +36,10 @@ const commands = [ name: 'openShortcutModal', label: (), shortcut: 'mod+alt+k', + }, + { + label: (), + shortcut: 'spacebar' } ]; diff --git a/src/index.js b/src/index.js index e7e9e0294..cb06529de 100644 --- a/src/index.js +++ b/src/index.js @@ -17,7 +17,6 @@ import * as Routes from './routes'; import pkg from '../package'; import commands from './commands'; -import commandsGeneral from './commandsGeneral'; import Settings from './settings'; import sections from './settings/sections'; import { @@ -241,7 +240,7 @@ class UsersRouting extends React.Component { { this.changeKeyboardShortcutsModal(false); }} - allCommands={commands.concat(commandsGeneral)} + allCommands={commands} /> )} From bab55fabca787d8a2bc1e6ba3877dd743295a307 Mon Sep 17 00:00:00 2001 From: Uladzislau_Kutarkin Date: Tue, 24 Dec 2024 12:04:28 +0400 Subject: [PATCH 2/2] UIU-3026: Remove duplicates from the keyboard shortcut modal --- src/commandsGeneral.js | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 src/commandsGeneral.js diff --git a/src/commandsGeneral.js b/src/commandsGeneral.js deleted file mode 100644 index 20d0655bc..000000000 --- a/src/commandsGeneral.js +++ /dev/null @@ -1,31 +0,0 @@ -import React from 'react'; -import { FormattedMessage } from 'react-intl'; - -const commandsGeneral = [ - { - label: (), - shortcut: 'spacebar' - }, - { - label: (), - shortcut: 'esc' - }, - { - label: (), - shortcut: 'mod+c' - }, - { - label: (), - shortcut: 'mod+x' - }, - { - label: (), - shortcut: 'mod+v' - }, - { - label: (), - shortcut: 'mod+f' - } -]; - -export default commandsGeneral;