move ColorPicker from chat settings to separate component

This commit is contained in:
marlon-erler
2024-07-23 13:23:27 +02:00
parent 79bda74049
commit 0874ed956a
5 changed files with 81 additions and 44 deletions
+5 -1
View File
@@ -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);
});
}
}