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