-
-
Notifications
You must be signed in to change notification settings - Fork 1
Feature/new UI #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Feature/new UI #46
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
6c5bbd8
style: initial redesign
Hladikes 614dcb1
feat: added landing & style changes
Hladikes 2c5d5cf
fix: minor ui fixes
Hladikes 7f79d31
style: new button variants added
Hladikes 499f333
style: nav removed
Hladikes 83c44bf
fix: calendar icon color changed
Hladikes c060a46
style: landing polished
Hladikes 6b4ee80
style: backdrop blur added
Hladikes 1fb0a09
fix: button sizing
Hladikes e796ac5
feat: sign modal
Hladikes 422480f
chore: fn changed
Hladikes 6ca0133
chore: added todo
Hladikes b9a2f1a
feat: breakdown visibility toggle
Hladikes d76586e
Merge remote-tracking branch 'origin/main' into feature/new-ui
Hladikes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,116 @@ | ||
| <template> | ||
| <VueFinalModal | ||
| modal-id="sign-modal" | ||
| class="flex items-center justify-center" | ||
| content-class="flex w-3/4 sm:w-2/3 md:w-1/2 xl:w-1/4 flex-col p-6 gap-4 bg-background-color rounded-2xl border border-background-color-inverse" | ||
| overlay-transition="vfm-fade" | ||
| content-transition="vfm-fade" | ||
| > | ||
| <div class="flex items-center justify-between pb-1"> | ||
| <h1 class="text-xl font-semibold text-text-color">Confirm creation</h1> | ||
| <button @click="closeModal()"> | ||
| <Icon name="mdi:close" size="32" class="text-text-color" /> | ||
| </button> | ||
| </div> | ||
|
|
||
| <hr class="-mx-6" /> | ||
|
|
||
| <template v-if="accountStore.hasSelectedAccount"> | ||
| <p class="mt-2 text-text-color opacity-70">Connected as</p> | ||
|
|
||
| <div class="flex items-center gap-3"> | ||
| <div class="h-7 w-7 rounded-full border-2 border-border-color"></div> | ||
| <p class="text-text-color">{{ currentAccount?.meta.name }}</p> | ||
| </div> | ||
| </template> | ||
|
|
||
| <client-only v-else> | ||
| <dot-connect /> | ||
| </client-only> | ||
|
|
||
| <hr class="my-3" /> | ||
|
|
||
| <template v-if="!isSigning"> | ||
| <div class="flex items-center gap-5"> | ||
| <div class="h-20 w-20 rounded-full border-2 border-border-color"></div> | ||
| <div class="flex flex-col gap-2"> | ||
| <h1 class="text-xl text-text-color">{{ props.name }}</h1> | ||
| <p class="text-sm text-text-color opacity-70">Network: PolkadotHub</p> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="grid grid-cols-2 gap-3"> | ||
| <p class="text-sm text-text-color">Event Start</p> | ||
| <p class="text-right text-sm text-text-color">{{ props.startDate.toISOString().split("T").at(0) }}</p> | ||
| <p class="text-sm text-text-color">Event End</p> | ||
| <p class="text-right text-sm text-text-color">{{ props.endDate.toISOString().split("T").at(0) }}</p> | ||
| <p class="text-sm text-text-color">Claim Code</p> | ||
| <p class="text-right text-sm font-bold text-text-color">{{ props.secret }}</p> | ||
| <p class="text-sm text-text-color">Amount</p> | ||
| <p class="text-right text-sm font-bold text-text-color">{{ props.quantity }}</p> | ||
| </div> | ||
|
|
||
| <hr class="-mx-6 my-3" /> | ||
|
|
||
| <div class="grid grid-cols-2 gap-3"> | ||
| <p class="text-sm text-text-color">Total Deposit + Fees</p> | ||
| <p class="text-right text-sm text-text-color"> | ||
| <span class="text-xs text-text-color opacity-60">$0.980</span> | ||
| <span class="ml-2 font-bold text-text-color">1 DOT</span> | ||
| </p> | ||
|
|
||
| <button class="col-span-2 flex items-center gap-2" @click="showBreakdown = !showBreakdown"> | ||
| <p class="text-xs text-text-color opacity-50">Breakdown</p> | ||
| <Icon :name="`mdi:chevron-${showBreakdown ? 'up' : 'down'}`" size="20" class="text-text-color opacity-50" /> | ||
| </button> | ||
|
|
||
| <template v-if="showBreakdown"> | ||
| <p class="text-sm text-text-color">Free Minting Deposit</p> | ||
| <p class="text-right text-sm text-text-color">24 x 0.04 DOT</p> | ||
| <p class="text-sm text-text-color">Fees</p> | ||
| <p class="text-right text-sm text-text-color">0.02 DOT</p> | ||
| </template> | ||
| </div> | ||
|
|
||
| <dot-button :disabled="!canSign" variant="primary" size="large" @click="sign()"> Proceed to signing </dot-button> | ||
| </template> | ||
|
|
||
| <template v-else> | ||
| <p class="text-text-color">Signing ...</p> | ||
| </template> | ||
| </VueFinalModal> | ||
| </template> | ||
|
|
||
| <script lang="ts" setup> | ||
| import { VueFinalModal, useVfm } from "vue-final-modal"; | ||
| import { useAccountStore } from "~/stores/account"; | ||
|
|
||
| const props = defineProps<{ | ||
| name: string; | ||
| image: File; | ||
| startDate: Date; | ||
| endDate: Date; | ||
| quantity: number; | ||
| secret: string; | ||
| }>(); | ||
|
|
||
| const accountStore = useAccountStore(); | ||
| const currentAccount = computed(() => accountStore.selected); | ||
|
|
||
| const canSign = computed(() => accountStore.hasSelectedAccount); | ||
| const isSigning = ref(false); | ||
|
|
||
| const showBreakdown = ref(false); | ||
|
|
||
| function sign() { | ||
| // TODO API call or smth | ||
| isSigning.value = true; | ||
|
|
||
| setTimeout(() => { | ||
| isSigning.value = false; | ||
| }, 1000); | ||
| } | ||
|
|
||
| const vfm = useVfm(); | ||
| const closeModal = () => vfm.close("sign-modal"); | ||
| </script> | ||
This file contains hidden or 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,3 +1,3 @@ | ||
| export type BtnVariant = "primary" | "secondary" | "tertiary"; | ||
| export type BtnVariant = "primary" | "secondary" | "tertiary" | "tertiary-light" | "tertiary-dark"; | ||
|
|
||
| export type BtnSize = "small" | "medium" | "large"; |
This file contains hidden or 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 hidden or 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,8 @@ | ||
| <template> | ||
| <div id="app-base" class="relative bg-bg-persistent"> | ||
| <main class="h-full min-h-screen"> | ||
| <slot /> | ||
| </main> | ||
| <layout-footer /> | ||
| </div> | ||
| </template> |
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.