mirror of
https://github.com/achiez/NebulaAuth-Steam-Desktop-Authenticator-by-Achies.git
synced 2026-07-25 06:14:31 +00:00
a9fdb58cac
Several methods were added and modified in `Storage.cs`, `MainVM_Groups.cs`, `MainVM_Proxy.cs`, and `ProxyManagerVM.cs` to validate if the data can be saved before performing various operations. The `SnackbarController.cs` was modified to increase the minimum snackbar time and adjust the duration calculation. In `MafileSerializer_SessionData.cs`, the check for whether the refresh token is expired or not was moved to a different location within the code. New localization entries were added in `localization.loc.json`. The changes are as follows: 1. Added a new HTML file `changelog\1.4.8.html` to the project `NebulaAuth.sln`. 2. Added a new converter `ProxyDataTextConverter` to `App.xaml`. 3. Imported `AchiesUtilities.Web.Proxy` in `ProxyTextConverter.cs`. 4. Modified the return string in `ProxyTextConverter` to include the port number. 5. Added a new class `ProxyDataTextConverter` in `ProxyTextConverter.cs`. 6. Increased the minimum snackbar time from 1000 to 1200 in `SnackbarController.cs`. 7. Modified the duration calculation in `GetSnackbarTime` method in `SnackbarController.cs`. 8. Added tooltips to ComboBoxes in `MainWindow.xaml`. 9. Added a new method `ValidateCanSave` in `Storage.cs` to validate if the data can be saved. 10. Added a new method `GetProxyString` in `ProxyStorage.cs` to get the proxy string. 11. Modified the `CompareProxy` method in `ProxyStorage.cs` to compare the address and port of the proxy data. 12. Removed a logger info line in `Shell.cs`. 13. Added a new property `DuplicateFound` in `Storage.cs`. 14. Modified the `CreatePathForMafile` method in `Storage.cs` to create a file name based on the account name or steam id. 15. Modified the `AddGroup` method in `MainVM_Groups.cs` to validate if the data can be saved before adding a group. 16. Modified the `AddToGroup` method in `MainVM_Groups.cs` to validate if the data can be saved before adding to a group. 17. Modified the `RemoveGroup` method in `MainVM_Groups.cs` to validate if the data can be saved before removing a group. 18. Modified the `PerformQuery` method in `MainVM_Groups.cs` to set `SelectedMafile` to the first item in `MaFiles`. 19. Modified the `RemoveProxy` method in `MainVM_Proxy.cs` to validate if the data can be saved before removing a proxy. 20. Modified the `SelectedProxyChanged` method in `MainVM_Proxy.cs` to validate if the data can be saved before changing the selected proxy. 21. Added a new method `ValidateCanSaveAndWarn` in `MainVM_Proxy.cs` to validate if the data can be saved and send a snackbar message if it can't. 22. Modified the `TimerCheckSeconds` property in `MainVM_Timer.cs` to send a snackbar message when the timer is changed. 23. Added a new method `RemoveProxy` in `LoginAgainOnImportVM.cs` to remove the selected proxy. 24. Modified the `AddProxy` method in `ProxyManagerVM.cs` to use the `DefaultScheme` to parse the proxy data. 25. Modified the `AddProxy` method in `ProxyManagerVM.cs` to use the `DefaultScheme` to parse the proxy data and get the proxy string. 26. Modified the `CopyProxy` method in `ProxyManagerVM.cs` to get the proxy string. 27. Added new localization entries in `localization.loc.json`. 28. The `update.xml` file was updated to reflect the new version of the software (1.4.8.0) and the corresponding download URL and changelog URL were updated accordingly. 29. In `AdmissionHelper.cs`, a new constant `SESSION_ID_COOKIE_NAME` was added to replace hardcoded "sessionid" strings. The same was done for `LANGUAGE_COOKIE_NAME` replacing "Steam_Language". This change was reflected in multiple methods within the `AdmissionHelper` class. 30. A new method `CloneCookie` was added to `AdmissionHelper.cs` to create a copy of a given cookie. This method was then used to replace repetitive code in the `TransferCommunityCookies` method. 31. In `MafileSerializer_SessionData.cs`, the check for whether the refresh token is expired or not was moved to a different location within the code. This change does not affect the functionality but may improve readability or maintainability of the code.
114 lines
6.1 KiB
XML
114 lines
6.1 KiB
XML
<UserControl x:Class="NebulaAuth.View.ProxyManagerView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:NebulaAuth.View"
|
|
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
xmlns:other="clr-namespace:NebulaAuth.ViewModel.Other"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="450" d:DesignWidth="800"
|
|
Foreground="WhiteSmoke"
|
|
FontFamily="{md:MaterialDesignFont}"
|
|
MinHeight="500"
|
|
MinWidth="400"
|
|
MaxHeight="550"
|
|
d:DataContext="{d:DesignInstance other:ProxyManagerVM}"
|
|
Background="{DynamicResource WindowBackground}">
|
|
<d:DesignerProperties.DesignStyle>
|
|
<Style TargetType="UserControl">
|
|
<Setter Property="Background" Value="{DynamicResource WindowBackground}" />
|
|
</Style>
|
|
</d:DesignerProperties.DesignStyle>
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Margin="10" FontStyle="Normal" Foreground="DarkGray" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="18" Text="{Tr ProxyManagerDialog.Title}"/>
|
|
<Button Margin="0,0,10,0" IsCancel="True" Grid.Column="1" Width="30" Height="30" Style="{StaticResource MaterialDesignIconForegroundButton}" HorizontalAlignment="Right" Command="{x:Static md:DialogHost.CloseDialogCommand}">
|
|
<md:PackIcon Kind="Close" Width="24" Height="24" Foreground="IndianRed"></md:PackIcon>
|
|
</Button>
|
|
|
|
</Grid>
|
|
<Separator Grid.Row="1"></Separator>
|
|
<Grid Grid.Row="2">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock HorizontalAlignment="Stretch"
|
|
Margin="15" FontSize="16">
|
|
<Run Text="{Tr ProxyManagerDialog.DefaultProxy, IsDynamic=False}"/>
|
|
<Run Text="{Binding DefaultProxy.Key, StringFormat='
0:', FallbackValue='X', Mode=OneWay}"/>
|
|
<Run Text="{Binding DefaultProxy.Value, Converter='{StaticResource ProxyDataTextConverter}', Mode=OneWay, FallbackValue=''}"/>
|
|
</TextBlock>
|
|
|
|
<Button Grid.Column="1" Command="{Binding SetDefaultCommand}">
|
|
<md:PackIcon Kind="HeartBoxOutline" Width="20" Height="20"></md:PackIcon>
|
|
</Button>
|
|
<Button Grid.Column="2" Command="{Binding RemoveDefaultCommand}" Cursor="Hand">
|
|
<md:PackIcon Kind="ClearBox" Width="20" Height="20"></md:PackIcon>
|
|
</Button>
|
|
</Grid>
|
|
<md:Card Grid.Row="3" Margin="10">
|
|
<ListBox FontSize="14" SelectedValue="{Binding SelectedProxy}" ItemsSource="{Binding Proxies}">
|
|
<ListBox.ItemContainerStyle>
|
|
<Style TargetType="ListBoxItem" BasedOn="{StaticResource MaterialDesignListBoxItem}">
|
|
<Setter Property="Tag" Value="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext}"/>
|
|
<Setter Property="ContextMenu">
|
|
<Setter.Value>
|
|
<ContextMenu>
|
|
<MenuItem Header="{Tr MainWindow.ContextMenus.Proxy.Copy}"
|
|
Command="{Binding PlacementTarget.Tag.CopyProxyCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}"
|
|
CommandParameter="{Binding Value}"/>
|
|
<MenuItem Header="{Tr MainWindow.ContextMenus.Proxy.CopyAddress}"
|
|
Command="{Binding PlacementTarget.Tag.CopyProxyAddressCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}"
|
|
CommandParameter="{Binding Value}"/>
|
|
</ContextMenu>
|
|
</Setter.Value>
|
|
</Setter>
|
|
|
|
</Style>
|
|
</ListBox.ItemContainerStyle>
|
|
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock>
|
|
<Run Text="{Binding Key, Mode=OneWay}"/><Run Text=": "/>
|
|
<Run Text="{Binding Value, Mode=OneWay, Converter={StaticResource ProxyDataTextConverter}}"/>
|
|
|
|
</TextBlock>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</md:Card>
|
|
<Grid Grid.Row="4">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBox Text="{Binding AddProxyField}" FontSize="12" md:TextFieldAssist.HasClearButton="True" AcceptsReturn="True" MaxHeight="100" Style="{StaticResource MaterialDesignOutlinedTextBox}" Margin="15" md:HintAssist.Hint="IP:PORT:USER:PASS{ID}"></TextBox>
|
|
<Button IsDefault="True" Grid.Column="1" Command="{Binding AddProxyCommand}">
|
|
<md:PackIcon Kind="Add"></md:PackIcon>
|
|
</Button>
|
|
<Button Grid.Column="2" Command="{Binding RemoveProxyCommand}">
|
|
<md:PackIcon Kind="Trash"></md:PackIcon>
|
|
</Button>
|
|
</Grid>
|
|
|
|
|
|
</Grid>
|
|
</UserControl>
|