mirror of
https://github.com/bitwarden/mobile.git
synced 2024-12-27 17:08:00 +01:00
ShowAndroidAutofillSettings
ShowAndroidAccessibilitySettings
This commit is contained in:
parent
44530b63ca
commit
42d6a7c9b8
@ -90,7 +90,7 @@
|
||||
Text="{u:I18n DisableWebsiteIconsDescription}"
|
||||
StyleClass="box-footer-label, box-footer-label-switch" />
|
||||
</StackLayout>
|
||||
<StackLayout StyleClass="box" IsVisible="{Binding AndroidOptions}">
|
||||
<StackLayout StyleClass="box" IsVisible="{Binding ShowAndroidAutofillSettings}">
|
||||
<StackLayout StyleClass="box-row-header">
|
||||
<Label Text="{u:I18n AutofillService}"
|
||||
StyleClass="box-header, box-header-platform" />
|
||||
@ -109,7 +109,7 @@
|
||||
Text="{u:I18n DisableSavePromptDescription}"
|
||||
StyleClass="box-footer-label, box-footer-label-switch" />
|
||||
</StackLayout>
|
||||
<StackLayout StyleClass="box" IsVisible="{Binding AndroidOptions}">
|
||||
<StackLayout StyleClass="box" IsVisible="{Binding ShowAndroidAutofillSettings}">
|
||||
<StackLayout StyleClass="box-row, box-row-input">
|
||||
<Label
|
||||
Text="{u:I18n BlacklistedUris}"
|
||||
@ -128,7 +128,7 @@
|
||||
Text="{u:I18n BlacklistedUrisDescription}"
|
||||
StyleClass="box-footer-label" />
|
||||
</StackLayout>
|
||||
<StackLayout StyleClass="box" IsVisible="{Binding AndroidOptions}">
|
||||
<StackLayout StyleClass="box" IsVisible="{Binding ShowAndroidAccessibilitySettings}">
|
||||
<StackLayout StyleClass="box-row-header">
|
||||
<Label Text="{u:I18n AutofillAccessibilityService}"
|
||||
StyleClass="box-header, box-header-platform" />
|
||||
@ -147,7 +147,7 @@
|
||||
Text="{u:I18n AutofillAlwaysDescription}"
|
||||
StyleClass="box-footer-label, box-footer-label-switch" />
|
||||
</StackLayout>
|
||||
<StackLayout StyleClass="box" IsVisible="{Binding AndroidOptions}">
|
||||
<StackLayout StyleClass="box" IsVisible="{Binding ShowAndroidAccessibilitySettings}">
|
||||
<StackLayout StyleClass="box-row, box-row-switch">
|
||||
<Label
|
||||
Text="{u:I18n AutofillPersistNotification}"
|
||||
@ -162,7 +162,7 @@
|
||||
Text="{u:I18n AutofillPersistNotificationDescription}"
|
||||
StyleClass="box-footer-label, box-footer-label-switch" />
|
||||
</StackLayout>
|
||||
<StackLayout StyleClass="box" IsVisible="{Binding AndroidOptions}">
|
||||
<StackLayout StyleClass="box" IsVisible="{Binding ShowAndroidAccessibilitySettings}">
|
||||
<StackLayout StyleClass="box-row, box-row-switch">
|
||||
<Label
|
||||
Text="{u:I18n AutofillPasswordField}"
|
||||
|
@ -1,16 +1,18 @@
|
||||
using Bit.App.Resources;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Bit.App.Abstractions;
|
||||
using Bit.App.Resources;
|
||||
using Bit.Core.Utilities;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Bit.App.Pages
|
||||
{
|
||||
public partial class OptionsPage : BaseContentPage
|
||||
{
|
||||
private readonly IDeviceActionService _deviceActionService;
|
||||
private readonly OptionsPageViewModel _vm;
|
||||
|
||||
public OptionsPage()
|
||||
{
|
||||
_deviceActionService = ServiceContainer.Resolve<IDeviceActionService>("deviceActionService");
|
||||
InitializeComponent();
|
||||
_vm = BindingContext as OptionsPageViewModel;
|
||||
_vm.Page = this;
|
||||
@ -19,7 +21,8 @@ namespace Bit.App.Pages
|
||||
_clearClipboardPicker.ItemDisplayBinding = new Binding("Value");
|
||||
if(Device.RuntimePlatform == Device.Android)
|
||||
{
|
||||
_vm.AndroidOptions = true;
|
||||
_vm.ShowAndroidAccessibilitySettings = true;
|
||||
_vm.ShowAndroidAutofillSettings = _deviceActionService.SupportsAutofillService();
|
||||
_themeDescriptionLabel.Text = string.Concat(_themeDescriptionLabel.Text, " ",
|
||||
AppResources.RestartIsRequired);
|
||||
}
|
||||
|
@ -33,7 +33,8 @@ namespace Bit.App.Pages
|
||||
private int _uriMatchSelectedIndex;
|
||||
private bool _inited;
|
||||
private bool _updatingAutofill;
|
||||
private bool _androidOptions;
|
||||
private bool _showAndroidAccessibilitySettings;
|
||||
private bool _showAndroidAutofillSettings;
|
||||
|
||||
public OptionsPageViewModel()
|
||||
{
|
||||
@ -195,10 +196,16 @@ namespace Bit.App.Pages
|
||||
set => SetProperty(ref _autofillBlacklistedUris, value);
|
||||
}
|
||||
|
||||
public bool AndroidOptions
|
||||
public bool ShowAndroidAccessibilitySettings
|
||||
{
|
||||
get => _androidOptions;
|
||||
set => SetProperty(ref _androidOptions, value);
|
||||
get => _showAndroidAccessibilitySettings;
|
||||
set => SetProperty(ref _showAndroidAccessibilitySettings, value);
|
||||
}
|
||||
|
||||
public bool ShowAndroidAutofillSettings
|
||||
{
|
||||
get => _showAndroidAutofillSettings;
|
||||
set => SetProperty(ref _showAndroidAutofillSettings, value);
|
||||
}
|
||||
|
||||
public async Task InitAsync()
|
||||
|
Loading…
Reference in New Issue
Block a user