diff --git a/src/pages/Admin.page.vue b/src/pages/Admin.page.vue index 40ac400..a011320 100644 --- a/src/pages/Admin.page.vue +++ b/src/pages/Admin.page.vue @@ -160,9 +160,7 @@ function fileUrl(f: any, dl = false) { if (token.value) q.set('token', token.value); return `/relay/admin/file?${q}`; } -function windowOpen(url: string) { - window.open(url, '_blank', 'noopener'); -} +const preview = ref(null); // 文件管理图片预览浮层(点缩略图站内打开,替代 window.open 弹窗) function fileOwner(f: any) { if (f.source === 'gen') return f.machine || 'AI'; if (f.source === 'mcp') return 'MCP'; @@ -761,7 +759,7 @@ function switchTab(id: 'overview' | 'files' | 'usage' | 'mcp' | 'storage' | 'rec - + {{ f.file_type || '文件' }} {{ f.name }} @@ -783,6 +781,14 @@ function switchTab(id: 'overview' | 'files' | 'usage' | 'mcp' | 'storage' | 'rec 第 {{ filePage }} / {{ filePages }} 页 · 共 {{ fileCount }} 条 +
+ +
+ {{ preview.name }} + 下载 + +
+
@@ -1439,6 +1445,11 @@ function switchTab(id: 'overview' | 'files' | 'usage' | 'mcp' | 'storage' | 'rec } /* ===== 文件管理:缩略图/类型徽标/分页 ===== */ +/* 图片预览浮层:点缩略图站内打开(不 window.open——popup 拦截会吞掉,且 token 不进新 tab 地址栏) */ +.adm-preview { position: fixed; inset: 0; z-index: 10000; background: rgba(0, 0, 0, 0.88); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; cursor: zoom-out; } +.adm-preview img { max-width: 92vw; max-height: 78vh; object-fit: contain; background: #fff; border-radius: 8px; cursor: default; } +.adm-preview-bar { display: flex; align-items: center; gap: 14px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 8px; padding: 8px 14px; cursor: default; } +.adm-preview-name { color: #fff; font-size: 13px; max-width: 52vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .adm-fscroll { overflow-x: auto; -webkit-overflow-scrolling: touch;