Rename task widget to todos
This commit is contained in:
@@ -42,22 +42,22 @@ export default function piTodoHerdr(pi: ExtensionAPI): void {
|
||||
|
||||
registerTaskTools(pi, state, refresh);
|
||||
|
||||
pi.registerCommand("tasks", {
|
||||
description: "Show or hide the task tree widget",
|
||||
pi.registerCommand("todo", {
|
||||
description: "Show or hide the todo tree widget",
|
||||
handler: async (_args, ctx) => {
|
||||
if (state.list().length === 0) {
|
||||
clearTaskWidget(ctx);
|
||||
ctx.ui.notify("No tasks yet.", "info");
|
||||
ctx.ui.notify("No todos yet.", "info");
|
||||
return;
|
||||
}
|
||||
|
||||
widgetVisible = !widgetVisible;
|
||||
if (widgetVisible) {
|
||||
updateTaskWidget(state, ctx, true);
|
||||
ctx.ui.notify("Task widget shown.", "info");
|
||||
ctx.ui.notify("Todo widget shown.", "info");
|
||||
} else {
|
||||
clearTaskWidget(ctx);
|
||||
ctx.ui.notify("Task widget hidden.", "info");
|
||||
ctx.ui.notify("Todo widget hidden.", "info");
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user