assembly/pages/index.vue

109 lines
2.8 KiB
Vue
Raw Normal View History

2021-07-17 16:50:30 +00:00
<template>
2021-07-21 20:53:46 +00:00
<div>
<h1 class="font-semibold text-2xl text-center">Assembly Apps</h1>
2021-07-17 21:44:21 +00:00
2021-07-21 20:53:46 +00:00
<div class="mt-10 grid w-full grid-cols-1 gap-4 sm:grid-cols-3 xl:gap-6">
<nuxt-link
v-for="app in apps"
:key="app.id"
:to="app.url"
2021-08-13 21:15:46 +00:00
class="relative flex flex-col items-center px-4 py-12 text-center rounded-[6px] cursor-pointer bg-white border border-transparent hover:border-[#1874FF] shadow"
2021-07-21 20:53:46 +00:00
>
<div
style="background: radial-gradient(42.15% 42.15% at 48.94% 48.94%, #D6DAE0 75.67%, #F0F3F9 100%), #C4C4C4;"
2021-08-13 21:15:46 +00:00
class="w-20 h-20 rounded-full flex items-center justify-center border border-[#CCDCF3]"
2021-07-21 20:53:46 +00:00
>
<div
2021-08-13 21:15:46 +00:00
class="w-16 h-16 rounded-full flex items-center justify-center bg-[#1874FF]"
2021-07-21 20:53:46 +00:00
>
2021-08-13 21:15:46 +00:00
<component :is="app.icon" class="w-10 h-10 text-white" />
2021-07-21 20:53:46 +00:00
</div>
</div>
2021-07-17 21:44:21 +00:00
2021-07-21 20:53:46 +00:00
<h2 class="mt-4 font-semibold text-19">{{ app.name }}</h2>
<p class="mt-2 text-14 font-regular text-grey-dark opacity-90">
{{ app.description }}
</p>
</nuxt-link>
</div>
</div>
2021-07-17 16:50:30 +00:00
</template>
<script lang="ts">
2021-07-21 20:53:46 +00:00
import { computed, defineComponent } from "@nuxtjs/composition-api";
import { useNetwork } from "~/composables/useNetwork";
2021-08-13 21:15:46 +00:00
import AaveIcon from "~/assets/icons/aave.svg?inline";
import CompoundIcon from "~/assets/icons/compound.svg?inline";
import MakerIcon from "~/assets/icons/makerdao.svg?inline";
2021-08-15 22:17:42 +00:00
import OneInchIcon from "~/assets/icons/1inch.svg?inline";
2021-08-21 09:00:58 +00:00
import LiquityIcon from "~/assets/icons/liquity.svg?inline";
2021-07-17 16:50:30 +00:00
2021-07-21 20:53:46 +00:00
const appsPerNetwork = {
mainnet: [
{
id: "aave-v2",
icon: AaveIcon,
name: "Aave v2",
2021-08-21 19:06:27 +00:00
url: "/aave-v2",
2021-08-09 19:11:32 +00:00
description: "Money Market"
2021-08-06 22:44:51 +00:00
},
{
id: "compound",
2021-08-07 23:22:42 +00:00
icon: CompoundIcon,
2021-08-06 22:44:51 +00:00
name: "Compound",
url: "/mainnet/compound",
2021-08-09 19:11:32 +00:00
description: "Money Market"
2021-08-06 22:44:51 +00:00
},
{
id: "maker",
2021-08-07 23:22:42 +00:00
icon: MakerIcon,
2021-08-08 11:34:44 +00:00
name: "MakerDAO",
2021-08-06 22:44:51 +00:00
url: "/mainnet/maker",
2021-08-09 19:11:32 +00:00
description: "Collateralized Debt"
2021-08-15 22:17:42 +00:00
},
{
id: "1inch",
icon: OneInchIcon,
name: "1inch",
2021-08-16 16:20:39 +00:00
url: "/1inch",
description: "DEX Aggregator"
2021-08-21 09:00:58 +00:00
},
{
id: "liquity",
icon: LiquityIcon,
name: "Liquity",
url: "/mainnet/liquity",
description: "Collateralized Debt"
2021-07-21 20:53:46 +00:00
}
],
polygon: [
{
id: "aave-v2",
icon: AaveIcon,
name: "Aave v2",
2021-08-21 19:06:27 +00:00
url: "/aave-v2",
2021-07-21 20:53:46 +00:00
description: "Lend and borrow straight from your Gnosis Safe"
2021-08-15 22:17:42 +00:00
},
{
id: "1inch",
icon: OneInchIcon,
name: "1inch",
2021-08-16 16:20:39 +00:00
url: "/1inch",
description: "DEX Aggregator"
2021-08-06 22:44:51 +00:00
}
2021-07-21 20:53:46 +00:00
]
};
export default defineComponent({
setup() {
const { activeNetworkId } = useNetwork();
const apps = computed(() => appsPerNetwork[activeNetworkId.value]);
return {
apps
};
}
});
2021-07-17 16:50:30 +00:00
</script>