clean file content handling
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -70,8 +70,15 @@ export default class FileModel {
|
||||
const didStore: boolean = this.storeFileContent(fileContent);
|
||||
if (didStore == false) return;
|
||||
|
||||
switch (fileContent.type) {
|
||||
case "board-info":
|
||||
case "task":
|
||||
this.boardsAndTasksModel.handleFileContent(fileContent);
|
||||
break;
|
||||
case "reaction":
|
||||
this.chatModel.handleReaction(fileContent);
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
// methods
|
||||
@@ -206,7 +213,7 @@ export interface FileContent<T extends string>
|
||||
readonly creationDate: string;
|
||||
|
||||
readonly type: T;
|
||||
}
|
||||
}
|
||||
|
||||
// references
|
||||
export const FileContentReference: FileContent<string> = {
|
||||
|
||||
@@ -6,5 +6,5 @@ export enum CommonKeys {
|
||||
CloseOrCancel = "backspace",
|
||||
Apply = "enter",
|
||||
Settings = ",",
|
||||
Create = ";",
|
||||
Create = "a",
|
||||
}
|
||||
|
||||
@@ -49,7 +49,9 @@ export default class CoreViewModel {
|
||||
};
|
||||
|
||||
handleKeyDown = (e: KeyboardEvent): void => {
|
||||
if (!(e instanceof KeyboardEvent)) return console.trace("NOT A KEY EVENT");
|
||||
if (CoreViewModel.checkIsKeystroke(e) == false) return;
|
||||
console.log(e.key);
|
||||
e.preventDefault();
|
||||
const contexts: Context[] = this.contexts;
|
||||
while (contexts.length > 0) {
|
||||
|
||||
@@ -154,6 +154,7 @@ export default class BoardViewModel extends TaskContainingPageViewModel {
|
||||
this,
|
||||
taskFileContent,
|
||||
);
|
||||
console.log("STILL HERE", taskFileContent.fileId);
|
||||
this.taskViewModels.set(taskFileContent.fileId, taskViewModel);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user