mirror of
https://github.com/bitwarden/mobile
synced 2025-12-05 23:53:33 +00:00
Compare commits
1 Commits
v2024.4.2
...
auth/pm-33
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2dd6a3f294 |
@@ -49,6 +49,38 @@
|
|||||||
AutomationId="{Binding AutomationIdSettingStatus}" />
|
AutomationId="{Binding AutomationIdSettingStatus}" />
|
||||||
</controls:ExtendedStackLayout>
|
</controls:ExtendedStackLayout>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
<DataTemplate
|
||||||
|
x:Key="regularWithDescriptionTemplate"
|
||||||
|
x:DataType="pages:SettingsPageListItem">
|
||||||
|
<controls:ExtendedStackLayout Orientation="Horizontal"
|
||||||
|
StyleClass="list-row, list-row-platform">
|
||||||
|
<StackLayout
|
||||||
|
HorizontalOptions="StartAndExpand"
|
||||||
|
VerticalOptions="Center">
|
||||||
|
<controls:CustomLabel
|
||||||
|
Text="{Binding Name, Mode=OneWay}"
|
||||||
|
LineBreakMode="{Binding LineBreakMode}"
|
||||||
|
StyleClass="list-title"
|
||||||
|
TextColor="{Binding NameColor}"
|
||||||
|
AutomationId="{Binding AutomationIdSettingName}" />
|
||||||
|
<controls:CustomLabel
|
||||||
|
Text="{Binding Description, Mode=OneWay}"
|
||||||
|
LineBreakMode="{Binding LineBreakMode}"
|
||||||
|
TextColor="{DynamicResource MutedColor}"
|
||||||
|
FontSize="Micro"
|
||||||
|
StyleClass="list-sub"/>
|
||||||
|
</StackLayout>
|
||||||
|
<controls:CustomLabel Text="{Binding SubLabel, Mode=OneWay}"
|
||||||
|
IsVisible="{Binding ShowSubLabel}"
|
||||||
|
HorizontalOptions="End"
|
||||||
|
HorizontalTextAlignment="End"
|
||||||
|
VerticalOptions="CenterAndExpand"
|
||||||
|
VerticalTextAlignment="Start"
|
||||||
|
TextColor="{Binding SubLabelColor}"
|
||||||
|
StyleClass="list-sub"
|
||||||
|
AutomationId="{Binding AutomationIdSettingStatus}" />
|
||||||
|
</controls:ExtendedStackLayout>
|
||||||
|
</DataTemplate>
|
||||||
<DataTemplate
|
<DataTemplate
|
||||||
x:Key="timePickerTemplate"
|
x:Key="timePickerTemplate"
|
||||||
x:DataType="pages:SettingsPageListItem">
|
x:DataType="pages:SettingsPageListItem">
|
||||||
@@ -107,6 +139,7 @@
|
|||||||
x:Key="listItemDataTemplateSelector"
|
x:Key="listItemDataTemplateSelector"
|
||||||
HeaderTemplate="{StaticResource headerTemplate}"
|
HeaderTemplate="{StaticResource headerTemplate}"
|
||||||
RegularTemplate="{StaticResource regularTemplate}"
|
RegularTemplate="{StaticResource regularTemplate}"
|
||||||
|
RegularWithDescriptionTemplate="{StaticResource regularWithDescriptionTemplate}"
|
||||||
TimePickerTemplate="{StaticResource timePickerTemplate}" />
|
TimePickerTemplate="{StaticResource timePickerTemplate}" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</ContentPage.Resources>
|
</ContentPage.Resources>
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ namespace Bit.App.Pages
|
|||||||
private void RowSelected(object sender, SelectionChangedEventArgs e)
|
private void RowSelected(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
((ExtendedCollectionView)sender).SelectedItem = null;
|
((ExtendedCollectionView)sender).SelectedItem = null;
|
||||||
if (e.CurrentSelection?.FirstOrDefault() is SettingsPageListItem item)
|
if (e.CurrentSelection?.FirstOrDefault() is SettingsPageListItem item && item.Enabled)
|
||||||
{
|
{
|
||||||
_vm?.ExecuteSettingItemCommand.Execute(item);
|
_vm?.ExecuteSettingItemCommand.Execute(item);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,8 +13,10 @@ namespace Bit.App.Pages
|
|||||||
public string Icon { get; set; }
|
public string Icon { get; set; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string SubLabel { get; set; }
|
public string SubLabel { get; set; }
|
||||||
|
public string Description { get; set; }
|
||||||
public TimeSpan? Time { get; set; }
|
public TimeSpan? Time { get; set; }
|
||||||
public bool UseFrame { get; set; }
|
public bool UseFrame { get; set; }
|
||||||
|
public bool Enabled { get; set; } = true;
|
||||||
public Func<Task> ExecuteAsync { get; set; }
|
public Func<Task> ExecuteAsync { get; set; }
|
||||||
|
|
||||||
public bool SubLabelTextEnabled => SubLabel == AppResources.On;
|
public bool SubLabelTextEnabled => SubLabel == AppResources.On;
|
||||||
@@ -24,6 +26,9 @@ namespace Bit.App.Pages
|
|||||||
public Color SubLabelColor => SubLabelTextEnabled ?
|
public Color SubLabelColor => SubLabelTextEnabled ?
|
||||||
ThemeManager.GetResourceColor("SuccessColor") :
|
ThemeManager.GetResourceColor("SuccessColor") :
|
||||||
ThemeManager.GetResourceColor("MutedColor");
|
ThemeManager.GetResourceColor("MutedColor");
|
||||||
|
public Color NameColor => Enabled ?
|
||||||
|
ThemeManager.GetResourceColor("TextColor") :
|
||||||
|
ThemeManager.GetResourceColor("MutedColor");
|
||||||
|
|
||||||
public string AutomationIdSettingName
|
public string AutomationIdSettingName
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ namespace Bit.App.Pages
|
|||||||
public DataTemplate HeaderTemplate { get; set; }
|
public DataTemplate HeaderTemplate { get; set; }
|
||||||
public DataTemplate RegularTemplate { get; set; }
|
public DataTemplate RegularTemplate { get; set; }
|
||||||
public DataTemplate TimePickerTemplate { get; set; }
|
public DataTemplate TimePickerTemplate { get; set; }
|
||||||
|
public DataTemplate RegularWithDescriptionTemplate { get; set; }
|
||||||
|
|
||||||
protected override DataTemplate OnSelectTemplate(object item, BindableObject container)
|
protected override DataTemplate OnSelectTemplate(object item, BindableObject container)
|
||||||
{
|
{
|
||||||
@@ -16,6 +17,10 @@ namespace Bit.App.Pages
|
|||||||
}
|
}
|
||||||
if (item is SettingsPageListItem listItem)
|
if (item is SettingsPageListItem listItem)
|
||||||
{
|
{
|
||||||
|
if (!string.IsNullOrEmpty(listItem.Description))
|
||||||
|
{
|
||||||
|
return RegularWithDescriptionTemplate;
|
||||||
|
}
|
||||||
return listItem.ShowTimeInput ? TimePickerTemplate : RegularTemplate;
|
return listItem.ShowTimeInput ? TimePickerTemplate : RegularTemplate;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -567,6 +567,8 @@ namespace Bit.App.Pages
|
|||||||
{
|
{
|
||||||
Name = AppResources.VaultTimeoutAction,
|
Name = AppResources.VaultTimeoutAction,
|
||||||
SubLabel = _vaultTimeoutActionDisplayValue,
|
SubLabel = _vaultTimeoutActionDisplayValue,
|
||||||
|
Description = IsVaultTimeoutActionLockAllowed ? null : AppResources.SetUpAnUnlockMethodToChangeYourVaultTimeoutAction,
|
||||||
|
Enabled = IsVaultTimeoutActionLockAllowed,
|
||||||
ExecuteAsync = () => VaultTimeoutActionAsync()
|
ExecuteAsync = () => VaultTimeoutActionAsync()
|
||||||
},
|
},
|
||||||
new SettingsPageListItem
|
new SettingsPageListItem
|
||||||
@@ -582,16 +584,19 @@ namespace Bit.App.Pages
|
|||||||
ExecuteAsync = () => ApproveLoginRequestsAsync()
|
ExecuteAsync = () => ApproveLoginRequestsAsync()
|
||||||
},
|
},
|
||||||
new SettingsPageListItem
|
new SettingsPageListItem
|
||||||
{
|
|
||||||
Name = AppResources.LockNow,
|
|
||||||
ExecuteAsync = () => LockAsync()
|
|
||||||
},
|
|
||||||
new SettingsPageListItem
|
|
||||||
{
|
{
|
||||||
Name = AppResources.TwoStepLogin,
|
Name = AppResources.TwoStepLogin,
|
||||||
ExecuteAsync = () => TwoStepAsync()
|
ExecuteAsync = () => TwoStepAsync()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
if (IsVaultTimeoutActionLockAllowed)
|
||||||
|
{
|
||||||
|
securityItems.Insert(4, new SettingsPageListItem
|
||||||
|
{
|
||||||
|
Name = AppResources.LockNow,
|
||||||
|
ExecuteAsync = () => LockAsync()
|
||||||
|
});
|
||||||
|
}
|
||||||
if (_approvePasswordlessLoginRequests)
|
if (_approvePasswordlessLoginRequests)
|
||||||
{
|
{
|
||||||
manageItems.Add(new SettingsPageListItem
|
manageItems.Add(new SettingsPageListItem
|
||||||
|
|||||||
29
src/App/Resources/AppResources.Designer.cs
generated
29
src/App/Resources/AppResources.Designer.cs
generated
@@ -418,6 +418,15 @@ namespace Bit.App.Resources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to addy.io.
|
||||||
|
/// </summary>
|
||||||
|
public static string AddyIo {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("AddyIo", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Admin approval requested.
|
/// Looks up a localized string similar to Admin approval requested.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -508,15 +517,6 @@ namespace Bit.App.Resources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to addy.io.
|
|
||||||
/// </summary>
|
|
||||||
public static string AddyIo {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("AddyIo", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to A notification has been sent to your device..
|
/// Looks up a localized string similar to A notification has been sent to your device..
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -6002,6 +6002,15 @@ namespace Bit.App.Resources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Set up an unlock method to change your vault timeout action..
|
||||||
|
/// </summary>
|
||||||
|
public static string SetUpAnUnlockMethodToChangeYourVaultTimeoutAction {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("SetUpAnUnlockMethodToChangeYourVaultTimeoutAction", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Set up TOTP.
|
/// Looks up a localized string similar to Set up TOTP.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -6751,7 +6760,7 @@ namespace Bit.App.Resources {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Unlocking may fail due to insufficient memory. Decrease your KDF memory settings to resolve..
|
/// Looks up a localized string similar to Unlocking may fail due to insufficient memory. Decrease your KDF memory settings or set up biometric unlock to resolve..
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string UnlockingMayFailDueToInsufficientMemoryDecreaseYourKDFMemorySettingsToResolve {
|
public static string UnlockingMayFailDueToInsufficientMemoryDecreaseYourKDFMemorySettingsToResolve {
|
||||||
get {
|
get {
|
||||||
|
|||||||
@@ -2762,4 +2762,7 @@ Do you want to switch to this account?</value>
|
|||||||
<data name="LoggingInOn" xml:space="preserve">
|
<data name="LoggingInOn" xml:space="preserve">
|
||||||
<value>Logging in on</value>
|
<value>Logging in on</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SetUpAnUnlockMethodToChangeYourVaultTimeoutAction" xml:space="preserve">
|
||||||
|
<value>Set up an unlock method to change your vault timeout action.</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|||||||
Reference in New Issue
Block a user