Skip to content

Commit

Permalink
better message, one dialog instance
Browse files Browse the repository at this point in the history
  • Loading branch information
ambrt committed Jan 31, 2021
1 parent 64384cd commit f1f1776
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"name": "joplin-plugin-tag-and-notebook-links",
"version": "1.3.4",
"version": "1.3.6",
"homepage":"https://discourse.joplinapp.org/t/go-to-tag-notebook-or-notes-via-links-and-by-highlighting-text-in-editor/12731",
"scripts": {
"dist": "webpack --joplin-plugin-config buildMain && webpack --joplin-plugin-config buildExtraScripts && webpack --joplin-plugin-config createArchive",
"prepare": "npm run dist",
"update": "npm install -g generator-joplin && yo joplin --update",
"distrun": "npm run dist && ~/.joplin/Joplin.AppImage --env dev"
"distrun": "npm run dist && ~/.joplin/Joplin.AppImage --env dev",
"distrun2": "npm run dist && ~/Downloads/Joplin-1.6.8.AppImage --env dev"
},
"license": "MIT",
"keywords": [
Expand Down
9 changes: 5 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ function escapeTitleText(text: string) {

joplin.plugins.register({
onStart: async function () {
let dialog = await joplin.views.dialogs.create('wrongText')
async function findTag(tagName) {
console.log(tagName)
let tagId = ''
Expand Down Expand Up @@ -156,8 +157,8 @@ joplin.plugins.register({
}
catch (err) {
console.log(err)
let dialog = await joplin.views.dialogs.create('wrongText')
await joplin.views.dialogs.setHtml(dialog, "Seems like text is not an exact id,tag or folder<br>Or other error occured");
//let dialog = await joplin.views.dialogs.create('wrongText')
await joplin.views.dialogs.setHtml(dialog, "Seems like text is not an exact note id, tag or folder<br>Include # or @ in front of tag or notebook<br>Or other error occured");
await joplin.views.dialogs.setButtons(dialog, [{ id: "ok" }]);
await joplin.views.dialogs.open(dialog);
}
Expand Down Expand Up @@ -201,8 +202,8 @@ joplin.plugins.register({
}
catch (err) {
console.log(err)
let dialog = await joplin.views.dialogs.create('wrongText')
await joplin.views.dialogs.setHtml(dialog, "Seems like text is not an exact id,tag or folder<br>Or other error occured");

await joplin.views.dialogs.setHtml(dialog, "Seems like text is not an exact note id, tag or folder<br>Include # or @ in front of tag or notebook<br>Or other error occured");
await joplin.views.dialogs.setButtons(dialog, [{ id: "ok" }]);
await joplin.views.dialogs.open(dialog);
}
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 1,
"id": "joplin.plugin.ambrt.goToItem",
"app_min_version": "1.6",
"version": "1.3.4",
"version": "1.3.6",
"name": "Create and go to #tags and @notebooks",
"description": "Go to tag,notebook or note via links or via text",
"author": "a",
Expand Down

0 comments on commit f1f1776

Please sign in to comment.