From 66b39c4f5defed3b8762b2e71cc6a513d4eb3cfc Mon Sep 17 00:00:00 2001 From: Jack Hamer Date: Tue, 19 Dec 2023 21:11:12 +0200 Subject: [PATCH] feat: lot more things --- assets/css/_mixins.scss | 7 + assets/css/style.scss | 12 +- components/address/AddressAvatar.vue | 2 +- components/animations/ProgressBlocks.vue | 23 -- components/common/Alert.vue | 6 +- components/common/AmountInput.vue | 330 ------------------ components/common/ContentBlock.vue | 4 +- components/common/ContentLoader.vue | 2 +- components/common/InfoContent.vue | 4 +- components/common/LabelButton.vue | 28 -- components/common/Modal.vue | 59 +++- components/common/QrCodeStyled.vue | 2 +- components/common/button/Button.vue | 9 +- components/common/button/Label.vue | 46 +++ components/common/button/Line.vue | 4 +- components/common/button/LineBodyInfo.vue | 2 +- components/common/input/InputLine.vue | 5 +- .../common/input/TransactionAddress.vue | 12 +- components/common/input/TransactionAmount.vue | 35 +- components/destination/DestinationItem.vue | 8 +- components/destination/IconContainer.vue | 2 +- components/header/AccountDropdown.vue | 2 +- components/header/NetworkDropdown.vue | 2 +- components/modal/contacts/AddContact.vue | 115 ------ components/modal/contacts/Contact.vue | 66 ---- .../modal/transaction/AllowanceInfo.vue | 22 ++ .../modal/zksync/lite/AccountActivation.vue | 19 - .../modal/zksync/lite/WalletAuthorization.vue | 21 -- components/token/TokenImage.vue | 6 +- components/token/TokenLine.vue | 5 +- components/transaction/Header.vue | 69 ---- .../transaction/TransactionItemIcon.vue | 31 -- .../transaction/TransactionProgress.vue | 168 +++++++++ .../lineItem/TransactionLineItem.vue | 19 +- components/transaction/summary/TokenEntry.vue | 4 +- composables/transaction/useAllowance.ts | 78 ++++- nuxt.config.ts | 10 + package-lock.json | 66 +--- package.json | 1 - pages/index.vue | 2 +- pages/send-methods.vue | 6 +- tailwind.config.js | 80 ++--- views/zksync/era/transactions/Deposit.vue | 146 +++++--- views/zksync/era/transactions/Transfer.vue | 79 ++--- 44 files changed, 576 insertions(+), 1043 deletions(-) create mode 100644 assets/css/_mixins.scss delete mode 100644 components/animations/ProgressBlocks.vue delete mode 100644 components/common/AmountInput.vue delete mode 100644 components/common/LabelButton.vue create mode 100644 components/common/button/Label.vue delete mode 100644 components/modal/contacts/AddContact.vue delete mode 100644 components/modal/contacts/Contact.vue create mode 100644 components/modal/transaction/AllowanceInfo.vue delete mode 100644 components/modal/zksync/lite/AccountActivation.vue delete mode 100644 components/modal/zksync/lite/WalletAuthorization.vue delete mode 100644 components/transaction/Header.vue delete mode 100644 components/transaction/TransactionItemIcon.vue create mode 100644 components/transaction/TransactionProgress.vue diff --git a/assets/css/_mixins.scss b/assets/css/_mixins.scss new file mode 100644 index 000000000..a9f760f91 --- /dev/null +++ b/assets/css/_mixins.scss @@ -0,0 +1,7 @@ +@mixin interactiveStyles { + &:enabled, + &[interactive="true"]:not([aria-disabled="true"]), + &:is(a, label):not([aria-disabled="true"]) { + @content; + } +} \ No newline at end of file diff --git a/assets/css/style.scss b/assets/css/style.scss index 491f6859c..7e0effabc 100644 --- a/assets/css/style.scss +++ b/assets/css/style.scss @@ -3,19 +3,9 @@ html.dark { } html, body { - @apply min-h-full w-full bg-gray font-sans antialiased dark:bg-black dark:text-white; + @apply min-h-full text-neutral-950 w-full bg-neutral-50 font-sans antialiased dark:bg-black dark:text-white; -webkit-text-size-adjust: 100%; - .link { - @apply font-medium text-primary-400 transition-colors dark:text-primary-200; - &:enabled, - &:is(a) { - &:not([aria-disabled="true"]) { - @apply hover:text-primary-300; - } - } - } - .tippy-box { @apply rounded-lg text-sm; &[data-theme~="light"] { diff --git a/components/address/AddressAvatar.vue b/components/address/AddressAvatar.vue index 6a862cf89..8bb779020 100644 --- a/components/address/AddressAvatar.vue +++ b/components/address/AddressAvatar.vue @@ -26,7 +26,7 @@ defineProps({ @apply h-full w-full; } .address-avatar-icon { - @apply absolute -bottom-1 -right-1 aspect-square h-[60%] w-[60%] rounded-full bg-white bg-opacity-90 shadow backdrop-blur-sm; + @apply absolute -bottom-1 -right-1 aspect-square h-[60%] w-[60%] rounded-full bg-neutral-100 bg-opacity-90 shadow backdrop-blur-sm; img, svg { diff --git a/components/animations/ProgressBlocks.vue b/components/animations/ProgressBlocks.vue deleted file mode 100644 index 66715464d..000000000 --- a/components/animations/ProgressBlocks.vue +++ /dev/null @@ -1,23 +0,0 @@ - - - - - diff --git a/components/common/Alert.vue b/components/common/Alert.vue index dfa960429..e1e8f1b9e 100644 --- a/components/common/Alert.vue +++ b/components/common/Alert.vue @@ -40,15 +40,15 @@ defineProps({ } &.variant- { &info { - @apply border bg-primary-100 text-primary-700; - @apply dark:border-primary-200/50 dark:bg-primary-200/10 dark:text-white; + @apply border bg-primary-300 text-primary-700; + @apply dark:border-primary-300/50 dark:bg-primary-300/10 dark:text-white; .alert-icon { @apply dark:text-primary-300; } .alert-body { .alert-link { - @apply hover:text-primary-600 dark:hover:text-primary-200; + @apply hover:text-primary-400 dark:hover:text-primary-300; } } } diff --git a/components/common/AmountInput.vue b/components/common/AmountInput.vue deleted file mode 100644 index 6656ec373..000000000 --- a/components/common/AmountInput.vue +++ /dev/null @@ -1,330 +0,0 @@ - - - - - diff --git a/components/common/ContentBlock.vue b/components/common/ContentBlock.vue index da1bd19bf..6a3242eac 100644 --- a/components/common/ContentBlock.vue +++ b/components/common/ContentBlock.vue @@ -10,13 +10,13 @@ import type { Component, PropType } from "vue"; defineProps({ as: { type: [String, Object] as PropType, - default: "label", + default: "div", }, }); diff --git a/components/common/ContentLoader.vue b/components/common/ContentLoader.vue index a9276c66d..b084f1011 100644 --- a/components/common/ContentLoader.vue +++ b/components/common/ContentLoader.vue @@ -22,6 +22,6 @@ defineProps({ diff --git a/components/common/InfoContent.vue b/components/common/InfoContent.vue index cc6cdbdcb..798a20dad 100644 --- a/components/common/InfoContent.vue +++ b/components/common/InfoContent.vue @@ -48,7 +48,7 @@ const { copy, copied } = useCopy(content); } } .info-content { - @apply w-full rounded-xl bg-white p-3 dark:bg-neutral-900; + @apply w-full rounded-xl bg-neutral-100 p-3 dark:bg-neutral-900; .info-content-inner { @apply flex justify-between; @@ -57,7 +57,7 @@ const { copy, copied } = useCopy(content); @apply text-sm text-gray-secondary dark:text-neutral-400; } .info-content-copy-button { - @apply text-sm font-medium text-primary-400 dark:text-primary-500; + @apply text-sm font-medium text-primary-400; } } } diff --git a/components/common/LabelButton.vue b/components/common/LabelButton.vue deleted file mode 100644 index f8d1e5a40..000000000 --- a/components/common/LabelButton.vue +++ /dev/null @@ -1,28 +0,0 @@ - - - - - diff --git a/components/common/Modal.vue b/components/common/Modal.vue index 55e81e003..2f7004a7e 100644 --- a/components/common/Modal.vue +++ b/components/common/Modal.vue @@ -1,6 +1,6 @@ diff --git a/components/transaction/Header.vue b/components/transaction/Header.vue deleted file mode 100644 index 6fc4e9926..000000000 --- a/components/transaction/Header.vue +++ /dev/null @@ -1,69 +0,0 @@ - - - - - diff --git a/components/transaction/TransactionItemIcon.vue b/components/transaction/TransactionItemIcon.vue deleted file mode 100644 index b4d1ebff8..000000000 --- a/components/transaction/TransactionItemIcon.vue +++ /dev/null @@ -1,31 +0,0 @@ - - - - - diff --git a/components/transaction/TransactionProgress.vue b/components/transaction/TransactionProgress.vue new file mode 100644 index 000000000..4d090ef7b --- /dev/null +++ b/components/transaction/TransactionProgress.vue @@ -0,0 +1,168 @@ + + + + + diff --git a/components/transaction/lineItem/TransactionLineItem.vue b/components/transaction/lineItem/TransactionLineItem.vue index b9fcab180..a7148886d 100644 --- a/components/transaction/lineItem/TransactionLineItem.vue +++ b/components/transaction/lineItem/TransactionLineItem.vue @@ -8,10 +8,10 @@ @click="!transactionUrl && copy()" >