cleanup, prepare BoardSettingsModal

This commit is contained in:
marlon-erler
2024-07-23 13:09:46 +02:00
parent 3aae049106
commit 3eb823c305
11 changed files with 222 additions and 87 deletions
+10 -1
View File
@@ -7,13 +7,14 @@ import TaskPageViewModel from "./taskPageViewModel";
export default class BoardViewModel {
taskPageViewModel: TaskPageViewModel;
// data
// state
boardInfo: BoardInfoFileContent;
name: React.State<string> = new React.State("");
color: React.State<Color> = new React.State<Color>(Color.Standard);
isSelected: React.State<boolean>;
isPresentingSettingsModal: React.State<boolean> = new React.State(false);
// view
select = (): void => {
@@ -24,6 +25,14 @@ export default class BoardViewModel {
this.taskPageViewModel.closeBoard();
};
showSettings = (): void => {
this.isPresentingSettingsModal.value = true;
};
hideSettings = (): void => {
this.isPresentingSettingsModal.value = false;
};
// load
loadListRelevantData = (): void => {
this.name.value = this.boardInfo.name;