mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 18:08:26 +03:00
totp text color changes with DynamicResource
This commit is contained in:
parent
dc0f9847c6
commit
a01f9c7351
3 changed files with 22 additions and 1 deletions
|
@ -110,10 +110,12 @@
|
||||||
Grid.Column="0" />
|
Grid.Column="0" />
|
||||||
<Label
|
<Label
|
||||||
Text="{Binding TotpSec, Mode=OneWay}"
|
Text="{Binding TotpSec, Mode=OneWay}"
|
||||||
|
Style="{DynamicResource textTotp}"
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Grid.RowSpan="2"
|
Grid.RowSpan="2"
|
||||||
HorizontalOptions="End"
|
HorizontalOptions="End"
|
||||||
|
HorizontalTextAlignment="End"
|
||||||
VerticalOptions="CenterAndExpand"/>
|
VerticalOptions="CenterAndExpand"/>
|
||||||
<controls:FaButton StyleClass="box-row-button, box-row-button-platform"
|
<controls:FaButton StyleClass="box-row-button, box-row-button-platform"
|
||||||
Text=""
|
Text=""
|
||||||
|
|
|
@ -72,7 +72,11 @@ namespace Bit.App.Pages
|
||||||
public bool TotpLow
|
public bool TotpLow
|
||||||
{
|
{
|
||||||
get => _totpLow;
|
get => _totpLow;
|
||||||
set => SetProperty(ref _totpLow, value);
|
set
|
||||||
|
{
|
||||||
|
SetProperty(ref _totpLow, value);
|
||||||
|
Page.Resources["textTotp"] = Application.Current.Resources[value ? "text-danger" : "text-default"];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task LoadAsync()
|
public async Task LoadAsync()
|
||||||
|
|
|
@ -11,6 +11,21 @@
|
||||||
<Setter Property="TextColor"
|
<Setter Property="TextColor"
|
||||||
Value="{StaticResource TextColor}" />
|
Value="{StaticResource TextColor}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
<Style TargetType="Label"
|
||||||
|
x:Key="text-default">
|
||||||
|
<Setter Property="TextColor"
|
||||||
|
Value="{StaticResource TextColor}" />
|
||||||
|
</Style>
|
||||||
|
<Style TargetType="Label"
|
||||||
|
x:Key="text-danger">
|
||||||
|
<Setter Property="TextColor"
|
||||||
|
Value="{StaticResource DangerColor}" />
|
||||||
|
</Style>
|
||||||
|
<Style TargetType="Label"
|
||||||
|
x:Key="text-success">
|
||||||
|
<Setter Property="TextColor"
|
||||||
|
Value="{StaticResource SuccessColor}" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
<!-- List -->
|
<!-- List -->
|
||||||
<Style TargetType="ListView"
|
<Style TargetType="ListView"
|
||||||
|
|
Loading…
Reference in a new issue