feat: update kanban view, dashboard view, add backlog status
This commit is contained in:
@@ -110,7 +110,7 @@ export class TaskDashboardPanel {
|
||||
const result = await listLocatedTasks(this.#deps.repo, locations);
|
||||
|
||||
if (result.isErr()) {
|
||||
this.#post({ type: "error", error: result.error });
|
||||
this.#post({ variant: "error", error: result.error });
|
||||
if (result.error.variant === AppErrorVariant.NO_FOLDER) {
|
||||
presentError(result.error);
|
||||
}
|
||||
@@ -130,14 +130,14 @@ export class TaskDashboardPanel {
|
||||
async #onMessage(raw: unknown): Promise<void> {
|
||||
const parsed = parseDashboardInboundMessage(raw);
|
||||
if (parsed.isErr()) {
|
||||
this.#post({ type: "error", error: parsed.error });
|
||||
this.#post({ variant: "error", error: parsed.error });
|
||||
return;
|
||||
}
|
||||
await this.#handleInbound(parsed.value);
|
||||
}
|
||||
|
||||
async #handleInbound(message: DashboardInboundMessage): Promise<void> {
|
||||
switch (message.type) {
|
||||
switch (message.variant) {
|
||||
case "ready":
|
||||
case "refresh":
|
||||
await this.reloadTasks();
|
||||
@@ -172,8 +172,7 @@ export class TaskDashboardPanel {
|
||||
async #saveDescription(id: string, description: string): Promise<void> {
|
||||
const located = this.#tasks.find((item) => item.task.id === id);
|
||||
if (!located) {
|
||||
this.#post({
|
||||
type: "error",
|
||||
this.#post({ variant: "error",
|
||||
error: appError(AppErrorVariant.NOT_FOUND, { id }),
|
||||
});
|
||||
return;
|
||||
@@ -186,7 +185,7 @@ export class TaskDashboardPanel {
|
||||
});
|
||||
|
||||
if (result.isErr()) {
|
||||
this.#post({ type: "error", error: result.error });
|
||||
this.#post({ variant: "error", error: result.error });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -197,7 +196,7 @@ export class TaskDashboardPanel {
|
||||
: item,
|
||||
);
|
||||
this.#selectedId = saved.id;
|
||||
this.#post({ type: "saved", task: saved });
|
||||
this.#post({ variant: "saved", task: saved });
|
||||
this.#postState();
|
||||
this.#deps.onTasksMutated?.();
|
||||
}
|
||||
@@ -210,8 +209,7 @@ export class TaskDashboardPanel {
|
||||
selectedId: this.#selectedId,
|
||||
});
|
||||
|
||||
this.#post({
|
||||
type: "state",
|
||||
this.#post({ variant: "state",
|
||||
filter: this.#filter,
|
||||
groupBy: this.#groupBy,
|
||||
selectedId: this.#selectedId,
|
||||
|
||||
Reference in New Issue
Block a user