From bce221aaaac3c654b4e840c80914dd27e2f192e5 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 10 Oct 2022 15:05:59 +0200 Subject: [PATCH] fixed edited entry names not actually being saved --- src/tracker.ts | 11 +++++++---- .../.obsidian/plugins/simple-time-tracker/main.js | 15 +++++++++------ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/tracker.ts b/src/tracker.ts index 83e6fa1..abc5fd9 100644 --- a/src/tracker.ts +++ b/src/tracker.ts @@ -112,17 +112,20 @@ export function displayTracker(tracker: Tracker, element: HTMLElement, getSectio .setClass("clickable-icon") .setTooltip("Edit") .setIcon("lucide-pencil") - .onClick(() => { + .onClick(async () => { if (namePar.hidden) { namePar.hidden = false; nameBox.inputEl.hidden = true; - if (nameBox.getValue()) - namePar.setText(nameBox.getValue()); editButton.setIcon("lucide-pencil"); + if (nameBox.getValue()) { + entry.name = nameBox.getValue(); + namePar.setText(entry.name); + await saveTracker(tracker, this.app, getSectionInfo()); + } } else { namePar.hidden = true; nameBox.inputEl.hidden = false; - nameBox.setValue(namePar.getText()); + nameBox.setValue(entry.name); editButton.setIcon("lucide-check"); } }); diff --git a/test-vault/.obsidian/plugins/simple-time-tracker/main.js b/test-vault/.obsidian/plugins/simple-time-tracker/main.js index d5128cd..dd8b6a3 100644 --- a/test-vault/.obsidian/plugins/simple-time-tracker/main.js +++ b/test-vault/.obsidian/plugins/simple-time-tracker/main.js @@ -166,20 +166,23 @@ function displayTracker(tracker, element, getSectionInfo, settings) { row.createEl("td", { text: entry.endTime ? formatTimestamp(entry.endTime, settings) : "" }); row.createEl("td", { text: entry.endTime ? formatDurationBetween(entry.startTime, entry.endTime) : "" }); let entryButtons = row.createEl("td"); - let editButton = new import_obsidian2.ButtonComponent(entryButtons).setClass("clickable-icon").setTooltip("Edit").setIcon("lucide-pencil").onClick(() => { + let editButton = new import_obsidian2.ButtonComponent(entryButtons).setClass("clickable-icon").setTooltip("Edit").setIcon("lucide-pencil").onClick(() => __async(this, null, function* () { if (namePar.hidden) { namePar.hidden = false; nameBox.inputEl.hidden = true; - if (nameBox.getValue()) - namePar.setText(nameBox.getValue()); editButton.setIcon("lucide-pencil"); + if (nameBox.getValue()) { + entry.name = nameBox.getValue(); + namePar.setText(entry.name); + yield saveTracker(tracker, this.app, getSectionInfo()); + } } else { namePar.hidden = true; nameBox.inputEl.hidden = false; - nameBox.setValue(namePar.getText()); + nameBox.setValue(entry.name); editButton.setIcon("lucide-check"); } - }); + })); new import_obsidian2.ButtonComponent(entryButtons).setClass("clickable-icon").setTooltip("Remove").setIcon("lucide-trash").onClick(() => __async(this, null, function* () { tracker.entries.remove(entry); yield saveTracker(tracker, this.app, getSectionInfo()); @@ -294,4 +297,4 @@ var SimpleTimeTrackerPlugin = class extends import_obsidian3.Plugin { }); } }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsic3JjL21haW4udHMiLCAic3JjL3NldHRpbmdzLnRzIiwgInNyYy9zZXR0aW5ncy10YWIudHMiLCAic3JjL3RyYWNrZXIudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImltcG9ydCB7IFBsdWdpbiB9IGZyb20gXCJvYnNpZGlhblwiO1xyXG5pbXBvcnQgeyBkZWZhdWx0U2V0dGluZ3MsIFNpbXBsZVRpbWVUcmFja2VyU2V0dGluZ3MgfSBmcm9tIFwiLi9zZXR0aW5nc1wiO1xyXG5pbXBvcnQgeyBTaW1wbGVUaW1lVHJhY2tlclNldHRpbmdzVGFiIH0gZnJvbSBcIi4vc2V0dGluZ3MtdGFiXCI7XHJcbmltcG9ydCB7IGRpc3BsYXlUcmFja2VyLCBsb2FkVHJhY2tlciB9IGZyb20gXCIuL3RyYWNrZXJcIjtcclxuXHJcbmV4cG9ydCBkZWZhdWx0IGNsYXNzIFNpbXBsZVRpbWVUcmFja2VyUGx1Z2luIGV4dGVuZHMgUGx1Z2luIHtcclxuXHJcblx0c2V0dGluZ3M6IFNpbXBsZ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GVudHJ5LnN0YXJ0VGltZSwgZW50cnkuZW5kVGltZSkgOiBcIlwiIH0pO1xyXG5cclxuICAgICAgICAgICAgbGV0IGVudHJ5QnV0dG9ucyA9IHJvdy5jcmVhdGVFbChcInRkXCIpO1xyXG4gICAgICAgICAgICBsZXQgZWRpdEJ1dHRvbiA9IG5ldyBCdXR0b25Db21wb25lbnQoZW50cnlCdXR0b25zKVxyXG4gICAgICAgICAgICAgICAgLnNldENsYXNzKFwiY2xpY2thYmxlLWljb25cIilcclxuICAgICAgICAgICAgICAgIC5zZXRUb29sdGlwKFwiRWRpdFwiKVxyXG4gICAgICAgICAgICAgICAgLnNldEljb24oXCJsdWNpZGUtcGVuY2lsXCIpXHJcbiAgICAgICAgICAgICAgICAub25DbGljaygoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKG5hbWVQYXIuaGlkZGVuKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWVQYXIuaGlkZGVuID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWVCb3guaW5wdXRFbC5oaWRkZW4gPSB0cnVlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAobmFtZUJveC5nZXRWYWx1ZSgpKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZVBhci5zZXRUZXh0KG5hbWVCb3guZ2V0VmFsdWUoKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGVkaXRCdXR0b24uc2V0SWNvbihcImx1Y2lkZS1wZW5jaWxcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZVBhci5oaWRkZW4gPSB0cnVlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lQm94LmlucHV0RWwuaGlkZGVuID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWVCb3guc2V0VmFsdWUobmFtZVBhci5nZXRUZXh0KCkpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBlZGl0QnV0dG9uLnNldEljb24oXCJsdWNpZGUtY2hlY2tcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIG5ldyBCdXR0b25Db21wb25lbnQoZW50cnlCdXR0b25zKVxyXG4gICAgICAgICAgICAgICAgLnNldENsYXNzKFwiY2xpY2thYmxlLWljb25cIilcclxuICAgICAgICAgICAgICAgIC5zZXRUb29sdGlwKFwiUmVtb3ZlXCIpXHJcbiAgICAgICAgICAgICAgICAuc2V0SWNvbihcImx1Y2lkZS10cmFzaFwiKVxyXG4gICAgICAgICAgICAgICAgLm9uQ2xpY2soYXN5bmMgKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHRyYWNrZXIuZW50cmllcy5yZW1vdmUoZW50cnkpO1xyXG4gICAgICAgICAgICAgICAgICAgIGF3YWl0IHNhdmVUcmFja2VyKHRyYWNrZXIsIHRoaXMuYXBwLCBnZXRTZWN0aW9uSW5mbygpKTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLy8gYWRkIGNvcHkgYnV0dG9uc1xyXG4gICAgICAgIGxldCBidXR0b25zID0gZWxlbWVudC5jcmVhdGVFbChcImRpdlwiLCB7IGNsczogXCJzaW1wbGUtdGltZS10cmFja2VyLWJvdHRvbVwiIH0pO1xyXG4gICAgICAgIG5ldyBCdXR0b25Db21wb25lbnQoYnV0dG9ucylcclxuICAgICAgICAgICAgLnNldEJ1dHRvblRleHQoXCJDb3B5IGFzIHRhYmxlXCIpXHJcbiAgICAgICAgICAgIC5vbkNsaWNrKCgpID0+IG5hdmlnYXRvci5jbGlwYm9hcmQud3JpdGVUZXh0KGNyZWF0ZU1hcmtkb3duVGFibGUodHJhY2tlciwgc2V0dGluZ3MpKSk7XHJcbiAgICAgICAgbmV3IEJ1dH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cmluZyk6IFRyYWNrZXIge1xyXG4gICAgaWYgKGpzb24pIHtcclxuICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICByZXR1cm4gSlNPTi5wYXJzZShqc29uKTtcclxuICAgICAgICB9IGNhdGNoIChlKSB7XHJcbiAgICAgICAgICAgIGNvbnNvbGUubG9nKGBGYWlsZWQgdG8gcGFyc2UgVHJhY2tlciBmcm9tICR7anNvbn1gKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbiAgICByZXR1cm4geyBlbnRyaWVzOiBbXSB9O1xyXG59XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gZGlzcGxheVRyYWNrZXIodHJhY2tlcjogVHJhY2tlciwgZWxlbWVudDogSFRNTEVsZW1lbnQsIGdldFNlY3Rpb25JbmZvOiAoKSA9PiBNYXJrZG93blNlY3Rpb25JbmZvcm1hdGlvbiwgc2V0dGluZ3M6IFNpbXBsZVRpbWVUcmFja2VyU2V0dGluZ3MpOiB2b2lkIHtcclxuICAgIC8vIGFkZCBzdGFydC9zdG9wIGNvbnRyb2xzXHJcbiAgICBsZXQgcnVubmluZyA9IGlzUnVubmluZyh0cmFja2VyKTtcclxuICAgIGxldCBidG4gPSBuZXcgQnV0dG9uQ29tcG9uZW50KGVsZW1lbnQpXHJcbiAgICAgICAgLnNldENsYXNzKFwiY2xpY2thYmxlLWljb25cIilcclxuICAgICAgICAuc2V0SWNvbihgbHVjaWRlLSR7cnVubmluZyA/IFwic3RvcFwiIDogXCJwbGF5XCJ9LWNpcmNsZWApXHJcbiAgICAgICAgLnNldFRvb2x0aXAocnVubmluZyA/IFwiRW5kXCIgOiBcIlN0YXJ0XCIpXHJcbiAgICAgICAgLm9uQ2xpY2soYXN5bmMgKCkgPT4ge1xyXG4gICAgICAgICAgICBpZiAocnVubmluZykge1xyXG4gICAgICAgICAgICAgICAgZW5kRW50cnkodHJhY2tlcik7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBzdGFyd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ICAgICAgICAgIG5hbWVQYXIuaGlkZGVuID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWVCb3guaW5wdXRFbC5oaWRkZW4gPSB0cnVlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBlZGl0QnV0dG9uLnNldEljb24oXCJsdWNpZGUtcGVuY2lsXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAobmFtZUJveC5nZXRWYWx1ZSgpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnRyeS5uYW1lID0gbmFtZUJveC5nZXRWYWx1ZSgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZVBhci5zZXRUZXh0KGVudHJ5Lm5hbWUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXdhaXQgc2F2ZVRyYWNrZXIodHJhY2tlciwgdGhpcy5hcHAsIGdldFNlY3Rpb25JbmZvKCkpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZVBhci5oaWRkZW4gPSB0cnVlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lQm94LmlucHV0RWwuaGlkZGVuID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWVCb3guc2V0VmFsdWUoZW50cnkubmFtZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGVkaXRCdXR0b24uc2V0SWNvbihcImx1Y2lkZS1jaGVja1wiKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgbmV3IEJ1dHRvbkNvbXBvbmVudChlbnRyeUJ1dHRvbnMpXHJcbiAgICAgICAgICAgICAgICAuc2V0Q2xhc3MoXCJjbGlja2FibGUtaWNvblwiKVxyXG4gICAgICAgICAgICAgICAgLnNldFRvb2x0aXAoXCJSZW1vdmVcIilcclxuICAgICAgICAgICAgICAgIC5zZXRJY29uKFwibHVjaWRlLXRyYXNoXCIpXHJcbiAgICAgICAgICAgICAgICAub25DbGljayhhc3luYyAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgdHJhY2tlci5lbnRyaWVzLnJlbW92ZShlbnRyeSk7XHJcbiAgICAgICAgICAgICAgICAgICAgYXdhaXQgc2F2ZVRyYWNrZXIodHJhY2tlciwgdGhpcy5hcHAsIGdldFNlY3Rpb25JbmZvKCkpO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBhZGQgY29weSBidXR0b25zXHJcbiAgICAgICAgbGV0IGJ1dHRvbnMgPSBlbGVtZW50LmNyZWF0ZUVsKFwiZGl2XCIsIHsgY2xzOiBcInNpbXBsZS10aW1lLXRyYWNrZXItYm90dG9tXCIgfSk7XHJcbiAgICAgICAgbmV3IEJ1dHRvbkNvbXBvbmVudChidXR0b25zKVxyXG4gICAgICAgICAgICAuc2V0QnV0dG9uVGV4dChcIkNvcHkgYXMgdGFibGVcIilcclxuICAgICAgICAgICAgLm9uQ2xpY2soKCkgPT4gbmF2aWdhdG9yLmNsaXBib2FyZC53cml0ZVRleHQoY3JlYXRlTWFya2Rvd25UYWJsZSh0cmFja2VyLCBzZXR0aW5ncykpKTtcclxuICAgICAgICBuZXcgQnV0dG9uQ29tcG9uZW50KGJ1dHRvbnMpXHJcbiAgICAgICAgICAgIC5zZXRCdXR0b25UZXh0KFwiQ29weSBhcyBDU1ZcIilcclxuICAgICAgICAgICAgLm9uQ2xpY2soKCkgPT4gbmF2aWdhdG9yLmNsaXBib2FyZC53cml0ZVRleHQoY3JlYXRlQ3N2KHRyYWNrZXIsIHNldHRpbmdzKSkpO1xyXG4gICAgfVxyXG5cclxuXHJcbiAgICBzZXRDb3VudGRvd25WYWx1ZXModHJhY2tlciwgY3VycmVudCwgdG90YWwsI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