From 46233d2ac3efaee02deefa802d92af229744e9dc Mon Sep 17 00:00:00 2001 From: Roe-xin Date: Tue, 17 Mar 2026 17:20:02 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=AE=9E=E7=8E=B0=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E9=9B=86=E5=88=A0=E9=99=A4=E5=8A=9F=E8=83=BD=20-=20=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E9=9B=86=E6=8C=89=E9=92=AE=E6=B7=BB=E5=8A=A0tooltip?= =?UTF-8?q?=20-=20=E5=AE=9E=E7=8E=B0=E5=88=A0=E9=99=A4=E7=9A=84=E4=BA=8C?= =?UTF-8?q?=E6=AC=A1=E7=A1=AE=E8=AE=A4=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/docsetDialog.ts | 117 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 112 insertions(+), 5 deletions(-) diff --git a/src/views/docsetDialog.ts b/src/views/docsetDialog.ts index 80d5222..49e597f 100644 --- a/src/views/docsetDialog.ts +++ b/src/views/docsetDialog.ts @@ -38,6 +38,16 @@ export function getDocsetDialogContent(): string { +
+
+
确认删除
+
+
+ + +
+
+
`; } @@ -198,6 +208,89 @@ export function getDocsetDialogStyles(): string { .docset-btn-confirm:hover { background: var(--vscode-button-hoverBackground); } + + .docset-delete-btn { + position: relative; + background: transparent; + border: none; + cursor: pointer; + padding: 4px; + color: var(--vscode-foreground); + opacity: 0.6; + } + + .docset-delete-btn:hover { + opacity: 1; + } + + .docset-delete-btn:hover::after { + content: attr(data-tooltip); + position: absolute; + bottom: 100%; + left: 50%; + transform: translateX(-50%); + background: var(--vscode-editorHoverWidget-background); + color: var(--vscode-editorHoverWidget-foreground); + border: 1px solid var(--vscode-editorHoverWidget-border); + padding: 4px 8px; + border-radius: 3px; + font-size: 12px; + white-space: nowrap; + margin-bottom: 4px; + z-index: 1000; + } + + .delete-confirm-dialog { + display: none; + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(0, 0, 0, 0.4); + z-index: 10000; + align-items: center; + justify-content: center; + } + + .delete-confirm-dialog.active { + display: flex; + } + + .delete-confirm-content { + background: var(--vscode-editor-background); + border: 1px solid var(--vscode-panel-border); + border-radius: 6px; + padding: 20px; + min-width: 300px; + max-width: 400px; + } + + .delete-confirm-title { + font-size: 14px; + font-weight: 600; + margin-bottom: 12px; + } + + .delete-confirm-message { + font-size: 13px; + color: var(--vscode-descriptionForeground); + margin-bottom: 16px; + } + + .delete-confirm-actions { + display: flex; + justify-content: flex-end; + gap: 8px; + } + + .delete-confirm-actions button { + padding: 6px 16px; + border: none; + border-radius: 4px; + cursor: pointer; + font-size: 13px; + } `; } @@ -299,7 +392,7 @@ export function getDocsetDialogScript(): string {
\${ds.name}
更新于 \${new Date(ds.updatedAt).toLocaleString('zh-CN')}
-