add guard cannotSetPrimaryChannel

This commit is contained in:
marlon-erler
2024-07-20 23:22:08 +02:00
parent 1e2868d416
commit 41ff3c787a
3 changed files with 25 additions and 3 deletions
+5 -1
View File
@@ -63,6 +63,7 @@ export function SettingsPage(chatViewModel: ChatViewModel) {
translations.chatPage.settings.addSecondaryChannelButtonAudioLabel
}
on:click={chatViewModel.addSecondaryChannel}
toggle:disabled={chatViewModel.cannotAddSecondaryChannel}
>
<span class="icon">add</span>
</button>
@@ -138,7 +139,10 @@ export function SettingsPage(chatViewModel: ChatViewModel) {
<hr></hr>
<button class="danger width-input flex-no" on:click={chatViewModel.remove}>
<button
class="danger width-input flex-no"
on:click={chatViewModel.remove}
>
{translations.chatPage.settings.deleteChatButton}
<span class="icon">delete_forever</span>
</button>