From e0564422199cac9858583002d8733e23cd082d14 Mon Sep 17 00:00:00 2001 From: alondmnt Date: Wed, 7 Jun 2023 22:50:39 +0300 Subject: [PATCH] improved: warning message before setting the history note (closes #1) --- package-lock.json | 4 ++-- package.json | 2 +- src/index.ts | 3 +++ src/manifest.json | 4 ++-- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index fd48d51..bf4a386 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "joplin-plugin-history-panel", - "version": "1.0.1", + "version": "1.0.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "joplin-plugin-history-panel", - "version": "1.0.0", + "version": "1.0.2", "license": "MIT", "devDependencies": { "@types/node": "^14.0.14", diff --git a/package.json b/package.json index 110d906..55a5b19 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "joplin-plugin-history-panel", - "version": "1.0.1", + "version": "1.0.2", "scripts": { "dist": "webpack --joplin-plugin-config buildMain && webpack --joplin-plugin-config buildExtraScripts && webpack --joplin-plugin-config createArchive", "prepare": "npm run dist", diff --git a/src/index.ts b/src/index.ts index ac25098..051c20a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -56,6 +56,9 @@ joplin.plugins.register({ iconName: 'far fa-hourglass', execute: async () => { const note = await joplin.workspace.selectedNote(); + const choice = await joplin.views.dialogs.showMessageBox( + `This will set the current note "${note.title}" as the history note, where your logs will be written to. Continue?`); + if (choice != 0) { return; } await joplin.settings.setValue('histNoteId', note.id); updateHistView(panel, settings, false); }, diff --git a/src/manifest.json b/src/manifest.json index 49a7fd1..a7a0db2 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -2,10 +2,10 @@ "manifest_version": 1, "id": "joplin.plugin.alondmnt.history-panel", "app_min_version": "2.6", - "version": "1.0.1", + "version": "1.0.2", "name": "History Panel", "description": "Joplin note browsing history", - "author": "alondmnt", + "author": "Alon Diament", "homepage_url": "https://github.com/alondmnt/joplin-plugin-history-panel#readme", "repository_url": "https://github.com/alondmnt/joplin-plugin-history-panel", "keywords": []