elk/components/account/AccountMe.client.vue

18 lines
483 B
Vue
Raw Normal View History

2022-11-15 16:48:23 +01:00
<script setup lang="ts">
2022-11-17 14:09:54 +01:00
const { currentUser } = $(useAppStore())
const account = $computed(() => currentUser?.account)
2022-11-15 16:48:23 +01:00
</script>
<template>
2022-11-16 22:27:02 +01:00
<div flex flex-col gap-4 p4>
2022-11-15 16:48:23 +01:00
<!-- TODO: multiple account switcher -->
2022-11-17 14:09:54 +01:00
<template v-if="account">
<AccountInfo :account="account" />
<PublishWidget />
</template>
2022-11-15 16:48:23 +01:00
<!-- TODO: dialog for select server -->
<a v-else href="/api/mas.to/login" px2 py1 bg-teal6 text-white m2 rounded>Login</a>
</div>
</template>