优化页面、修复BUG
This commit is contained in:
26
client/src/components/admin/SessionExpiredModal.vue
Normal file
26
client/src/components/admin/SessionExpiredModal.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user