This commit is contained in:
Baobhan Sith
2025-04-25 19:20:46 +08:00
parent f4a2e28078
commit 073d9d3f95
2 changed files with 4 additions and 2 deletions
@@ -142,7 +142,8 @@ const isFailedAction = (actionType: string): boolean => {
<h2 class="text-lg font-medium">{{ t('dashboard.recentConnections', '最近连接') }}</h2>
</div>
<div class="p-4">
<div v-if="isLoadingConnections" class="text-center text-text-secondary">{{ t('common.loading') }}</div>
<!-- Loading State (Only show if loading AND no connections are displayed yet) -->
<div v-if="isLoadingConnections && recentConnections.length === 0" class="text-center text-text-secondary">{{ t('common.loading') }}</div>
<ul v-else-if="recentConnections.length > 0" class="space-y-3">
<li v-for="conn in recentConnections" :key="conn.id" class="flex items-center justify-between p-3 bg-header/50 border border-border/50 rounded transition duration-150 ease-in-out"> <!-- Applied audit log item style -->
<div class="flex-grow mr-4 overflow-hidden">
@@ -26,7 +26,8 @@
<!-- List Area -->
<div class="flex-grow overflow-y-auto p-2">
<!-- Loading State -->
<div v-if="isLoading" class="p-6 text-center text-text-secondary text-sm flex flex-col items-center justify-center h-full">
<!-- Loading State (Only show if loading AND no commands are displayed yet) -->
<div v-if="isLoading && filteredAndSortedCommands.length === 0" class="p-6 text-center text-text-secondary text-sm flex flex-col items-center justify-center h-full">
<i class="fas fa-spinner fa-spin text-xl mb-2"></i>
<p>{{ t('common.loading', '加载中...') }}</p>
</div>