Codemaid
This commit is contained in:
@@ -2,9 +2,9 @@ using Toolkit.UI.Controls.Avalonia;
|
|||||||
|
|
||||||
namespace Wallet.Avalonia;
|
namespace Wallet.Avalonia;
|
||||||
|
|
||||||
public partial class AddItemNavigationView :
|
public partial class AddItemNavigationView :
|
||||||
SettingsExpander
|
SettingsExpander
|
||||||
{
|
{
|
||||||
public AddItemNavigationView() =>
|
public AddItemNavigationView() =>
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Controls.ApplicationLifetimes;
|
using Avalonia.Controls.ApplicationLifetimes;
|
||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
using Wallet.Data;
|
using FluentAvalonia.Core;
|
||||||
using HotAvalonia;
|
using HotAvalonia;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||||
@@ -11,8 +11,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Toolkit.Avalonia;
|
using Toolkit.Avalonia;
|
||||||
using Toolkit.Foundation;
|
using Toolkit.Foundation;
|
||||||
using FluentAvalonia.Core;
|
using Wallet.Data;
|
||||||
using Avalonia.Controls;
|
|
||||||
|
|
||||||
namespace Wallet.Avalonia;
|
namespace Wallet.Avalonia;
|
||||||
|
|
||||||
@@ -50,7 +49,7 @@ public partial class App : Application
|
|||||||
.AddConfiguration("Item:Server", ItemConfiguration.Server)
|
.AddConfiguration("Item:Server", ItemConfiguration.Server)
|
||||||
.AddConfiguration("Item:Education Record", ItemConfiguration.EducationRecord)
|
.AddConfiguration("Item:Education Record", ItemConfiguration.EducationRecord)
|
||||||
.AddConfiguration("Item:Travel Documents", ItemConfiguration.TravelDocuments)
|
.AddConfiguration("Item:Travel Documents", ItemConfiguration.TravelDocuments)
|
||||||
.AddConfiguration("Item:Concert Ticket", ItemConfiguration.ConcertTicket)
|
.AddConfiguration("Item:Concert Ticket", ItemConfiguration.ConcertTicket)
|
||||||
.ConfigureServices((context, services) =>
|
.ConfigureServices((context, services) =>
|
||||||
{
|
{
|
||||||
services.AddAvalonia();
|
services.AddAvalonia();
|
||||||
@@ -95,11 +94,11 @@ public partial class App : Application
|
|||||||
provider.GetServices<IConfigurationDescriptor<ItemConfiguration>>().OrderBy(x => x.Name) ??
|
provider.GetServices<IConfigurationDescriptor<ItemConfiguration>>().OrderBy(x => x.Name) ??
|
||||||
Enumerable.Empty<IConfigurationDescriptor<ItemConfiguration>>();
|
Enumerable.Empty<IConfigurationDescriptor<ItemConfiguration>>();
|
||||||
|
|
||||||
return new ItemConfigurationCollection(items.ToDictionary(x => x.Name,
|
return new ItemConfigurationCollection(items.ToDictionary(x => x.Name,
|
||||||
x => (Func<ItemConfiguration>)(() => x.Value)));
|
x => (Func<ItemConfiguration>)(() => x.Value)));
|
||||||
});
|
});
|
||||||
|
|
||||||
services.TryAddSingleton<IDecoratorService<ProfileImage<IImageDescriptor>>,
|
services.TryAddSingleton<IDecoratorService<ProfileImage<IImageDescriptor>>,
|
||||||
DecoratorService<ProfileImage<IImageDescriptor>>>();
|
DecoratorService<ProfileImage<IImageDescriptor>>>();
|
||||||
|
|
||||||
services.TryAddSingleton<IDecoratorService<SecurityKey>, DecoratorService<SecurityKey>>();
|
services.TryAddSingleton<IDecoratorService<SecurityKey>, DecoratorService<SecurityKey>>();
|
||||||
@@ -115,7 +114,7 @@ public partial class App : Application
|
|||||||
|
|
||||||
services.AddHandler<ItemHandler>();
|
services.AddHandler<ItemHandler>();
|
||||||
services.AddHandler<ItemImageHandler>();
|
services.AddHandler<ItemImageHandler>();
|
||||||
|
|
||||||
services.AddHandler<CreateItemHandler>();
|
services.AddHandler<CreateItemHandler>();
|
||||||
services.AddHandler<DeleteItemHandler>();
|
services.AddHandler<DeleteItemHandler>();
|
||||||
services.AddHandler<UpdateItemHander>();
|
services.AddHandler<UpdateItemHander>();
|
||||||
@@ -160,7 +159,7 @@ public partial class App : Application
|
|||||||
|
|
||||||
services.AddTemplate<ItemNavigationViewModel, ItemNavigationView>();
|
services.AddTemplate<ItemNavigationViewModel, ItemNavigationView>();
|
||||||
services.AddHandler<ItemNavigationViewModelActivatedHandler>();
|
services.AddHandler<ItemNavigationViewModelActivatedHandler>();
|
||||||
|
|
||||||
services.AddTemplate<EmptyItemCollectionViewModel, EmptyItemCollectionView>("EmptyItemCollection");
|
services.AddTemplate<EmptyItemCollectionViewModel, EmptyItemCollectionView>("EmptyItemCollection");
|
||||||
|
|
||||||
services.AddScoped<IDecoratorService<ItemHeaderConfiguration>, DecoratorService<ItemHeaderConfiguration>>();
|
services.AddScoped<IDecoratorService<ItemHeaderConfiguration>, DecoratorService<ItemHeaderConfiguration>>();
|
||||||
@@ -202,7 +201,7 @@ public partial class App : Application
|
|||||||
services.AddHandler<ConfirmUpdateItemHandler>(nameof(ItemState.Write));
|
services.AddHandler<ConfirmUpdateItemHandler>(nameof(ItemState.Write));
|
||||||
services.AddHandler<ConfirmCreateItemHandler>(nameof(ItemState.New));
|
services.AddHandler<ConfirmCreateItemHandler>(nameof(ItemState.New));
|
||||||
services.AddHandler<ConfirmDeleteItemHandler>();
|
services.AddHandler<ConfirmDeleteItemHandler>();
|
||||||
|
|
||||||
services.AddHandler<HyperlinkHandler>();
|
services.AddHandler<HyperlinkHandler>();
|
||||||
|
|
||||||
services.AddHandler<ItemChangedHandler>(ServiceLifetime.Singleton);
|
services.AddHandler<ItemChangedHandler>(ServiceLifetime.Singleton);
|
||||||
|
|||||||
@@ -16,6 +16,6 @@ public class ApplicationSplashScreen :
|
|||||||
|
|
||||||
public int MinimumShowTime => 2000;
|
public int MinimumShowTime => 2000;
|
||||||
|
|
||||||
public Task RunTasks(CancellationToken cancellationToken) =>
|
public Task RunTasks(CancellationToken cancellationToken) =>
|
||||||
Task.CompletedTask;
|
Task.CompletedTask;
|
||||||
}
|
}
|
||||||
@@ -5,6 +5,6 @@ namespace Wallet.Avalonia;
|
|||||||
public partial class ArchiveNavigationView :
|
public partial class ArchiveNavigationView :
|
||||||
NavigationViewItem
|
NavigationViewItem
|
||||||
{
|
{
|
||||||
public ArchiveNavigationView() =>
|
public ArchiveNavigationView() =>
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
@@ -6,4 +6,4 @@ public partial class BackActionView : UserControl
|
|||||||
{
|
{
|
||||||
public BackActionView() =>
|
public BackActionView() =>
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
@@ -2,9 +2,9 @@ using Toolkit.UI.Controls.Avalonia;
|
|||||||
|
|
||||||
namespace Wallet.Avalonia;
|
namespace Wallet.Avalonia;
|
||||||
|
|
||||||
public partial class CategoriesNavigationView :
|
public partial class CategoriesNavigationView :
|
||||||
NavigationViewItem
|
NavigationViewItem
|
||||||
{
|
{
|
||||||
public CategoriesNavigationView() =>
|
public CategoriesNavigationView() =>
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
@@ -7,4 +7,4 @@ public partial class CategoryNavigationView :
|
|||||||
{
|
{
|
||||||
public CategoryNavigationView() =>
|
public CategoryNavigationView() =>
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@ using Toolkit.UI.Controls.Avalonia;
|
|||||||
|
|
||||||
namespace Wallet.Avalonia;
|
namespace Wallet.Avalonia;
|
||||||
|
|
||||||
public partial class CommentEntryCollectionView :
|
public partial class CommentEntryCollectionView :
|
||||||
SettingsExpander
|
SettingsExpander
|
||||||
{
|
{
|
||||||
public CommentEntryCollectionView() =>
|
public CommentEntryCollectionView() =>
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ using Toolkit.UI.Controls.Avalonia;
|
|||||||
|
|
||||||
namespace Wallet.Avalonia
|
namespace Wallet.Avalonia
|
||||||
{
|
{
|
||||||
public partial class CommentEntryView :
|
public partial class CommentEntryView :
|
||||||
SettingsExpanderItem
|
SettingsExpanderItem
|
||||||
{
|
{
|
||||||
public CommentEntryView() =>
|
public CommentEntryView() =>
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,9 +2,9 @@ using Toolkit.UI.Controls.Avalonia;
|
|||||||
|
|
||||||
namespace Wallet.Avalonia;
|
namespace Wallet.Avalonia;
|
||||||
|
|
||||||
public partial class CreateCommentEntryView :
|
public partial class CreateCommentEntryView :
|
||||||
SettingsExpanderItem
|
SettingsExpanderItem
|
||||||
{
|
{
|
||||||
public CreateCommentEntryView() =>
|
public CreateCommentEntryView() =>
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
@@ -5,6 +5,6 @@ namespace Wallet.Avalonia;
|
|||||||
public partial class CreateItemNavigationView :
|
public partial class CreateItemNavigationView :
|
||||||
NavigationViewItem
|
NavigationViewItem
|
||||||
{
|
{
|
||||||
public CreateItemNavigationView() =>
|
public CreateItemNavigationView() =>
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,6 @@ namespace Wallet.Avalonia;
|
|||||||
|
|
||||||
public partial class CreateWalletNavigationView : SettingsExpander
|
public partial class CreateWalletNavigationView : SettingsExpander
|
||||||
{
|
{
|
||||||
public CreateWalletNavigationView() =>
|
public CreateWalletNavigationView() =>
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
@@ -2,9 +2,9 @@ using Toolkit.UI.Controls.Avalonia;
|
|||||||
|
|
||||||
namespace Wallet.Avalonia;
|
namespace Wallet.Avalonia;
|
||||||
|
|
||||||
public partial class DateEntryView :
|
public partial class DateEntryView :
|
||||||
SettingsExpander
|
SettingsExpander
|
||||||
{
|
{
|
||||||
public DateEntryView() =>
|
public DateEntryView() =>
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
@@ -2,9 +2,9 @@ using Toolkit.UI.Controls.Avalonia;
|
|||||||
|
|
||||||
namespace Wallet.Avalonia;
|
namespace Wallet.Avalonia;
|
||||||
|
|
||||||
public partial class DropdownEntryCollectionView :
|
public partial class DropdownEntryCollectionView :
|
||||||
SettingsExpander
|
SettingsExpander
|
||||||
{
|
{
|
||||||
public DropdownEntryCollectionView() =>
|
public DropdownEntryCollectionView() =>
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
@@ -2,9 +2,9 @@ using Avalonia.Controls;
|
|||||||
|
|
||||||
namespace Wallet.Avalonia;
|
namespace Wallet.Avalonia;
|
||||||
|
|
||||||
public partial class EmptyItemCollectionView :
|
public partial class EmptyItemCollectionView :
|
||||||
UserControl
|
UserControl
|
||||||
{
|
{
|
||||||
public EmptyItemCollectionView() =>
|
public EmptyItemCollectionView() =>
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@ using Toolkit.UI.Controls.Avalonia;
|
|||||||
|
|
||||||
namespace Wallet.Avalonia;
|
namespace Wallet.Avalonia;
|
||||||
|
|
||||||
public partial class FavouritesNavigationView :
|
public partial class FavouritesNavigationView :
|
||||||
NavigationViewItem
|
NavigationViewItem
|
||||||
{
|
{
|
||||||
public FavouritesNavigationView() => InitializeComponent();
|
public FavouritesNavigationView() => InitializeComponent();
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ using Toolkit.UI.Controls.Avalonia;
|
|||||||
|
|
||||||
namespace Wallet.Avalonia;
|
namespace Wallet.Avalonia;
|
||||||
|
|
||||||
public partial class HyperlinkEntryView :
|
public partial class HyperlinkEntryView :
|
||||||
SettingsExpander
|
SettingsExpander
|
||||||
{
|
{
|
||||||
public HyperlinkEntryView() =>
|
public HyperlinkEntryView() =>
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
@@ -2,9 +2,9 @@ using Avalonia.Controls;
|
|||||||
|
|
||||||
namespace Wallet.Avalonia;
|
namespace Wallet.Avalonia;
|
||||||
|
|
||||||
public partial class ItemCategoryNavigationCollectionView :
|
public partial class ItemCategoryNavigationCollectionView :
|
||||||
UserControl
|
UserControl
|
||||||
{
|
{
|
||||||
public ItemCategoryNavigationCollectionView() =>
|
public ItemCategoryNavigationCollectionView() =>
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
@@ -6,4 +6,4 @@ public partial class ItemCategoryNavigationView : ListBoxItem
|
|||||||
{
|
{
|
||||||
public ItemCategoryNavigationView() =>
|
public ItemCategoryNavigationView() =>
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,6 @@ namespace Wallet.Avalonia;
|
|||||||
|
|
||||||
public partial class ItemContentView : UserControl
|
public partial class ItemContentView : UserControl
|
||||||
{
|
{
|
||||||
public ItemContentView() =>
|
public ItemContentView() =>
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
@@ -9,4 +9,4 @@ namespace Wallet.Avalonia
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,4 +6,4 @@ public partial class ItemNavigationCollectionView :
|
|||||||
UserControl
|
UserControl
|
||||||
{
|
{
|
||||||
public ItemNavigationCollectionView() => InitializeComponent();
|
public ItemNavigationCollectionView() => InitializeComponent();
|
||||||
}
|
}
|
||||||
@@ -3,10 +3,10 @@ using System;
|
|||||||
|
|
||||||
namespace Wallet.Avalonia;
|
namespace Wallet.Avalonia;
|
||||||
|
|
||||||
public partial class ItemNavigationView :
|
public partial class ItemNavigationView :
|
||||||
ListBoxItem
|
ListBoxItem
|
||||||
{
|
{
|
||||||
public ItemNavigationView() =>
|
public ItemNavigationView() =>
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
protected override Type StyleKeyOverride =>
|
protected override Type StyleKeyOverride =>
|
||||||
|
|||||||
@@ -5,6 +5,6 @@ namespace Wallet.Avalonia;
|
|||||||
public partial class ItemSectionView :
|
public partial class ItemSectionView :
|
||||||
UserControl
|
UserControl
|
||||||
{
|
{
|
||||||
public ItemSectionView() =>
|
public ItemSectionView() =>
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
MenuItemsSource="{Binding}"
|
MenuItemsSource="{Binding}"
|
||||||
SelectedItem="{Binding SelectedItem}">
|
SelectedItem="{Binding SelectedItem}">
|
||||||
<Interaction.Behaviors>
|
<Interaction.Behaviors>
|
||||||
<DataTriggerBehavior Binding="{ReflectionBinding SelectedItem.IsOpened, Mode=TwoWay}" Value="True">
|
<DataTriggerBehavior Binding="{ReflectionBinding SelectedItem.IsOpened}" Value="True">
|
||||||
<InvokeNavigationViewItemAction SelectedIndex="1" />
|
<InvokeNavigationViewItemAction SelectedIndex="1" />
|
||||||
</DataTriggerBehavior>
|
</DataTriggerBehavior>
|
||||||
</Interaction.Behaviors>
|
</Interaction.Behaviors>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ namespace Wallet.Avalonia
|
|||||||
public partial class MaskedTextEntryView :
|
public partial class MaskedTextEntryView :
|
||||||
SettingsExpander
|
SettingsExpander
|
||||||
{
|
{
|
||||||
public MaskedTextEntryView() =>
|
public MaskedTextEntryView() =>
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,6 @@ namespace Wallet.Avalonia;
|
|||||||
|
|
||||||
public partial class OpenWalletView : UserControl
|
public partial class OpenWalletView : UserControl
|
||||||
{
|
{
|
||||||
public OpenWalletView() =>
|
public OpenWalletView() =>
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
@@ -2,9 +2,9 @@ using Toolkit.UI.Controls.Avalonia;
|
|||||||
|
|
||||||
namespace Wallet.Avalonia;
|
namespace Wallet.Avalonia;
|
||||||
|
|
||||||
public partial class PasswordEntryView :
|
public partial class PasswordEntryView :
|
||||||
SettingsExpander
|
SettingsExpander
|
||||||
{
|
{
|
||||||
public PasswordEntryView() =>
|
public PasswordEntryView() =>
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
@@ -2,9 +2,9 @@ using Toolkit.UI.Controls.Avalonia;
|
|||||||
|
|
||||||
namespace Wallet.Avalonia;
|
namespace Wallet.Avalonia;
|
||||||
|
|
||||||
public partial class PinEntryView :
|
public partial class PinEntryView :
|
||||||
SettingsExpander
|
SettingsExpander
|
||||||
{
|
{
|
||||||
public PinEntryView() =>
|
public PinEntryView() =>
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,6 @@ namespace Wallet.Avalonia;
|
|||||||
|
|
||||||
public partial class SearchWalletActionView : UserControl
|
public partial class SearchWalletActionView : UserControl
|
||||||
{
|
{
|
||||||
public SearchWalletActionView() =>
|
public SearchWalletActionView() =>
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
@@ -9,4 +9,4 @@ namespace Wallet.Avalonia
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,9 +2,9 @@ using Toolkit.UI.Controls.Avalonia;
|
|||||||
|
|
||||||
namespace Wallet.Avalonia;
|
namespace Wallet.Avalonia;
|
||||||
|
|
||||||
public partial class TextEntryView :
|
public partial class TextEntryView :
|
||||||
SettingsExpander
|
SettingsExpander
|
||||||
{
|
{
|
||||||
public TextEntryView() =>
|
public TextEntryView() =>
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
@@ -2,8 +2,8 @@ using Avalonia.Controls;
|
|||||||
|
|
||||||
namespace Wallet.Avalonia;
|
namespace Wallet.Avalonia;
|
||||||
|
|
||||||
public partial class WalletNavigationCollectionView :
|
public partial class WalletNavigationCollectionView :
|
||||||
UserControl
|
UserControl
|
||||||
{
|
{
|
||||||
public WalletNavigationCollectionView() => InitializeComponent();
|
public WalletNavigationCollectionView() => InitializeComponent();
|
||||||
}
|
}
|
||||||
@@ -5,12 +5,13 @@
|
|||||||
xmlns:ui="using:FluentAvalonia.UI.Controls"
|
xmlns:ui="using:FluentAvalonia.UI.Controls"
|
||||||
xmlns:vm="using:Wallet"
|
xmlns:vm="using:Wallet"
|
||||||
x:DataType="vm:WalletNavigationViewModel"
|
x:DataType="vm:WalletNavigationViewModel"
|
||||||
|
BadgeBrush="{DynamicResource SystemFillColorAttentionBrush}"
|
||||||
BadgePath="F1 M 10 3.799999 C 8.559999 3.799999 7.226666 4.16 6 4.879999 C 4.773333 5.6 3.8 6.573334 3.08 7.799999 C 2.36 9.026667 2 10.360001 2 11.799999 C 2 13.24 2.36 14.573334 3.08 15.799999 C 3.8 17.026667 4.773333 18 6 18.719999 C 7.226666 19.439999 8.559999 19.799999 10 19.799999 C 11.439999 19.799999 12.773333 19.439999 14 18.719999 C 15.226665 18 16.199999 17.026667 16.92 15.799999 C 17.639999 14.573334 18 13.24 18 11.799999 C 18 10.360001 17.639999 9.026667 16.92 7.799999 C 16.199999 6.573334 15.226665 5.6 14 4.879999 C 12.773333 4.16 11.439999 3.799999 10 3.799999 Z "
|
BadgePath="F1 M 10 3.799999 C 8.559999 3.799999 7.226666 4.16 6 4.879999 C 4.773333 5.6 3.8 6.573334 3.08 7.799999 C 2.36 9.026667 2 10.360001 2 11.799999 C 2 13.24 2.36 14.573334 3.08 15.799999 C 3.8 17.026667 4.773333 18 6 18.719999 C 7.226666 19.439999 8.559999 19.799999 10 19.799999 C 11.439999 19.799999 12.773333 19.439999 14 18.719999 C 15.226665 18 16.199999 17.026667 16.92 15.799999 C 17.639999 14.573334 18 13.24 18 11.799999 C 18 10.360001 17.639999 9.026667 16.92 7.799999 C 16.199999 6.573334 15.226665 5.6 14 4.879999 C 12.773333 4.16 11.439999 3.799999 10 3.799999 Z "
|
||||||
BadgePlacement="BottomRight"
|
BadgePlacement="BottomRight"
|
||||||
BadgeSize="10"
|
BadgeSize="10"
|
||||||
ContentTemplate="{x:Null}"
|
ContentTemplate="{x:Null}"
|
||||||
Foreground="#4CAF50"
|
Foreground="#4CAF50"
|
||||||
IsBadgeVisible="True"
|
IsBadgeVisible="{Binding IsOpened}"
|
||||||
ListBoxExtension.IsItemInvokedEnabled="True"
|
ListBoxExtension.IsItemInvokedEnabled="True"
|
||||||
ToolTip.Tip="{Binding Name}">
|
ToolTip.Tip="{Binding Name}">
|
||||||
<OverflowItem.Resources>
|
<OverflowItem.Resources>
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
using Avalonia.Controls;
|
|
||||||
using System;
|
using System;
|
||||||
using Toolkit.UI.Controls.Avalonia;
|
using Toolkit.UI.Controls.Avalonia;
|
||||||
|
|
||||||
@@ -7,7 +6,7 @@ namespace Wallet.Avalonia;
|
|||||||
public partial class WalletNavigationView :
|
public partial class WalletNavigationView :
|
||||||
OverflowItem
|
OverflowItem
|
||||||
{
|
{
|
||||||
public WalletNavigationView() =>
|
public WalletNavigationView() =>
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
protected override Type StyleKeyOverride =>
|
protected override Type StyleKeyOverride =>
|
||||||
|
|||||||
@@ -23,5 +23,5 @@ public record ItemEntity
|
|||||||
|
|
||||||
public ICollection<TagEntity> Tags { get; set; } = new List<TagEntity>();
|
public ICollection<TagEntity> Tags { get; set; } = new List<TagEntity>();
|
||||||
|
|
||||||
public ICollection<BlobEntity> Blobs { get; set; } = new List<BlobEntity>();
|
public ICollection<BlobEntity> Blobs { get; set; } = new List<BlobEntity>();
|
||||||
}
|
}
|
||||||
@@ -24,11 +24,10 @@ public class ArchiveItemHandler(IDecoratorService<Item<(Guid, string)>> decorato
|
|||||||
cache.Remove(item);
|
cache.Remove(item);
|
||||||
publisher.Publish(Changed.As<Item>());
|
publisher.Publish(Changed.As<Item>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -14,4 +14,4 @@ public partial class AttachmentEntryCollectionViewModel(IServiceProvider provide
|
|||||||
ICollection<Comment> value,
|
ICollection<Comment> value,
|
||||||
bool isConcealed,
|
bool isConcealed,
|
||||||
bool isRevealed,
|
bool isRevealed,
|
||||||
double width) : ItemEntryCollectionViewModel<AttachmentEntryViewModel, ICollection<Comment>>(provider, factory, mediator, publisher, subscriber, disposer, state, configuration, key, value, isConcealed, isRevealed, width);
|
double width) : ItemEntryCollectionViewModel<AttachmentEntryViewModel, ICollection<Comment>>(provider, factory, mediator, publisher, subscriber, disposer, state, configuration, key, value, isConcealed, isRevealed, width);
|
||||||
@@ -25,4 +25,4 @@ public class CategoriesNavigationViewModelActivationHandler(IMediator mediator,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,10 +5,10 @@ namespace Wallet;
|
|||||||
public class CloseWalletHandler(IDecoratorService<WalletConnection> walletConnectionDecorator) :
|
public class CloseWalletHandler(IDecoratorService<WalletConnection> walletConnectionDecorator) :
|
||||||
IHandler<CloseEventArgs<Wallet>, bool>
|
IHandler<CloseEventArgs<Wallet>, bool>
|
||||||
{
|
{
|
||||||
public Task<bool> Handle(CloseEventArgs<Wallet> args,
|
public Task<bool> Handle(CloseEventArgs<Wallet> args,
|
||||||
CancellationToken cancellationToken)
|
CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
walletConnectionDecorator.Set(null);
|
walletConnectionDecorator.Set(null);
|
||||||
return Task.FromResult(true);
|
return Task.FromResult(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
-3
@@ -1,6 +1,4 @@
|
|||||||
using Toolkit.Foundation;
|
namespace Wallet;
|
||||||
|
|
||||||
namespace Wallet;
|
|
||||||
|
|
||||||
public record Closed
|
public record Closed
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -5,4 +5,4 @@ public record Comment
|
|||||||
public DateTimeOffset DateTime { get; set; }
|
public DateTimeOffset DateTime { get; set; }
|
||||||
|
|
||||||
public string? Text { get; set; }
|
public string? Text { get; set; }
|
||||||
}
|
}
|
||||||
@@ -39,8 +39,10 @@ public partial class CommentEntryCollectionViewModel(IServiceProvider provider,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RemoveAt(Count - 1);
|
if (Count > 0)
|
||||||
|
{
|
||||||
|
RemoveAt(Count - 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ public class CommentEntryCollectionViewModelHandler(IServiceFactory serviceFacto
|
|||||||
List<Comment> values = configuration.Value is not null ? new List<Comment>(configuration.Value) : [];
|
List<Comment> values = configuration.Value is not null ? new List<Comment>(configuration.Value) : [];
|
||||||
double? width = configuration.Width;
|
double? width = configuration.Width;
|
||||||
|
|
||||||
if (serviceFactory.Create<CommentEntryCollectionViewModel>(args => args.Initialize(),
|
if (serviceFactory.Create<CommentEntryCollectionViewModel>(args => args.Initialize(),
|
||||||
[.. args.Parameters, configuration, label, values, false, false, width])
|
[.. args.Parameters, configuration, label, values, false, false, width])
|
||||||
is CommentEntryCollectionViewModel viewModel)
|
is CommentEntryCollectionViewModel viewModel)
|
||||||
{
|
{
|
||||||
@@ -29,5 +29,4 @@ public class CommentEntryCollectionViewModelHandler(IServiceFactory serviceFacto
|
|||||||
|
|
||||||
return Task.FromResult<IItemEntryViewModel?>(default);
|
return Task.FromResult<IItemEntryViewModel?>(default);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@ public class ConfirmCreateItemHandler(IMediator mediator,
|
|||||||
Guid id = Guid.NewGuid();
|
Guid id = Guid.NewGuid();
|
||||||
|
|
||||||
await mediator.Handle<CreateEventArgs<(Guid, string, string, IImageDescriptor?,
|
await mediator.Handle<CreateEventArgs<(Guid, string, string, IImageDescriptor?,
|
||||||
ItemConfiguration)>, bool>(new CreateEventArgs<(Guid, string, string, IImageDescriptor?,
|
ItemConfiguration)>, bool>(new CreateEventArgs<(Guid, string, string, IImageDescriptor?,
|
||||||
ItemConfiguration)>((id, name, category, imageDescriptor ?? default, itemConfiguration)));
|
ItemConfiguration)>((id, name, category, imageDescriptor ?? default, itemConfiguration)));
|
||||||
|
|
||||||
Item<(Guid, string, string)> item = new((id, name, category));
|
Item<(Guid, string, string)> item = new((id, name, category));
|
||||||
@@ -30,4 +30,4 @@ public class ConfirmCreateItemHandler(IMediator mediator,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -25,9 +25,9 @@ public class ConfirmUpdateItemHandler(IDecoratorService<Item<(Guid, string)>> it
|
|||||||
|
|
||||||
(Guid id, _) = item.Value;
|
(Guid id, _) = item.Value;
|
||||||
|
|
||||||
await mediator.Handle<UpdateEventArgs<Item<(Guid, string, string, IImageDescriptor?,
|
await mediator.Handle<UpdateEventArgs<Item<(Guid, string, string, IImageDescriptor?,
|
||||||
ItemConfiguration)>>, bool>(new UpdateEventArgs<Item<(Guid, string, string, IImageDescriptor?,
|
ItemConfiguration)>>, bool>(new UpdateEventArgs<Item<(Guid, string, string, IImageDescriptor?,
|
||||||
ItemConfiguration)>>(new Item<(Guid, string, string, IImageDescriptor?, ItemConfiguration)>((id,
|
ItemConfiguration)>>(new Item<(Guid, string, string, IImageDescriptor?, ItemConfiguration)>((id,
|
||||||
name, category, imageDescriptor, itemConfiguration))));
|
name, category, imageDescriptor, itemConfiguration))));
|
||||||
|
|
||||||
Item<(Guid, string)> newItem = new((id, name));
|
Item<(Guid, string)> newItem = new((id, name));
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ using Wallet.Data;
|
|||||||
|
|
||||||
namespace Wallet;
|
namespace Wallet;
|
||||||
|
|
||||||
public class CountCategoriesHandler(IDbContextFactory<WalletContext> dbContextFactory) :
|
public class CountCategoriesHandler(IDbContextFactory<WalletContext> dbContextFactory) :
|
||||||
IHandler<CountEventArgs<Item>, IReadOnlyCollection<(string, int)>>
|
IHandler<CountEventArgs<Item>, IReadOnlyCollection<(string, int)>>
|
||||||
{
|
{
|
||||||
public async Task<IReadOnlyCollection<(string, int)>> Handle(CountEventArgs<Item> args,
|
public async Task<IReadOnlyCollection<(string, int)>> Handle(CountEventArgs<Item> args,
|
||||||
CancellationToken cancellationToken)
|
CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
using WalletContext context = await dbContextFactory.CreateDbContextAsync(cancellationToken);
|
using WalletContext context = await dbContextFactory.CreateDbContextAsync(cancellationToken);
|
||||||
@@ -49,4 +49,4 @@ public class CountCategoriesHandler(IDbContextFactory<WalletContext> dbContextFa
|
|||||||
|
|
||||||
return combinedCounts;
|
return combinedCounts;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
using Wallet.Data;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.ChangeTracking;
|
using Microsoft.EntityFrameworkCore.ChangeTracking;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using Toolkit.Foundation;
|
using Toolkit.Foundation;
|
||||||
|
using Wallet.Data;
|
||||||
|
|
||||||
namespace Wallet;
|
namespace Wallet;
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ public class CreateItemHandler(IImageWriter imageWriter,
|
|||||||
CancellationToken cancellationToken)
|
CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
(Guid id, string name, string category, IImageDescriptor? imageDescriptor, ItemConfiguration configuration) = args.Sender;
|
(Guid id, string name, string category, IImageDescriptor? imageDescriptor, ItemConfiguration configuration) = args.Sender;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string content = JsonSerializer.Serialize(configuration);
|
string content = JsonSerializer.Serialize(configuration);
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
namespace Wallet;
|
namespace Wallet;
|
||||||
|
|
||||||
public class CreateProfileImageHandler(IFileProvider fileProvider,
|
public class CreateProfileImageHandler(IFileProvider fileProvider,
|
||||||
IImageReader imageReader) :
|
IImageReader imageReader) :
|
||||||
IHandler<CreateEventArgs<ProfileImage>, IImageDescriptor?>
|
IHandler<CreateEventArgs<ProfileImage>, IImageDescriptor?>
|
||||||
{
|
{
|
||||||
public async Task<IImageDescriptor?> Handle(CreateEventArgs<ProfileImage> args,
|
public async Task<IImageDescriptor?> Handle(CreateEventArgs<ProfileImage> args,
|
||||||
@@ -21,4 +21,4 @@ public class CreateProfileImageHandler(IFileProvider fileProvider,
|
|||||||
|
|
||||||
return default;
|
return default;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -14,4 +14,4 @@ public partial class DateEntryViewModel(IServiceProvider provider,
|
|||||||
DateTimeOffset? value,
|
DateTimeOffset? value,
|
||||||
bool isConcealed,
|
bool isConcealed,
|
||||||
bool isRevealed,
|
bool isRevealed,
|
||||||
double width) : ItemEntryViewModel<DateTimeOffset?>(provider, factory, mediator, publisher, subscriber, disposer, state, configuration, key, value, isConcealed, isRevealed, width);
|
double width) : ItemEntryViewModel<DateTimeOffset?>(provider, factory, mediator, publisher, subscriber, disposer, state, configuration, key, value, isConcealed, isRevealed, width);
|
||||||
@@ -15,7 +15,7 @@ public class DateEntryViewModelHandler(IServiceFactory serviceFactory) :
|
|||||||
DateTimeOffset? value = configuration.Value is not null ? configuration.Value : DateTimeOffset.Now;
|
DateTimeOffset? value = configuration.Value is not null ? configuration.Value : DateTimeOffset.Now;
|
||||||
double? width = configuration.Width;
|
double? width = configuration.Width;
|
||||||
|
|
||||||
if (serviceFactory.Create<DateEntryViewModel>(args => args.Initialize(),
|
if (serviceFactory.Create<DateEntryViewModel>(args => args.Initialize(),
|
||||||
[.. args.Parameters, configuration, label, value, false, false, width])
|
[.. args.Parameters, configuration, label, value, false, false, width])
|
||||||
is DateEntryViewModel viewModel)
|
is DateEntryViewModel viewModel)
|
||||||
{
|
{
|
||||||
|
|||||||
+2
-2
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Wallet;
|
namespace Wallet;
|
||||||
|
|
||||||
public partial class DigitRule :
|
public partial class DigitRule :
|
||||||
IPasswordRule
|
IPasswordRule
|
||||||
{
|
{
|
||||||
public int CalculateScore(string password) =>
|
public int CalculateScore(string password) =>
|
||||||
@@ -10,4 +10,4 @@ public partial class DigitRule :
|
|||||||
|
|
||||||
[GeneratedRegex(@"\d")]
|
[GeneratedRegex(@"\d")]
|
||||||
private static partial Regex Regex();
|
private static partial Regex Regex();
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Wallet;
|
namespace Wallet;
|
||||||
|
|
||||||
public partial class DiversityBonusRule :
|
public partial class DiversityBonusRule :
|
||||||
IPasswordRule
|
IPasswordRule
|
||||||
{
|
{
|
||||||
public int CalculateScore(string password)
|
public int CalculateScore(string password)
|
||||||
|
|||||||
@@ -7,4 +7,4 @@ public record DropdownEntryCollectionConfiguration :
|
|||||||
{
|
{
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||||
public IList<string> Values { get; set; } = new List<string>();
|
public IList<string> Values { get; set; } = new List<string>();
|
||||||
}
|
}
|
||||||
@@ -2,18 +2,18 @@
|
|||||||
|
|
||||||
namespace Wallet;
|
namespace Wallet;
|
||||||
|
|
||||||
public partial class DropdownEntryCollectionViewModel :
|
public partial class DropdownEntryCollectionViewModel :
|
||||||
ItemEntryCollectionViewModel<DropdownEntryViewModel, object>
|
ItemEntryCollectionViewModel<DropdownEntryViewModel, object>
|
||||||
{
|
{
|
||||||
public DropdownEntryCollectionViewModel(IServiceProvider provider,
|
public DropdownEntryCollectionViewModel(IServiceProvider provider,
|
||||||
IServiceFactory factory,
|
IServiceFactory factory,
|
||||||
IMediator mediator,
|
IMediator mediator,
|
||||||
IPublisher publisher,
|
IPublisher publisher,
|
||||||
ISubscriber subscriber,
|
ISubscriber subscriber,
|
||||||
IDisposer disposer,
|
IDisposer disposer,
|
||||||
IEnumerable<DropdownEntryViewModel> items,
|
IEnumerable<DropdownEntryViewModel> items,
|
||||||
ItemState state,
|
ItemState state,
|
||||||
DropdownEntryCollectionConfiguration configuration,
|
DropdownEntryCollectionConfiguration configuration,
|
||||||
string key,
|
string key,
|
||||||
object value,
|
object value,
|
||||||
bool isConcealed,
|
bool isConcealed,
|
||||||
|
|||||||
@@ -34,4 +34,4 @@ public class DropdownEntryCollectionViewModelHandler(IServiceFactory serviceFact
|
|||||||
|
|
||||||
return Task.FromResult<IItemEntryViewModel?>(default);
|
return Task.FromResult<IItemEntryViewModel?>(default);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,5 +7,5 @@ public partial class DropdownEntryViewModel(IServiceProvider provider,
|
|||||||
IMediator mediator,
|
IMediator mediator,
|
||||||
IPublisher publisher,
|
IPublisher publisher,
|
||||||
ISubscriber subscriber,
|
ISubscriber subscriber,
|
||||||
IDisposer disposer,
|
IDisposer disposer,
|
||||||
string? value = default) : Observable<string>(provider, factory, mediator, publisher, subscriber, disposer, value);
|
string? value = default) : Observable<string>(provider, factory, mediator, publisher, subscriber, disposer, value);
|
||||||
@@ -4,13 +4,13 @@ using Toolkit.Foundation;
|
|||||||
namespace Wallet;
|
namespace Wallet;
|
||||||
|
|
||||||
public partial class EmptyItemCollectionViewModel(IServiceProvider provider,
|
public partial class EmptyItemCollectionViewModel(IServiceProvider provider,
|
||||||
IServiceFactory factory,
|
IServiceFactory factory,
|
||||||
IMediator mediator,
|
IMediator mediator,
|
||||||
IPublisher publisher,
|
IPublisher publisher,
|
||||||
ISubscriber subscriber,
|
ISubscriber subscriber,
|
||||||
IDisposer disposer,
|
IDisposer disposer,
|
||||||
NamedComponent named) : Observable(provider, factory, mediator, publisher, subscriber, disposer)
|
NamedComponent named) : Observable(provider, factory, mediator, publisher, subscriber, disposer)
|
||||||
{
|
{
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private string named = $"{named}";
|
private string named = $"{named}";
|
||||||
}
|
}
|
||||||
@@ -11,7 +11,7 @@ public abstract partial class FilterNavigationViewModel(IServiceProvider provide
|
|||||||
ISubscriber subscriber,
|
ISubscriber subscriber,
|
||||||
IDisposer disposer,
|
IDisposer disposer,
|
||||||
int key,
|
int key,
|
||||||
string value) :
|
string value) :
|
||||||
ObservableCollection<INavigationViewModel, int, string>(provider, factory, mediator, publisher, subscriber, disposer, key, value),
|
ObservableCollection<INavigationViewModel, int, string>(provider, factory, mediator, publisher, subscriber, disposer, key, value),
|
||||||
INavigationViewModel,
|
INavigationViewModel,
|
||||||
INotificationHandler<ActivatedEventArgs<Wallet>>,
|
INotificationHandler<ActivatedEventArgs<Wallet>>,
|
||||||
@@ -74,7 +74,7 @@ public abstract partial class FilterNavigationViewModel<TWalletNavigation>(IServ
|
|||||||
public Task Handle(DeactivatedEventArgs<Wallet> args)
|
public Task Handle(DeactivatedEventArgs<Wallet> args)
|
||||||
{
|
{
|
||||||
IsSelected = false;
|
IsSelected = false;
|
||||||
IsActivated = false;
|
IsActivated = false;
|
||||||
|
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
namespace Wallet;
|
namespace Wallet;
|
||||||
|
|
||||||
public record Hyperlink(string? Value);
|
public record Hyperlink(string? Value);
|
||||||
@@ -14,7 +14,7 @@ public class HyperlinkEntryViewModelHandler(IServiceFactory serviceFactory) :
|
|||||||
string? value = $"{configuration.Value}" ?? "";
|
string? value = $"{configuration.Value}" ?? "";
|
||||||
double? width = configuration.Width;
|
double? width = configuration.Width;
|
||||||
|
|
||||||
if (serviceFactory.Create<HyperlinkEntryViewModel>(args => args.Initialize(),
|
if (serviceFactory.Create<HyperlinkEntryViewModel>(args => args.Initialize(),
|
||||||
[.. args.Parameters, configuration, label, value, false, false, width])
|
[.. args.Parameters, configuration, label, value, false, false, width])
|
||||||
is HyperlinkEntryViewModel viewModel)
|
is HyperlinkEntryViewModel viewModel)
|
||||||
{
|
{
|
||||||
@@ -24,4 +24,4 @@ public class HyperlinkEntryViewModelHandler(IServiceFactory serviceFactory) :
|
|||||||
|
|
||||||
return Task.FromResult<IItemEntryViewModel?>(default);
|
return Task.FromResult<IItemEntryViewModel?>(default);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,7 +3,7 @@ using Toolkit.Foundation;
|
|||||||
|
|
||||||
namespace Wallet;
|
namespace Wallet;
|
||||||
|
|
||||||
public class HyperlinkHandler :
|
public class HyperlinkHandler :
|
||||||
INotificationHandler<CreateEventArgs<Hyperlink>>
|
INotificationHandler<CreateEventArgs<Hyperlink>>
|
||||||
{
|
{
|
||||||
public Task Handle(CreateEventArgs<Hyperlink> args)
|
public Task Handle(CreateEventArgs<Hyperlink> args)
|
||||||
@@ -16,10 +16,9 @@ public class HyperlinkHandler :
|
|||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
namespace Wallet;
|
namespace Wallet;
|
||||||
|
|
||||||
public interface ICommentEntryViewModel : IItemEntryViewModel;
|
public interface ICommentEntryViewModel : IItemEntryViewModel;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wallet;
|
namespace Wallet;
|
||||||
|
|
||||||
public interface IItemConfigurationCollection :
|
public interface IItemConfigurationCollection :
|
||||||
IReadOnlyDictionary<string, Func<ItemConfiguration>>;
|
IReadOnlyDictionary<string, Func<ItemConfiguration>>;
|
||||||
@@ -34,4 +34,4 @@ public interface IItemEntryConfiguration<TValue> :
|
|||||||
[JsonDerivedType(typeof(DateEntryConfiguration), typeDiscriminator: "Date")]
|
[JsonDerivedType(typeof(DateEntryConfiguration), typeDiscriminator: "Date")]
|
||||||
[JsonDerivedType(typeof(HyperlinkEntryConfiguration), typeDiscriminator: "Hyperlink")]
|
[JsonDerivedType(typeof(HyperlinkEntryConfiguration), typeDiscriminator: "Hyperlink")]
|
||||||
[JsonDerivedType(typeof(PinEntryConfiguration), typeDiscriminator: "Pin")]
|
[JsonDerivedType(typeof(PinEntryConfiguration), typeDiscriminator: "Pin")]
|
||||||
public interface IItemEntryConfiguration;
|
public interface IItemEntryConfiguration;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wallet;
|
namespace Wallet;
|
||||||
|
|
||||||
public interface IItemViewModel :
|
public interface IItemViewModel :
|
||||||
IDisposable;
|
IDisposable;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wallet;
|
namespace Wallet;
|
||||||
|
|
||||||
public interface INavigationViewModel :
|
public interface INavigationViewModel :
|
||||||
IDisposable;
|
IDisposable;
|
||||||
@@ -3,4 +3,4 @@
|
|||||||
public interface IPasswordRule
|
public interface IPasswordRule
|
||||||
{
|
{
|
||||||
int CalculateScore(string password);
|
int CalculateScore(string password);
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
|
namespace Wallet
|
||||||
namespace Wallet
|
|
||||||
{
|
{
|
||||||
public interface IWalletConnectionFactory
|
public interface IWalletConnectionFactory
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ namespace Wallet;
|
|||||||
|
|
||||||
public interface IWalletFactory
|
public interface IWalletFactory
|
||||||
{
|
{
|
||||||
Task<bool> Create(string name,
|
Task<bool> Create(string name,
|
||||||
string password,
|
string password,
|
||||||
IImageDescriptor? imageDescriptor);
|
IImageDescriptor? imageDescriptor);
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wallet;
|
namespace Wallet;
|
||||||
|
|
||||||
public record ImageEntryConfiguration :
|
public record ImageEntryConfiguration :
|
||||||
ItemEntryConfiguration<string>;
|
ItemEntryConfiguration<string>;
|
||||||
@@ -25,4 +25,4 @@ public partial class ItemCategoryNavigationCollectionViewModel(IServiceProvider
|
|||||||
|
|
||||||
return base.OnActivated();
|
return base.OnActivated();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -24,4 +24,4 @@ public partial class ItemCategoryNavigationViewModel(IServiceProvider provider,
|
|||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
private void Invoke() => Publisher.Publish(Notify.As(new ItemCategory<string>(Name)));
|
private void Invoke() => Publisher.Publish(Notify.As(new ItemCategory<string>(Name)));
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@ public class ItemCategoryViewModelActivatedHandler(IItemConfigurationCollection
|
|||||||
bool selected = true;
|
bool selected = true;
|
||||||
foreach (KeyValuePair<string, Func<ItemConfiguration>> configuration in configurations)
|
foreach (KeyValuePair<string, Func<ItemConfiguration>> configuration in configurations)
|
||||||
{
|
{
|
||||||
if (serviceFactory.Create<ItemCategoryNavigationViewModel>(args => args.Initialize(),
|
if (serviceFactory.Create<ItemCategoryNavigationViewModel>(args => args.Initialize(),
|
||||||
configuration.Key, selected)
|
configuration.Key, selected)
|
||||||
is ItemCategoryNavigationViewModel viewModel)
|
is ItemCategoryNavigationViewModel viewModel)
|
||||||
{
|
{
|
||||||
@@ -23,4 +23,4 @@ public class ItemCategoryViewModelActivatedHandler(IItemConfigurationCollection
|
|||||||
|
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,15 +3,15 @@
|
|||||||
namespace Wallet;
|
namespace Wallet;
|
||||||
|
|
||||||
public class ItemChangedHandler(IMediator mediator,
|
public class ItemChangedHandler(IMediator mediator,
|
||||||
IPublisher publisher) :
|
IPublisher publisher) :
|
||||||
INotificationHandler<ChangedEventArgs<Item>>
|
INotificationHandler<ChangedEventArgs<Item>>
|
||||||
{
|
{
|
||||||
public async Task Handle(ChangedEventArgs<Item> args)
|
public async Task Handle(ChangedEventArgs<Item> args)
|
||||||
{
|
{
|
||||||
IReadOnlyCollection<(string, int)>? counts = await mediator.Handle<CountEventArgs<Item>,
|
IReadOnlyCollection<(string, int)>? counts = await mediator.Handle<CountEventArgs<Item>,
|
||||||
IReadOnlyCollection<(string, int)>>(Count.As<Item>());
|
IReadOnlyCollection<(string, int)>>(Count.As<Item>());
|
||||||
|
|
||||||
if (counts is { Count: > 0 } )
|
if (counts is { Count: > 0 })
|
||||||
{
|
{
|
||||||
foreach ((string key, int count) in counts)
|
foreach ((string key, int count) in counts)
|
||||||
{
|
{
|
||||||
@@ -19,4 +19,4 @@ public class ItemChangedHandler(IMediator mediator,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,4 +3,4 @@
|
|||||||
namespace Wallet;
|
namespace Wallet;
|
||||||
|
|
||||||
public class ItemCommandHeaderCollection(IList<IDisposable> list) :
|
public class ItemCommandHeaderCollection(IList<IDisposable> list) :
|
||||||
ReadOnlyCollection<IDisposable>(list);
|
ReadOnlyCollection<IDisposable>(list);
|
||||||
@@ -26,7 +26,7 @@ public partial class ItemCommandHeaderViewModel(IServiceProvider provider,
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -83,7 +83,7 @@ public record ItemConfiguration
|
|||||||
Label = "Name on account"
|
Label = "Name on account"
|
||||||
},
|
},
|
||||||
new DropdownEntryCollectionConfiguration
|
new DropdownEntryCollectionConfiguration
|
||||||
{
|
{
|
||||||
Label = "Type",
|
Label = "Type",
|
||||||
Values = [
|
Values = [
|
||||||
"Checking Account",
|
"Checking Account",
|
||||||
|
|||||||
@@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
namespace Wallet;
|
namespace Wallet;
|
||||||
|
|
||||||
public class ItemConfigurationCollection(IDictionary<string, Func<ItemConfiguration>> dictionary) :
|
public class ItemConfigurationCollection(IDictionary<string, Func<ItemConfiguration>> dictionary) :
|
||||||
ReadOnlyDictionary<string, Func<ItemConfiguration>>(dictionary),
|
ReadOnlyDictionary<string, Func<ItemConfiguration>>(dictionary),
|
||||||
IItemConfigurationCollection;
|
IItemConfigurationCollection;
|
||||||
@@ -46,4 +46,4 @@ public class ItemContentFromCategoryViewModelActivationHandler(IItemConfiguratio
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -18,7 +18,7 @@ public partial class ItemContentViewModel(IServiceProvider provider,
|
|||||||
|
|
||||||
public Task Handle(NotifyEventArgs<ItemCategory<string>> args)
|
public Task Handle(NotifyEventArgs<ItemCategory<string>> args)
|
||||||
{
|
{
|
||||||
if (args.Sender is ItemCategory<string> category
|
if (args.Sender is ItemCategory<string> category
|
||||||
&& category.Value is string value)
|
&& category.Value is string value)
|
||||||
{
|
{
|
||||||
Activate(() => new ActivationBuilder(new ActivationEventArgs<IItemEntryViewModel,
|
Activate(() => new ActivationBuilder(new ActivationEventArgs<IItemEntryViewModel,
|
||||||
@@ -27,4 +27,4 @@ public partial class ItemContentViewModel(IServiceProvider provider,
|
|||||||
|
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,7 @@ public class ItemContentViewModelActivationHandler(IDecoratorService<Item<(Guid,
|
|||||||
{
|
{
|
||||||
if (item.Value is (Guid Id, _))
|
if (item.Value is (Guid Id, _))
|
||||||
{
|
{
|
||||||
(_, _, _, _, ItemConfiguration? configuration) = await mediator.Handle<RequestEventArgs<Item<Guid>>,
|
(_, _, _, _, ItemConfiguration? configuration) = await mediator.Handle<RequestEventArgs<Item<Guid>>,
|
||||||
(Guid, string, string?, string, ItemConfiguration?)>(Request.As(new Item<Guid>(Id)));
|
(Guid, string, string?, string, ItemConfiguration?)>(Request.As(new Item<Guid>(Id)));
|
||||||
|
|
||||||
if (configuration is not null)
|
if (configuration is not null)
|
||||||
@@ -49,4 +49,4 @@ public class ItemContentViewModelActivationHandler(IDecoratorService<Item<(Guid,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -28,7 +28,7 @@ public class ItemCreatedHandler(IServiceProvider serviceProvider,
|
|||||||
int index = cache.IndexOf(cachedItem);
|
int index = cache.IndexOf(cachedItem);
|
||||||
decoratorService.Set(cachedItem);
|
decoratorService.Set(cachedItem);
|
||||||
|
|
||||||
publisher.Publish(Insert.As(index, viewModel),
|
publisher.Publish(Insert.As(index, viewModel),
|
||||||
nameof(ItemNavigationCollectionViewModel));
|
nameof(ItemNavigationCollectionViewModel));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
namespace Wallet;
|
namespace Wallet;
|
||||||
|
|
||||||
public record ItemEntry;
|
public record ItemEntry;
|
||||||
@@ -4,7 +4,7 @@ using Toolkit.Foundation;
|
|||||||
|
|
||||||
namespace Wallet;
|
namespace Wallet;
|
||||||
|
|
||||||
public partial class ItemEntryCollectionViewModel<TItem, TValue> :
|
public partial class ItemEntryCollectionViewModel<TItem, TValue> :
|
||||||
ObservableCollection<TItem, string, TValue>,
|
ObservableCollection<TItem, string, TValue>,
|
||||||
IItemEntryViewModel,
|
IItemEntryViewModel,
|
||||||
IHandler<ValidateEventArgs<ItemEntry>, bool>,
|
IHandler<ValidateEventArgs<ItemEntry>, bool>,
|
||||||
@@ -97,7 +97,6 @@ public partial class ItemEntryCollectionViewModel<TItem, TValue> :
|
|||||||
|
|
||||||
protected virtual void OnStateChanged()
|
protected virtual void OnStateChanged()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task Handle(ConfirmEventArgs<Item> args)
|
public Task Handle(ConfirmEventArgs<Item> args)
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace Wallet;
|
|||||||
[JsonDerivedType(typeof(DateEntryConfiguration), typeDiscriminator: "Date")]
|
[JsonDerivedType(typeof(DateEntryConfiguration), typeDiscriminator: "Date")]
|
||||||
[JsonDerivedType(typeof(HyperlinkEntryConfiguration), typeDiscriminator: "Hyperlink")]
|
[JsonDerivedType(typeof(HyperlinkEntryConfiguration), typeDiscriminator: "Hyperlink")]
|
||||||
[JsonDerivedType(typeof(PinEntryConfiguration), typeDiscriminator: "Pin")]
|
[JsonDerivedType(typeof(PinEntryConfiguration), typeDiscriminator: "Pin")]
|
||||||
public record ItemEntryConfiguration<TValue> :
|
public record ItemEntryConfiguration<TValue> :
|
||||||
IItemEntryConfiguration<TValue>
|
IItemEntryConfiguration<TValue>
|
||||||
{
|
{
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
using Wallet.Data;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using Toolkit.Foundation;
|
using Toolkit.Foundation;
|
||||||
|
using Wallet.Data;
|
||||||
|
|
||||||
namespace Wallet;
|
namespace Wallet;
|
||||||
|
|
||||||
public class ItemHandler(IDbContextFactory<WalletContext> dbContextFactory) :
|
public class ItemHandler(IDbContextFactory<WalletContext> dbContextFactory) :
|
||||||
IHandler<RequestEventArgs<Item<Guid>>, (Guid, string, string?, string, ItemConfiguration?)>
|
IHandler<RequestEventArgs<Item<Guid>>, (Guid, string, string?, string, ItemConfiguration?)>
|
||||||
{
|
{
|
||||||
public async Task<(Guid, string, string?, string, ItemConfiguration?)> Handle(RequestEventArgs<Item<Guid>> args,
|
public async Task<(Guid, string, string?, string, ItemConfiguration?)> Handle(RequestEventArgs<Item<Guid>> args,
|
||||||
CancellationToken cancellationToken)
|
CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
if (args.Sender is Item<Guid> item)
|
if (args.Sender is Item<Guid> item)
|
||||||
@@ -43,7 +43,6 @@ public class ItemHandler(IDbContextFactory<WalletContext> dbContextFactory) :
|
|||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,4 +52,4 @@ public class ItemHandler(IDbContextFactory<WalletContext> dbContextFactory) :
|
|||||||
|
|
||||||
return default;
|
return default;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
public record ItemHeader<TValue>(TValue Value);
|
public record ItemHeader<TValue>(TValue Value);
|
||||||
|
|
||||||
public record ItemHeader;
|
public record ItemHeader;
|
||||||
@@ -4,7 +4,7 @@ using Toolkit.Foundation;
|
|||||||
|
|
||||||
namespace Wallet;
|
namespace Wallet;
|
||||||
|
|
||||||
public partial class ItemHeaderViewModel :
|
public partial class ItemHeaderViewModel :
|
||||||
Observable<string>,
|
Observable<string>,
|
||||||
IHandler<ValidateEventArgs<ItemEntry>, bool>,
|
IHandler<ValidateEventArgs<ItemEntry>, bool>,
|
||||||
INotificationHandler<UpdateEventArgs<ItemEntry>>,
|
INotificationHandler<UpdateEventArgs<ItemEntry>>,
|
||||||
@@ -110,7 +110,7 @@ public partial class ItemHeaderViewModel :
|
|||||||
private async Task Import() => ImageDescriptor = await Mediator.Handle<CreateEventArgs<ProfileImage>,
|
private async Task Import() => ImageDescriptor = await Mediator.Handle<CreateEventArgs<ProfileImage>,
|
||||||
IImageDescriptor>(Create.As<ProfileImage>());
|
IImageDescriptor>(Create.As<ProfileImage>());
|
||||||
|
|
||||||
partial void OnImageDescriptorChanged(IImageDescriptor? value)
|
private partial void OnImageDescriptorChanged(IImageDescriptor? value)
|
||||||
{
|
{
|
||||||
if (configuration is not null)
|
if (configuration is not null)
|
||||||
{
|
{
|
||||||
@@ -118,7 +118,7 @@ public partial class ItemHeaderViewModel :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
partial void OnImageDescriptorChanged(IImageDescriptor? oldValue,
|
private partial void OnImageDescriptorChanged(IImageDescriptor? oldValue,
|
||||||
IImageDescriptor? newValue)
|
IImageDescriptor? newValue)
|
||||||
{
|
{
|
||||||
if (configuration is not null)
|
if (configuration is not null)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using Wallet.Data;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Toolkit.Foundation;
|
using Toolkit.Foundation;
|
||||||
|
using Wallet.Data;
|
||||||
|
|
||||||
namespace Wallet;
|
namespace Wallet;
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ public class ItemImageHandler(IDbContextFactory<WalletContext> dbContextFactory,
|
|||||||
})
|
})
|
||||||
.FirstOrDefaultAsync(cancellationToken);
|
.FirstOrDefaultAsync(cancellationToken);
|
||||||
|
|
||||||
if (result is not null &&
|
if (result is not null &&
|
||||||
result.Image is BlobEntity image &&
|
result.Image is BlobEntity image &&
|
||||||
image.Data is { Length: > 0 } data)
|
image.Data is { Length: > 0 } data)
|
||||||
{
|
{
|
||||||
@@ -35,4 +35,4 @@ public class ItemImageHandler(IDbContextFactory<WalletContext> dbContextFactory,
|
|||||||
|
|
||||||
return default;
|
return default;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -71,4 +71,4 @@ public partial class ItemNavigationCollectionViewModel :
|
|||||||
|
|
||||||
protected override ActivationBuilder ActivationBuilder() =>
|
protected override ActivationBuilder ActivationBuilder() =>
|
||||||
new(Activation.As<ItemNavigationViewModel, ItemNavigationCollectionConfiguration>(configuration));
|
new(Activation.As<ItemNavigationViewModel, ItemNavigationCollectionConfiguration>(configuration));
|
||||||
}
|
}
|
||||||
@@ -17,7 +17,7 @@ public class ItemNavigationCollectionViewModelActivatedHandler(IMediator mediato
|
|||||||
cache.Clear();
|
cache.Clear();
|
||||||
bool selected = true;
|
bool selected = true;
|
||||||
|
|
||||||
IReadOnlyCollection<(Guid Id, string Name, string Category, bool Favourite, bool Archived)>? results =
|
IReadOnlyCollection<(Guid Id, string Name, string Category, bool Favourite, bool Archived)>? results =
|
||||||
await mediator.Handle<QueryEventArgs<Wallet<(string?, string?)>>,
|
await mediator.Handle<QueryEventArgs<Wallet<(string?, string?)>>,
|
||||||
IReadOnlyCollection<(Guid Id, string Name, string Category, bool Favourite,
|
IReadOnlyCollection<(Guid Id, string Name, string Category, bool Favourite,
|
||||||
bool Archived)>>(Query.As(new Wallet<(string?, string?)>((configuration.Filter, configuration.Query))));
|
bool Archived)>>(Query.As(new Wallet<(string?, string?)>((configuration.Filter, configuration.Query))));
|
||||||
@@ -31,8 +31,8 @@ public class ItemNavigationCollectionViewModelActivatedHandler(IMediator mediato
|
|||||||
IDecoratorService<Item<(Guid, string)>> decoratorService = serviceScope.ServiceProvider
|
IDecoratorService<Item<(Guid, string)>> decoratorService = serviceScope.ServiceProvider
|
||||||
.GetRequiredService<IDecoratorService<Item<(Guid, string)>>>();
|
.GetRequiredService<IDecoratorService<Item<(Guid, string)>>>();
|
||||||
|
|
||||||
if (serviceFactory.Create<ItemNavigationViewModel>(args => args.Initialize(), configuration.Filter,
|
if (serviceFactory.Create<ItemNavigationViewModel>(args => args.Initialize(), configuration.Filter,
|
||||||
Id, Name, "Description", Category, selected, Favourite, Archived)
|
Id, Name, "Description", Category, selected, Favourite, Archived)
|
||||||
is ItemNavigationViewModel viewModel)
|
is ItemNavigationViewModel viewModel)
|
||||||
{
|
{
|
||||||
Item<(Guid, string)> item = new((Id, Name));
|
Item<(Guid, string)> item = new((Id, Name));
|
||||||
|
|||||||
@@ -17,4 +17,4 @@ public class ItemNavigationViewModelActivatedHandler(IMediator mediator,
|
|||||||
publisher.Publish(Notify.As(new Item<IImageDescriptor>(imageDescriptor)));
|
publisher.Publish(Notify.As(new Item<IImageDescriptor>(imageDescriptor)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -16,4 +16,4 @@ public partial class ItemSectionViewModel(IServiceProvider provider,
|
|||||||
public string Id => id;
|
public string Id => id;
|
||||||
|
|
||||||
public IContentTemplate Template { get; set; } = template;
|
public IContentTemplate Template { get; set; } = template;
|
||||||
}
|
}
|
||||||
+1
-1
@@ -5,4 +5,4 @@ public enum ItemState
|
|||||||
New,
|
New,
|
||||||
Read,
|
Read,
|
||||||
Write
|
Write
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
using Toolkit.Foundation;
|
using Toolkit.Foundation;
|
||||||
using Wallet.Data;
|
|
||||||
|
|
||||||
namespace Wallet;
|
namespace Wallet;
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
public class LengthRule :
|
public class LengthRule :
|
||||||
IPasswordRule
|
IPasswordRule
|
||||||
{
|
{
|
||||||
public int CalculateScore(string password) =>
|
public int CalculateScore(string password) =>
|
||||||
password.Length >= 8 ? 5 : 0;
|
password.Length >= 8 ? 5 : 0;
|
||||||
}
|
}
|
||||||
@@ -2,13 +2,12 @@
|
|||||||
|
|
||||||
namespace Wallet;
|
namespace Wallet;
|
||||||
|
|
||||||
public partial class LowercaseRule :
|
public partial class LowercaseRule :
|
||||||
IPasswordRule
|
IPasswordRule
|
||||||
{
|
{
|
||||||
public int CalculateScore(string password) =>
|
public int CalculateScore(string password) =>
|
||||||
Regex().IsMatch(password) ? 2 : 0;
|
Regex().IsMatch(password) ? 2 : 0;
|
||||||
|
|
||||||
|
|
||||||
[GeneratedRegex(@"[a-z]")]
|
[GeneratedRegex(@"[a-z]")]
|
||||||
private static partial Regex Regex();
|
private static partial Regex Regex();
|
||||||
}
|
}
|
||||||
@@ -32,7 +32,6 @@ public partial class MainViewModel :
|
|||||||
Reset(args =>
|
Reset(args =>
|
||||||
{
|
{
|
||||||
args.SetSource(wallet, () => wallet);
|
args.SetSource(wallet, () => wallet);
|
||||||
SelectedItem = wallet;
|
|
||||||
}, false);
|
}, false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -7,4 +7,4 @@ public record MaskedTextEntryConfiguration :
|
|||||||
{
|
{
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||||
public string? Pattern { get; set; }
|
public string? Pattern { get; set; }
|
||||||
}
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user