Start refining the UI
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Toolkit.Foundation;
|
||||
|
||||
namespace Bitvault;
|
||||
|
||||
public partial class EmptyItemCollectionViewModel(IServiceProvider provider,
|
||||
IServiceFactory factory,
|
||||
IMediator mediator,
|
||||
IPublisher publisher,
|
||||
ISubscription subscriber,
|
||||
IDisposer disposer,
|
||||
NamedComponent named) : Observable(provider, factory, mediator, publisher, subscriber, disposer)
|
||||
{
|
||||
[ObservableProperty]
|
||||
private string named = $"{named}";
|
||||
}
|
||||
@@ -10,6 +10,9 @@ public partial class ItemCollectionViewModel :
|
||||
INotificationHandler<NotifyEventArgs<Search>>,
|
||||
IBackStack
|
||||
{
|
||||
[ObservableProperty]
|
||||
public string? named;
|
||||
|
||||
private LockerViewModelConfiguration configuration;
|
||||
|
||||
public ItemCollectionViewModel(IServiceProvider provider,
|
||||
@@ -19,20 +22,18 @@ public partial class ItemCollectionViewModel :
|
||||
ISubscription subscriber,
|
||||
IDisposer disposer,
|
||||
IContentTemplate template,
|
||||
NamedComponent named,
|
||||
LockerViewModelConfiguration configuration,
|
||||
string? filter = null) : base(provider, factory, mediator, publisher, subscriber, disposer)
|
||||
{
|
||||
Template = template;
|
||||
Named = $"{named}";
|
||||
|
||||
this.configuration = configuration with { Filter = filter };
|
||||
}
|
||||
|
||||
public IContentTemplate Template { get; set; }
|
||||
|
||||
public override Task OnDeactivated()
|
||||
{
|
||||
return base.OnDeactivated();
|
||||
}
|
||||
|
||||
public Task Handle(NotifyEventArgs<Filter> args)
|
||||
{
|
||||
if (args.Value is Filter filter)
|
||||
@@ -66,6 +67,10 @@ public partial class ItemCollectionViewModel :
|
||||
return base.OnActivated();
|
||||
}
|
||||
|
||||
public override Task OnDeactivated()
|
||||
{
|
||||
return base.OnDeactivated();
|
||||
}
|
||||
protected override IAggerate OnAggerate(object? key) =>
|
||||
Aggerate.With<ItemNavigationViewModel, LockerViewModelConfiguration>(configuration)
|
||||
with { Key = key };
|
||||
|
||||
@@ -67,6 +67,11 @@ public partial class ItemViewModel :
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
Publisher.Publish(Notify.As(Factory.Create<ItemCommandHeaderCollection>(new List<IDisposable>())));
|
||||
base.Dispose();
|
||||
}
|
||||
public Task Handle(CancelEventArgs<Item> args)
|
||||
{
|
||||
Publisher.Publish(Notify.As(Factory.Create<ItemCommandHeaderCollection>(new List<IDisposable>
|
||||
|
||||
@@ -9,9 +9,13 @@ public partial class OpenLockerViewModel(IServiceProvider provider,
|
||||
IMediator mediator,
|
||||
IPublisher publisher,
|
||||
ISubscription subscriber,
|
||||
IDisposer disposer) :
|
||||
IDisposer disposer,
|
||||
string name) :
|
||||
Observable(provider, factory, mediator, publisher, subscriber, disposer)
|
||||
{
|
||||
[ObservableProperty]
|
||||
private string? name = name;
|
||||
|
||||
[ObservableProperty]
|
||||
private string? password;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user