move ColorPicker from chat settings to separate component
This commit is contained in:
@@ -41,6 +41,11 @@ export default class ChatViewModel {
|
||||
this.taskPageViewModel.closeBoard();
|
||||
}
|
||||
|
||||
setColor = (color: Color): void => {
|
||||
this.displayedColor.value = color;
|
||||
this.chatModel.setColor(color);
|
||||
}
|
||||
|
||||
resetColor = (): void => {
|
||||
this.displayedColor.value = this.settingsPageViewModel.color.value;
|
||||
};
|
||||
|
||||
@@ -73,7 +73,7 @@ export default class SettingsPageViewModel {
|
||||
|
||||
setColor = (newColor: Color): void => {
|
||||
this.color.value = newColor;
|
||||
this.chatViewModel.chatModel.setColor(newColor);
|
||||
this.chatViewModel.setColor(newColor);
|
||||
};
|
||||
|
||||
remove = (): void => {
|
||||
@@ -119,5 +119,9 @@ export default class SettingsPageViewModel {
|
||||
this.encryptionKeyInput.value ==
|
||||
this.chatViewModel.chatModel.info.encryptionKey
|
||||
);
|
||||
|
||||
this.color.subscribe((newColor) => {
|
||||
this.setColor(newColor);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user