Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions SecRandom/Services/Security/SecuritySetupWindows.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Avalonia.Controls.Primitives;
using Avalonia.Controls.Selection;
using Avalonia.Controls.Templates;
using Avalonia.Input;
using Avalonia.Input.Platform;
using Avalonia.Layout;
using Avalonia.Media;
Expand Down Expand Up @@ -291,11 +292,16 @@ private static void AddUsbField(
Content = content
};

private static TextBox CreatePasswordInput(string placeholderText) => new()
private static TextBox CreatePasswordInput(string placeholderText)
{
PasswordChar = '●',
PlaceholderText = placeholderText
};
var input = new TextBox
{
PasswordChar = '●',
PlaceholderText = placeholderText
};
InputMethod.SetIsInputMethodEnabled(input, false);
return input;
}

private static IImage BuildQrCode(string content)
{
Expand Down
2 changes: 2 additions & 0 deletions SecRandom/Services/Security/SecurityVerificationWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Windows.Input;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Layout;
using Avalonia.Threading;
using FluentAvalonia.UI.Controls;
Expand All @@ -23,6 +24,7 @@ public static async Task<SecurityVerificationResponse> ShowAsync(TopLevel xamlRo
PasswordChar = '●',
PlaceholderText = SR.C_PasswordPlaceholder
};
InputMethod.SetIsInputMethodEnabled(password, false);
var totp = new TextBox { PlaceholderText = SR.C_TotpPlaceholder, MaxLength = 6 };
var usb = new TextBlock
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.Threading.Tasks;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
using Avalonia.Input;
using Avalonia.Interactivity;
using Avalonia.Media;
using Avalonia.Platform.Storage;
Expand Down Expand Up @@ -836,6 +837,7 @@ private async void OpenOmniTtsProviderButton_OnClick(object? sender, RoutedEvent
(option, _) => new TextBlock { Text = option.DisplayName });
var baseUrlBox = new TextBox { MinWidth = 360, Text = Settings.OmniTtsApiBaseUrl };
var apiKeyBox = new TextBox { MinWidth = 360, PasswordChar = '*' };
InputMethod.SetIsInputMethodEnabled(apiKeyBox, false);
var keyStatus = new TextBlock { Opacity = 0.7, FontSize = 12 };

void RefreshKeyStatus()
Expand Down
Loading