From b51b1d54fdb7ebae1129c08f2d0c8cc2f22b162e Mon Sep 17 00:00:00 2001 From: Bartosz Date: Tue, 5 Nov 2024 11:19:18 +0100 Subject: [PATCH] feat: permission manager form as modal --- src/constants/common.ts | 1 + src/popup/components/FixedScreenFooter.vue | 1 + src/popup/components/Header.vue | 2 - .../components/Modals/PermissionManager.vue | 335 +++++++++++++++++ src/popup/pages/PermissionManager.vue | 338 ------------------ src/popup/pages/PermissionsSettings.vue | 17 +- src/popup/router/modals.ts | 9 +- src/popup/router/routeNames.ts | 2 - src/popup/router/routes.ts | 22 -- 9 files changed, 355 insertions(+), 372 deletions(-) create mode 100644 src/popup/components/Modals/PermissionManager.vue delete mode 100644 src/popup/pages/PermissionManager.vue diff --git a/src/constants/common.ts b/src/constants/common.ts index f19689e8c..a1dd9c332 100644 --- a/src/constants/common.ts +++ b/src/constants/common.ts @@ -337,6 +337,7 @@ export const MODAL_MULTISIG_VAULT_CREATE = 'multisig-vault-create'; export const MODAL_NETWORK_SWITCHER = 'network-switcher'; export const MODAL_PAYLOAD_FORM = 'payload-form'; export const MODAL_PROTOCOL_SELECT = 'protocol-select'; +export const MODAL_PERMISSION_MANAGER = 'permission-manager'; export const MODAL_SCAN_QR = 'scan-qr'; export const MODAL_RECIPIENT_HELPER = 'recipient-helper'; export const MODAL_RECIPIENT_INFO = 'recipient-info'; diff --git a/src/popup/components/FixedScreenFooter.vue b/src/popup/components/FixedScreenFooter.vue index f087f5887..39ab74749 100644 --- a/src/popup/components/FixedScreenFooter.vue +++ b/src/popup/components/FixedScreenFooter.vue @@ -29,6 +29,7 @@ export default defineComponent({ bottom: 0; margin: auto 0 0; // Moves the footer to the bottom of the container display: flex; + flex-wrap: wrap; justify-content: center; gap: 8px; padding: var(--screen-padding-x); diff --git a/src/popup/components/Header.vue b/src/popup/components/Header.vue index 981bcad7a..21c999fe8 100644 --- a/src/popup/components/Header.vue +++ b/src/popup/components/Header.vue @@ -165,8 +165,6 @@ export default defineComponent({ more: () => t('pages.titles.more'), networks: () => t('pages.titles.networks'), permissionsSettings: () => t('pages.titles.permissionsSettings'), - permissionsEdit: () => t('pages.titles.permissionsEdit'), - permissionsAdd: () => t('pages.titles.permissionsAdd'), commentNew: () => t('pages.titles.commentNew'), donateError: () => t('pages.titles.donateError'), address: () => t('pages.titles.address'), diff --git a/src/popup/components/Modals/PermissionManager.vue b/src/popup/components/Modals/PermissionManager.vue new file mode 100644 index 000000000..6e869b364 --- /dev/null +++ b/src/popup/components/Modals/PermissionManager.vue @@ -0,0 +1,335 @@ + + + + + diff --git a/src/popup/pages/PermissionManager.vue b/src/popup/pages/PermissionManager.vue deleted file mode 100644 index c7ff17323..000000000 --- a/src/popup/pages/PermissionManager.vue +++ /dev/null @@ -1,338 +0,0 @@ - - - - - diff --git a/src/popup/pages/PermissionsSettings.vue b/src/popup/pages/PermissionsSettings.vue index 3cc6feca2..33e5fc6de 100644 --- a/src/popup/pages/PermissionsSettings.vue +++ b/src/popup/pages/PermissionsSettings.vue @@ -15,9 +15,9 @@ @@ -25,8 +25,8 @@ extend variant="muted" :text="$t('pages.permissions.add')" - :to="{ name: ROUTE_PERMISSIONS_ADD }" :icon="PlusIcon" + @click="manage()" /> @@ -36,8 +36,9 @@