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
@@ -17,6 +17,9 @@ export default class ChatMessageViewModel {
ChatMessageStatus | undefined
>(undefined);
sentByUser: boolean;
// state
isPresentingInfoModal: React.State<boolean> = new React.State(false);
// methods
copyMessage = (): void => {
@@ -29,6 +32,15 @@ export default class ChatMessageViewModel {
this.messagePageViewModel.decryptMessage(this);
};
// view
showInfoModal = (): void => {
this.isPresentingInfoModal.value = true;
}
hideInfoModal = (): void => {
this.isPresentingInfoModal.value = false;
}
// load
loadData = (): void => {
this.channel = this.chatMessage.channel;
+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;