feat: 移除状态指示器,优化状态栏组件,简化代码结构

This commit is contained in:
Wenjie Zhang 2025-10-12 16:39:05 +08:00
parent 3600c7f9b7
commit d46f2a035d
2 changed files with 1 additions and 64 deletions

View File

@ -33,10 +33,6 @@
</span>
</a-badge>
</div>
<div class="status-indicator" :class="systemStatus">
<div class="status-dot"></div>
<span class="status-text">{{ statusText }}</span>
</div>
</div>
</div>
</div>
@ -58,7 +54,6 @@ const { activeCount: activeCountRef } = storeToRefs(taskerStore)
//
const currentTime = ref('')
const systemStatus = ref('online')
//
const organization = computed(() => infoStore.organization)
@ -89,19 +84,6 @@ const greeting = computed(() => {
return `${greetingText}${currentUser.value}`
})
const statusText = computed(() => {
switch (systemStatus.value) {
case 'online':
return '在线'
case 'offline':
return '离线'
case 'maintenance':
return '维护中'
default:
return '未知'
}
})
const activeTaskCount = computed(() => activeCountRef.value || 0)
const openTaskCenter = () => {
@ -257,52 +239,6 @@ onUnmounted(() => {
font-weight: 500;
}
.status-indicator {
display: flex;
align-items: center;
gap: 4px;
padding: 2px 6px;
border-radius: 4px;
font-size: 11px;
font-weight: 500;
&.online {
background-color: #f0fdf4;
color: #16a34a;
.status-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background-color: #16a34a;
}
}
&.offline {
background-color: #fef2f2;
color: #dc2626;
.status-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background-color: #dc2626;
}
}
&.maintenance {
background-color: #fffbeb;
color: #d97706;
.status-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background-color: #d97706;
}
}
}
//
@media (max-width: 768px) {
.status-bar {

View File

@ -145,6 +145,7 @@ const mainList = [{
class="nav-item task-center"
:class="{ active: isDrawerOpen }"
@click="taskerStore.openDrawer()"
v-if="activeTaskCount > 0"
>
<a-tooltip placement="right">
<template #title>任务中心</template>