Skip to content

Commit

Permalink
fix: improve transactions page (#343)
Browse files Browse the repository at this point in the history
  • Loading branch information
JackHamer09 committed Oct 23, 2023
1 parent 54280c2 commit 1ed930a
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/assets/style/pages/_transactions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,26 @@
}

@media (max-width: $mobile) {
.transactionsButtonGroup {
gap: 5px;

.button {
display: inline-flex !important;
align-items: center;
margin: 0 !important;
padding: 0 15px 0 10px !important;
line-height: 100% !important;
min-width: fit-content !important;
min-height: 40px !important;

svg {
top: initial !important;
max-width: 12px !important;
width: auto !important;
height: auto !important;
}
}
}
.transactionsTile {
display: flex;
flex-direction: column;
Expand Down
37 changes: 37 additions & 0 deletions src/blocks/Transactions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,30 @@
<block-modals-account-activation />
<div class="tileBlock transactionsTile">
<div class="tileHeadline h3">Transactions</div>
<div class="_display-flex _justify-content-space-between transactionsButtonGroup _margin-bottom-1">
<i-button
block
class="_margin-y-0 _margin-right-1 _padding-right-2"
data-cy="account_deposit_button"
size="md"
:href="accountZkScanUrl"
target="_blank"
variant="secondary"
>
<v-icon class="planeIcon" name="ri-external-link-line" />&nbsp;View in Explorer
</i-button>
<i-button
block
class="_margin-y-0 _padding-right-1 _margin-right-1"
data-cy="account_send_zksync_button"
size="md"
:href="exportLink"
target="_blank"
variant="secondary"
>
<v-icon class="planeIcon" name="ri-file-line" />&nbsp;Export
</i-button>
</div>
<div class="transactionsListContainer genericListContainer">
<div v-if="loadingStatus === 'main'" class="nothingFound">
<loader class="_display-block" />
Expand Down Expand Up @@ -58,6 +82,19 @@ export default Vue.extend({
transactionHistoryAllLoaded(): boolean {
return this.$store.getters["zk-history/transactionHistoryAllLoaded"];
},
accountAddress(): string {
return this.$store.getters["zk-account/address"];
},
accountZkScanUrl(): string {
console.log(this.$store.getters["zk-onboard/config"]);
return (this.$store.getters["zk-onboard/config"].zkSyncNetwork.explorer +
"explorer/accounts/" +
this.accountAddress) as string;
},
exportLink(): string {
const network = this.$store.getters["zk-onboard/config"].ethereumNetwork.name;
return `https://zkexport-lite.netlify.app/export/account/transactions?address=${this.accountAddress}&network=${network}`;
},
},
async mounted() {
if (!this.transactionHistoryRequested) {
Expand Down

0 comments on commit 1ed930a

Please sign in to comment.