diff --git a/manifest.json b/manifest.json index 1ed36e7..98781af 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "float-search", "name": "Floating Search", - "version": "3.3.1", + "version": "3.3.2", "minAppVersion": "0.15.0", "description": "You can use search view in modal now.", "author": "Boninall", @@ -12,4 +12,4 @@ "支付宝": "https://cdn.jsdelivr.net/gh/Quorafind/.github@main/IMAGE/%E6%94%AF%E4%BB%98%E5%AE%9D%E4%BB%98%E6%AC%BE%E7%A0%81.jpg" }, "isDesktopOnly": false -} \ No newline at end of file +} diff --git a/package.json b/package.json index a5f4bd2..2794c5c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "float-search", - "version": "3.3.1", + "version": "3.3.2", "description": "You can use search view in modal now.", "main": "main.js", "scripts": { diff --git a/src/floatSearchIndex.ts b/src/floatSearchIndex.ts index 0a14b03..2a8e4c0 100644 --- a/src/floatSearchIndex.ts +++ b/src/floatSearchIndex.ts @@ -286,6 +286,18 @@ export default class FloatSearchPlugin extends Plugin { }); } }); + + this.addCommand({ + id: 'open-search-view-window', + name: 'Open Search View Window', + callback: async () => { + const leaf = app.workspace.getLeaf('window'); + leaf.setPinned(true); + await leaf.setViewState({ + type: "search", + }); + } + }); } registerEditorMenuHandler() {