From d001d7887a42a1d7d7b25fd4a11b715223083527 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Tue, 27 Sep 2022 21:44:28 +0200 Subject: [PATCH] orrganized code a bit better --- src/main.ts | 28 +++------------- src/tracker.ts | 22 +++++++++++-- .../obsidian-simple-time-tracker/main.js | 32 +++++++++---------- test-vault/track-note-test.md | 2 +- 4 files changed, 41 insertions(+), 43 deletions(-) diff --git a/src/main.ts b/src/main.ts index edf707d..f9345eb 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,7 +1,7 @@ -import { ButtonComponent, Plugin, TextComponent } from "obsidian"; +import { Plugin } from "obsidian"; import { defaultSettings, SimpleTimeTrackerSettings } from "./settings"; import { SimpleTimeTrackerSettingsTab } from "./settings-tab"; -import { displayTracker, endEntry, isRunning, loadTracker, saveTracker, startEntry, Tracker } from "./tracker"; +import { displayTracker, loadTracker } from "./tracker"; export default class SimpleTimeTrackerPlugin extends Plugin { @@ -13,29 +13,9 @@ export default class SimpleTimeTrackerPlugin extends Plugin { this.addSettingTab(new SimpleTimeTrackerSettingsTab(this.app, this)); this.registerMarkdownCodeBlockProcessor("simple-time-tracker", (s, e, i) => { - e.empty(); - let tracker = loadTracker(s); - let running = isRunning(tracker); - - let btn = new ButtonComponent(e) - .setButtonText(running ? "End" : "Start") - .onClick(async () => { - if (running) { - endEntry(tracker); - } else { - startEntry(tracker, name.getValue()); - } - await saveTracker(tracker, this.app, i.getSectionInfo(e)); - }); - btn.buttonEl.addClass("simple-time-tracker-btn"); - - let name = new TextComponent(e) - .setPlaceholder("Segment name") - .setDisabled(running); - name.inputEl.addClass("simple-time-tracker-txt"); - - displayTracker(tracker, e); + e.empty(); + displayTracker(tracker, e, () => i.getSectionInfo(e)); }); } diff --git a/src/tracker.ts b/src/tracker.ts index ff4bb30..d1cb214 100644 --- a/src/tracker.ts +++ b/src/tracker.ts @@ -1,4 +1,4 @@ -import { moment, App, MarkdownSectionInformation } from "obsidian"; +import { moment, App, MarkdownSectionInformation, ButtonComponent, TextComponent } from "obsidian"; export class Tracker { entries: Entry[]; @@ -52,7 +52,25 @@ export function loadTracker(json: string): Tracker { return { entries: [] }; } -export function displayTracker(tracker: Tracker, element: HTMLElement): void { +export function displayTracker(tracker: Tracker, element: HTMLElement, getSectionInfo: () => MarkdownSectionInformation): void { + // add start/stop controls + let running = isRunning(tracker); + let btn = new ButtonComponent(element) + .setButtonText(running ? "End" : "Start") + .onClick(async () => { + if (running) { + endEntry(tracker); + } else { + startEntry(tracker, name.getValue()); + } + await saveTracker(tracker, this.app, getSectionInfo()); + }); + btn.buttonEl.addClass("simple-time-tracker-btn"); + let name = new TextComponent(element) + .setPlaceholder("Segment name") + .setDisabled(running); + name.inputEl.addClass("simple-time-tracker-txt"); + // add timers let timer = element.createDiv({ cls: "simple-time-tracker-timers" }); let currentDiv = timer.createEl("div", { cls: "simple-time-tracker-timer" }); diff --git a/test-vault/.obsidian/plugins/obsidian-simple-time-tracker/main.js b/test-vault/.obsidian/plugins/obsidian-simple-time-tracker/main.js index 0ce386b..3e46b80 100644 --- a/test-vault/.obsidian/plugins/obsidian-simple-time-tracker/main.js +++ b/test-vault/.obsidian/plugins/obsidian-simple-time-tracker/main.js @@ -110,7 +110,19 @@ function loadTracker(json) { } return { entries: [] }; } -function displayTracker(tracker, element) { +function displayTracker(tracker, element, getSectionInfo) { + let running = isRunning(tracker); + let btn = new import_obsidian2.ButtonComponent(element).setButtonText(running ? "End" : "Start").onClick(() => __async(this, null, function* () { + if (running) { + endEntry(tracker); + } else { + startEntry(tracker, name.getValue()); + } + yield saveTracker(tracker, this.app, getSectionInfo()); + })); + btn.buttonEl.addClass("simple-time-tracker-btn"); + let name = new import_obsidian2.TextComponent(element).setPlaceholder("Segment name").setDisabled(running); + name.inputEl.addClass("simple-time-tracker-txt"); let timer = element.createDiv({ cls: "simple-time-tracker-timers" }); let currentDiv = timer.createEl("div", { cls: "simple-time-tracker-timer" }); let current = currentDiv.createEl("span", { cls: "simple-time-tracker-timer-time" }); @@ -174,21 +186,9 @@ var SimpleTimeTrackerPlugin = class extends import_obsidian3.Plugin { yield this.loadSettings(); this.addSettingTab(new SimpleTimeTrackerSettingsTab(this.app, this)); this.registerMarkdownCodeBlockProcessor("simple-time-tracker", (s, e, i) => { - e.empty(); let tracker = loadTracker(s); - let running = isRunning(tracker); - let btn = new import_obsidian3.ButtonComponent(e).setButtonText(running ? "End" : "Start").onClick(() => __async(this, null, function* () { - if (running) { - endEntry(tracker); - } else { - startEntry(tracker, name.getValue()); - } - yield saveTracker(tracker, this.app, i.getSectionInfo(e)); - })); - btn.buttonEl.addClass("simple-time-tracker-btn"); - let name = new import_obsidian3.TextComponent(e).setPlaceholder("Segment name").setDisabled(running); - name.inputEl.addClass("simple-time-tracker-txt"); - displayTracker(tracker, e); + e.empty(); + displayTracker(tracker, e, () => i.getSectionInfo(e)); }); }); } @@ -203,4 +203,4 @@ var SimpleTimeTrackerPlugin = class extends import_obsidian3.Plugin { }); } }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsic3JjL21haW4udHMiLCAic3JjL3NldHRpbmdzLnRzIiwgInNyYy9zZXR0aW5ncy10YWIudHMiLCAic3JjL3RyYWNrZXIudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImltcG9ydCB7IEJ1dHRvbkNvbXBvbmVudCwgUGx1Z2luLCBUZXh0Q29tcG9uZW50IH0gZnJvbSBcIm9ic2lkaWFuXCI7XHJcbmltcG9ydCB7IGRlZmF1bHRTZXR0aW5ncywgU2ltcGxlVGltZVRyYWNrZXJTZXR0aW5ncyB9IGZyb20gXCIuL3NldHRpbmdzXCI7XHJcbmltcG9ydCB7IFNpbXBsZVRpbWVUcmFja2VyU2V0dGluZ3NUYWIgfSBmcm9tIFwiLi9zZXR0aW5ncy10YWJcIjtcclxuaW1wb3J0IHsgZGlzcGxheVRyYWNrZXIsIGVuZEVudHJ5LCBpc1J1bm5pbmcsIGxvYWRUcmFja2V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VFbChcInRkXCIsIHsgdGV4dDogbW9tZW50LnVuaXgoZW50cnkuZW5kVGltZSkuZm9ybWF0KFwiWVktTU0tREQgaGg6bW06c3NcIikgfSk7XHJcbiAgICAgICAgICAgIGxldCBkdXJhdGlvbiA9IG1vbWVudC51bml4KGVudHJ5LmVuZFRpbWUpLmRpZmYobW9tZW50LnVuaXgoZW50cnkuc3RhcnRUaW1lKSk7XHJcbiAgICAgICAgICAgIHJvdy5jcmVhdGVFbChcInRkXCIsIHsgdGV4dDogZ2V0Q291bnRkb3duRGlzcGxheShtb21lbnQuZHVyYXRpb24oZHVyYXRpb24pKSB9KTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgc2V0Q291bnRkb3duVmFsdWVzKHRyYWNrZXIsIGN1cnJlbnQsIHRvdGFsLCBjdXJyZW50RGl2KTtcclxuICAgIGxldCBpbnRlcnZhbElkID0gd2luZG93LnNldEludGVydmFsKCgpID0+IHtcclxuICAgICAgICAvLyB3ZSBkZWxldGUgdGhlIGludGVydmFsIHRpbWVyIHdoZW4gdGhlIGVsZW1lbnQgaXMgcmVtb3ZlZFxyXG4gICAgICAgIGlmICghZWxlbWVudC5pc0Nvbm5lY3RlZCkge1xyXG4gICAgICAgICAgICB3aW5kb3cuY2xlYXJJbnRlcnZhbChpbnRlcnZhbElkKTtcclxuICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgIH1cclxuICAgICAgICBzZXRDb3VudGRvd25WYWx1ZXModHJhY2tlciwgY3VycmVudCwgdG90YWwsIGN1cnJlbnREaXYpO1xyXG4gICAgfSwgMTAwMCk7XHJcblxyXG59O1xyXG5cclxuZnVuY3Rpb24gZ2V0Q291bnRkb3duRGlzcGxheShkdXJhdGlvbjogbW9tZW50LkR1cmF0aW9uKTogc3RyaW5nIHtcclxuICAgIGxldCByZXQgPSBcIlwiO1xyXG4gICAgaWYgKGR1cmF0aW9uLmhvdXJzKCkgPiAwKVxyXG4gICAgICAgIHJldCArPSBkdXJ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DAwKTtcclxuXHJcbn07XHJcblxyXG5mdW5jdGlvbiBnZXRDb3VudGRvd25EaXNwbGF5KGR1cmF0aW9uOiBtb21lbnQuRHVyYXRpb24pOiBzdHJpbmcge1xyXG4gICAgbGV0IHJldCA9IFwiXCI7XHJcbiAgICBpZiAoZHVyYXRpb24uaG91cnMoKSA+IDApXHJcbiAgICAgICAgcmV0ICs9IGR1cmF0aW9uLmhvdXJzKCkgKyBcImggXCI7XHJcbiAgICBpZiAoZHVyYXRpb24ubWludXRlcygpID4gMClcclxuICAgICAgICByZXQgKz0gZHVyYXRpb24ubWludXRlcygpICsgXCJtIFwiO1xyXG4gICAgcmV0ICs9IGR1cmF0aW9uLnNlY29uZHMoKSArIFwic1wiO1xyXG4gICAgcmV0dXJuIHJldDtcclxufVxyXG5cclxuZnVuY3Rpb24gc2V0Q291bnRkb3duVmFsdWVzKHRyYWNrZXI6IFRyYWNrZXIsIGN1cnJlbnQ6IEhUTUxFbGVtZW50LCB0b3RhbDogSFRNTEVsZW1lbnQsIGN1cnJlbnREaXY6IEhUTUxEaXZFbGVtZW50KSB7XHJcbiAgICBsZXQgY3VyckVudHJ5ID0gdHJhY2tlci5lbnRyaWVzLmxhc3QoKTtcclxuICAgIGlmIChjdXJyRW50cnkpIHtcclxuICAgICAgICBsZXQgY3VyckR1cmF0aW9uID0gbW9tZW50KCkuZGlmZihtb21lbnQudW5peChjdXJyRW50cnkuc3RhcnRUaW1lKSk7XHJcbiAgICAgICAgaWYgKCFjdXJyRW50cnkuZW5kVGltZSlcclxuICAgICAgICAgICAgY3VycmVudC5zZXRUZXh0KGdldENvdW50ZG93bkRpc3BsYXkobW9tZW50LmR1cmF0aW9uKGN1cnJEdXJhdGlvbikpKTtcclxuXHJcbiAgICAgICAgbGV0IHRvdGFsRHVyYXRpb24gPSAwO1xyXG4gICAgICAgIGZvciAobGV0IGVudHJ5IG9mIHRyYWNrZXIuZW50cmllcykge1xyXG4gICAgICAgICAgICBpZiAoZW50cnkgPT0g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BUSxRQUFRLG9CQUFvQix3QkFBTyxTQUFTO0FBRXhELFFBQUksZ0JBQWdCO0FBQ3BCLGFBQVMsU0FBUyxRQUFRLFNBQVM7QUFDL0IsVUFBSSxTQUFTLGFBQWEsQ0FBQyxVQUFVLFNBQVM7QUFDMUMseUJBQWlCO0FBQUEsYUFDZDtBQUNILHlCQUFpQix3QkFBTyxLQUFLLE1BQU0sU0FBUyxLQUFLLHdCQUFPLEtBQUssTUFBTTtBQUFBO0FBQUE7QUFHM0UsVUFBTSxRQUFRLG9CQUFvQix3QkFBTyxTQUFTO0FBQUE7QUFFdEQsYUFBVyxTQUFTLENBQUMsYUFBYSxDQUFDLENBQUMsVUFBVTtBQUFBOzs7QUh2SWxELDRDQUFxRCx3QkFBTztBQUFBLEVBSXJELFNBQXdCO0FBQUE7QUFDN0IsWUFBTSxLQUFLO0FBRVgsV0FBSyxjQUFjLElBQUksNkJBQTZCLEtBQUssS0FBSztBQUU5RCxXQUFLLG1DQUFtQyx1QkFBdUIsQ0FBQyxHQUFHLEdBQUcsTUFBTTtBQUMzRSxZQUFJLFVBQVUsWUFBWTtBQUMxQixVQUFFO0FBQ0YsdUJBQWUsU0FBUyxHQUFHLE1BQU0sRUFBRSxlQUFlO0FBQUE7QUFBQTtBQUFBO0FBQUEsRUFJOUMsZUFBZTtBQUFBO0FBQ3BCLFdBQUssV0FBVyxPQUFPLE9BQU8sSUFBSSxpQkFBaUIsTUFBTSxLQUFLO0FBQUE7QUFBQTtBQUFBLEVBR3pELGVBQWU7QUFBQTtBQUNwQixZQUFNLEtBQUssU0FBUyxLQUFLO0FBQUE7QUFBQTtBQUFBOyIsCiAgIm5hbWVzIjogW10KfQo= diff --git a/test-vault/track-note-test.md b/test-vault/track-note-test.md index 2b8f97d..15fb6a3 100644 --- a/test-vault/track-note-test.md +++ b/test-vault/track-note-test.md @@ -1,7 +1,7 @@ This is a time tracker: ```simple-time-tracker -{"entries":[{"name":"Segment 1","startTime":1664306406,"endTime":1664306408},{"name":"Segment 2","startTime":1664306409,"endTime":1664306410},{"name":"Segment 3","startTime":1664306411,"endTime":1664306412},{"name":"Segment 4","startTime":1664306413,"endTime":1664306422},{"name":"Segment 5","startTime":1664306455,"endTime":1664306458},{"name":"Segment 6","startTime":1664306543,"endTime":1664306545},{"name":"Segment 7","startTime":1664306581,"endTime":1664306599},{"name":"Segment 8","startTime":1664306956,"endTime":1664306959},{"name":"Segment 9","startTime":1664306962,"endTime":1664306965},{"name":"Segment 10","startTime":1664307015,"endTime":1664307018},{"name":"Segment 11","startTime":1664307036,"endTime":1664307039},{"name":"Segment 12","startTime":1664307055,"endTime":1664307149},{"name":"Segment 13","startTime":1664307152,"endTime":1664307159},{"name":"Segment 14","startTime":1664307169,"endTime":1664307198},{"name":"Segment 15","startTime":1664307254,"endTime":1664307270},{"name":"Segment 16","startTime":1664307272,"endTime":1664307279},{"name":"Working on stuff","startTime":1664307284,"endTime":1664307290},{"name":"Segment 18","startTime":1664307593,"endTime":1664307611}]} +{"entries":[{"name":"Segment 1","startTime":1664306406,"endTime":1664306408},{"name":"Segment 2","startTime":1664306409,"endTime":1664306410},{"name":"Segment 3","startTime":1664306411,"endTime":1664306412},{"name":"Segment 4","startTime":1664306413,"endTime":1664306422},{"name":"Segment 5","startTime":1664306455,"endTime":1664306458},{"name":"Segment 6","startTime":1664306543,"endTime":1664306545},{"name":"Segment 7","startTime":1664306581,"endTime":1664306599},{"name":"Segment 8","startTime":1664306956,"endTime":1664306959},{"name":"Segment 9","startTime":1664306962,"endTime":1664306965},{"name":"Segment 10","startTime":1664307015,"endTime":1664307018},{"name":"Segment 11","startTime":1664307036,"endTime":1664307039},{"name":"Segment 12","startTime":1664307055,"endTime":1664307149},{"name":"Segment 13","startTime":1664307152,"endTime":1664307159},{"name":"Segment 14","startTime":1664307169,"endTime":1664307198},{"name":"Segment 15","startTime":1664307254,"endTime":1664307270},{"name":"Segment 16","startTime":1664307272,"endTime":1664307279},{"name":"Working on stuff","startTime":1664307284,"endTime":1664307290},{"name":"Segment 18","startTime":1664307593,"endTime":1664307611},{"name":"Segment 19","startTime":1664307842,"endTime":1664307851}]} ```