diff --git a/MainWindow.xaml b/MainWindow.xaml index 8b020dc..946e75e 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -169,7 +169,15 @@ + Visibility="{Binding ShowStartStream, Converter={StaticResource BoolToVis}}"> + + + + + + + + @@ -1225,7 +1233,7 @@ - diff --git a/ViewModels/MainViewModel.cs b/ViewModels/MainViewModel.cs index d73ac9e..2ad1cf4 100644 --- a/ViewModels/MainViewModel.cs +++ b/ViewModels/MainViewModel.cs @@ -1526,6 +1526,8 @@ public class MainViewModel : ViewModelBase public ICommand ActivateLicenseCommand { get; } public ICommand OpenLicenseEntryCommand { get; } public ICommand OpenHotkeyConfigCommand { get; } + public ICommand ChangeAccountCommand { get; } + public ICommand LogoutCommand { get; } public MainViewModel() { @@ -1600,6 +1602,8 @@ public class MainViewModel : ViewModelBase ActivateLicenseCommand = new RelayCommand(_ => _ = ActivateLicenseAsync(), _ => !IsLicenseValidating); OpenLicenseEntryCommand = new RelayCommand(_ => IsLicenseEntryOpen = !IsLicenseEntryOpen); OpenHotkeyConfigCommand = new RelayCommand(_ => OpenHotkeyConfig()); + ChangeAccountCommand = new RelayCommand(_ => _ = ChangeAccountAsync()); + LogoutCommand = new RelayCommand(_ => _ = SignOutYouTubeAsync()); _layoutStore = new LayoutStore(LayoutPathOverride ?? DefaultLayoutPath); _activeLayoutPath = _layoutStore.ActivePath; @@ -3591,4 +3595,10 @@ public class MainViewModel : ViewModelBase AppLog.Write("Socials: signed out of YouTube"); await Task.CompletedTask; } + + private async Task ChangeAccountAsync() + { + await SignOutYouTubeAsync(); + await SignInAsync(); + } }