From bb70a4261a0da48f030c31651a1b3434cdcf3369 Mon Sep 17 00:00:00 2001 From: Abdelrhman Farag <85403429+aomafarag@users.noreply.github.com> Date: Mon, 5 Dec 2022 12:14:02 +0100 Subject: [PATCH] feat: Adjust table width (#549) --- .../auction/collateral/CollateralAuction.vue | 10 +++++----- .../CollateralAuctionBidTransactionTable.vue | 2 +- .../CollateralAuctionSwapTransactionTable.vue | 2 +- .../CollateralAuctionsTable.stories.js | 15 +++++++++++++++ .../collateral/CollateralAuctionsTable.vue | 9 +++++---- .../auction/collateral/TimeTillProfitable.vue | 2 +- frontend/components/auction/debt/DebtAuction.vue | 4 ++-- .../debt/DebtAuctionBidTransactionTable.vue | 2 +- .../auction/debt/DebtAuctionsTable.stories.js | 15 +++++++++++++++ .../auction/debt/DebtAuctionsTable.vue | 9 +++++---- .../auction/surplus/SurplusAuction.vue | 2 +- .../surplus/SurplusAuctionsTable.stories.js | 15 +++++++++++++++ .../auction/surplus/SurplusAuctionsTable.vue | 6 ++++-- .../common/formatters/TimeTill.stories.js | 14 ++++++++++++++ .../components/common/formatters/TimeTill.vue | 1 - .../components/panels/CollectAuctionPanel.vue | 2 +- frontend/components/vault/VaultsTable.stories.js | 15 +++++++++++++++ frontend/components/vault/VaultsTable.vue | 7 ++++--- frontend/helpers/tillDuration.ts | 16 +++++++++++++--- 19 files changed, 118 insertions(+), 30 deletions(-) diff --git a/frontend/components/auction/collateral/CollateralAuction.vue b/frontend/components/auction/collateral/CollateralAuction.vue index 3397b1df5..a69f24c73 100644 --- a/frontend/components/auction/collateral/CollateralAuction.vue +++ b/frontend/components/auction/collateral/CollateralAuction.vue @@ -21,7 +21,7 @@ Auction Ends - + @@ -77,7 +77,7 @@ Estimated Profitability Time - + @@ -89,7 +89,7 @@ /> Updating... - + @@ -281,7 +281,7 @@ import FormatCurrency from '~/components/common/formatters/FormatCurrency.vue'; import Loading from '~/components/common/other/Loading.vue'; import Explain from '~/components/common/other/Explain.vue'; import TimeTillProfitable from '~/components/auction/collateral/TimeTillProfitable.vue'; -import CollateralAuctionEventsBlock from '~/components/auction/collateral/CollateralAuctionEventsBlock'; +import CollateralAuctionEventsBlock from '~/components/auction/collateral/CollateralAuctionEventsBlock.vue'; import AuctionRestartPanel from '~/components/panels/AuctionRestartPanel.vue'; import LoadingIcon from '~/assets/icons/loading.svg'; diff --git a/frontend/components/auction/collateral/CollateralAuctionBidTransactionTable.vue b/frontend/components/auction/collateral/CollateralAuctionBidTransactionTable.vue index fcbeb003c..2510247b5 100644 --- a/frontend/components/auction/collateral/CollateralAuctionBidTransactionTable.vue +++ b/frontend/components/auction/collateral/CollateralAuctionBidTransactionTable.vue @@ -3,7 +3,7 @@
Auction Ends
- +
diff --git a/frontend/components/auction/collateral/CollateralAuctionSwapTransactionTable.vue b/frontend/components/auction/collateral/CollateralAuctionSwapTransactionTable.vue index 03cbdecae..f19e66560 100644 --- a/frontend/components/auction/collateral/CollateralAuctionSwapTransactionTable.vue +++ b/frontend/components/auction/collateral/CollateralAuctionSwapTransactionTable.vue @@ -2,7 +2,7 @@
Auction Ends
-
+
Auction Amount
diff --git a/frontend/components/auction/collateral/CollateralAuctionsTable.stories.js b/frontend/components/auction/collateral/CollateralAuctionsTable.stories.js index 69e7b576d..88f39d205 100644 --- a/frontend/components/auction/collateral/CollateralAuctionsTable.stories.js +++ b/frontend/components/auction/collateral/CollateralAuctionsTable.stories.js @@ -12,6 +12,7 @@ const common = { auctions: fakeAuctions, selectedAuctionId: randomSelectedAuction.id, lastUpdated: new Date(faker.date.recent()), + isLoading: false, }), }; @@ -21,6 +22,20 @@ storiesOf('Auction/Collateral/CollateralAuctionsTable', module) template: '', })) + .add('Reset Updated Timer', () => ({ + ...common, + created() { + setInterval(() => { + this.isLoading = true; + setTimeout(() => { + this.isLoading = false; + }, 1000); + this.lastUpdated = new Date(faker.date.recent()); + }, 10 * 1000); + }, + template: + '', + })) .add('Fetching With Auctions', () => ({ ...common, template: '', diff --git a/frontend/components/auction/collateral/CollateralAuctionsTable.vue b/frontend/components/auction/collateral/CollateralAuctionsTable.vue index 517fde9be..3364665ed 100644 --- a/frontend/components/auction/collateral/CollateralAuctionsTable.vue +++ b/frontend/components/auction/collateral/CollateralAuctionsTable.vue @@ -10,6 +10,8 @@ :custom-row="customRowEvents" :get-popup-container="() => $el" :locale="{ emptyText: 'No active auctions' }" + :table-layout="auto" + :scroll="{ x: 'max-content' }" class="AuctionsTable relative overflow-visible" >
@@ -42,7 +44,7 @@ Requires Restart Ends in - +
@@ -50,8 +52,8 @@ Updating...
- Last updated - Last updated unknown time ago + Updated + Updated unknown time ago
compareAsc(a, b)), - width: '200px', }, { slots: { title: 'updatingStatus', customRender: 'action' }, diff --git a/frontend/components/auction/collateral/TimeTillProfitable.vue b/frontend/components/auction/collateral/TimeTillProfitable.vue index 1d6e9bf5c..10b3d377a 100644 --- a/frontend/components/auction/collateral/TimeTillProfitable.vue +++ b/frontend/components/auction/collateral/TimeTillProfitable.vue @@ -1,7 +1,7 @@