updates
This commit is contained in:
parent
d694f9b645
commit
d27f66e95d
5 changed files with 230 additions and 162 deletions
|
|
@ -1,14 +1,15 @@
|
|||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { useNostrStore } from '@/stores/nostr'
|
||||
import SupportChat from '@/components/SupportChat.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { Dialog, DialogContent } from '@/components/ui/dialog'
|
||||
import Login from '@/components/Login.vue'
|
||||
|
||||
const router = useRouter()
|
||||
const nostrStore = useNostrStore()
|
||||
const showLoginDialog = ref(!nostrStore.isLoggedIn)
|
||||
|
||||
// Redirect to home if not logged in
|
||||
if (!nostrStore.isLoggedIn) {
|
||||
router.push('/')
|
||||
const handleLoginSuccess = () => {
|
||||
showLoginDialog.value = false
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
@ -20,6 +21,13 @@ if (!nostrStore.isLoggedIn) {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Login Dialog -->
|
||||
<Dialog v-model:open="showLoginDialog">
|
||||
<DialogContent class="sm:max-w-md">
|
||||
<Login @success="handleLoginSuccess" />
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue