Polish
This commit is contained in:
19
view.ts
19
view.ts
@@ -23,7 +23,7 @@ export class TaskWeaverView extends ItemView {
|
||||
}
|
||||
|
||||
getIcon(): string {
|
||||
return "clock";
|
||||
return "zap";
|
||||
}
|
||||
|
||||
async onOpen(): Promise<void> {
|
||||
@@ -45,7 +45,9 @@ export class TaskWeaverView extends ItemView {
|
||||
container.addClass("taskweaver-container");
|
||||
|
||||
const headerDiv = container.createDiv({ cls: "taskweaver-header" });
|
||||
headerDiv.createEl("h4", { text: "TaskWeaver" });
|
||||
const headerTitle = headerDiv.createEl("h4");
|
||||
headerTitle.createSpan({ text: "⚡ ", cls: "taskweaver-header-icon" });
|
||||
headerTitle.createSpan({ text: "TaskWeaver" });
|
||||
|
||||
const buttonContainer = headerDiv.createDiv({ cls: "taskweaver-button-group" });
|
||||
|
||||
@@ -172,11 +174,14 @@ export class TaskWeaverView extends ItemView {
|
||||
|
||||
const taskControls = taskDiv.createDiv({ cls: "taskweaver-task-controls" });
|
||||
|
||||
const timerSpan = taskControls.createSpan({
|
||||
cls: "taskweaver-timer-small",
|
||||
attr: { "data-task-id": task.id }
|
||||
});
|
||||
timerSpan.setText(formatDuration(this.plugin.getTaskElapsed(task)));
|
||||
// Only show timer for completed tasks
|
||||
if (task.completed) {
|
||||
const timerSpan = taskControls.createSpan({
|
||||
cls: "taskweaver-timer-small",
|
||||
attr: { "data-task-id": task.id }
|
||||
});
|
||||
timerSpan.setText(formatDuration(this.plugin.getTaskElapsed(task)));
|
||||
}
|
||||
|
||||
if (!task.completed) {
|
||||
if (!task.startTime) {
|
||||
|
||||
Reference in New Issue
Block a user