Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve transactions page #343

Merged
merged 1 commit into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading