From 54d39d930de2ba3f5a2f921b87e0fc19fd6f3685 Mon Sep 17 00:00:00 2001 From: Svetoslav Borislavov Date: Wed, 4 Dec 2024 09:44:38 +0200 Subject: [PATCH] refactor: create composables for globally injected items (#1278) Signed-off-by: Svetoslav Borislavov --- .../GlobalAppProcesses/GlobalAppProcesses.vue | 19 ++-- front-end/src/renderer/components/Header.vue | 20 ++--- .../ImportExternalPrivateKeyModal.vue | 29 ++----- .../components/DecryptKeys.vue | 28 ++---- front-end/src/renderer/components/Menu.vue | 18 ---- .../Organization/AutoLoginInOrganization.vue | 25 ++---- .../Create/FileContents/FileContents.vue | 34 +++----- .../Transaction/TransactionGroupProcessor.vue | 42 +++------ .../BigFileOrganizationRequestHandler.vue | 50 ++++------- .../components/ConfirmTransactionHandler.vue | 43 +++------ .../renderer/components/UserModeSelect.vue | 30 ++----- .../src/renderer/composables/useLoader.ts | 37 ++++++++ .../composables/usePersonalPassword.ts | 54 ++++++++++++ .../composables/useSetDynamicLayout.ts | 2 + .../pages/AccountSetup/AccountSetup.vue | 10 +-- .../AccountSetup/components/KeyPairs.vue | 29 ++----- .../AccountSetup/components/NewPassword.vue | 34 +++----- .../src/renderer/pages/Accounts/Accounts.vue | 8 +- .../LinkExistingAccount.vue | 8 +- .../ConsensusService/ConsensusService.vue | 5 -- .../renderer/pages/ConsensusService/index.ts | 3 - .../pages/ContactList/ContactList.vue | 8 +- .../ContactList/SignUpUser/SignUpUser.vue | 8 +- .../CreateTransaction/CreateTransaction.vue | 8 +- .../CreateTransactionGroup.vue | 8 +- front-end/src/renderer/pages/Files/Files.vue | 8 +- .../pages/ForgotPassword/ForgotPassword.vue | 48 ---------- .../renderer/pages/ForgotPassword/index.ts | 3 - front-end/src/renderer/pages/Help/Help.vue | 5 -- front-end/src/renderer/pages/Help/index.ts | 3 - .../src/renderer/pages/Migrate/Migrate.vue | 8 +- .../OrganizationLogin/OrganizationLogin.vue | 66 ++++---------- .../renderer/pages/RestoreKey/RestoreKey.vue | 31 +++---- .../RestoreMissingKeys/RestoreMissingKeys.vue | 31 +++---- .../src/renderer/pages/Settings/Settings.vue | 8 +- .../GeneralTab/components/NetworkSettings.vue | 21 ++--- .../pages/Settings/components/KeysTab.vue | 26 ++---- .../pages/Settings/components/ProfileTab.vue | 36 +++----- .../pages/SmartContracts/SmartContracts.vue | 5 -- .../renderer/pages/SmartContracts/index.ts | 3 - .../src/renderer/pages/Tokens/Tokens.vue | 87 ------------------- front-end/src/renderer/pages/Tokens/index.ts | 3 - .../TransactionDetails/TransactionDetails.vue | 48 +++------- .../TransactionGroupDetails.vue | 42 +++------ .../pages/Transactions/Transactions.vue | 50 ++++------- .../renderer/pages/UserLogin/UserLogin.vue | 8 +- .../src/renderer/providers/dynamicLayout.ts | 16 ++++ front-end/src/renderer/router/index.ts | 10 --- front-end/src/renderer/router/meta.ts | 2 - front-end/src/renderer/utils/index.ts | 27 ------ 50 files changed, 358 insertions(+), 797 deletions(-) create mode 100644 front-end/src/renderer/composables/useLoader.ts create mode 100644 front-end/src/renderer/composables/usePersonalPassword.ts delete mode 100644 front-end/src/renderer/pages/ConsensusService/ConsensusService.vue delete mode 100644 front-end/src/renderer/pages/ConsensusService/index.ts delete mode 100644 front-end/src/renderer/pages/ForgotPassword/ForgotPassword.vue delete mode 100644 front-end/src/renderer/pages/ForgotPassword/index.ts delete mode 100644 front-end/src/renderer/pages/Help/Help.vue delete mode 100644 front-end/src/renderer/pages/Help/index.ts delete mode 100644 front-end/src/renderer/pages/SmartContracts/SmartContracts.vue delete mode 100644 front-end/src/renderer/pages/SmartContracts/index.ts delete mode 100644 front-end/src/renderer/pages/Tokens/Tokens.vue delete mode 100644 front-end/src/renderer/pages/Tokens/index.ts diff --git a/front-end/src/renderer/components/GlobalAppProcesses/GlobalAppProcesses.vue b/front-end/src/renderer/components/GlobalAppProcesses/GlobalAppProcesses.vue index 6b0de93c3..c40fbb484 100644 --- a/front-end/src/renderer/components/GlobalAppProcesses/GlobalAppProcesses.vue +++ b/front-end/src/renderer/components/GlobalAppProcesses/GlobalAppProcesses.vue @@ -1,23 +1,17 @@