From dd00fdb6426742720750ad96259eee456f0095ea Mon Sep 17 00:00:00 2001 From: John Christopher Date: Sun, 21 Jul 2024 17:04:57 -0500 Subject: [PATCH] remove ribbon icon, add `Clipper: Open view` command, tick beta version --- manifest-beta.json | 4 ++-- manifest.json | 4 ++-- package.json | 2 +- src/main.ts | 20 +++++++++++++++++--- versions.json | 29 +---------------------------- 5 files changed, 23 insertions(+), 36 deletions(-) diff --git a/manifest-beta.json b/manifest-beta.json index 5fcdebb..e3a0474 100644 --- a/manifest-beta.json +++ b/manifest-beta.json @@ -1,7 +1,7 @@ { "id": "obsidian-clipper", - "name": "Obsidian Clipper", - "version": "1.0.0-beta.4", + "name": "Clipper", + "version": "1.0.0-beta.6", "minAppVersion": "0.15.0", "description": "This plugin helps you capture highlights from the web.", "author": "John Christopher", diff --git a/manifest.json b/manifest.json index 71fccae..e3a0474 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-clipper", - "name": "Obsidian Clipper", - "version": "1.0.0-beta.5", + "name": "Clipper", + "version": "1.0.0-beta.6", "minAppVersion": "0.15.0", "description": "This plugin helps you capture highlights from the web.", "author": "John Christopher", diff --git a/package.json b/package.json index 16eb63e..2244844 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsidian-clipper", - "version": "1.0.0-beta.5", + "version": "1.0.0-beta.6", "description": "This plugin helps you capture highlights from the web.", "main": "main.js", "scripts": { diff --git a/src/main.ts b/src/main.ts index 877e1f1..a7009ea 100644 --- a/src/main.ts +++ b/src/main.ts @@ -156,6 +156,20 @@ export default class ObsidianClipperPlugin extends Plugin { }, }); + // Is the Clipper View Open? + this.addCommand({ + id: "show-clipper-view", + name: "Open view", + checkCallback: (checking: boolean) => { + if (checking) { + return ( + this.app.workspace.getLeavesOfType(VIEW_TYPE).length === 0 + ); + } + this.activateView(); + }, + }); + this.registerObsidianProtocolHandler('obsidian-clipper', async (e) => { const parameters = e as unknown as Parameters; @@ -197,9 +211,9 @@ export default class ObsidianClipperPlugin extends Plugin { (leaf) => new BookmarkletLinksView(leaf) ); - this.addRibbonIcon('paperclip', 'Activate view', () => { - this.activateView(); - }); + // this.addRibbonIcon('paperclip', 'Clipper', () => { + // this.activateView(); + // }); } async activateView() { diff --git a/versions.json b/versions.json index 596f5d0..4af6a66 100644 --- a/versions.json +++ b/versions.json @@ -1,30 +1,3 @@ { - "0.0.1": "0.15.0", - "0.0.2": "0.15.0", - "0.0.3": "0.15.0", - "0.0.4": "0.15.0", - "0.0.5": "0.15.0", - "0.0.6": "0.15.0", - "0.0.7": "0.15.0", - "0.1.0": "0.15.0", - "0.1.1": "0.15.0", - "0.1.2": "0.15.0", - "0.1.3": "0.15.0", - "0.1.4": "0.15.0", - "0.1.5": "0.15.0", - "0.1.6": "0.15.0", - "0.2.0": "0.15.0", - "0.2.1": "0.15.0", - "0.2.2": "0.15.0", - "0.2.3": "0.15.0", - "0.2.4": "0.15.0", - "0.2.5": "0.15.0", - "0.2.6": "0.15.0", - "0.2.7": "0.15.0", - "0.2.8": "0.15.0", - "1.0.0-beta.1": "0.15.0", - "1.0.0-beta.2": "0.15.0", - "1.0.0-beta.3": "0.15.0", - "1.0.0-beta.4": "0.15.0", - "1.0.0-beta.5": "0.15.0" + "1.0.0-beta.6": "0.15.0" }