Skip to content

Commit

Permalink
feat: other send options
Browse files Browse the repository at this point in the history
  • Loading branch information
JackHamer09 committed May 23, 2023
1 parent 10b0b8c commit 37889ba
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 0 deletions.
9 changes: 9 additions & 0 deletions components/destination/DestinationItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<div v-if="description" class="destination-item-description">{{ description }}</div>
</div>
</template>
<template #right v-if="icon">
<component :is="icon" class="destination-icon" aria-hidden="true" />
</template>
</CommonButtonLineWithImg>
</template>

Expand All @@ -28,6 +31,9 @@ defineProps({
description: {
type: String,
},
icon: {
type: [Object, Function] as PropType<Component>,
},
});
</script>

Expand All @@ -50,5 +56,8 @@ defineProps({
@apply text-sm leading-tight text-gray-secondary;
}
}
.destination-icon {
@apply mx-3 h-4 w-4 text-gray-secondary;
}
}
</style>
38 changes: 38 additions & 0 deletions pages/transaction/zksync/era/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,48 @@
description="Withdraw to Ethereum (L1)"
/>
</CommonCardWithLineButtons>

<TypographyCategoryLabel>Send to exchange</TypographyCategoryLabel>
<CommonCardWithLineButtons>
<DestinationItem
label="Official bridge"
:icon-url="destinations.ethereum.iconUrl"
as="RouterLink"
:to="{ name: 'transaction-zksync-era-withdraw', query: $route.query }"
description="Send to exchange using official bridge"
disabled
/>
<DestinationItem
v-bind="destinations.layerswap"
:icon="ArrowUpRightIcon"
as="a"
target="_blank"
href="https://www.layerswap.io/?networkName=ZKSYNCERA_MAINNET"
/>
</CommonCardWithLineButtons>

<TypographyCategoryLabel>Send to another network</TypographyCategoryLabel>
<CommonCardWithLineButtons>
<DestinationItem
v-bind="destinations.layerswap"
:icon="ArrowUpRightIcon"
as="a"
target="_blank"
href="https://www.layerswap.io/?networkName=ZKSYNCERA_MAINNET"
/>
<DestinationItem
v-bind="destinations.orbiter"
:icon="ArrowUpRightIcon"
as="a"
target="_blank"
href="https://www.orbiter.finance/?source=zkSync%20Era"
/>
</CommonCardWithLineButtons>
</SelectDestination>
</template>

<script lang="ts" setup>
import { ArrowUpRightIcon } from "@heroicons/vue/24/outline";
import { storeToRefs } from "pinia";
import { useRouter } from "#app";
Expand Down
Binary file modified public/.DS_Store
Binary file not shown.
6 changes: 6 additions & 0 deletions public/img/layerswap.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions public/img/orbiter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions store/destinations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ export const useDestinationsStore = defineStore("destinations", () => {
label: `Ethereum ${capitalize(selectedEthereumNetwork.value.network)}`,
iconUrl: "/img/ethereum.svg",
},
layerswap: {
key: "layerswap",
label: "Layerswap",
iconUrl: "/img/layerswap.svg",
},
orbiter: {
key: "orbiter",
label: "Orbiter",
iconUrl: "/img/orbiter.svg",
},
}));

return {
Expand Down

0 comments on commit 37889ba

Please sign in to comment.