Support unarchiving
This commit is contained in:
@@ -97,6 +97,7 @@ public partial class App : Application
|
||||
services.AddTemplate<ConfirmItemActionViewModel, ConfirmItemActionView>();
|
||||
services.AddTemplate<DismissItemActionViewModel, DismissItemActionView>();
|
||||
services.AddTemplate<ArchiveItemActionViewModel, ArchiveItemActionView>();
|
||||
services.AddTemplate<UnarchiveItemActionViewModel, UnarchiveItemActionView>();
|
||||
services.AddTemplate<EditItemActionViewModel, EditItemActionView>();
|
||||
services.AddTemplate<DeleteItemActionViewModel, DeleteItemActionView>();
|
||||
|
||||
@@ -106,8 +107,7 @@ public partial class App : Application
|
||||
|
||||
services.AddHandler<ConfirmItemHandler>(ServiceLifetime.Scoped);
|
||||
services.AddHandler<ArchiveItemHandler>(ServiceLifetime.Scoped);
|
||||
|
||||
services.AddHandler<ItemActivatedHandler>();
|
||||
services.AddHandler<UnarchiveItemHandler>(ServiceLifetime.Scoped);
|
||||
|
||||
});
|
||||
})!);
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
ToolTip.Tip="Archive">
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
||||
FontFamily="{DynamicResource FluentThemeFontFamily}"
|
||||
FontSize="16"
|
||||
Foreground="{DynamicResource IconForegroundBrush}"
|
||||
Text="" />
|
||||
Text="" />
|
||||
</Button>
|
||||
</UserControl>
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
ToolTip.Tip="Save">
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
||||
FontSize="16"
|
||||
FontFamily="{DynamicResource FluentThemeFontFamily}"
|
||||
FontSize="18"
|
||||
Foreground="{DynamicResource IconForegroundBrush}"
|
||||
Text="" />
|
||||
Text="" />
|
||||
</Button>
|
||||
</UserControl>
|
||||
|
||||
@@ -1,18 +1,21 @@
|
||||
<UserControl
|
||||
x:Class="Bitvault.Avalonia.DismissItemActionView"
|
||||
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"
|
||||
x:DataType="vm:DismissItemActionViewModel">
|
||||
<Button
|
||||
Width="{StaticResource ButtonWidth}"
|
||||
Height="{StaticResource ButtonHeight}"
|
||||
VerticalAlignment="Center"
|
||||
Command="{Binding InvokeCommand}"
|
||||
Foreground="{DynamicResource IconForegroundBrush}"
|
||||
ToolTip.Tip="Cancel">
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
||||
FontFamily="{DynamicResource FluentThemeFontFamily}"
|
||||
FontSize="16"
|
||||
Foreground="{DynamicResource IconForegroundBrush}"
|
||||
Text="󸁞" />
|
||||
Text="" />
|
||||
</Button>
|
||||
</UserControl>
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
ToolTip.Tip="Edit">
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
||||
FontFamily="{DynamicResource FluentThemeFontFamily}"
|
||||
FontSize="16"
|
||||
Foreground="{DynamicResource IconForegroundBrush}"
|
||||
Text="" />
|
||||
Text="" />
|
||||
</Button>
|
||||
</UserControl>
|
||||
|
||||
@@ -14,7 +14,11 @@
|
||||
<NavigateAction
|
||||
Region="{Binding Named, StringFormat='{}{0}:Content'}"
|
||||
Route="Item"
|
||||
Scope="self" />
|
||||
Scope="self">
|
||||
<NavigateAction.ParameterBindings>
|
||||
<ParameterBinding Key="Archived" Value="{Binding Archived}" />
|
||||
</NavigateAction.ParameterBindings>
|
||||
</NavigateAction>
|
||||
</DataTriggerBehavior>
|
||||
</Interaction.Behaviors>
|
||||
<Grid Background="Transparent" ColumnDefinitions="Auto,*">
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
<UserControl
|
||||
x:Class="Bitvault.Avalonia.UnarchiveItemActionView"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="using:Bitvault"
|
||||
x:DataType="vm:UnarchiveItemActionViewModel">
|
||||
<Button
|
||||
Width="{StaticResource ButtonWidth}"
|
||||
Height="{StaticResource ButtonHeight}"
|
||||
VerticalAlignment="Center"
|
||||
Command="{Binding InvokeCommand}"
|
||||
Foreground="{DynamicResource IconForegroundBrush}"
|
||||
ToolTip.Tip="Unarchive">
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="{DynamicResource FluentThemeFontFamily}"
|
||||
FontSize="16"
|
||||
Foreground="{DynamicResource IconForegroundBrush}"
|
||||
Text="" />
|
||||
</Button>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,8 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Bitvault.Avalonia;
|
||||
|
||||
public partial class UnarchiveItemActionView : UserControl
|
||||
{
|
||||
public UnarchiveItemActionView() => InitializeComponent();
|
||||
}
|
||||
Reference in New Issue
Block a user