@ -52,6 +52,8 @@ namespace Bit.App.Pages
@@ -52,6 +52,8 @@ namespace Bit.App.Pages
private bool _ showFirefoxRelayApiAccessToken ;
private bool _ showAnonAddyApiAccessToken ;
private bool _ showSimpleLoginApiKey ;
private bool _ showDuckDuckGoApiKey ;
private bool _ showFastmailApiKey ;
private bool _ editMode ;
public GeneratorPageViewModel ( )
@ -79,6 +81,8 @@ namespace Bit.App.Pages
@@ -79,6 +81,8 @@ namespace Bit.App.Pages
ForwardedEmailServiceTypeOptions = new List < ForwardedEmailServiceType > {
ForwardedEmailServiceType . AnonAddy ,
ForwardedEmailServiceType . DuckDuckGo ,
ForwardedEmailServiceType . Fastmail ,
ForwardedEmailServiceType . FirefoxRelay ,
ForwardedEmailServiceType . SimpleLogin
} ;
@ -461,15 +465,9 @@ namespace Bit.App.Pages
@@ -461,15 +465,9 @@ namespace Bit.App.Pages
{
return _ showAnonAddyApiAccessToken ;
}
set = > SetProperty ( ref _ showAnonAddyApiAccessToken , value ,
additionalPropertyNames : new string [ ]
{
nameof ( ShowAnonAddyHiddenValueIcon )
} ) ;
set = > SetProperty ( ref _ showAnonAddyApiAccessToken , value ) ;
}
public string ShowAnonAddyHiddenValueIcon = > _ showAnonAddyApiAccessToken ? BitwardenIcons . EyeSlash : BitwardenIcons . Eye ;
public string AnonAddyDomainName
{
get = > _ usernameOptions . AnonAddyDomainName ;
@ -504,15 +502,9 @@ namespace Bit.App.Pages
@@ -504,15 +502,9 @@ namespace Bit.App.Pages
{
return _ showFirefoxRelayApiAccessToken ;
}
set = > SetProperty ( ref _ showFirefoxRelayApiAccessToken , value ,
additionalPropertyNames : new string [ ]
{
nameof ( ShowFirefoxRelayHiddenValueIcon )
} ) ;
set = > SetProperty ( ref _ showFirefoxRelayApiAccessToken , value ) ;
}
public string ShowFirefoxRelayHiddenValueIcon = > _ showFirefoxRelayApiAccessToken ? BitwardenIcons . EyeSlash : BitwardenIcons . Eye ;
public string SimpleLoginApiKey
{
get = > _ usernameOptions . SimpleLoginApiKey ;
@ -533,14 +525,55 @@ namespace Bit.App.Pages
@@ -533,14 +525,55 @@ namespace Bit.App.Pages
{
return _ showSimpleLoginApiKey ;
}
set = > SetProperty ( ref _ showSimpleLoginApiKey , value ,
additionalPropertyNames : new string [ ]
set = > SetProperty ( ref _ showSimpleLoginApiKey , value ) ;
}
public string DuckDuckGoApiKey
{
get = > _ usernameOptions . DuckDuckGoApiKey ;
set
{
if ( _ usernameOptions . DuckDuckGoApiKey ! = value )
{
nameof ( ShowSimpleLoginHiddenValueIcon )
} ) ;
_ usernameOptions . DuckDuckGoApiKey = value ;
TriggerPropertyChanged ( nameof ( DuckDuckGoApiKey ) ) ;
SaveUsernameOptionsAsync ( false ) . FireAndForget ( ) ;
}
}
}
public string ShowSimpleLoginHiddenValueIcon = > _ showSimpleLoginApiKey ? BitwardenIcons . EyeSlash : BitwardenIcons . Eye ;
public bool ShowDuckDuckGoApiKey
{
get
{
return _ showDuckDuckGoApiKey ;
}
set = > SetProperty ( ref _ showDuckDuckGoApiKey , value ) ;
}
public string FastmailApiKey
{
get = > _ usernameOptions . FastMailApiKey ;
set
{
if ( _ usernameOptions . FastMailApiKey ! = value )
{
_ usernameOptions . FastMailApiKey = value ;
TriggerPropertyChanged ( nameof ( FastmailApiKey ) ) ;
SaveUsernameOptionsAsync ( false ) . FireAndForget ( ) ;
}
}
}
public bool ShowFastmailApiKey
{
get
{
return _ showFastmailApiKey ;
}
set = > SetProperty ( ref _ showFastmailApiKey , value ) ;
}
public bool CapitalizeRandomWordUsername
{
@ -778,6 +811,8 @@ namespace Bit.App.Pages
@@ -778,6 +811,8 @@ namespace Bit.App.Pages
TriggerPropertyChanged ( nameof ( FirefoxRelayApiAccessToken ) ) ;
TriggerPropertyChanged ( nameof ( AnonAddyDomainName ) ) ;
TriggerPropertyChanged ( nameof ( AnonAddyApiAccessToken ) ) ;
TriggerPropertyChanged ( nameof ( DuckDuckGoApiKey ) ) ;
TriggerPropertyChanged ( nameof ( FastmailApiKey ) ) ;
TriggerPropertyChanged ( nameof ( CatchAllEmailDomain ) ) ;
TriggerPropertyChanged ( nameof ( ForwardedEmailServiceSelected ) ) ;
TriggerPropertyChanged ( nameof ( UsernameTypeSelected ) ) ;
@ -849,6 +884,12 @@ namespace Bit.App.Pages
@@ -849,6 +884,12 @@ namespace Bit.App.Pages
case ForwardedEmailServiceType . SimpleLogin :
ShowSimpleLoginApiKey = ! ShowSimpleLoginApiKey ;
break ;
case ForwardedEmailServiceType . DuckDuckGo :
ShowDuckDuckGoApiKey = ! ShowDuckDuckGoApiKey ;
break ;
case ForwardedEmailServiceType . Fastmail :
ShowFastmailApiKey = ! ShowFastmailApiKey ;
break ;
}
}
}