mirror of
https://github.com/KeyKeeperApp/KeyKeeper.git
synced 2026-05-04 05:46:29 +03:00
Изменено окно "О приложении" + небольшие правки
Визуальная составляющая: Изменено окно "О приложении". Цвет фона теперь синий. Надпись теперь на русском (взята с ReadMe). Небольшие правки: Кнопка "настройки" на главном экране теперь открывает окно настроек. Кнопка "о приложении" теперь открывает окно "о приложении"
This commit is contained in:
@@ -12,6 +12,8 @@ public class AboutWindow : Window
|
|||||||
this.Width = 600;
|
this.Width = 600;
|
||||||
this.Height = 400;
|
this.Height = 400;
|
||||||
|
|
||||||
|
this.Background = new SolidColorBrush(Color.Parse("#2328c4"));
|
||||||
|
|
||||||
var AboutKeyKeeper = new TextBlock
|
var AboutKeyKeeper = new TextBlock
|
||||||
{
|
{
|
||||||
Text = "About Keykeeper",
|
Text = "About Keykeeper",
|
||||||
@@ -22,7 +24,7 @@ public class AboutWindow : Window
|
|||||||
|
|
||||||
var AboutText = new TextBlock
|
var AboutText = new TextBlock
|
||||||
{
|
{
|
||||||
Text = "KeyKeeper is a personal password and key manager\nwhere you can save passwords and other login\ninformation, configure one-time code generation,\nand create encryption keys for personal use",
|
Text = "KeyKeeper - личный менеджер паролей и ключей,\nгде пользователь сможет сохранять свои логины, пароли, адреса электронной почты, ключи восстановления с различных веб-сайтов и\nиз приложений и управлять ими. Ключи и пароли\nбудут храниться исключительно локально на\nкомпьютере пользователя и всё хранилище\nцеликом можно будет защитить мастер-паролем.",
|
||||||
HorizontalAlignment = HorizontalAlignment.Left,
|
HorizontalAlignment = HorizontalAlignment.Left,
|
||||||
FontSize = 16,
|
FontSize = 16,
|
||||||
TextAlignment = TextAlignment.Left,
|
TextAlignment = TextAlignment.Left,
|
||||||
|
|||||||
@@ -5,27 +5,19 @@ using Avalonia.Media;
|
|||||||
namespace KeyKeeper.Views;
|
namespace KeyKeeper.Views;
|
||||||
public class SettingsWindow : Window
|
public class SettingsWindow : Window
|
||||||
{
|
{
|
||||||
private async void OpenAbout()
|
|
||||||
{
|
|
||||||
var AboutWindow = new AboutWindow();
|
|
||||||
await AboutWindow.ShowDialog(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public SettingsWindow()
|
public SettingsWindow()
|
||||||
{
|
{
|
||||||
this.Title = "Настройки";
|
this.Title = "Настройки";
|
||||||
this.Width = 400;
|
this.Width = 400;
|
||||||
this.Height = 300;
|
this.Height = 300;
|
||||||
var AboutButton = new Button
|
var textBlock = new TextBlock
|
||||||
{
|
{
|
||||||
Content = "О приложении",
|
Text = "Окно настроек",
|
||||||
HorizontalAlignment = Avalonia.Layout.HorizontalAlignment.Center,
|
HorizontalAlignment = Avalonia.Layout.HorizontalAlignment.Center,
|
||||||
VerticalAlignment = Avalonia.Layout.VerticalAlignment.Center,
|
VerticalAlignment = Avalonia.Layout.VerticalAlignment.Center,
|
||||||
FontSize = 16
|
FontSize = 16
|
||||||
};
|
};
|
||||||
|
|
||||||
AboutButton.Click += (sender, e) => OpenAbout();
|
this.Content = textBlock;
|
||||||
|
|
||||||
this.Content = AboutButton;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,13 @@ public partial class MainWindowViewModel : ViewModelBase
|
|||||||
var settingsWindow = new SettingsWindow();
|
var settingsWindow = new SettingsWindow();
|
||||||
await settingsWindow.ShowDialog(GetMainWindow()!);
|
await settingsWindow.ShowDialog(GetMainWindow()!);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[RelayCommand]
|
||||||
|
private async Task OpenAbout()
|
||||||
|
{
|
||||||
|
var AboutWindow = new AboutWindow();
|
||||||
|
await AboutWindow.ShowDialog(GetMainWindow()!);
|
||||||
|
}
|
||||||
private static Window? GetMainWindow()
|
private static Window? GetMainWindow()
|
||||||
{
|
{
|
||||||
return App.Current?.ApplicationLifetime is Avalonia.Controls.ApplicationLifetimes.IClassicDesktopStyleApplicationLifetime desktop
|
return App.Current?.ApplicationLifetime is Avalonia.Controls.ApplicationLifetimes.IClassicDesktopStyleApplicationLifetime desktop
|
||||||
|
|||||||
@@ -42,8 +42,10 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Grid.Row="2" Orientation="Horizontal" Spacing="25">
|
<StackPanel Grid.Row="2" Orientation="Horizontal" Spacing="25">
|
||||||
<Svg Path="/Assets/settings.svg" Width="61" Height="61"/>
|
|
||||||
<Button Command="{Binding OpenSettingsCommand}">
|
<Button Command="{Binding OpenSettingsCommand}">
|
||||||
|
<Svg Path="/Assets/settings.svg" Width="61" Height="61"/>
|
||||||
|
</Button>
|
||||||
|
<Button Command="{Binding OpenAboutCommand}">
|
||||||
<Svg Path="/Assets/about.svg" Width="61" Height="61"/>
|
<Svg Path="/Assets/about.svg" Width="61" Height="61"/>
|
||||||
</Button>
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
Reference in New Issue
Block a user