Skip to content

Commit

Permalink
feat(tauri/ui): replace 'All Orders' and 'All Vaults' buttons with ge…
Browse files Browse the repository at this point in the history
…neric back button
  • Loading branch information
mattyg committed Jan 29, 2024
1 parent 6183ae4 commit bae7b8c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
8 changes: 8 additions & 0 deletions tauri-app/src/lib/components/ButtonBack.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<script lang="ts">
import { Button } from "flowbite-svelte";
import ArrowLeftSolid from "flowbite-svelte-icons/ArrowLeftSolid.svelte";
</script>

<Button outline size="xs" class="w-32" color="primary" on:click={() => history.back()}>
<ArrowLeftSolid size="xs" /><span class="ml-2">Back</span>
</Button>
8 changes: 3 additions & 5 deletions tauri-app/src/routes/orders/[id]/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<script lang="ts">
import { Button, Card } from 'flowbite-svelte';
import ArrowLeftSolid from 'flowbite-svelte-icons/ArrowLeftSolid.svelte';
import { Card } from 'flowbite-svelte';
import { orderDetail } from '$lib/stores/orderDetail';
import { walletAddressMatchesOrBlank } from '$lib/stores/settings';
import ButtonLoading from '$lib/components/ButtonLoading.svelte';
import ModalOrderRemove from '$lib/components/ModalOrderRemove.svelte';
import BadgeActive from '$lib/components/BadgeActive.svelte';
import { formatTimestampSecondsAsLocal } from '$lib/utils/time';
import ButtonVaultLink from '$lib/components/ButtonVaultLink.svelte';
import ButtonBack from '$lib/components/ButtonBack.svelte';
export let data: { id: string };
let showRemoveModal = false;
Expand All @@ -18,9 +18,7 @@

<div class="flex w-full">
<div class="flex-1">
<Button outline size="xs" class="w-32" color="primary" href="/orders">
<ArrowLeftSolid size="xs" /><span class="ml-2">All Orders</span>
</Button>
<ButtonBack />
</div>
<h1 class="flex-0 mb-8 text-4xl font-bold text-gray-900 dark:text-white">Order</h1>
<div class="flex-1"></div>
Expand Down
6 changes: 2 additions & 4 deletions tauri-app/src/routes/vaults/[id]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
TableBodyRow,
TableBodyCell,
} from 'flowbite-svelte';
import ArrowLeftSolid from 'flowbite-svelte-icons/ArrowLeftSolid.svelte';
import { vaultDetail } from '$lib/stores/vaultDetail';
import ModalVaultDeposit from '$lib/components/ModalVaultDeposit.svelte';
import ModalVaultWithdraw from '$lib/components/ModalVaultWithdraw.svelte';
import { walletAddress } from '$lib/stores/settings';
import { toHex } from 'viem';
import { formatTimestampSecondsAsLocal } from '$lib/utils/time';
import ButtonBack from '$lib/components/ButtonBack.svelte';
export let data: { id: string };
let showDepositModal = false;
Expand All @@ -35,9 +35,7 @@

<div class="flex w-full">
<div class="flex-1">
<Button outline size="xs" class="w-32" color="primary" href="/vaults">
<ArrowLeftSolid size="xs" /><span class="ml-2">All Vaults</span>
</Button>
<ButtonBack />
</div>
<h1 class="flex-0 mb-8 text-4xl font-bold text-gray-900 dark:text-white">Vault</h1>
<div class="flex-1"></div>
Expand Down

0 comments on commit bae7b8c

Please sign in to comment.