mirror of
https://github.com/fawney19/Aether.git
synced 2026-01-02 15:52:26 +08:00
refactor(frontend): 优化共享视图页面
- 改进 Dashboard 和 Usage 页面
This commit is contained in:
@@ -1101,7 +1101,7 @@ async function viewAnnouncementDetail(announcement: Announcement) {
|
|||||||
try {
|
try {
|
||||||
await announcementApi.markAsRead(announcement.id)
|
await announcementApi.markAsRead(announcement.id)
|
||||||
announcement.is_read = true
|
announcement.is_read = true
|
||||||
} catch {}
|
} catch { /* 静默忽略标记已读错误 */ }
|
||||||
}
|
}
|
||||||
selectedAnnouncement.value = announcement
|
selectedAnnouncement.value = announcement
|
||||||
detailDialogOpen.value = true
|
detailDialogOpen.value = true
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ import {
|
|||||||
} from '@/features/usage/composables'
|
} from '@/features/usage/composables'
|
||||||
import type { PeriodValue, FilterStatusValue } from '@/features/usage/types'
|
import type { PeriodValue, FilterStatusValue } from '@/features/usage/types'
|
||||||
import type { UserOption } from '@/features/usage/components/UsageRecordsTable.vue'
|
import type { UserOption } from '@/features/usage/components/UsageRecordsTable.vue'
|
||||||
|
import { log } from '@/utils/logger'
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const authStore = useAuthStore()
|
const authStore = useAuthStore()
|
||||||
@@ -250,7 +251,7 @@ async function pollActiveRequests() {
|
|||||||
await refreshData()
|
await refreshData()
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('轮询活跃请求状态失败:', error)
|
log.error('轮询活跃请求状态失败:', error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -423,7 +424,7 @@ async function exportData(format: 'csv' | 'json') {
|
|||||||
a.click()
|
a.click()
|
||||||
window.URL.revokeObjectURL(url)
|
window.URL.revokeObjectURL(url)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('导出失败:', error)
|
log.error('导出失败:', error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user