From e10917a02b02c94e10be6d5a1c52a3d44c8ea596 Mon Sep 17 00:00:00 2001 From: lukicenturi Date: Mon, 28 Aug 2023 13:18:48 +0700 Subject: [PATCH] feat: revamp profile pages --- components/account/CountrySelect.vue | 293 ++---------------- components/account/home/AccountAddress.vue | 192 ++++++++++++ components/account/home/AccountDetails.vue | 137 +++++++- .../account/home/AccountInformation.vue | 280 +++++++---------- components/account/home/AccountOverview.vue | 49 --- components/account/home/ApiKeys.vue | 109 +++---- .../account/home/CancelSubscription.vue | 213 ++++++------- components/account/home/ChangePassword.vue | 195 ++++++------ components/account/home/DangerZone.vue | 155 ++++----- components/account/home/ErrorNotification.vue | 41 --- .../account/home/FloatingNotification.vue | 34 ++ components/account/home/PaymentsTable.vue | 125 ++++---- .../account/home/PremiumPlaceholder.vue | 67 ++-- components/account/home/SubscriptionTable.vue | 209 +++++-------- components/account/signup/SignupAddress.vue | 37 +-- components/checkout/pay/PaypalPayment.vue | 8 +- components/common/ButtonLink.vue | 5 +- components/common/CopyButton.vue | 50 +-- components/common/DataTable.vue | 77 ----- components/common/NotificationMessage.vue | 25 -- components/download/DownloadButton.vue | 2 +- components/icons/CheckMarkIcon.vue | 12 - components/icons/CopyIcon.vue | 12 - components/icons/ErrorIcon.vue | 20 -- components/plans/details/FreePlan.vue | 2 +- layouts/account.vue | 109 +++++++ locales/en.json | 114 ++++++- modules/ui-library/runtime/plugin.ts | 12 + nuxt.config.ts | 1 + package.json | 2 +- pages/home.vue | 31 -- pages/home/account-details.vue | 14 + pages/home/address.vue | 10 + pages/home/customer-information.vue | 10 + pages/home/subscription.vue | 32 ++ plugins/redirect.ts | 7 + pnpm-lock.yaml | 16 +- store/index.ts | 9 + tailwind.config.cjs | 2 + types/common.ts | 7 - 40 files changed, 1338 insertions(+), 1387 deletions(-) create mode 100644 components/account/home/AccountAddress.vue delete mode 100644 components/account/home/AccountOverview.vue delete mode 100644 components/account/home/ErrorNotification.vue create mode 100644 components/account/home/FloatingNotification.vue delete mode 100644 components/common/DataTable.vue delete mode 100644 components/common/NotificationMessage.vue delete mode 100644 components/icons/CheckMarkIcon.vue delete mode 100644 components/icons/CopyIcon.vue delete mode 100644 components/icons/ErrorIcon.vue create mode 100644 layouts/account.vue delete mode 100644 pages/home.vue create mode 100644 pages/home/account-details.vue create mode 100644 pages/home/address.vue create mode 100644 pages/home/customer-information.vue create mode 100644 pages/home/subscription.vue diff --git a/components/account/CountrySelect.vue b/components/account/CountrySelect.vue index 05394312..3fe49bca 100644 --- a/components/account/CountrySelect.vue +++ b/components/account/CountrySelect.vue @@ -1,291 +1,52 @@ - - diff --git a/components/account/home/AccountAddress.vue b/components/account/home/AccountAddress.vue new file mode 100644 index 00000000..99458eb1 --- /dev/null +++ b/components/account/home/AccountAddress.vue @@ -0,0 +1,192 @@ + + + diff --git a/components/account/home/AccountDetails.vue b/components/account/home/AccountDetails.vue index c9513df7..fdeed67a 100644 --- a/components/account/home/AccountDetails.vue +++ b/components/account/home/AccountDetails.vue @@ -1,6 +1,139 @@ + + diff --git a/components/account/home/AccountInformation.vue b/components/account/home/AccountInformation.vue index b86bcca4..8f00c000 100644 --- a/components/account/home/AccountInformation.vue +++ b/components/account/home/AccountInformation.vue @@ -1,22 +1,16 @@ - - diff --git a/components/account/home/AccountOverview.vue b/components/account/home/AccountOverview.vue deleted file mode 100644 index 585e4b23..00000000 --- a/components/account/home/AccountOverview.vue +++ /dev/null @@ -1,49 +0,0 @@ - - - - - diff --git a/components/account/home/ApiKeys.vue b/components/account/home/ApiKeys.vue index a816fcf3..2d3b543a 100644 --- a/components/account/home/ApiKeys.vue +++ b/components/account/home/ApiKeys.vue @@ -8,84 +8,55 @@ const { account } = storeToRefs(store); const apiKey = computed(() => account.value?.apiKey ?? ''); const apiSecret = computed(() => account.value?.apiSecret ?? ''); const hasApiKeys = computed(() => apiKey.value && apiSecret.value); -const showKey = ref(false); -const showSecret = ref(false); const regenerateKeys = async () => await store.updateKeys(); -const css = useCssModule(); +const { t } = useI18n(); - - diff --git a/components/account/home/CancelSubscription.vue b/components/account/home/CancelSubscription.vue index cf4c42f6..fc428c79 100644 --- a/components/account/home/CancelSubscription.vue +++ b/components/account/home/CancelSubscription.vue @@ -1,4 +1,6 @@ - - diff --git a/components/account/home/ChangePassword.vue b/components/account/home/ChangePassword.vue index 80d0bfb8..69ed3f4e 100644 --- a/components/account/home/ChangePassword.vue +++ b/components/account/home/ChangePassword.vue @@ -1,7 +1,7 @@ - - diff --git a/components/account/home/DangerZone.vue b/components/account/home/DangerZone.vue index 0728c334..63d3dd25 100644 --- a/components/account/home/DangerZone.vue +++ b/components/account/home/DangerZone.vue @@ -1,5 +1,6 @@ - - diff --git a/components/account/home/ErrorNotification.vue b/components/account/home/ErrorNotification.vue deleted file mode 100644 index f3c7564d..00000000 --- a/components/account/home/ErrorNotification.vue +++ /dev/null @@ -1,41 +0,0 @@ - - - - - diff --git a/components/account/home/FloatingNotification.vue b/components/account/home/FloatingNotification.vue new file mode 100644 index 00000000..d1947006 --- /dev/null +++ b/components/account/home/FloatingNotification.vue @@ -0,0 +1,34 @@ + + + diff --git a/components/account/home/PaymentsTable.vue b/components/account/home/PaymentsTable.vue index 10b61ea4..25b146fe 100644 --- a/components/account/home/PaymentsTable.vue +++ b/components/account/home/PaymentsTable.vue @@ -1,15 +1,36 @@ - - diff --git a/components/account/home/PremiumPlaceholder.vue b/components/account/home/PremiumPlaceholder.vue index e78dce67..cea8b3d1 100644 --- a/components/account/home/PremiumPlaceholder.vue +++ b/components/account/home/PremiumPlaceholder.vue @@ -1,42 +1,39 @@ - - diff --git a/components/account/home/SubscriptionTable.vue b/components/account/home/SubscriptionTable.vue index b88b6796..1fb3dc9d 100644 --- a/components/account/home/SubscriptionTable.vue +++ b/components/account/home/SubscriptionTable.vue @@ -1,30 +1,48 @@ diff --git a/components/icons/CheckMarkIcon.vue b/components/icons/CheckMarkIcon.vue deleted file mode 100644 index 09c14209..00000000 --- a/components/icons/CheckMarkIcon.vue +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/components/icons/CopyIcon.vue b/components/icons/CopyIcon.vue deleted file mode 100644 index 77d778ee..00000000 --- a/components/icons/CopyIcon.vue +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/components/icons/ErrorIcon.vue b/components/icons/ErrorIcon.vue deleted file mode 100644 index 49eb5506..00000000 --- a/components/icons/ErrorIcon.vue +++ /dev/null @@ -1,20 +0,0 @@ - - - - - diff --git a/components/plans/details/FreePlan.vue b/components/plans/details/FreePlan.vue index 2afbe749..d6be49ad 100644 --- a/components/plans/details/FreePlan.vue +++ b/components/plans/details/FreePlan.vue @@ -4,7 +4,7 @@ const css = useCssModule();