mirror of
https://github.com/Ellpeck/ObsidianSimpleTimeTracker.git
synced 2024-12-18 19:39:22 +01:00
some casing and style improvements
This commit is contained in:
parent
c4548f5e67
commit
49406dd869
4 changed files with 11 additions and 11 deletions
|
@ -31,7 +31,7 @@ export default class SimpleTimeTrackerPlugin extends Plugin {
|
|||
btn.buttonEl.addClass("simple-time-tracker-btn");
|
||||
|
||||
let name = new TextComponent(e)
|
||||
.setPlaceholder("Segment Name")
|
||||
.setPlaceholder("Segment name")
|
||||
.setDisabled(running);
|
||||
name.inputEl.addClass("simple-time-tracker-txt");
|
||||
|
||||
|
|
|
@ -57,17 +57,17 @@ export function displayTracker(tracker: Tracker, element: HTMLElement): void {
|
|||
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" });
|
||||
currentDiv.createEl("span", { text: "CURRENT" });
|
||||
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" });
|
||||
totalDiv.createEl("span", { text: "TOTAL" });
|
||||
totalDiv.createEl("span", { text: "Total" });
|
||||
|
||||
// add list
|
||||
let table = element.createEl("table", { cls: "simple-time-tracker-table" });
|
||||
table.createEl("tr").append(
|
||||
createEl("th", { text: "Segment" }),
|
||||
createEl("th", { text: "Start Time" }),
|
||||
createEl("th", { text: "End Time" }),
|
||||
createEl("th", { text: "Start time" }),
|
||||
createEl("th", { text: "End time" }),
|
||||
createEl("th", { text: "Total" }));
|
||||
|
||||
for (let entry of tracker.entries) {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -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}]}
|
||||
{"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}]}
|
||||
```
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue