Skip to content

Commit 36bb439

Browse files
committed
Add passwordBox
1 parent ddc6af5 commit 36bb439

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Flow.Launcher.Core/Plugin/JsonRPCConfigurationModel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public class FieldAttributes
2929
public bool Validation { get; set; }
3030
public List<string> Options { get; set; }
3131
public string DefaultValue { get; set; }
32+
public char passwordChar { get; set; }
3233
public void Deconstruct(out string Name, out string Label, out string Description, out bool Validation, out List<string> Options, out string DefaultValue)
3334
{
3435
Name = this.Name;

Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,17 @@ public Control CreateSettingPanel()
416416
contentControl = textBox;
417417
break;
418418
}
419+
case "passwordBox":
420+
{
421+
var passwordBox = new PasswordBox()
422+
{
423+
Width = 300,
424+
Margin = settingControlMargin,
425+
Password = Settings[attribute.Name] as string ?? string.Empty,
426+
PasswordChar = attribute.passwordChar == default ? '*' : attribute.passwordChar
427+
};
428+
break;
429+
}
419430
case "dropdown":
420431
{
421432
var comboBox = new ComboBox()

0 commit comments

Comments
 (0)