From 09d9bc4132277379ed0ab7a7a07ba3ff94b6ee9d Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Tue, 27 Sep 2022 21:23:36 +0200 Subject: [PATCH] pretty much finished the basics --- src/tracker.ts | 87 +++++++++++++------ styles.css | 17 ++++ .../obsidian-simple-time-tracker/main.js | 84 ++++++++++++------ .../obsidian-simple-time-tracker/styles.css | 17 ++++ test-vault/track-note-test.md | 2 +- 5 files changed, 153 insertions(+), 54 deletions(-) diff --git a/src/tracker.ts b/src/tracker.ts index da30f05..e871f9d 100644 --- a/src/tracker.ts +++ b/src/tracker.ts @@ -1,4 +1,4 @@ -import { App, MarkdownSectionInformation } from "obsidian"; +import { moment, App, MarkdownSectionInformation } from "obsidian"; export class Tracker { entries: Entry[]; @@ -11,14 +11,15 @@ export interface Entry { } export function startEntry(tracker: Tracker, name: string): void { - // date constructor returns the current date - let entry: Entry = { name: name, startTime: Date.now(), endTime: null }; + if (!name) + name = `Segment ${tracker.entries.length + 1}`; + let entry: Entry = { name: name, startTime: moment().unix(), endTime: null }; tracker.entries.push(entry); }; export function endEntry(tracker: Tracker): void { let last = tracker.entries.last(); - last.endTime = Date.now(); + last.endTime = moment().unix(); } export function isRunning(tracker: Tracker): boolean { @@ -52,32 +53,64 @@ export function loadTracker(json: string): Tracker { } export function displayTracker(tracker: Tracker, element: HTMLElement): void { + // add timers let timer = element.createDiv({ cls: "simple-time-tracker-timers" }); - let current = timer.createEl("div", { cls: "simple-time-tracker-timer" }); - current.createEl("span", { cls: "simple-time-tracker-timer-time", text: "00:00" }); - current.createEl("span", { text: "CURRENT" }); - let total = timer.createEl("div", { cls: "simple-time-tracker-timer" }); - total.createEl("span", { cls: "simple-time-tracker-timer-time", text: "01:00" }); - total.createEl("span", { text: "TOTAL" }); + let currentDiv = timer.createEl("div", { cls: "simple-time-tracker-timer" }); + let current = currentDiv.createEl("span", { cls: "simple-time-tracker-timer-time", text: "00:00" }); + currentDiv.createEl("span", { text: "CURRENT" }); + let totalDiv = timer.createEl("div", { cls: "simple-time-tracker-timer" }); + let total = totalDiv.createEl("span", { cls: "simple-time-tracker-timer-time", text: "00:00" }); + totalDiv.createEl("span", { text: "TOTAL" }); - let list = element.createEl("ul"); - for (let entry of tracker.entries) - list.createEl("li", { text: displayEntry(entry) }); -}; - -export function displayEntry(entry: Entry): string { - // TODO add an option to display this as an interval rather than a from - to string - let ret = ""; - if (entry.name) - ret += `${entry.name}: `; - - let start = new Date(entry.startTime); - ret += `${start.toLocaleString()} - `; - - if (entry.endTime) { - let end = new Date(entry.endTime); - ret += `${end.toLocaleString()}`; + // add list + let table = element.createEl("table", { cls: "simple-time-tracker-table" }); + for (let entry of tracker.entries) { + let row = table.createEl("tr"); + row.createEl("td", { text: entry.name }); + row.createEl("td", { text: moment.unix(entry.startTime).format("YY-MM-DD hh:mm:ss") }); + if (entry.endTime) { + row.createEl("td", { text: moment.unix(entry.endTime).format("YY-MM-DD hh:mm:ss") }); + let duration = moment.unix(entry.endTime).diff(moment.unix(entry.startTime)); + row.createEl("td", { text: getCountdownDisplay(moment.duration(duration)) }); + } } + setCountdownValues(tracker, current, total, currentDiv); + let intervalId = window.setInterval(() => { + // we delete the interval timer when the element is removed + if (!element.isConnected) { + window.clearInterval(intervalId); + return; + } + setCountdownValues(tracker, current, total, currentDiv); + }, 1000); + +}; + +function getCountdownDisplay(duration: moment.Duration): string { + let ret = ""; + if (duration.hours() > 0) + ret += duration.hours().toString().padStart(2, "0") + ":"; + ret += duration.minutes().toString().padStart(2, "0") + ":" + duration.seconds().toString().padStart(2, "0"); return ret; } + +function setCountdownValues(tracker: Tracker, current: HTMLElement, total: HTMLElement, currentDiv: HTMLDivElement) { + let currEntry = tracker.entries.last(); + if (currEntry) { + let currDuration = moment().diff(moment.unix(currEntry.startTime)); + if (!currEntry.endTime) + current.setText(getCountdownDisplay(moment.duration(currDuration))); + + let totalDuration = 0; + for (let entry of tracker.entries) { + if (entry == currEntry && !currEntry.endTime) { + totalDuration += currDuration; + } else { + totalDuration += moment.unix(entry.endTime).diff(moment.unix(entry.startTime)); + } + } + total.setText(getCountdownDisplay(moment.duration(totalDuration))); + } + currentDiv.toggleClass("simple-time-tracker-grayed", !currEntry || !!currEntry.endTime); +} diff --git a/styles.css b/styles.css index 66c0b36..825a6cb 100644 --- a/styles.css +++ b/styles.css @@ -11,6 +11,10 @@ margin-right: auto; } +.simple-time-tracker-txt { + text-align: center; +} + .simple-time-tracker-btn { margin-top: 10px; margin-bottom: 10px; @@ -34,3 +38,16 @@ font-size: xx-large; font-weight: bolder; } + +.simple-time-tracker-grayed { + opacity: 25%; +} + +.simple-time-tracker-table { + width: 100%; + margin-top: 20px; +} + +.simple-time-tracker-table td { + border: none; +} 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 afc5d4e..8890a7a 100644 --- a/test-vault/.obsidian/plugins/obsidian-simple-time-tracker/main.js +++ b/test-vault/.obsidian/plugins/obsidian-simple-time-tracker/main.js @@ -50,7 +50,7 @@ var __async = (__this, __arguments, generator) => { __export(exports, { default: () => SimpleTimeTrackerPlugin }); -var import_obsidian2 = __toModule(require("obsidian")); +var import_obsidian3 = __toModule(require("obsidian")); // src/settings.ts var defaultSettings = {}; @@ -72,13 +72,16 @@ var SimpleTimeTrackerSettingsTab = class extends import_obsidian.PluginSettingTa }; // src/tracker.ts +var import_obsidian2 = __toModule(require("obsidian")); function startEntry(tracker, name) { - let entry = { name, startTime: Date.now(), endTime: null }; + if (!name) + name = `Segment ${tracker.entries.length + 1}`; + let entry = { name, startTime: (0, import_obsidian2.moment)().unix(), endTime: null }; tracker.entries.push(entry); } function endEntry(tracker) { let last = tracker.entries.last(); - last.endTime = Date.now(); + last.endTime = (0, import_obsidian2.moment)().unix(); } function isRunning(tracker) { let last = tracker.entries.last(); @@ -109,31 +112,60 @@ function loadTracker(json) { } function displayTracker(tracker, element) { let timer = element.createDiv({ cls: "simple-time-tracker-timers" }); - let current = timer.createEl("div", { cls: "simple-time-tracker-timer" }); - current.createEl("span", { cls: "simple-time-tracker-timer-time", text: "00:00" }); - current.createEl("span", { text: "CURRENT" }); - let total = timer.createEl("div", { cls: "simple-time-tracker-timer" }); - total.createEl("span", { cls: "simple-time-tracker-timer-time", text: "01:00" }); - total.createEl("span", { text: "TOTAL" }); - let list = element.createEl("ul"); - for (let entry of tracker.entries) - list.createEl("li", { text: displayEntry(entry) }); -} -function displayEntry(entry) { - let ret = ""; - if (entry.name) - ret += `${entry.name}: `; - let start = new Date(entry.startTime); - ret += `${start.toLocaleString()} - `; - if (entry.endTime) { - let end = new Date(entry.endTime); - ret += `${end.toLocaleString()}`; + let currentDiv = timer.createEl("div", { cls: "simple-time-tracker-timer" }); + let current = currentDiv.createEl("span", { cls: "simple-time-tracker-timer-time", text: "00:00" }); + currentDiv.createEl("span", { text: "CURRENT" }); + let totalDiv = timer.createEl("div", { cls: "simple-time-tracker-timer" }); + let total = totalDiv.createEl("span", { cls: "simple-time-tracker-timer-time", text: "00:00" }); + totalDiv.createEl("span", { text: "TOTAL" }); + let table = element.createEl("table", { cls: "simple-time-tracker-table" }); + for (let entry of tracker.entries) { + let row = table.createEl("tr"); + row.createEl("td", { text: entry.name }); + row.createEl("td", { text: import_obsidian2.moment.unix(entry.startTime).format("YY-MM-DD hh:mm:ss") }); + if (entry.endTime) { + row.createEl("td", { text: import_obsidian2.moment.unix(entry.endTime).format("YY-MM-DD hh:mm:ss") }); + let duration = import_obsidian2.moment.unix(entry.endTime).diff(import_obsidian2.moment.unix(entry.startTime)); + row.createEl("td", { text: getCountdownDisplay(import_obsidian2.moment.duration(duration)) }); + } } + setCountdownValues(tracker, current, total, currentDiv); + let intervalId = window.setInterval(() => { + if (!element.isConnected) { + window.clearInterval(intervalId); + return; + } + setCountdownValues(tracker, current, total, currentDiv); + }, 1e3); +} +function getCountdownDisplay(duration) { + let ret = ""; + if (duration.hours() > 0) + ret += duration.hours().toString().padStart(2, "0") + ":"; + ret += duration.minutes().toString().padStart(2, "0") + ":" + duration.seconds().toString().padStart(2, "0"); return ret; } +function setCountdownValues(tracker, current, total, currentDiv) { + let currEntry = tracker.entries.last(); + if (currEntry) { + let currDuration = (0, import_obsidian2.moment)().diff(import_obsidian2.moment.unix(currEntry.startTime)); + if (!currEntry.endTime) + current.setText(getCountdownDisplay(import_obsidian2.moment.duration(currDuration))); + let totalDuration = 0; + for (let entry of tracker.entries) { + if (entry == currEntry && !currEntry.endTime) { + totalDuration += currDuration; + } else { + totalDuration += import_obsidian2.moment.unix(entry.endTime).diff(import_obsidian2.moment.unix(entry.startTime)); + } + } + total.setText(getCountdownDisplay(import_obsidian2.moment.duration(totalDuration))); + } + currentDiv.toggleClass("simple-time-tracker-grayed", !currEntry || !!currEntry.endTime); +} // src/main.ts -var SimpleTimeTrackerPlugin = class extends import_obsidian2.Plugin { +var SimpleTimeTrackerPlugin = class extends import_obsidian3.Plugin { onload() { return __async(this, null, function* () { yield this.loadSettings(); @@ -142,7 +174,7 @@ var SimpleTimeTrackerPlugin = class extends import_obsidian2.Plugin { e.empty(); let tracker = loadTracker(s); let running = isRunning(tracker); - let btn = new import_obsidian2.ButtonComponent(e).setButtonText(running ? "End" : "Start").onClick(() => __async(this, null, function* () { + let btn = new import_obsidian3.ButtonComponent(e).setButtonText(running ? "End" : "Start").onClick(() => __async(this, null, function* () { if (running) { endEntry(tracker); } else { @@ -151,7 +183,7 @@ var SimpleTimeTrackerPlugin = class extends import_obsidian2.Plugin { yield saveTracker(tracker, this.app, i.getSectionInfo(e)); })); btn.buttonEl.addClass("simple-time-tracker-btn"); - let name = new import_obsidian2.TextComponent(e).setPlaceholder("Segment Name").setDisabled(running); + let name = new import_obsidian3.TextComponent(e).setPlaceholder("Segment Name").setDisabled(running); name.inputEl.addClass("simple-time-tracker-txt"); displayTracker(tracker, e); }); @@ -168,4 +200,4 @@ var SimpleTimeTrackerPlugin = class extends import_obsidian2.Plugin { }); } }; -//# sourceMappingURL=data:application/json;base64,ewog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V4dDogZ2V0Q291bnRkb3duRGlzcGxheShtb21lbnQuZHVyYXRpb24oZHVyYXRpb24pKSB9KTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgc2V0Q291bnRkb3duVmFsdWVzKHRyYWNrZXIsIGN1cnJlbnQsIHRvdGFsLCBjdXJyZW50RGl2KTtcclxuICAgIGxldCBpbnRlcnZhbElkID0gd2luZG93LnNldEludGVydmFsKCgpID0+IHtcclxuICAgICAgICAvLyB3ZSBkZWxldGUgdGhlIGludGVydmFsIHRpbWVyIHdoZW4gdGhlIGVsZW1lbnQgaXMgcmVtb3ZlZFxyXG4gICAgICAgIGlmICghZWxlbWVudC5pc0Nvbm5lY3RlZCkge1xyXG4gICAgICAgICAgICB3aW5kb3cuY2xlYXJJbnRlcnZhbChpbnRlcnZhbElkKTtcclxuICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgIH1cclxuICAgICAgICBzZXRDb3VudGRvd25WYWx1ZXModHJhY2tlciwgY3VycmVudCwgdG90YWwsIGN1cnJlbnREaXYpO1xyXG4gICAgfSwgMTAwMCk7XHJcblxyXG59O1xyXG5cclxuZnVuY3Rpb24gZ2V0Q291bnRkb3duRGlzcGxheShkdXJhdGlvbjogbW9tZW50LkR1cmF0aW9uKTogc3RyaW5nIHtcclxuICAgIGxldCByZXQgPSBcIlwiO1xyXG4gICAgaWYgKGR1cmF0aW9uLmhvdXJzKCkgPiAwKVxyXG4gICAgICAgIHJldCArPSBkdXJhdGlvbi5ob3VycygpLnRvU3RyaW5nKCkucGFkU3RhcnQoMiwgXCIwXCIpICsgXCI6XCI7XHJcbiAgICByZXQgKz0gZHVyYXRpb24ubWludXRlcygpLnRvU3RyaW5nKCkucGFkU3RhcnQoMiwgXCIwXCIpICsgXCI6XCIgKyBkdXJhdGlvbi5zZWNvbmRzKCkudG9TdHJpbmcoKS5wYWRTdGFydCgyLCBcIjBcIik7XHJcbiAgICByZXR1cm4gcmV0O1xyXG59XHJcblxyXG5mdW5jdGlvbiBzZXRDb3VudGRvd25WYWx1ZXModHJhY2tlcjogVHJhY2tlciwgY3VycmVudDogSFRNTEVsZW1lbnQsIHRvdGFsOiBIVE1MRWxlbWVudCwgY3VycmVudERpdjogSFRNTERpdkVsZW1lbnQpIHtcclxuICAgIGxldCBjdXJyRW50cnkgPSB0cmFja2VyLmVudHJpZXMubGFzdCgpO1xyXG4gICAgaWYgKGN1cnJFbnRyeSkge1xyXG4gICAgICAgIGxldCBjdXJyRHVyYXRpb24gPSBtb21lbnQoKS5kaWZmKG1vbWVudC51bml4KGN1cnJFbnRyeS5zdGFydFRpbWUpKTtcclxuICAgICAgICBpZiAoIWN1cnJFbnRyeS5lbmRUaW1lKVxyXG4gICAgICAgICAgICBjdXJyZW50LnNldFRleHQoZ2V0Q291bnRkb3duRGlzcGxheShtb21lbnQuZHVyYXRpb24oY3VyckR1cmF0aW9uKSkpO1xyXG5cclxuICAgICAgICBsZXQgdG90YWxEdXJhdGlvbiA9IDA7XHJcbiAgICAgICAgZm9yIChsZXQgZW50cnkgb2YgdHJhY2tlci5lbnRyaWVzKSB7XHJcbiAgICAgICAgICAgIGlmIChlbnRyeSA9PSBjdXJyRW50cnkgJiYgIWN1cnJFbnRyeS5lbmRUaW1lKSB7XHJcbiAgICAgICAgICAgICAgICB0b3RhbER1cmF0aW9uICs9IGN1cnJEdXJhdGlvbjtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIHRvdGFsRHVyYXRpb24gKz0gbW9tZW50LnVuaXgoZW50cnkuZW5kVGltZSkuZGlmZihtb21lbnQudW5peChlbnRyeS5zdGFydFRpbWUpKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICB0b3RhbC5zZXRUZXh0KGdldENvdW50ZG93bkRpc3BsYXkobW9tZW50LmR1cmF0aW9uKHRvdGFsRHVyYXRpb24pKSk7XHJcbiAgICB9XHJcbiAgICBjdXJyZW50RGl2LnRvZ2dsZUNs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lO0FBQUE7QUFFeEQsWUFBSSxTQUFTLFNBQVM7QUFFdEIsWUFBSSxPQUFPLElBQUksK0JBQWMsR0FDM0IsZUFBZSxnQkFDZixZQUFZO0FBQ2QsYUFBSyxRQUFRLFNBQVM7QUFFdEIsdUJBQWUsU0FBUztBQUFBO0FBQUE7QUFBQTtBQUFBLEVBSXBCLGVBQWU7QUFBQTtBQUNwQixXQUFLLFdBQVcsT0FBTyxPQUFPLElBQUksaUJBQWlCLE1BQU0sS0FBSztBQUFBO0FBQUE7QUFBQSxFQUd6RCxlQUFlO0FBQUE7QUFDcEIsWUFBTSxLQUFLLFNBQVMsS0FBSztBQUFBO0FBQUE7QUFBQTsiLAogICJuYW1lcyI6IFtdCn0K diff --git a/test-vault/.obsidian/plugins/obsidian-simple-time-tracker/styles.css b/test-vault/.obsidian/plugins/obsidian-simple-time-tracker/styles.css index 66c0b36..825a6cb 100644 --- a/test-vault/.obsidian/plugins/obsidian-simple-time-tracker/styles.css +++ b/test-vault/.obsidian/plugins/obsidian-simple-time-tracker/styles.css @@ -11,6 +11,10 @@ margin-right: auto; } +.simple-time-tracker-txt { + text-align: center; +} + .simple-time-tracker-btn { margin-top: 10px; margin-bottom: 10px; @@ -34,3 +38,16 @@ font-size: xx-large; font-weight: bolder; } + +.simple-time-tracker-grayed { + opacity: 25%; +} + +.simple-time-tracker-table { + width: 100%; + margin-top: 20px; +} + +.simple-time-tracker-table td { + border: none; +} diff --git a/test-vault/track-note-test.md b/test-vault/track-note-test.md index e70fc66..cc05429 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":"Test segment my dudes!","startTime":1664298280695,"endTime":1664298283168},{"name":"","startTime":1664298304811,"endTime":1664298305748},{"name":"","startTime":1664298308288,"endTime":1664298322668},{"name":"","startTime":1664298323435,"endTime":1664298324617},{"name":"","startTime":1664298325410,"endTime":1664298326481},{"name":"","startTime":1664298328460,"endTime":1664298788945},{"name":"","startTime":1664298940959,"endTime":1664298943024},{"name":"","startTime":1664299161618,"endTime":1664299162696},{"name":"","startTime":1664299510766,"endTime":1664299511737}]} +{"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}]} ```