Skip to content

Commit

Permalink
You can now also open the user settings from the settings tab
Browse files Browse the repository at this point in the history
  • Loading branch information
Yelo420 committed Jan 7, 2024
1 parent 9416ced commit 4397c71
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Recommended Gamevault Server Version: `v10.1.0`
- The download icon in the game view now changes depending on whether the game has already been downloaded
- Added more details to gamesettings ring chart
- Changed default background of game view
- You can now also open the user settings from the settings tab

## 1.8.1
Recommended Gamevault Server Version: `v10.0.2`
Expand Down
1 change: 1 addition & 0 deletions gamevault/UserControls/SettingsUserControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
<settingsComponents:LoginUserControl Margin="10,10,0,0" HorizontalAlignment="Left"/>
<Button Content="Logout" VerticalAlignment="Bottom" Height="32" Margin="10,10,0,0" HorizontalAlignment="Left" Width="205" FontSize="15" Click="Logout_Click"/>
<settingsComponents:RegisterUserControl Margin="10,10,0,0" HorizontalAlignment="Left"/>
<Button Content="Edit your User" VerticalAlignment="Bottom" Height="32" Margin="10,10,0,0" HorizontalAlignment="Left" Width="205" FontSize="15" Click="EditUser_Click"/>
</StackPanel>
</StackPanel>
</TabItem>
Expand Down
9 changes: 9 additions & 0 deletions gamevault/UserControls/SettingsUserControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,5 +168,14 @@ private void DownloadLimit_Save(object sender, EventArgs e)
Preferences.Set(AppConfigKey.DownloadLimit, ViewModel.DownloadLimit, AppFilePath.UserFile);
MainWindowViewModel.Instance.AppBarText = "Successfully saved download limit";
}

private void EditUser_Click(object sender, RoutedEventArgs e)
{
if (LoginManager.Instance.IsLoggedIn())
{
MainWindowViewModel.Instance.OpenPopup(new UserSettingsUserControl(LoginManager.Instance.GetCurrentUser()) { Width = 1200, Height = 800, Margin = new Thickness(50) });
}
else { MainWindowViewModel.Instance.AppBarText = "You are not logged in"; }
}
}
}

0 comments on commit 4397c71

Please sign in to comment.