1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-09-06 12:19:08 +01:00
elk/components/modal/ModalContainer.vue
2022-11-23 11:48:01 +08:00

36 lines
880 B
Vue

<script setup lang="ts">
import { isAccountSwitcherOpen, isSigninDialogOpen } from '~/composables/dialog'
const accounts = useAccounts()
</script>
<template>
<ModalDrawer
v-model="isAccountSwitcherOpen"
>
<div max-w-60rem mxa p4>
<h1 text-2xl>
Switch Account
</h1>
<template v-for="acc of accounts" :key="acc.id">
<AccountInfo
:account="acc.account"
:link="false"
:full-server="true"
py4 border="b base"
@click="loginTo(acc)"
/>
</template>
<div py2 mx--2>
<button btn-text flex="~ gap-1" items-center @click="openSigninDialog">
<div i-ri:user-add-line />
Add another account
</button>
</div>
</div>
</ModalDrawer>
<ModalDialog v-model="isSigninDialogOpen">
<AccountSignIn m6 />
</ModalDialog>
</template>