From 724c6e11e64133495c7196d5fcc025645e2e9235 Mon Sep 17 00:00:00 2001 From: jinghui Date: Mon, 16 Nov 2026 00:37:37 +0800 Subject: [PATCH] =?UTF-8?q?fix(admin):=20=E6=96=87=E4=BB=B6=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E7=82=B9=E7=BC=A9=E7=95=A5=E5=9B=BE=E6=94=B9=E7=AB=99?= =?UTF-8?q?=E5=86=85=E9=A2=84=E8=A7=88=E6=B5=AE=E5=B1=82=E2=80=94=E2=80=94?= =?UTF-8?q?window.open=E8=A2=AB=E5=BC=B9=E7=AA=97=E6=8B=A6=E6=88=AA?= =?UTF-8?q?=E6=89=93=E4=B8=8D=E5=BC=80=EF=BC=8C=E4=B8=94token=E4=B8=8D?= =?UTF-8?q?=E8=BF=9B=E5=9C=B0=E5=9D=80=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Admin.page.vue | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) 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;