Fix some edge cases
This commit is contained in:
@@ -1,8 +0,0 @@
|
|||||||
using Avalonia.Controls;
|
|
||||||
|
|
||||||
namespace Bitvault.Avalonia;
|
|
||||||
|
|
||||||
public partial class AddItemActionView : UserControl
|
|
||||||
{
|
|
||||||
public AddItemActionView() => InitializeComponent();
|
|
||||||
}
|
|
||||||
@@ -83,7 +83,7 @@ public partial class App : Application
|
|||||||
|
|
||||||
services.AddTemplate<SearchHeaderViewModel, SearchHeaderView>("SearchHeader");
|
services.AddTemplate<SearchHeaderViewModel, SearchHeaderView>("SearchHeader");
|
||||||
services.AddTemplate<ContainerHeaderViewModel, ContainerHeaderView>("ContainerHeader");
|
services.AddTemplate<ContainerHeaderViewModel, ContainerHeaderView>("ContainerHeader");
|
||||||
services.AddTemplate<AddItemActionViewModel, AddItemActionView>();
|
services.AddTemplate<CreateItemActionViewModel, CreateItemActionView>();
|
||||||
|
|
||||||
services.AddTemplate<ItemNavigationViewModel, ItemNavigationView>();
|
services.AddTemplate<ItemNavigationViewModel, ItemNavigationView>();
|
||||||
services.AddTemplate<ItemViewModel, ItemView>("Item");
|
services.AddTemplate<ItemViewModel, ItemView>("Item");
|
||||||
@@ -92,6 +92,9 @@ public partial class App : Application
|
|||||||
|
|
||||||
services.AddTemplate<ConfirmItemActionViewModel, ConfirmItemActionView>();
|
services.AddTemplate<ConfirmItemActionViewModel, ConfirmItemActionView>();
|
||||||
services.AddTemplate<DismissItemActionViewModel, DismissItemActionView>();
|
services.AddTemplate<DismissItemActionViewModel, DismissItemActionView>();
|
||||||
|
services.AddTemplate<ArchiveItemActionViewModel, ArchiveItemActionView>();
|
||||||
|
services.AddTemplate<EditItemActionViewModel, EditItemActionView>();
|
||||||
|
services.AddTemplate<DeleteItemActionViewModel, DeleteItemActionView>();
|
||||||
|
|
||||||
services.AddTemplate<ItemHeaderViewModel, ItemHeaderView>();
|
services.AddTemplate<ItemHeaderViewModel, ItemHeaderView>();
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<UserControl
|
||||||
|
x:Class="Bitvault.Avalonia.ArchiveItemActionView"
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:vm="using:Bitvault"
|
||||||
|
x:DataType="vm:ArchiveItemActionViewModel">
|
||||||
|
<Button
|
||||||
|
Width="{StaticResource ButtonWidth}"
|
||||||
|
Height="{StaticResource ButtonHeight}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Command="{Binding InvokeCommand}"
|
||||||
|
Foreground="{DynamicResource IconForegroundBrush}"
|
||||||
|
ToolTip.Tip="Archive">
|
||||||
|
<TextBlock
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
||||||
|
FontSize="16"
|
||||||
|
Foreground="{DynamicResource IconForegroundBrush}"
|
||||||
|
Text="" />
|
||||||
|
</Button>
|
||||||
|
</UserControl>
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
|
||||||
|
namespace Bitvault.Avalonia;
|
||||||
|
|
||||||
|
public partial class ArchiveItemActionView : UserControl
|
||||||
|
{
|
||||||
|
public ArchiveItemActionView() => InitializeComponent();
|
||||||
|
}
|
||||||
@@ -40,8 +40,8 @@
|
|||||||
<ProjectReference Include="..\Toolkit\Toolkit.UI.Controls.Avalonia\Toolkit.UI.Controls.Avalonia.csproj" />
|
<ProjectReference Include="..\Toolkit\Toolkit.UI.Controls.Avalonia\Toolkit.UI.Controls.Avalonia.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Update="AddItemActionView.axaml.cs">
|
<Compile Update="CreateItemActionView.axaml.cs">
|
||||||
<DependentUpon>AddItemActionView.axaml</DependentUpon>
|
<DependentUpon>CreateItemActionView.axaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Update="ItemCommandHeaderView.axaml.cs">
|
<Compile Update="ItemCommandHeaderView.axaml.cs">
|
||||||
<DependentUpon>ItemCommandHeaderView.axaml</DependentUpon>
|
<DependentUpon>ItemCommandHeaderView.axaml</DependentUpon>
|
||||||
|
|||||||
@@ -21,7 +21,9 @@
|
|||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Margin="2,-1,0,0"
|
Margin="2,-1,0,0"
|
||||||
ItemTemplate="{ReflectionBinding Template}"
|
ItemTemplate="{ReflectionBinding Template}"
|
||||||
ItemsSource="{Binding}">
|
ItemsSource="{Binding}"
|
||||||
|
SelectedIndex="{Binding SelectedIndex}"
|
||||||
|
SelectionMode="AlwaysSelected">
|
||||||
<ListBox.Styles>
|
<ListBox.Styles>
|
||||||
<Style Selector="ListBoxItem">
|
<Style Selector="ListBoxItem">
|
||||||
<Setter Property="IsSelected" Value="{ReflectionBinding Selected}" />
|
<Setter Property="IsSelected" Value="{ReflectionBinding Selected}" />
|
||||||
|
|||||||
+7
-3
@@ -1,9 +1,9 @@
|
|||||||
<UserControl
|
<UserControl
|
||||||
x:Class="Bitvault.Avalonia.AddItemActionView"
|
x:Class="Bitvault.Avalonia.CreateItemActionView"
|
||||||
xmlns="https://github.com/avaloniaui"
|
xmlns="https://github.com/avaloniaui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:vm="using:Bitvault"
|
xmlns:vm="using:Bitvault"
|
||||||
x:DataType="vm:AddItemActionViewModel">
|
x:DataType="vm:CreateItemActionViewModel">
|
||||||
<Button
|
<Button
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Width="{StaticResource ButtonWidth}"
|
Width="{StaticResource ButtonWidth}"
|
||||||
@@ -22,7 +22,11 @@
|
|||||||
<NavigateAction
|
<NavigateAction
|
||||||
Context="{Binding Named, StringFormat='{}{0}:Content'}"
|
Context="{Binding Named, StringFormat='{}{0}:Content'}"
|
||||||
Route="Item"
|
Route="Item"
|
||||||
Scope="self" />
|
Scope="self">
|
||||||
|
<NavigateAction.ParameterBindings>
|
||||||
|
<ParameterBinding Key="Immutable" Value="{x:False}" />
|
||||||
|
</NavigateAction.ParameterBindings>
|
||||||
|
</NavigateAction>
|
||||||
</EventTriggerBehavior>
|
</EventTriggerBehavior>
|
||||||
</Interaction.Behaviors>
|
</Interaction.Behaviors>
|
||||||
</Button>
|
</Button>
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
|
||||||
|
namespace Bitvault.Avalonia;
|
||||||
|
|
||||||
|
public partial class CreateItemActionView : UserControl
|
||||||
|
{
|
||||||
|
public CreateItemActionView() => InitializeComponent();
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<UserControl
|
||||||
|
x:Class="Bitvault.Avalonia.DeleteItemActionView"
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:vm="using:Bitvault"
|
||||||
|
x:DataType="vm:DeleteItemActionViewModel">
|
||||||
|
<Button
|
||||||
|
Width="{StaticResource ButtonWidth}"
|
||||||
|
Height="{StaticResource ButtonHeight}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Command="{Binding InvokeCommand}"
|
||||||
|
Foreground="{DynamicResource IconForegroundBrush}"
|
||||||
|
ToolTip.Tip="Delete">
|
||||||
|
<TextBlock
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
||||||
|
FontSize="16"
|
||||||
|
Foreground="{DynamicResource IconForegroundBrush}"
|
||||||
|
Text="" />
|
||||||
|
</Button>
|
||||||
|
</UserControl>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
|
||||||
|
namespace Bitvault.Avalonia
|
||||||
|
{
|
||||||
|
public partial class DeleteItemActionView : UserControl
|
||||||
|
{
|
||||||
|
public DeleteItemActionView()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
Height="{StaticResource ButtonHeight}"
|
Height="{StaticResource ButtonHeight}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Foreground="{DynamicResource IconForegroundBrush}"
|
Foreground="{DynamicResource IconForegroundBrush}"
|
||||||
ToolTip.Tip="Save">
|
ToolTip.Tip="Cancel">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<UserControl
|
||||||
|
x:Class="Bitvault.Avalonia.EditItemActionView"
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:vm="using:Bitvault"
|
||||||
|
x:DataType="vm:EditItemActionViewModel">
|
||||||
|
<Button
|
||||||
|
Width="{StaticResource ButtonWidth}"
|
||||||
|
Height="{StaticResource ButtonHeight}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Command="{Binding InvokeCommand}"
|
||||||
|
Foreground="{DynamicResource IconForegroundBrush}"
|
||||||
|
ToolTip.Tip="Edit">
|
||||||
|
<TextBlock
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
||||||
|
FontSize="16"
|
||||||
|
Foreground="{DynamicResource IconForegroundBrush}"
|
||||||
|
Text="" />
|
||||||
|
</Button>
|
||||||
|
</UserControl>
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
|
||||||
|
namespace Bitvault.Avalonia;
|
||||||
|
|
||||||
|
public partial class EditItemActionView : UserControl
|
||||||
|
{
|
||||||
|
public EditItemActionView() => InitializeComponent();
|
||||||
|
}
|
||||||
@@ -11,7 +11,15 @@
|
|||||||
DisplayName="{Binding Value}" />
|
DisplayName="{Binding Value}" />
|
||||||
<TextBox
|
<TextBox
|
||||||
MaxWidth="360"
|
MaxWidth="360"
|
||||||
|
IsVisible="{Binding !Immutable}"
|
||||||
Text="{Binding Value}"
|
Text="{Binding Value}"
|
||||||
|
TextAlignment="Center"
|
||||||
Watermark="Enter name" />
|
Watermark="Enter name" />
|
||||||
|
<SelectableTextBlock
|
||||||
|
MaxWidth="360"
|
||||||
|
IsVisible="{Binding Immutable}"
|
||||||
|
SelectionBrush="Red"
|
||||||
|
Text="{Binding Value}"
|
||||||
|
TextAlignment="Center" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
Scope="self" />
|
Scope="self" />
|
||||||
<NavigateAction Context="{Binding Named, StringFormat='{}{0}:Content'}" Route="Item">
|
<NavigateAction Context="{Binding Named, StringFormat='{}{0}:Content'}" Route="Item">
|
||||||
<NavigateAction.ParameterBindings>
|
<NavigateAction.ParameterBindings>
|
||||||
|
<ParameterBinding Key="Immutable" Value="{x:True}" />
|
||||||
<ParameterBinding Key="Id" Value="{Binding Id}" />
|
<ParameterBinding Key="Id" Value="{Binding Id}" />
|
||||||
<ParameterBinding Key="Name" Value="{Binding Name}" />
|
<ParameterBinding Key="Name" Value="{Binding Name}" />
|
||||||
</NavigateAction.ParameterBindings>
|
</NavigateAction.ParameterBindings>
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
namespace Bitvault;
|
||||||
|
|
||||||
|
public record Archive
|
||||||
|
{
|
||||||
|
public static ArchiveEventArgs<TValue> As<TValue>(TValue value) =>
|
||||||
|
new(value);
|
||||||
|
|
||||||
|
public static ArchiveEventArgs<TValue> As<TValue>() where TValue : new() =>
|
||||||
|
new(new TValue());
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
namespace Bitvault;
|
||||||
|
|
||||||
|
public record ArchiveEventArgs<TValue>(TValue Value);
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
using CommunityToolkit.Mvvm.Input;
|
||||||
|
using Toolkit.Foundation;
|
||||||
|
|
||||||
|
namespace Bitvault;
|
||||||
|
|
||||||
|
public partial class ArchiveItemActionViewModel(IServiceProvider provider,
|
||||||
|
IServiceFactory factory,
|
||||||
|
IMediator mediator,
|
||||||
|
IPublisher publisher,
|
||||||
|
ISubscriber subscriber,
|
||||||
|
IDisposer disposer) : ObservableViewModel(provider, factory, mediator, publisher, subscriber, disposer)
|
||||||
|
{
|
||||||
|
[RelayCommand]
|
||||||
|
public async Task Invoke() => await Publisher.Publish(Archive.As<Item>());
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
namespace Bitvault;
|
namespace Bitvault;
|
||||||
|
|
||||||
public partial class ContainerHeaderViewModel : ObservableCollectionViewModel<string, IDisposable>,
|
public partial class ContainerHeaderViewModel : ObservableCollectionViewModel<string, IDisposable>,
|
||||||
INotificationHandler<ActivateEventArgs<Filter<string>>>
|
INotificationHandler<RequestEventArgs<Filter<string>>>
|
||||||
{
|
{
|
||||||
public ContainerHeaderViewModel(IServiceProvider provider,
|
public ContainerHeaderViewModel(IServiceProvider provider,
|
||||||
IServiceFactory factory,
|
IServiceFactory factory,
|
||||||
@@ -15,12 +15,12 @@ public partial class ContainerHeaderViewModel : ObservableCollectionViewModel<st
|
|||||||
{
|
{
|
||||||
Template = template;
|
Template = template;
|
||||||
|
|
||||||
Add<AddItemActionViewModel>(scope: true);
|
Add<CreateItemActionViewModel>(scope: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IContentTemplate Template { get; set; }
|
public IContentTemplate Template { get; set; }
|
||||||
|
|
||||||
public Task Handle(ActivateEventArgs<Filter<string>> args,
|
public Task Handle(RequestEventArgs<Filter<string>> args,
|
||||||
CancellationToken cancellationToken = default)
|
CancellationToken cancellationToken = default)
|
||||||
{
|
{
|
||||||
if (args.Value is Filter<string> filter)
|
if (args.Value is Filter<string> filter)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ using Toolkit.Foundation;
|
|||||||
|
|
||||||
namespace Bitvault;
|
namespace Bitvault;
|
||||||
|
|
||||||
public partial class AddItemActionViewModel(IServiceProvider provider,
|
public partial class CreateItemActionViewModel(IServiceProvider provider,
|
||||||
IServiceFactory factory,
|
IServiceFactory factory,
|
||||||
IMediator mediator,
|
IMediator mediator,
|
||||||
IPublisher publisher,
|
IPublisher publisher,
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using Toolkit.Foundation;
|
using CommunityToolkit.Mvvm.Input;
|
||||||
|
using Toolkit.Foundation;
|
||||||
|
|
||||||
namespace Bitvault;
|
namespace Bitvault;
|
||||||
|
|
||||||
@@ -7,4 +8,8 @@ public partial class DeleteItemActionViewModel(IServiceProvider provider,
|
|||||||
IMediator mediator,
|
IMediator mediator,
|
||||||
IPublisher publisher,
|
IPublisher publisher,
|
||||||
ISubscriber subscriber,
|
ISubscriber subscriber,
|
||||||
IDisposer disposer) : ObservableViewModel(provider, factory, mediator, publisher, subscriber, disposer);
|
IDisposer disposer) : ObservableViewModel(provider, factory, mediator, publisher, subscriber, disposer)
|
||||||
|
{
|
||||||
|
[RelayCommand]
|
||||||
|
public async Task Invoke() => await Publisher.Publish(Delete.As<Item>());
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using Toolkit.Foundation;
|
using CommunityToolkit.Mvvm.Input;
|
||||||
|
using Toolkit.Foundation;
|
||||||
|
|
||||||
namespace Bitvault;
|
namespace Bitvault;
|
||||||
|
|
||||||
@@ -7,5 +8,9 @@ public partial class EditItemActionViewModel(IServiceProvider provider,
|
|||||||
IMediator mediator,
|
IMediator mediator,
|
||||||
IPublisher publisher,
|
IPublisher publisher,
|
||||||
ISubscriber subscriber,
|
ISubscriber subscriber,
|
||||||
IDisposer disposer) : ObservableViewModel(provider, factory, mediator, publisher, subscriber, disposer);
|
IDisposer disposer) : ObservableViewModel(provider, factory, mediator, publisher, subscriber, disposer)
|
||||||
|
{
|
||||||
|
[RelayCommand]
|
||||||
|
public async Task Invoke() => await Publisher.Publish(Edit.As<Item>());
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,5 +38,5 @@ public partial class FilterContainerNavigationViewModel : ObservableViewModel,
|
|||||||
Task.FromResult(Activated = true);
|
Task.FromResult(Activated = true);
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
public async Task Invoke() => await Publisher.Publish(Request.As(new Filter<string>(Filter)));
|
public async Task Invoke() => await Publisher.Publish(Request.As(new Filter<string>(Filter)), nameof(ContainerViewModel));
|
||||||
}
|
}
|
||||||
@@ -14,6 +14,9 @@ public partial class ItemCommandHeaderViewModel : ObservableCollectionViewModel
|
|||||||
{
|
{
|
||||||
Add<ConfirmItemActionViewModel>();
|
Add<ConfirmItemActionViewModel>();
|
||||||
Add<DismissItemActionViewModel>();
|
Add<DismissItemActionViewModel>();
|
||||||
|
Add<EditItemActionViewModel>();
|
||||||
|
Add<DeleteItemActionViewModel>();
|
||||||
|
Add<ArchiveItemActionViewModel>();
|
||||||
|
|
||||||
Template = template;
|
Template = template;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using Toolkit.Foundation;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
using Toolkit.Foundation;
|
||||||
|
|
||||||
namespace Bitvault;
|
namespace Bitvault;
|
||||||
|
|
||||||
@@ -8,10 +9,13 @@ public partial class ItemHeaderViewModel(IServiceProvider provider,
|
|||||||
IPublisher publisher,
|
IPublisher publisher,
|
||||||
ISubscriber subscriber,
|
ISubscriber subscriber,
|
||||||
IDisposer disposer,
|
IDisposer disposer,
|
||||||
|
bool immutable,
|
||||||
string? value = null) : ObservableViewModel<string, string>(provider, factory, mediator, publisher, subscriber, disposer, value),
|
string? value = null) : ObservableViewModel<string, string>(provider, factory, mediator, publisher, subscriber, disposer, value),
|
||||||
IItemViewModel
|
IItemViewModel
|
||||||
{
|
{
|
||||||
|
[ObservableProperty]
|
||||||
|
private bool immutable = immutable;
|
||||||
|
|
||||||
public void Invoke(ItemConfiguration args) =>
|
public void Invoke(ItemConfiguration args) =>
|
||||||
args.Name = Value;
|
args.Name = Value;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,9 @@ public partial class ItemNavigationViewModel(IServiceProvider provider,
|
|||||||
int id,
|
int id,
|
||||||
string name,
|
string name,
|
||||||
string description) :
|
string description) :
|
||||||
ObservableViewModel(provider, factory, mediator, publisher, subscriber, disposer)
|
ObservableViewModel(provider, factory, mediator, publisher, subscriber, disposer),
|
||||||
|
INotificationHandler<ArchiveEventArgs<Item>>,
|
||||||
|
IRemovable
|
||||||
{
|
{
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private string? description = description;
|
private string? description = description;
|
||||||
@@ -31,4 +33,11 @@ public partial class ItemNavigationViewModel(IServiceProvider provider,
|
|||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private bool selected;
|
private bool selected;
|
||||||
public IContentTemplate Template { get; set; } = template;
|
public IContentTemplate Template { get; set; } = template;
|
||||||
|
|
||||||
|
public Task Handle(ArchiveEventArgs<Item> args,
|
||||||
|
CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
Dispose();
|
||||||
|
return Task.CompletedTask;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -13,6 +13,9 @@ public partial class ItemViewModel :
|
|||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private string named;
|
private string named;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private bool immutable;
|
||||||
|
|
||||||
public ItemViewModel(IServiceProvider provider,
|
public ItemViewModel(IServiceProvider provider,
|
||||||
IServiceFactory factory,
|
IServiceFactory factory,
|
||||||
IMediator mediator,
|
IMediator mediator,
|
||||||
@@ -21,14 +24,16 @@ public partial class ItemViewModel :
|
|||||||
IDisposer disposer,
|
IDisposer disposer,
|
||||||
IContentTemplate template,
|
IContentTemplate template,
|
||||||
NamedComponent named,
|
NamedComponent named,
|
||||||
|
bool immutable = true,
|
||||||
int? id = null,
|
int? id = null,
|
||||||
string? name = null) : base(provider, factory, mediator, publisher, subscriber, disposer)
|
string? name = null) : base(provider, factory, mediator, publisher, subscriber, disposer)
|
||||||
{
|
{
|
||||||
Template = template;
|
Template = template;
|
||||||
Named = $"{named}";
|
Named = $"{named}";
|
||||||
Id = id;
|
Id = id;
|
||||||
|
Immutable = immutable;
|
||||||
|
|
||||||
Add<ItemHeaderViewModel>(name ?? "");
|
Add<ItemHeaderViewModel>(immutable, name ?? "");
|
||||||
}
|
}
|
||||||
|
|
||||||
public IContentTemplate Template { get; set; }
|
public IContentTemplate Template { get; set; }
|
||||||
|
|||||||
Reference in New Issue
Block a user