From 27a7bfb147b66a5aaa29cb072136f76cd52b5bde Mon Sep 17 00:00:00 2001 From: engigu Date: Tue, 10 Mar 2026 15:05:25 +0800 Subject: [PATCH] feat: remove login logs clear --- web/src/views/loginlogs/tabs/LoginLogTab.vue | 47 +------------------- 1 file changed, 1 insertion(+), 46 deletions(-) diff --git a/web/src/views/loginlogs/tabs/LoginLogTab.vue b/web/src/views/loginlogs/tabs/LoginLogTab.vue index 97b09e6..c489d4d 100644 --- a/web/src/views/loginlogs/tabs/LoginLogTab.vue +++ b/web/src/views/loginlogs/tabs/LoginLogTab.vue @@ -3,18 +3,7 @@ import { ref, onMounted } from 'vue' import { Button } from '@/components/ui/button' import { Input } from '@/components/ui/input' import Pagination from '@/components/Pagination.vue' -import { RefreshCw, Search, Loader2, Trash2 } from 'lucide-vue-next' -import { - AlertDialog, - AlertDialogAction, - AlertDialogCancel, - AlertDialogContent, - AlertDialogDescription, - AlertDialogFooter, - AlertDialogHeader, - AlertDialogTitle, -} from '@/components/ui/alert-dialog' -import { LOG_CATEGORY } from '@/api' +import { RefreshCw, Search, Loader2 } from 'lucide-vue-next' import TextOverflow from '@/components/TextOverflow.vue' import { api } from '@/api' import { toast } from 'vue-sonner' @@ -59,7 +48,6 @@ const filterUsername = ref('') const currentPage = ref(1) const total = ref(0) const loading = ref(false) -const showClearConfirm = ref(false) let searchTimer: ReturnType | null = null // IP 地理位置弹窗 @@ -115,17 +103,6 @@ function handlePageChange(page: number) { loadLogs() } -async function handleClear() { - try { - await api.appLogs.clear(LOG_CATEGORY.LOGIN_LOG) - toast.success('清空成功') - currentPage.value = 1 - loadLogs() - } catch (e: any) { - toast.error('清空失败: ' + (e.message || '')) - } -} - onMounted(loadLogs) @@ -143,28 +120,6 @@ onMounted(loadLogs) title="刷新"> - - - - - 确认清空所有登录日志? - - 此操作将永久清空所有记录,操作后无法恢复。确认要继续吗? - - - - 取消 - - 确认清空 - - - -