mirror of
https://github.com/taskgenius/taskgenius-plugin.git
synced 2026-07-22 06:40:25 +00:00
feat(view): add task count display in view title
- Add createTaskMark() method to show total task count - Display formatted task count in view title - Remove debug console.log statement
This commit is contained in:
parent
7721ac191c
commit
86cbad4a47
1 changed files with 12 additions and 2 deletions
|
|
@ -283,8 +283,6 @@ export class TaskView extends ItemView {
|
|||
this.currentFilterState = null;
|
||||
}
|
||||
|
||||
console.log("currentFilterState", this.currentFilterState);
|
||||
|
||||
// 3. 初始化组件(但先不传入数据)
|
||||
this.initializeComponents();
|
||||
|
||||
|
|
@ -326,6 +324,8 @@ export class TaskView extends ItemView {
|
|||
|
||||
this.toggleDetailsVisibility(false);
|
||||
|
||||
this.createTaskMark();
|
||||
|
||||
this.createActionButtons();
|
||||
|
||||
(this.leaf.tabHeaderStatusContainerEl as HTMLElement).empty();
|
||||
|
|
@ -665,6 +665,16 @@ export class TaskView extends ItemView {
|
|||
});
|
||||
}
|
||||
|
||||
private createTaskMark() {
|
||||
this.titleEl.setText(
|
||||
t("{{num}} Tasks", {
|
||||
interpolation: {
|
||||
num: this.tasks.length,
|
||||
},
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
private createActionButtons() {
|
||||
this.detailsToggleBtn = this.addAction(
|
||||
"panel-right-dashed",
|
||||
|
|
|
|||
Loading…
Reference in a new issue