mirror of
https://github.com/bitwarden/mobile
synced 2025-12-19 09:43:27 +00:00
* Refactored CustomFields to stop using RepeaterView and use BindableLayout and divided the different types on different files and added a factory to create them * Fix formatting
20 lines
677 B
C#
20 lines
677 B
C#
using System.Windows.Input;
|
|
using Bit.Core.Models.View;
|
|
using Xamarin.Forms;
|
|
|
|
namespace Bit.App.Lists.ItemViewModels.CustomFields
|
|
{
|
|
public class TextCustomFieldItemViewModel : BaseCustomFieldItemViewModel
|
|
{
|
|
public TextCustomFieldItemViewModel(FieldView field, bool isEditing, ICommand fieldOptionsCommand, ICommand copyFieldCommand)
|
|
: base(field, isEditing, fieldOptionsCommand)
|
|
{
|
|
CopyFieldCommand = new Command(() => copyFieldCommand?.Execute(Field));
|
|
}
|
|
|
|
public override bool ShowCopyButton => !_isEditing && !string.IsNullOrWhiteSpace(Field.Value);
|
|
|
|
public ICommand CopyFieldCommand { get; }
|
|
}
|
|
}
|