From 03d3bc4ef127123b4743b81b07a9512c7c14859b Mon Sep 17 00:00:00 2001 From: nino Date: Tue, 10 Dec 2024 17:32:07 +0400 Subject: [PATCH 1/2] Move ButtonsPagination.svelte component in ui-components --- .../lib/components/ButtonsPagination.svelte | 39 +++++++++++++++++++ packages/ui-components/src/lib/index.ts | 1 + tauri-app/src/lib/components/AppTable.svelte | 2 +- .../lib/components/ButtonsPagination.svelte | 39 ------------------- 4 files changed, 41 insertions(+), 40 deletions(-) create mode 100644 packages/ui-components/src/lib/components/ButtonsPagination.svelte delete mode 100644 tauri-app/src/lib/components/ButtonsPagination.svelte diff --git a/packages/ui-components/src/lib/components/ButtonsPagination.svelte b/packages/ui-components/src/lib/components/ButtonsPagination.svelte new file mode 100644 index 000000000..19e213016 --- /dev/null +++ b/packages/ui-components/src/lib/components/ButtonsPagination.svelte @@ -0,0 +1,39 @@ + + +
+ {#if loading} + + {/if} + +
+ {index} +
+ +
diff --git a/packages/ui-components/src/lib/index.ts b/packages/ui-components/src/lib/index.ts index 7278e5b90..7c92dc972 100644 --- a/packages/ui-components/src/lib/index.ts +++ b/packages/ui-components/src/lib/index.ts @@ -34,6 +34,7 @@ export { default as Heading } from './components/Heading.svelte'; export { default as Text } from './components/Text.svelte'; export { default as DropdownProperty } from './components/DropdownProperty.svelte'; export { default as IconError } from './components/IconError.svelte'; +export { default as ButtonsPagination } from './components/ButtonsPagination.svelte'; //Types export type { AppStoresInterface } from './types/appStores.ts'; diff --git a/tauri-app/src/lib/components/AppTable.svelte b/tauri-app/src/lib/components/AppTable.svelte index 232341ebd..744cfd805 100644 --- a/tauri-app/src/lib/components/AppTable.svelte +++ b/tauri-app/src/lib/components/AppTable.svelte @@ -1,7 +1,7 @@ - -
- {#if loading} - - {/if} - -
- {index} -
- -
From 7aaf52cb52d29157800ff6aac4103af63e220503 Mon Sep 17 00:00:00 2001 From: nino Date: Wed, 11 Dec 2024 13:02:50 +0400 Subject: [PATCH 2/2] Remove unused AppTable, ButtonsPagination and TradesTable components --- .../lib/components/ButtonsPagination.svelte | 39 ----------- packages/ui-components/src/lib/index.ts | 1 - tauri-app/src/lib/components/AppTable.svelte | 66 ------------------ .../src/lib/components/TradesTable.svelte | 67 ------------------- 4 files changed, 173 deletions(-) delete mode 100644 packages/ui-components/src/lib/components/ButtonsPagination.svelte delete mode 100644 tauri-app/src/lib/components/AppTable.svelte delete mode 100644 tauri-app/src/lib/components/TradesTable.svelte diff --git a/packages/ui-components/src/lib/components/ButtonsPagination.svelte b/packages/ui-components/src/lib/components/ButtonsPagination.svelte deleted file mode 100644 index 19e213016..000000000 --- a/packages/ui-components/src/lib/components/ButtonsPagination.svelte +++ /dev/null @@ -1,39 +0,0 @@ - - -
- {#if loading} - - {/if} - -
- {index} -
- -
diff --git a/packages/ui-components/src/lib/index.ts b/packages/ui-components/src/lib/index.ts index 7c92dc972..7278e5b90 100644 --- a/packages/ui-components/src/lib/index.ts +++ b/packages/ui-components/src/lib/index.ts @@ -34,7 +34,6 @@ export { default as Heading } from './components/Heading.svelte'; export { default as Text } from './components/Text.svelte'; export { default as DropdownProperty } from './components/DropdownProperty.svelte'; export { default as IconError } from './components/IconError.svelte'; -export { default as ButtonsPagination } from './components/ButtonsPagination.svelte'; //Types export type { AppStoresInterface } from './types/appStores.ts'; diff --git a/tauri-app/src/lib/components/AppTable.svelte b/tauri-app/src/lib/components/AppTable.svelte deleted file mode 100644 index 744cfd805..000000000 --- a/tauri-app/src/lib/components/AppTable.svelte +++ /dev/null @@ -1,66 +0,0 @@ - - -{#if $listStore.isFetchingFirst} -
- -
-{:else if $listStore.currentPage.length === 0} -
{emptyMessage}
-{:else} - - - - - - {#each $listStore.currentPage as item} - { - dispatch('clickRow', { item }); - }} - > - - - {/each} - -
- - {#if enableCsvExport} -
- listStore.exportCsv()} - loading={$listStore.isExporting} - > - - Export to CSV - - -
- {/if} -{/if} diff --git a/tauri-app/src/lib/components/TradesTable.svelte b/tauri-app/src/lib/components/TradesTable.svelte deleted file mode 100644 index bbb52ffa6..000000000 --- a/tauri-app/src/lib/components/TradesTable.svelte +++ /dev/null @@ -1,67 +0,0 @@ - - - - - Date - Sender - Transaction Hash - Input - Output - IO Ratio - - - - - {formatTimestampSecondsAsLocal(BigInt(item.timestamp))} - - - - - - - - - {formatUnits( - BigInt(item.inputVaultBalanceChange.amount), - Number(item.inputVaultBalanceChange.vault.token.decimals ?? 0), - )} - {item.inputVaultBalanceChange.vault.token.symbol} - - - {formatUnits( - BigInt(item.outputVaultBalanceChange.amount), - Number(item.outputVaultBalanceChange.vault.token.decimals ?? 0), - )} - {item.outputVaultBalanceChange.vault.token.symbol} - - - {Math.abs( - Number( - formatUnits( - BigInt(item.inputVaultBalanceChange.amount), - Number(item.inputVaultBalanceChange.vault.token.decimals ?? 0), - ), - ) / - Number( - formatUnits( - BigInt(item.outputVaultBalanceChange.amount), - Number(item.outputVaultBalanceChange.vault.token.decimals ?? 0), - ), - ), - )} - {item.inputVaultBalanceChange.vault.token.symbol}/{item.outputVaultBalanceChange.vault.token - .symbol} - - -