Skip to content

Commit 210703d

Browse files
committed
feat: basic martix supported
1 parent f451477 commit 210703d

19 files changed

Lines changed: 8391 additions & 5494 deletions

File tree

src/common/setting-definition.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ export interface QuadrantSpecificConfig {
170170
urgentTag: string; // Tag to identify urgent tasks (default: "#urgent")
171171
importantTag: string; // Tag to identify important tasks (default: "#important")
172172
urgentThresholdDays: number; // Days until due date to consider task urgent
173+
usePriorityForClassification: boolean; // Use priority levels instead of tags for classification
174+
urgentPriorityThreshold: number; // Priority level (1-5) to consider task urgent when using priority
175+
importantPriorityThreshold: number; // Priority level (1-5) to consider task important when using priority
173176
customQuadrantColors: boolean; // Use custom colors for quadrants
174177
quadrantColors: {
175178
urgentImportant: string; // Red - Crisis
@@ -1052,8 +1055,8 @@ export const DEFAULT_SETTINGS: TaskProgressBarSettings = {
10521055
},
10531056
{
10541057
id: "quadrant",
1055-
name: t("Priority Matrix"),
1056-
icon: "grid-3x3",
1058+
name: t("Matrix"),
1059+
icon: "layout-grid",
10571060
type: "default",
10581061
visible: true,
10591062
hideCompletedAndAbandonedTasks: false,
@@ -1070,6 +1073,9 @@ export const DEFAULT_SETTINGS: TaskProgressBarSettings = {
10701073
urgentTag: "#urgent",
10711074
importantTag: "#important",
10721075
urgentThresholdDays: 3,
1076+
usePriorityForClassification: false,
1077+
urgentPriorityThreshold: 4,
1078+
importantPriorityThreshold: 3,
10731079
customQuadrantColors: false,
10741080
quadrantColors: {
10751081
urgentImportant: "#dc3545",

src/components/ViewComponentManager.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,11 @@ class ViewComponentFactory {
143143
onTaskSelected: handlers.onTaskSelected,
144144
onTaskCompleted: handlers.onTaskCompleted,
145145
onTaskContextMenu: handlers.onTaskContextMenu,
146+
onTaskUpdated: async (task: Task) => {
147+
if (plugin.taskManager) {
148+
await plugin.taskManager.updateTask(task);
149+
}
150+
},
146151
},
147152
viewId
148153
);
@@ -195,9 +200,14 @@ export class ViewComponentManager extends Component {
195200
if (specificViewType) {
196201
viewType = specificViewType;
197202
} else if (
198-
["calendar", "kanban", "gantt", "forecast", "table", "quadrant"].includes(
199-
viewId
200-
)
203+
[
204+
"calendar",
205+
"kanban",
206+
"gantt",
207+
"forecast",
208+
"table",
209+
"quadrant",
210+
].includes(viewId)
201211
) {
202212
viewType = viewId;
203213
}

0 commit comments

Comments
 (0)