-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
196 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
@import './components/common'; | ||
@import './components/footer'; | ||
@import './components/header'; | ||
@import './components/policy'; | ||
@import './components/sidebar'; | ||
@import './components/swap'; | ||
@import './components/transfer'; | ||
@import './components/tokenSelect'; | ||
@import './components/tokenSelect'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.main-block { | ||
padding: 54px 0 50px; | ||
|
||
@media (max-width: $breakpoint-xs) { | ||
padding: 24px 0 24px; | ||
} | ||
|
||
border-bottom: 1px solid #aabec8; | ||
} | ||
|
||
.title { | ||
font-size: 18px; | ||
font-weight: 500; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
.policy-card { | ||
.certificate { | ||
display: flex; | ||
align-items: flex-end; | ||
&-status { | ||
&__proved { | ||
display: flex; | ||
align-items: center; | ||
a { | ||
height: 64px; | ||
display: inline-block; | ||
text-align: center; | ||
svg { | ||
height: 64px; | ||
width: 64px; | ||
|
||
path { | ||
fill: $yellow; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
<script lang="ts" setup> | ||
import { useWallet } from 'solana-wallets-vue' | ||
import { formatDate } from '@/utils' | ||
import { ALBUS_APP_URL } from '@/config' | ||
const connectionStore = useConnectionStore() | ||
const cluster = computed(() => connectionStore.cluster) | ||
const userStore = useUserStore() | ||
const requiredPolicyData = computed(() => userStore.requiredPolicyData) | ||
const serviceLoading = computed(() => userStore.serviceLoading) | ||
const { connected } = useWallet() | ||
// const isProved = computed(() => !!userStore.certificate?.data.proof) | ||
const certificate = computed(() => userStore.certificate) | ||
const certificateValid = computed(() => userStore.certificateValid) | ||
const certificateLoading = computed(() => userStore.state.certificateLoading) | ||
const createdAt = computed(() => { | ||
const date = new Date(Number(certificate.value?.data.createdAt) * 1000) | ||
return formatDate(date) | ||
}) | ||
const expiredAt = computed(() => { | ||
const date = new Date(Number(certificate.value?.data.expiredAt) * 1000) | ||
return Number(certificate.value?.data.expiredAt) === 0 ? '∞' : formatDate(date) | ||
}) | ||
</script> | ||
|
||
<template> | ||
<q-card class="swap-card policy-card"> | ||
<q-card-section class="swap-card__header"> | ||
Certificate | ||
</q-card-section> | ||
<div> | ||
<q-inner-loading :showing="serviceLoading" label-class="text-teal" label-style="font-size: 1.1em" /> | ||
<q-card-section v-if="requiredPolicyData" class="swap-card__body swap-field__label"> | ||
<div class="title"> | ||
Required certificate | ||
</div> | ||
<div>Name: {{ requiredPolicyData.name }}</div> | ||
<div>Rules:</div> | ||
<div class="q-ml-xs"> | ||
<div v-for="(r, i) in requiredPolicyData.rules" :key="i"> | ||
- {{ r.key }}: {{ r.label }} | ||
</div> | ||
</div> | ||
</q-card-section> | ||
<q-card-section v-if="connected" class="swap-card__body swap-field__label"> | ||
<q-inner-loading :showing="certificateLoading" label-class="text-teal" label-style="font-size: 1.1em" /> | ||
<div class="title q-mb-md"> | ||
Your certificate | ||
</div> | ||
|
||
<div v-if="!certificateValid" class="certificate-status__undefined"> | ||
<q-btn | ||
:label="certificate ? 'prove' : 'create'" | ||
unelevated | ||
:color="certificate ? 'teal-14' : 'yellow'" | ||
text-color="black" | ||
:href="`${ALBUS_APP_URL}/wizard/${userStore.requiredPolicy}/${cluster}`" | ||
target="_blank" | ||
type="a" | ||
/> | ||
<q-btn | ||
:loading="certificateLoading" | ||
class="q-ml-md" | ||
label="reload" | ||
unelevated | ||
color="yellow" | ||
text-color="black" | ||
@click="userStore.getCertificates" | ||
/> | ||
</div> | ||
<div v-else class="certificate-status__proved"> | ||
<a :href="`${ALBUS_APP_URL}/holder`" target="_blank"> | ||
<i-app-certificate /> | ||
</a> | ||
<div class="q-ml-md"> | ||
<div>Created: {{ createdAt }}</div> | ||
<div>Expired: <span v-html="expiredAt" /></div> | ||
</div> | ||
</div> | ||
</q-card-section> | ||
</div> | ||
</q-card> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
<template> | ||
<stake-card /> | ||
<div class="main-block row"> | ||
<div class="row justify-center col-xs-12 col-md-6 q-px-sm q-py-md"> | ||
<policy-card /> | ||
</div> | ||
<div class="row justify-center col-xs-12 col-md-6 q-px-sm q-py-md"> | ||
<stake-card /> | ||
</div> | ||
</div> | ||
<stake-content /> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
<template> | ||
<swap-card /> | ||
<div class="main-block row"> | ||
<div class="row justify-center col-xs-12 col-md-6 q-px-sm q-py-md"> | ||
<policy-card /> | ||
</div> | ||
<div class="row justify-center col-xs-12 col-md-6 q-px-sm q-py-md"> | ||
<swap-card /> | ||
</div> | ||
</div> | ||
<swap-content /> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
<template> | ||
<transfer-card /> | ||
<div class="main-block row"> | ||
<div class="row justify-center col-xs-12 col-md-6 q-px-sm q-py-md"> | ||
<policy-card /> | ||
</div> | ||
<div class="row justify-center col-xs-12 col-md-6 q-px-sm q-py-md"> | ||
<transfer-card /> | ||
</div> | ||
</div> | ||
<transfer-content /> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters