diff --git a/media/style.css b/media/style.css index 5102a8b..4cd191d 100644 --- a/media/style.css +++ b/media/style.css @@ -2709,6 +2709,27 @@ html.pi-viewport-recovering #pi-web-app { background: var(--pi-bg); } +.settings-open-vscode { + display: block; + width: 100%; + margin-top: 10px; + padding: 6px 10px; + border: 1px solid var(--pi-line); + border-radius: 2px; + background: transparent; + color: var(--pi-muted); + font: inherit; + font-size: 0.85em; + text-align: left; + cursor: pointer; +} + +.settings-open-vscode:hover, +.settings-open-vscode:focus-visible { + border-color: var(--pi-lavender); + color: var(--pi-text); +} + .pi-dialog-btn, .pi-dialog-input, .pi-dialog-option { diff --git a/src/test/vscode-settings-entry.test.ts b/src/test/vscode-settings-entry.test.ts index ac30ea6..e29a94a 100644 --- a/src/test/vscode-settings-entry.test.ts +++ b/src/test/vscode-settings-entry.test.ts @@ -12,12 +12,14 @@ suite("VS Code settings entry", () => { assert.strictEqual(extensionSettingsQuery(" ", " "), "@ext:auchan.pion-code"); }); - test("gear opens native settings and the panel executes the filtered command", () => { + test("gear opens the quick settings panel with a full VS Code settings link", () => { const handlers = readFileSync( new URL("../../src/webview/handlers/index.ts", import.meta.url), "utf8", ); assert.match(handlers, /pi-sb-settings/); + assert.match(handlers, /toggleSettingsPanel\(\);/); + assert.match(handlers, /settings-open-vscode/); assert.match(handlers, /postMessage\(\{ type: "openVscodeSettings" \}\)/); const panel = readFileSync( @@ -27,6 +29,6 @@ suite("VS Code settings entry", () => { assert.match(panel, /case "openVscodeSettings"/); assert.match(panel, /extensionSettingsQuery\(pkg\.publisher, pkg\.name\)/); assert.match(panel, /"workbench\.action\.openSettings"/); - assert.match(panel, /Open Pi on Code settings in VS Code/); + assert.match(panel, /Open Pi settings/); }); }); diff --git a/src/webview-panel.ts b/src/webview-panel.ts index ba96d40..4ba905f 100644 --- a/src/webview-panel.ts +++ b/src/webview-panel.ts @@ -1077,7 +1077,7 @@ export class PiWebviewPanel {