1.5.3 pre-release

- Added hyperlink to troubleshooting guide in Linking window
- Minor localization and design updates
This commit is contained in:
Давид Чернопятов
2024-09-22 16:28:06 +03:00
parent a286403ef4
commit 99be9d64c6
16 changed files with 141 additions and 40 deletions
+4
View File
@@ -18,6 +18,10 @@ public static class LocManager
//Thread.CurrentThread.CurrentCulture= CultureInfo.GetCultureInfo(GetLanguageCode(language));
}
public static string GetCurrentLanguageCode()
{
return Loc.Instance.CurrentLanguage;
}
public static string GetLanguageCode(LocalizationLanguage language)
{
+1 -1
View File
@@ -173,7 +173,7 @@ public static class MaClient
}
public static async Task<LoginConfirmationResult> ConfirmLoginRequest(Mafile mafile)
public static async Task<LoginConfirmationResult> ConfirmLoginRequest(Mafile mafile) //TODO: move into library
{
ValidateMafile(mafile);
SetProxy(mafile);
+1 -1
View File
@@ -10,7 +10,7 @@
<SatelliteResourceLanguages>en;ru;ua</SatelliteResourceLanguages>
<ApplicationIcon>Theme\lock.ico</ApplicationIcon>
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>
<AssemblyVersion>1.5.2</AssemblyVersion>
<AssemblyVersion>1.5.3</AssemblyVersion>
</PropertyGroup>
<ItemGroup>
@@ -6,7 +6,6 @@
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:theme="clr-namespace:NebulaAuth.Theme"
mc:Ignorable="d"
d:DesignHeight="100" d:DesignWidth="400"
Height="Auto" Width="Auto" MaxWidth="500"
Background="{DynamicResource WindowBackground}">
<Grid Margin="15">
@@ -9,9 +9,8 @@
xmlns:model="clr-namespace:NebulaAuth.Model"
xmlns:entities="clr-namespace:NebulaAuth.Model.Entities"
mc:Ignorable="d"
d:DesignHeight="250" d:DesignWidth="800"
theme:FontScaleWindow.Scale="0.9" theme:FontScaleWindow.ResizeFont="True"
Foreground="WhiteSmoke" Cursor="Hand"
Foreground="WhiteSmoke"
d:DataContext="{d:DesignInstance other:LoginAgainVM}"
Background="{DynamicResource WindowBackground}">
@@ -9,9 +9,8 @@
xmlns:model="clr-namespace:NebulaAuth.Model"
xmlns:entities="clr-namespace:NebulaAuth.Model.Entities"
mc:Ignorable="d"
d:DesignHeight="250" d:DesignWidth="800"
theme:FontScaleWindow.Scale="0.9" theme:FontScaleWindow.ResizeFont="True"
Foreground="WhiteSmoke" Cursor="Hand"
Foreground="WhiteSmoke"
d:DataContext="{d:DesignInstance other:LoginAgainOnImportVM}"
Background="{DynamicResource WindowBackground}">
@@ -9,7 +9,7 @@
xmlns:model="clr-namespace:NebulaAuth.Model"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
Foreground="WhiteSmoke" Cursor="Hand"
Foreground="WhiteSmoke"
d:DataContext="{d:DesignInstance other:LoginAgainVM}"
Background="{DynamicResource WindowBackground}">
+24 -18
View File
@@ -7,7 +7,6 @@
xmlns:materialDesign="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="{materialDesign:MaterialDesignFont}"
MinHeight="640"
@@ -63,7 +62,14 @@
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock FontStyle="Normal" Foreground="DarkGray" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="18" Text="{Tr LinkerDialog.Title}"/>
<StackPanel Orientation="Horizontal">
<TextBlock FontStyle="Normal" Foreground="DarkGray" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="18" Text="{Tr LinkerDialog.Title}"/>
<TextBlock Margin="5,0,0,0" VerticalAlignment="Center" FontSize="12" >
<Hyperlink Command="{Binding OpenTroubleshootingCommand}">
<Run Text="{Tr LinkerDialog.GotErrorHyperlinkText, IsDynamic=False}"></Run>
</Hyperlink>
</TextBlock>
</StackPanel>
<Button Grid.Column="1" Width="30" Height="30" Style="{StaticResource MaterialDesignIconForegroundButton}" HorizontalAlignment="Right" Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}">
<materialDesign:PackIcon Kind="Close" Width="24" Height="24" Foreground="IndianRed"></materialDesign:PackIcon>
</Button>
@@ -86,38 +92,38 @@
</ComboBox>
<Button Grid.Column="1" IsEnabled="{Binding IsPasswordFieldVisible}" Margin="5,0,0,0" Command="{Binding ResetProxyCommand}" Content="{materialDesign:PackIcon Trash}"/>
</Grid>
<StackPanel Grid.Row="3" Orientation="Horizontal" Margin="10" Tag="{Binding IsLogin}">
<StackPanel Grid.Row="3" Orientation="Horizontal" Margin="7" Tag="{Binding IsLogin}">
<materialDesign:PackIcon Width="20" Height="20" VerticalAlignment="Center" Margin="0,0,5,0"/>
<TextBlock Text="{Tr LinkerDialog.Authorization}"/>
<TextBlock FontSize="16" Text="{Tr LinkerDialog.Authorization}"/>
</StackPanel>
<StackPanel Grid.Row="4" Orientation="Horizontal" Margin="10" Tag="{Binding IsEmailCode}">
<StackPanel Grid.Row="4" Orientation="Horizontal" Margin="7" Tag="{Binding IsEmailCode}">
<materialDesign:PackIcon Width="20" Height="20" VerticalAlignment="Center" Margin="0,0,5,0"/>
<TextBlock Text="{Tr LinkerDialog.EmailCode}"/>
<TextBlock FontSize="16" Text="{Tr LinkerDialog.EmailCode}"/>
</StackPanel>
<StackPanel Grid.Row="5" Orientation="Horizontal" Margin="10" Tag="{Binding IsPhoneNumber}">
<StackPanel Grid.Row="5" Orientation="Horizontal" Margin="7" Tag="{Binding IsPhoneNumber}">
<materialDesign:PackIcon Width="20" Height="20" VerticalAlignment="Center" Margin="0,0,5,0"/>
<TextBlock Text="{Tr LinkerDialog.PhoneNumber}"/>
<TextBlock FontSize="16" Text="{Tr LinkerDialog.PhoneNumber}"/>
</StackPanel>
<StackPanel Grid.Row="6" Orientation="Horizontal" Margin="10" Tag="{Binding IsEmailConfirmation}">
<StackPanel Grid.Row="6" Orientation="Horizontal" Margin="7" Tag="{Binding IsEmailConfirmation}">
<materialDesign:PackIcon Width="20" Height="20" VerticalAlignment="Center" Margin="0,0,5,0"/>
<TextBlock Text="{Tr LinkerDialog.EmailLink}"/>
<TextBlock FontSize="16" Text="{Tr LinkerDialog.EmailLink}"/>
</StackPanel>
<StackPanel Grid.Row="7" Orientation="Horizontal" Margin="10" Tag="{Binding IsLinkCode}">
<StackPanel Grid.Row="7" Orientation="Horizontal" Margin="7" Tag="{Binding IsLinkCode}">
<materialDesign:PackIcon Width="20" Height="20" VerticalAlignment="Center" Margin="0,0,5,0"/>
<TextBlock Text="{Tr LinkerDialog.SmsOrCode}"/>
<TextBlock FontSize="16" Text="{Tr LinkerDialog.SmsOrCode}"/>
</StackPanel>
<StackPanel Grid.Row="8" Orientation="Horizontal" Margin="10" Tag="{Binding IsCompleted}">
<StackPanel Grid.Row="8" Orientation="Horizontal" Margin="7" Tag="{Binding IsCompleted}">
<materialDesign:PackIcon Width="20" Height="20" VerticalAlignment="Center" Margin="0,0,5,0"/>
<TextBlock Text="{Tr LinkerDialog.Completed}"/>
<TextBlock FontSize="16" Text="{Tr LinkerDialog.Completed}"/>
</StackPanel>
<Grid Grid.Row="9" Margin="10">
<Grid Grid.Row="9" Margin="10,20,10,10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBox Padding="10" Text="{Binding FieldText}" Visibility="{Binding IsFieldVisible, Converter={StaticResource BooleanToVisibilityConverter}}" Style="{StaticResource MaterialDesignOutlinedTextBox}" FontSize="16" Margin="0,0,0,10"></TextBox>
<TextBox Grid.Row="1" Padding="10" Text="{Binding PassFieldText}" Visibility="{Binding IsPasswordFieldVisible, Converter={StaticResource BooleanToVisibilityConverter}}" Style="{StaticResource MaterialDesignOutlinedTextBox}" FontSize="16"/>
<TextBox Padding="7" Text="{Binding FieldText}" Visibility="{Binding IsFieldVisible, Converter={StaticResource BooleanToVisibilityConverter}}" Style="{StaticResource MaterialDesignOutlinedTextBox}" FontSize="16" Margin="0,0,0,10"></TextBox>
<TextBox Grid.Row="1" Padding="7" Text="{Binding PassFieldText}" Visibility="{Binding IsPasswordFieldVisible, Converter={StaticResource BooleanToVisibilityConverter}}" Style="{StaticResource MaterialDesignOutlinedTextBox}" FontSize="16"/>
<GroupBox Grid.Row="2" MaxWidth="400" BorderBrush="{StaticResource PrimaryHueMidBrush}" VerticalAlignment="Bottom" BorderThickness="1" Margin="0,10,0,0" Padding="5">
<GroupBox.HeaderTemplate>
<DataTemplate>
@@ -128,6 +134,6 @@
</GroupBox>
</Grid>
<Button Grid.Row="10" FontSize="18" Command="{Binding ProceedCommand}" Content="{Tr LinkerDialog.ProceedButton}"/>
<Button Grid.Row="10" Height="35" FontSize="17" Command="{Binding ProceedCommand}" Content="{Tr LinkerDialog.ProceedButton}"/>
</Grid>
</UserControl>
+1 -1
View File
@@ -53,7 +53,7 @@
<Run Text="{Binding DefaultProxy.Value, Converter='{StaticResource ProxyDataTextConverter}', Mode=OneWay, FallbackValue=''}"/>
</TextBlock>
<Button Grid.Column="1" Command="{Binding RemoveDefaultCommand}" Cursor="Hand">
<Button Grid.Column="1" Command="{Binding RemoveDefaultCommand}">
<md:PackIcon Kind="ClearBox" Width="20" Height="20"></md:PackIcon>
</Button>
</Grid>
-2
View File
@@ -8,8 +8,6 @@
xmlns:other="clr-namespace:NebulaAuth.ViewModel.Other"
xmlns:wpf="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
mc:Ignorable="d"
d:DesignHeight="700"
d:DesignWidth="500"
Foreground="WhiteSmoke"
FontFamily="{materialDesign:MaterialDesignFont}"
d:DataContext="{d:DesignInstance other:UpdaterVM}"
+1 -2
View File
@@ -1,5 +1,4 @@
using System;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.ComponentModel;
using SteamLib.SteamMobile;
using System.Diagnostics.CodeAnalysis;
using System.Threading;
-1
View File
@@ -17,7 +17,6 @@ using NebulaAuth.Model.Entities;
using SteamLib.Exceptions;
using NebulaAuth.Utility;
using NebulaAuth.View.Dialogs;
using AutoUpdaterDotNET;
namespace NebulaAuth.ViewModel;
+15 -2
View File
@@ -3,6 +3,7 @@ using AchiesUtilities.Web.Proxy;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using MaterialDesignThemes.Wpf;
using NebulaAuth.Core;
using NebulaAuth.Model;
using NebulaAuth.Model.Entities;
using NebulaAuth.Utility;
@@ -19,12 +20,12 @@ using SteamLib.SteamMobile.AuthenticatorLinker;
using SteamLib.Web;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using System.Windows;
using NebulaAuth.Core;
namespace NebulaAuth.ViewModel.Other;
@@ -194,7 +195,7 @@ public partial class LinkAccountVM : ObservableObject, IEmailProvider, IPhoneNum
Storage.SaveMafile(mafile);
File.Delete(Path.Combine("mafiles_backup", mafile.AccountName + ".mafile"));
HintText =
string.Format(GetLocalizationOrDefault("MafileLinked"),
string.Format(GetLocalizationOrDefault("MafileLinked"),
mafile.RevocationCode,
mafile.SessionData?.SteamId.Steam64);
@@ -401,6 +402,18 @@ public partial class LinkAccountVM : ObservableObject, IEmailProvider, IPhoneNum
#endregion
[RelayCommand]
private void OpenTroubleshooting()
{
const string troubleshootingURI =
"https://achiez.github.io/NebulaAuth-Steam-Desktop-Authenticator-by-Achies/docs/{0}/LinkingTroubleshooting";
var localized = string.Format(troubleshootingURI, LocManager.GetCurrentLanguageCode());
Process.Start(new ProcessStartInfo(new Uri(localized).ToString())
{
UseShellExecute = true
});
}
private static string GetLocalizationOrDefault(string key)
{
+11 -6
View File
@@ -430,6 +430,11 @@
"ru": "Привязка",
"ua": "Прив'язка"
},
"GotErrorHyperlinkText": {
"en": "(getting error?)",
"ru": "(возникает ошибка?)",
"ua": "(виникає помилка?)"
},
"Proxy": {
"en": "Proxy",
"ru": "Прокси",
@@ -451,14 +456,14 @@
"ua": "Номер телефону"
},
"EmailLink": {
"en": "Email link",
"ru": "Ссылка из письма",
"ua": "Посилання з листа"
"en": "EMail link",
"ru": "Ссылка из email",
"ua": "Посилання з email"
},
"SmsOrCode": {
"en": "Sms or code",
"ru": "Смс или код",
"ua": "Смс або код"
"en": "SMS or code",
"ru": "СМС или код",
"ua": "СМС або код"
},
"Completed": {
"en": "Completed",