mirror of
https://github.com/achiez/NebulaAuth-Steam-Desktop-Authenticator-by-Achies.git
synced 2026-07-25 14:24:32 +00:00
882d39b8f3
- Refactored file handling: added backup directories, improved mafile naming strategy, and introduced renaming functionality. - Enhanced UI: updated `MainWindow`, `SettingsView`, and dialogs with new controls, commands, and improved layouts. - Introduced `TextFieldDialog` for user input with localization support. - Improved localization: added new strings for buttons, errors, and tooltips. Removed all user-observed not localized strings - Fixed clipboard handling logic in `ClipboardHelper`. - Added 'Create Group' button in mafile's context menu and corresponding dialog view - Implemented `RequiresAdminAccess` check before updating program and requesting previlegies
497 lines
35 KiB
XML
497 lines
35 KiB
XML
<Window x:Class="NebulaAuth.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
|
|
xmlns:windowStyle="clr-namespace:NebulaAuth.Theme.WindowStyle"
|
|
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
xmlns:converters="clr-namespace:NebulaAuth.Converters"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:entities="clr-namespace:NebulaAuth.Model.Entities"
|
|
xmlns:viewModel="clr-namespace:NebulaAuth.ViewModel"
|
|
xmlns:nebulaAuth="clr-namespace:NebulaAuth"
|
|
WindowStartupLocation="CenterScreen"
|
|
MinHeight="500" MinWidth="500"
|
|
Title="NebulaAuth" Height="800" Width="730"
|
|
Style="{StaticResource MainWindow}"
|
|
RenderOptions.BitmapScalingMode="HighQuality"
|
|
FontFamily="{md:MaterialDesignFont}"
|
|
TextElement.Foreground="{DynamicResource BaseContentBrush}"
|
|
mc:Ignorable="d"
|
|
d:DataContext="{d:DesignInstance viewModel:MainVM}"
|
|
md:RippleAssist.IsDisabled="{Binding Settings.RippleDisabled}"
|
|
FontSize="18">
|
|
<b:Interaction.Behaviors>
|
|
<windowStyle:WindowChromeRenderedBehavior />
|
|
</b:Interaction.Behaviors>
|
|
|
|
<Window.InputBindings>
|
|
<KeyBinding Command="{Binding Path=PasteMafilesFromClipboardCommand}"
|
|
Key="V"
|
|
Modifiers="Control" />
|
|
<KeyBinding Command="{x:Static ApplicationCommands.Find}"
|
|
Key="F"
|
|
Modifiers="Control" />
|
|
</Window.InputBindings>
|
|
<Window.CommandBindings>
|
|
<CommandBinding Command="Find"
|
|
Executed="FocusSearchBox"/>
|
|
</Window.CommandBindings>
|
|
<Border Name="DragNDropBorder" Panel.ZIndex="3" Opacity="1" AllowDrop="True"
|
|
DragDrop.DragEnter="Rectangle_DragEnter" DragLeave="Rectangle_DragLeave" Drop="Rectangle_Drop">
|
|
<md:DialogHost DialogOpened="DialogHost_DialogOpened"
|
|
DialogClosed="DialogHost_DialogClosed"
|
|
ApplyBlurBackground="{Binding Settings.ApplyBlurBackground}"
|
|
BlurRadius="12"
|
|
x:Name="DialogHostInstance">
|
|
|
|
<Grid ZIndex="0">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Image Grid.RowSpan="2" Opacity="{Binding Settings.BackgroundOpacity}" Stretch="UniformToFill"
|
|
RenderOptions.BitmapScalingMode="LowQuality" HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Visibility="{Binding Settings.BackgroundMode, Converter={StaticResource BackgroundImageVisibleConverter}}"
|
|
Source="{Binding Settings.BackgroundMode, Mode=OneWay, Converter={StaticResource BackgroundSourceConverter}}">
|
|
<Image.Effect>
|
|
<BlurEffect Radius="{Binding Settings.BackgroundBlur}" />
|
|
</Image.Effect>
|
|
</Image>
|
|
<Rectangle Grid.Row="0" Grid.RowSpan="2" Fill="Black" Stretch="UniformToFill"
|
|
Opacity="{Binding Settings.BackgroundGamma}"
|
|
IsHitTestVisible="False" />
|
|
|
|
<Rectangle Name="DragNDropOverlay" Grid.Row="0" Grid.RowSpan="3" Panel.ZIndex="1" Fill="#242123"
|
|
Opacity="0.9" Visibility="Hidden" />
|
|
<StackPanel Name="DragNDropPanel" Grid.Row="0" ZIndex="2" Grid.RowSpan="3" Visibility="Hidden"
|
|
VerticalAlignment="Center" HorizontalAlignment="Center">
|
|
<TextBlock FontSize="24" FontWeight="Bold" Foreground="#9a65b8"
|
|
Text="{Tr MainWindow.Global.DragNDropHint}" />
|
|
<md:PackIcon Foreground="#9a65b8" HorizontalAlignment="Center" Width="36" Height="36"
|
|
Kind="FileReplaceOutline" />
|
|
|
|
</StackPanel>
|
|
<ToolBarTray>
|
|
<ToolBar ClipToBounds="True" HorizontalContentAlignment="Stretch"
|
|
Style="{StaticResource MaterialDesignToolBar}" FontSize="16">
|
|
<Menu FontSize="16">
|
|
<MenuItem Header="{Tr MainWindow.Menu.File.Caption}">
|
|
<MenuItem Header="{Tr MainWindow.Menu.File.Import}"
|
|
Command="{Binding AddMafileCommand}" />
|
|
<MenuItem Header="{Tr MainWindow.Menu.File.Remove}"
|
|
Command="{Binding RemoveMafileCommand}" />
|
|
<MenuItem Header="{Tr MainWindow.Menu.File.OpenFolder}"
|
|
Command="{Binding OpenMafileFolderCommand}" />
|
|
<MenuItem IsEnabled="False" Header="⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯" Height="15" />
|
|
<MenuItem Header="{Tr MainWindow.Menu.File.Settings}"
|
|
Command="{Binding OpenSettingsDialogCommand}" />
|
|
</MenuItem>
|
|
</Menu>
|
|
<Menu>
|
|
<MenuItem Header="{Tr MainWindow.Menu.Account.Caption}">
|
|
<MenuItem Header="{Tr MainWindow.Menu.Account.Link}"
|
|
Command="{Binding LinkAccountCommand}" />
|
|
<MenuItem Header="{Tr MainWindow.Menu.Account.MoveSteamGuard}"
|
|
Command="{Binding MoveAccountCommand}" />
|
|
<MenuItem Header="{Tr MainWindow.Menu.Account.Unlink}"
|
|
Command="{Binding RemoveAuthenticatorCommand}" />
|
|
|
|
<MenuItem IsEnabled="False" Header="⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯" Height="15" />
|
|
<MenuItem Header="{Tr MainWindow.Menu.Account.RefreshSession}"
|
|
Command="{Binding RefreshSessionCommand}" />
|
|
<MenuItem Header="{Tr MainWindow.Menu.Account.LoginAgain}"
|
|
Command="{Binding LoginAgainCommand}" />
|
|
</MenuItem>
|
|
</Menu>
|
|
<Separator />
|
|
<ComboBox ToolTip="{Tr MainWindow.AppBar.GroupToolTip}"
|
|
md:HintAssist.Hint="{Tr MainWindow.AppBar.GroupsHint}"
|
|
MinWidth="100"
|
|
MaxWidth="200"
|
|
Margin="8,0,8,0" VerticalAlignment="Center" IsEditable="True"
|
|
ItemsSource="{Binding Groups}"
|
|
SelectedValue="{Binding SelectedGroup}"
|
|
md:TextFieldAssist.HasClearButton="True">
|
|
|
|
<FrameworkElement.Resources>
|
|
<ResourceDictionary>
|
|
<Style TargetType="md:PackIcon">
|
|
<Setter Property="Width" Value="15" />
|
|
<Setter Property="Height" Value="15" />
|
|
</Style>
|
|
</ResourceDictionary>
|
|
</FrameworkElement.Resources>
|
|
<UIElement.InputBindings>
|
|
<KeyBinding Key="Enter" Command="{Binding AddGroupCommand}"
|
|
CommandParameter="{Binding Path=Text, RelativeSource={RelativeSource AncestorType=ComboBox}}" />
|
|
</UIElement.InputBindings>
|
|
</ComboBox>
|
|
<ComboBox ToolTip="{Tr MainWindow.AppBar.Proxy.ProxyManipulateToolTip}"
|
|
|
|
MinWidth="80"
|
|
MaxWidth="200"
|
|
Margin="8,0,8,0"
|
|
VerticalAlignment="Center"
|
|
md:HintAssist.Hint="{Tr MainWindow.AppBar.Proxy.ProxyHint}"
|
|
md:ComboBoxAssist.ShowSelectedItem="False"
|
|
SelectedValue="{Binding SelectedProxy}"
|
|
|
|
ItemsSource="{Binding Proxies}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate DataType="{x:Type entities:MaProxy}">
|
|
<TextBlock
|
|
Text="{Binding Converter={StaticResource ProxyTextConverter}, Mode=OneWay}" />
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
<FrameworkElement.ContextMenu>
|
|
<ContextMenu>
|
|
<MenuItem Header="{Tr MainWindow.AppBar.Proxy.ProxyOpenManagerHint}"
|
|
Command="{Binding OpenProxyManagerCommand}" />
|
|
</ContextMenu>
|
|
</FrameworkElement.ContextMenu>
|
|
<UIElement.InputBindings>
|
|
<KeyBinding Key="Delete" Command="{Binding RemoveProxyCommand}" />
|
|
</UIElement.InputBindings>
|
|
</ComboBox>
|
|
|
|
<md:PackIcon Kind="StopAlert" VerticalAlignment="Center" HorizontalAlignment="Center"
|
|
Foreground="{DynamicResource ErrorBrush}" Margin="3"
|
|
ToolTipService.InitialShowDelay="300">
|
|
<md:PackIcon.ToolTip>
|
|
<TextBlock>
|
|
<Run
|
|
Text="{Tr MainWindow.AppBar.Proxy.ProxyAlert.MafileProxyInUse, IsDynamic=False}" />
|
|
<Run Text=" " />
|
|
<Run Text="{Binding SelectedMafile.Proxy.Data, FallbackValue='', Mode=OneWay}" />
|
|
</TextBlock>
|
|
</md:PackIcon.ToolTip>
|
|
<UIElement.Visibility>
|
|
<Binding Path="ProxyExist">
|
|
<Binding.Converter>
|
|
<converters:ValueConverterGroup>
|
|
<converters:ReverseBooleanConverter />
|
|
<BooleanToVisibilityConverter />
|
|
</converters:ValueConverterGroup>
|
|
</Binding.Converter>
|
|
</Binding>
|
|
</UIElement.Visibility>
|
|
</md:PackIcon>
|
|
<md:PackIcon Kind="StopAlert" VerticalAlignment="Center" HorizontalAlignment="Center"
|
|
Foreground="{DynamicResource WarningBrush}" Margin="3"
|
|
ToolTip="{Tr MainWindow.AppBar.Proxy.ProxyAlert.DefaultInUse}"
|
|
ToolTipService.InitialShowDelay="300"
|
|
Visibility="{Binding IsDefaultProxy, Converter={StaticResource BooleanToVisibilityConverter}}" />
|
|
<Separator />
|
|
<ToggleButton ToolTip="{Tr MainWindow.AppBar.MarketTimerHint}"
|
|
IsEnabled="{Binding IsMafileSelected}" Margin="2"
|
|
Style="{StaticResource MaterialDesignFlatToggleButton}"
|
|
IsChecked="{Binding MarketTimerEnabled}">
|
|
<md:PackIcon Kind="ShoppingCart" />
|
|
<FrameworkElement.ContextMenu>
|
|
<ContextMenu>
|
|
<MenuItem Header="{Tr MainWindow.AppBar.TimersContextMenu.SwitchMAACGroup}"
|
|
Command="{Binding Path=SwitchMAACOnGroupCommand}"
|
|
CommandParameter="{StaticResource True}" />
|
|
<MenuItem Header="{Tr MainWindow.AppBar.TimersContextMenu.SwitchMAACAll}"
|
|
Command="{Binding Path=SwitchMAACOnAllCommand}"
|
|
CommandParameter="{StaticResource True}" />
|
|
</ContextMenu>
|
|
</FrameworkElement.ContextMenu>
|
|
</ToggleButton>
|
|
<ToggleButton ToolTip="{Tr MainWindow.AppBar.TradeTimerHint}"
|
|
IsEnabled="{Binding IsMafileSelected}" Margin="2"
|
|
Style="{StaticResource MaterialDesignFlatToggleButton}"
|
|
IsChecked="{Binding TradeTimerEnabled}">
|
|
<md:PackIcon Kind="AccountArrowRight" />
|
|
<FrameworkElement.ContextMenu>
|
|
<ContextMenu>
|
|
<MenuItem Header="{Tr MainWindow.AppBar.TimersContextMenu.SwitchMAACGroup}"
|
|
Command="{Binding Path=SwitchMAACOnGroupCommand}"
|
|
CommandParameter="{StaticResource False}" />
|
|
<MenuItem Header="{Tr MainWindow.AppBar.TimersContextMenu.SwitchMAACAll}"
|
|
Command="{Binding Path=SwitchMAACOnAllCommand}"
|
|
CommandParameter="{StaticResource False}" />
|
|
</ContextMenu>
|
|
</FrameworkElement.ContextMenu>
|
|
</ToggleButton>
|
|
<TextBox md:HintAssist.Hint="{Tr Common.Abbreviations.Time.Seconds}" Margin="10,0,0,0"
|
|
MinWidth="30" Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
|
Text="{Binding TimerCheckSeconds, UpdateSourceTrigger=PropertyChanged, Delay=700}"
|
|
PreviewTextInput="UIElement_OnPreviewTextInput" />
|
|
<ToggleButton ToolTip="{Tr MainWindow.AppBar.ShowAutoConfirmAccountsHint}"
|
|
HorizontalAlignment="Right" IsChecked="{Binding MaacDisplay}"
|
|
Foreground="{DynamicResource BaseContentBrush}" VerticalAlignment="Center"
|
|
Style="{StaticResource MaterialDesignFlatPrimaryToggleButton}" Margin="4">
|
|
<md:PackIcon Kind="Accounts" />
|
|
</ToggleButton>
|
|
</ToolBar>
|
|
</ToolBarTray>
|
|
<Grid Row="1">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="0.4*" />
|
|
<ColumnDefinition Width="0.6*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid Grid.Column="0">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
<Border Grid.Row="0" Margin="10" Padding="5"
|
|
BorderThickness="1"
|
|
CornerRadius="12">
|
|
<Border.BorderBrush>
|
|
<SolidColorBrush Color="{DynamicResource Base300Color}" Opacity="0.3" />
|
|
</Border.BorderBrush>
|
|
<Border.Background>
|
|
<SolidColorBrush Color="{DynamicResource Base100Color}"
|
|
Opacity="{Binding Settings.LeftOpacity}" />
|
|
</Border.Background>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<TextBlock Margin="4"
|
|
Visibility="{Binding MaFiles.Count, Converter={StaticResource AnyMafilesToVisibilityConverter}}"
|
|
TextWrapping="WrapWithOverflow" FontSize="16"
|
|
Text="{Tr MainWindow.LeftPart.NoMafiles}" />
|
|
|
|
<ListBox FontSize="17" Margin="2"
|
|
x:Name="MafileListBox"
|
|
SelectionMode="Single"
|
|
ItemsSource="{Binding MaFiles}"
|
|
SelectedValue="{Binding SelectedMafile}"
|
|
PreviewMouseDown="MafileListBox_OnPreviewMouseDown">
|
|
<ListBox.Resources>
|
|
<DiscreteObjectKeyFrame x:Key="groupsProxy" Value="{Binding Groups}"/>
|
|
<DiscreteObjectKeyFrame x:Key="listBoxProxy" Value="{Binding ElementName=MafileListBox}"/>
|
|
</ListBox.Resources>
|
|
<ListBox.ItemContainerStyle>
|
|
<Style TargetType="ListBoxItem"
|
|
BasedOn="{StaticResource MaterialDesignListBoxItem}">
|
|
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
</Style>
|
|
</ListBox.ItemContainerStyle>
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid ToolTip="{Binding Filename}">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock HorizontalAlignment="Stretch" Text="{Binding AccountName}">
|
|
<TextBlock.Resources>
|
|
<SolidColorBrush x:Key="BaseContentBrushProxy"
|
|
Color="{DynamicResource BaseContentColor}" />
|
|
</TextBlock.Resources>
|
|
|
|
<TextBlock.Foreground>
|
|
<Binding Path="LinkedClient.IsError"
|
|
Converter="{StaticResource PortableMaClientStatusToColorConverter}"
|
|
FallbackValue="{StaticResource BaseContentBrushProxy}" />
|
|
</TextBlock.Foreground>
|
|
</TextBlock>
|
|
<StackPanel
|
|
Visibility="{Binding LinkedClient, Converter={StaticResource NullableToVisibilityConverter}}"
|
|
Grid.Column="1" Orientation="Horizontal">
|
|
<md:PackIcon Kind="ShoppingCart"
|
|
Visibility="{Binding LinkedClient.AutoConfirmMarket, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}" />
|
|
<md:PackIcon Kind="AccountArrowRight"
|
|
Visibility="{Binding LinkedClient.AutoConfirmTrades, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
<ListBox.InputBindings>
|
|
<KeyBinding Key="C" Modifiers="Control"
|
|
Command="{Binding DataContext.CopyLoginCommand, RelativeSource={RelativeSource AncestorType=Window}}"
|
|
CommandParameter="{Binding SelectedItem, RelativeSource={RelativeSource FindAncestor, AncestorType=ListBox}}" />
|
|
<KeyBinding Key="X" Modifiers="Control"
|
|
Command="{Binding DataContext.CopyMafileCommand, RelativeSource={RelativeSource AncestorType=Window}}"
|
|
CommandParameter="{Binding SelectedItem, RelativeSource={RelativeSource FindAncestor, AncestorType=ListBox}}" />
|
|
</ListBox.InputBindings>
|
|
<FrameworkElement.ContextMenu>
|
|
<ContextMenu Tag="{Binding Groups}">
|
|
<MenuItem InputGestureText="Ctrl+C"
|
|
Header="{Tr MainWindow.ContextMenus.Mafile.CopyLogin}"
|
|
Command="{Binding CopyLoginCommand}"
|
|
CommandParameter="{Binding PlacementTarget.SelectedValue, RelativeSource={RelativeSource AncestorType=ContextMenu}}" />
|
|
<MenuItem Header="{Tr MainWindow.ContextMenus.Mafile.CopySteamId}"
|
|
Command="{Binding CopySteamIdCommand}"
|
|
CommandParameter="{Binding PlacementTarget.SelectedValue, RelativeSource={RelativeSource AncestorType=ContextMenu}}" />
|
|
<MenuItem InputGestureText="Ctrl+X"
|
|
Header="{Tr MainWindow.ContextMenus.Mafile.CopyMafile}"
|
|
Command="{Binding CopyMafileCommand}"
|
|
CommandParameter="{Binding PlacementTarget.SelectedValue, RelativeSource={RelativeSource AncestorType=ContextMenu}}" />
|
|
<MenuItem Header="{Tr MainWindow.ContextMenus.Mafile.AddToGroup}"
|
|
>
|
|
<MenuItem.ItemsSource>
|
|
<CompositeCollection>
|
|
<MenuItem
|
|
Command="{Binding CreateGroupCommand}"
|
|
CommandParameter="{Binding Value.SelectedValue, Source={StaticResource listBoxProxy}}">
|
|
<MenuItem.Header>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<md:PackIcon Kind="PlusCircle" VerticalAlignment="Center"/>
|
|
<TextBlock VerticalAlignment="Center" Margin="5,0,0,0" Grid.Column="1" Text="{Tr MainWindow.ContextMenus.Mafile.CreateGroup}"></TextBlock>
|
|
</Grid>
|
|
</MenuItem.Header>
|
|
</MenuItem>
|
|
<Separator />
|
|
<CollectionContainer Collection="{Binding Value, Source={StaticResource groupsProxy}}" />
|
|
|
|
</CompositeCollection>
|
|
</MenuItem.ItemsSource>
|
|
|
|
<ItemsControl.ItemContainerStyle>
|
|
<Style BasedOn="{StaticResource MaterialDesignMenuItem}"
|
|
TargetType="{x:Type MenuItem}">
|
|
<Setter Property="Command"
|
|
Value="{Binding DataContext.AddToGroupCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}" />
|
|
<Setter Property="CommandParameter">
|
|
<Setter.Value>
|
|
<MultiBinding
|
|
Converter="{StaticResource MultiCommandParameterConverter}">
|
|
<Binding />
|
|
<Binding Path="PlacementTarget.SelectedValue"
|
|
RelativeSource="{RelativeSource AncestorType=ContextMenu}" />
|
|
</MultiBinding>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ItemsControl.ItemContainerStyle>
|
|
</MenuItem>
|
|
<MenuItem Header="{Tr MainWindow.ContextMenus.Mafile.RemoveFromGroup}"
|
|
Command="{Binding Path=RemoveGroupCommand}"
|
|
CommandParameter="{Binding Path=PlacementTarget.SelectedValue, RelativeSource={RelativeSource AncestorType={x:Type ContextMenu}}}"
|
|
/>
|
|
<MenuItem Header="{Tr MainWindow.ContextMenus.Mafile.CopyPassword}"
|
|
Command="{Binding Path=CopyPasswordCommand}"
|
|
CommandParameter="{Binding Path=PlacementTarget.SelectedValue, RelativeSource={RelativeSource AncestorType={x:Type ContextMenu}}}" />
|
|
|
|
</ContextMenu>
|
|
</FrameworkElement.ContextMenu>
|
|
|
|
</ListBox>
|
|
|
|
<TextBox Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
|
FontSize="16"
|
|
md:TextFieldAssist.HasClearButton="True" Grid.Row="1" Margin="10,5,10,10"
|
|
md:HintAssist.Hint="{Tr MainWindow.LeftPart.SearchBoxHint}"
|
|
Text="{Binding SearchText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
x:Name="SearchField"
|
|
KeyDown="SearchField_OnKeyDown" />
|
|
</Grid>
|
|
|
|
</Border>
|
|
|
|
</Grid>
|
|
<Grid Grid.Column="1">
|
|
<Border Background="{DynamicResource MaterialDesign.Brush.Card.Background}"
|
|
Opacity="{Binding Settings.RightOpacity}"
|
|
BorderThickness="1"
|
|
|
|
Margin="10,10,15,10" CornerRadius="12" VerticalAlignment="Stretch">
|
|
<Border.BorderBrush>
|
|
<SolidColorBrush Color="{DynamicResource Base300Color}" Opacity="0.3" />
|
|
</Border.BorderBrush>
|
|
</Border>
|
|
<md:Card Margin="10,10,15,10" Padding="2" UniformCornerRadius="12"
|
|
Background="Transparent" >
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="115*" />
|
|
<RowDefinition Height="436*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid Row="0">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<TextBox FontSize="24"
|
|
IsReadOnly="True" HorizontalContentAlignment="Center"
|
|
Background="#00FFFFFF"
|
|
|
|
Style="{StaticResource MaterialDesignTextBox}"
|
|
|
|
Text="{Binding Code, FallbackValue=Code}">
|
|
<TextBox.InputBindings>
|
|
<MouseBinding Gesture="LeftClick" Command="{Binding CopyCodeCommand}" />
|
|
</TextBox.InputBindings>
|
|
</TextBox>
|
|
<nebulaAuth:CodeProgressBar
|
|
Visibility="{Binding SelectedMafile, Converter={StaticResource NullableToVisibilityConverter}}"
|
|
Grid.Row="1" Height="4"
|
|
Style="{StaticResource MaterialDesignLinearProgressBar}"
|
|
MaxTime="30" TimeRemaining="{Binding CodeProgress, Mode=OneWay}"
|
|
/>
|
|
</Grid>
|
|
<Button IsEnabled="{Binding IsMafileSelected}"
|
|
FontSize="14"
|
|
Grid.Row="1"
|
|
Style="{StaticResource MaterialDesignOutlinedButton}"
|
|
Margin="0,10,0,10"
|
|
HorizontalAlignment="Center"
|
|
Content="{Tr MainWindow.RightPart.LoadConfirmations}"
|
|
Command="{Binding GetConfirmationsCommand}"
|
|
md:ButtonProgressAssist.IsIndeterminate="True"
|
|
md:ButtonProgressAssist.IsIndicatorVisible="{Binding GetConfirmationsCommand.IsRunning}"
|
|
Width="{Binding Path=ActualWidth, Converter={StaticResource CoefficientConverter}, ConverterParameter=0.6, RelativeSource={RelativeSource AncestorType=md:Card}}" />
|
|
<ItemsControl md:RippleAssist.IsDisabled="True" Focusable="False" Grid.Row="2"
|
|
FontSize="16"
|
|
Margin="10,10,10,10"
|
|
Visibility="{Binding ConfirmationsVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
|
|
ItemsSource="{Binding Confirmations}" Grid.RowSpan="2" />
|
|
<Button FontSize="16"
|
|
Style="{StaticResource MaterialDesignFlatButton}" Grid.Row="4"
|
|
Command="{Binding ConfirmLoginCommand}"
|
|
Content="{Tr MainWindow.RightPart.ConfirmLogin}" />
|
|
</Grid>
|
|
|
|
</md:Card>
|
|
</Grid>
|
|
</Grid>
|
|
<Border Grid.Row="2" BorderBrush="#1e1e24">
|
|
<Border.Background>
|
|
<SolidColorBrush Opacity="1" Color="{DynamicResource Base300Color}" />
|
|
</Border.Background>
|
|
<Grid>
|
|
<ToolBarPanel TextElement.Foreground="{DynamicResource SecondaryContentBrush}"
|
|
Orientation="Horizontal" Margin="5">
|
|
<TextBlock FontSize="15" Text="{Tr MainWindow.Footer.AccountsCount}" />
|
|
<TextBlock FontSize="15" Text="{Binding MaFiles.Count}" />
|
|
<TextBlock FontSize="15" Text="|" Margin="10,0,10,0" />
|
|
<TextBlock FontSize="15" Text="{Tr MainWindow.Footer.SelectedAccount}" />
|
|
<TextBlock FontSize="15"
|
|
Text="{Binding SelectedMafile.AccountName, TargetNullValue=' ', FallbackValue=' ', Mode=OneWay}" />
|
|
<!--<Button Command="{Binding DebugCommand}">Debug</Button>-->
|
|
</ToolBarPanel>
|
|
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Right" FontSize="16"
|
|
Margin="0,0,10,0">
|
|
<Hyperlink
|
|
NavigateUri="https://github.com/achiez/NebulaAuth-Steam-Desktop-Authenticator-by-Achies"
|
|
|
|
Foreground="{DynamicResource AccentBrush}"
|
|
Command="{Binding OpenLinksViewCommand}">
|
|
by achies
|
|
</Hyperlink>
|
|
</TextBlock>
|
|
</Grid>
|
|
</Border>
|
|
<md:Snackbar Grid.Row="1" MessageQueue="{Binding MessageQueue}" />
|
|
</Grid>
|
|
</md:DialogHost>
|
|
</Border>
|
|
</Window> |