From 8cb680ba2a90b7bf1f23b00f8924452645a91571 Mon Sep 17 00:00:00 2001 From: mtyszczak <mateusz.tyszczak@gmail.com> Date: Tue, 18 Mar 2025 15:48:48 +0100 Subject: [PATCH] Add connect button to the account information card --- src/components/utilcards/AccountDetails.vue | 9 +++++++++ src/components/utilcards/ConfirmAccountUpdateCard.vue | 2 +- src/components/utilcards/ConfirmCreateAccountCard.vue | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/components/utilcards/AccountDetails.vue b/src/components/utilcards/AccountDetails.vue index 8f0fa75..96d33ec 100644 --- a/src/components/utilcards/AccountDetails.vue +++ b/src/components/utilcards/AccountDetails.vue @@ -1,15 +1,19 @@ <script setup lang="ts"> import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; import { Skeleton } from '@/components/ui/skeleton'; +import { Button } from '@/components/ui/button'; import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar' import { mdiAccountBadgeOutline, mdiOpenInNew } from '@mdi/js'; import { useSettingsStore } from '@/stores/settings.store'; import { computed } from 'vue'; import { useUserStore } from '@/stores/user.store'; +import { useWalletStore } from '@/stores/wallet.store'; const settingsStore = useSettingsStore(); const hasUser = computed(() => settingsStore.settings.account !== undefined); +const walletStore = useWalletStore(); + const userStore = useUserStore(); </script> @@ -51,6 +55,11 @@ const userStore = useUserStore(); </div> </div> </div> + <div v-else> + <Button @click="walletStore.openWalletSelectModal()" class="w-full font-bold"> + Connect your wallet now + </Button> + </div> </CardContent> </Card> </template> \ No newline at end of file diff --git a/src/components/utilcards/ConfirmAccountUpdateCard.vue b/src/components/utilcards/ConfirmAccountUpdateCard.vue index 85d7e10..33bf986 100644 --- a/src/components/utilcards/ConfirmAccountUpdateCard.vue +++ b/src/components/utilcards/ConfirmAccountUpdateCard.vue @@ -99,7 +99,7 @@ const updateAuthority = async() => { <Input id="updateAuthority_ownerKey" placeholder="Nothing to add" v-model="ownerKey" class="my-2" /> </div> <Button class="my-2" @click="updateAuthority" :loading="isLoading">Update Authority</Button> - <p>Note: By clicking the above button, the transaction will be created, signed, and broadcasted immediately to the mainnet chain</p> + <p class="text-sm">Note: By clicking the above button, the transaction will be created, signed, and broadcasted immediately to the mainnet chain</p> </div> </CardContent> </Card> diff --git a/src/components/utilcards/ConfirmCreateAccountCard.vue b/src/components/utilcards/ConfirmCreateAccountCard.vue index 5260c66..f6e2913 100644 --- a/src/components/utilcards/ConfirmCreateAccountCard.vue +++ b/src/components/utilcards/ConfirmCreateAccountCard.vue @@ -182,7 +182,7 @@ const createAccount = async() => { </div> </RadioGroup> <Button @click="createAccount" :loading="isLoading">Create account</Button> - <p>Note: By clicking the above button, the transaction will be created, signed, and broadcasted immediately to the mainnet chain</p> + <p class="text-sm">Note: By clicking the above button, the transaction will be created, signed, and broadcasted immediately to the mainnet chain</p> </div> </CardContent> </Card> -- GitLab