From 944c5cf47a72008f4bd1ff9c07c6aea6719041e4 Mon Sep 17 00:00:00 2001 From: jlpereira Date: Thu, 30 May 2024 19:51:32 -0300 Subject: [PATCH] Code refactor, replace v-hotkey plugin --- .../new_extract/components/Navbar.vue | 2 +- .../components/saveCombination.vue | 173 +++---- .../nomenclature/new_combination/main.js | 3 +- .../tasks/nomenclature/new_taxon_name/app.vue | 432 +++++++----------- .../components/basicInformation.vue | 3 - .../new_taxon_name/components/cloneTaxon.vue | 220 +++++---- .../components/createNewButton.vue | 136 +++--- .../new_taxon_name/components/navHeader.vue | 104 ++--- .../components/saveTaxonName.vue | 87 ++-- .../components/taxonNameBox.vue | 188 +++----- .../new_taxon_name/const/components.js | 121 +++++ 11 files changed, 691 insertions(+), 778 deletions(-) create mode 100644 app/javascript/vue/tasks/nomenclature/new_taxon_name/const/components.js diff --git a/app/javascript/vue/tasks/extracts/new_extract/components/Navbar.vue b/app/javascript/vue/tasks/extracts/new_extract/components/Navbar.vue index 8905668594..f0d8fc4e77 100644 --- a/app/javascript/vue/tasks/extracts/new_extract/components/Navbar.vue +++ b/app/javascript/vue/tasks/extracts/new_extract/components/Navbar.vue @@ -1,5 +1,5 @@ - diff --git a/app/javascript/vue/tasks/nomenclature/new_combination/main.js b/app/javascript/vue/tasks/nomenclature/new_combination/main.js index 789b94b0f5..1b85be802a 100644 --- a/app/javascript/vue/tasks/nomenclature/new_combination/main.js +++ b/app/javascript/vue/tasks/nomenclature/new_combination/main.js @@ -1,12 +1,11 @@ import { createApp } from 'vue' import HelpSystem from '@/plugins/help/help' import en from './lang/help/en' -import hotkey from '@/plugins/v-hotkey' import App from './app.vue' function init() { const app = createApp(App) - app.directive('hotkey', hotkey) + app.use(HelpSystem, { languages: { en: en diff --git a/app/javascript/vue/tasks/nomenclature/new_taxon_name/app.vue b/app/javascript/vue/tasks/nomenclature/new_taxon_name/app.vue index e57590b4b7..1d1e81d6fe 100644 --- a/app/javascript/vue/tasks/nomenclature/new_taxon_name/app.vue +++ b/app/javascript/vue/tasks/nomenclature/new_taxon_name/app.vue @@ -1,10 +1,7 @@ - +