Files
nl-blogs/client/src/components/admin/SessionExpiredModal.vue
2026-06-24 16:50:04 +08:00

27 lines
831 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<Teleport to="body">
<div
v-if="sessionExpired"
class="fixed inset-0 z-[9999] flex items-center justify-center bg-black/60 backdrop-blur-sm"
>
<div class="w-full max-w-sm mx-4 bg-[#121214] border border-white/10 rounded-xl p-6 shadow-2xl">
<h3 class="text-lg font-medium text-white mb-2">登录已过期</h3>
<p class="text-sm text-art-muted mb-6">您的登录状态已失效请重新登录</p>
<button
type="button"
class="w-full admin-btn-primary py-2.5"
@click="confirmSessionExpired"
>
确认
</button>
</div>
</div>
</Teleport>
</template>
<script setup lang="ts">
import { useAuth } from '../../composables/useAuth'
const { sessionExpired, confirmSessionExpired } = useAuth()
</script>