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')}
-