fix new task/event context, add keystroke to create task
This commit is contained in:
@@ -311,6 +311,7 @@ export default class BoardViewModel extends TaskContainingPageViewModel {
|
||||
this.registerKeyStroke(CommonKeys.CloseOrCancel, this.hideFilterModal);
|
||||
this.registerKeyStroke(CommonKeys.Settings, this.showSettings);
|
||||
this.registerKeyStroke(CommonKeys.Apply, this.hideSettings);
|
||||
this.registerKeyStroke(CommonKeys.Create, this.createTask);
|
||||
|
||||
this.taskPageViewModel.registerContext(this.boardInfo.fileId, this);
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ export default class CalendarPageViewModel extends TaskContainingPageViewModel {
|
||||
taskFileContent,
|
||||
);
|
||||
|
||||
this.selectTask(taskViewModel);
|
||||
taskViewModel.open();
|
||||
this.updateTaskIndices();
|
||||
};
|
||||
|
||||
@@ -215,6 +215,7 @@ export default class CalendarPageViewModel extends TaskContainingPageViewModel {
|
||||
this.registerKeyStroke(CommonKeys.Reset, this.showToday);
|
||||
this.registerKeyStroke("p", this.showNextMonth);
|
||||
this.registerKeyStroke("o", this.showPreviousMonth);
|
||||
this.registerKeyStroke(CommonKeys.Create, this.createEvent);
|
||||
|
||||
this.chatViewModel.registerContext(ChatPageTypes.Calendar, this);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ export default class TaskContainingPageViewModel extends Context {
|
||||
this,
|
||||
taskFileContent,
|
||||
);
|
||||
this.selectTask(taskViewModel);
|
||||
taskViewModel.open();
|
||||
this.updateTaskIndices();
|
||||
};
|
||||
|
||||
|
||||
@@ -87,6 +87,7 @@ export default class TaskViewModel extends Context {
|
||||
|
||||
// view
|
||||
open = (): void => {
|
||||
console.log(this);
|
||||
this.coreViewModel.context = this;
|
||||
this.containingModel.selectTask(this);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user