extract Login out of Support.vue as its own dialog; add copy button and reminder to save key

This commit is contained in:
padreug 2025-02-12 01:45:40 +01:00
parent 8b3f1aa14b
commit ed1b4cb22a
3 changed files with 126 additions and 81 deletions

View file

@ -1,17 +1,22 @@
<script setup lang="ts">
import { useNostrStore } from '@/stores/nostr'
import SupportChat from '@/components/SupportChat.vue'
import Login from '@/components/Login.vue'
import { useRouter } from 'vue-router'
const router = useRouter()
const nostrStore = useNostrStore()
// Redirect to home if not logged in
if (!nostrStore.isLoggedIn) {
router.push('/')
}
</script>
<template>
<div class="container max-w-4xl mx-auto h-[calc(100vh-4rem)] py-4 px-4 sm:px-6 lg:px-8">
<div class="h-full">
<div class="h-full animate-in fade-in-50 slide-in-from-bottom-3">
<Login v-if="!nostrStore.isLoggedIn" />
<SupportChat v-else />
<SupportChat v-if="nostrStore.isLoggedIn" />
</div>
</div>
</div>