Codemaid
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls.ApplicationLifetimes;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Wallet.Data;
|
||||
using FluentAvalonia.Core;
|
||||
using HotAvalonia;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
@@ -11,8 +11,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Toolkit.Avalonia;
|
||||
using Toolkit.Foundation;
|
||||
using FluentAvalonia.Core;
|
||||
using Avalonia.Controls;
|
||||
using Wallet.Data;
|
||||
|
||||
namespace Wallet.Avalonia;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
MenuItemsSource="{Binding}"
|
||||
SelectedItem="{Binding SelectedItem}">
|
||||
<Interaction.Behaviors>
|
||||
<DataTriggerBehavior Binding="{ReflectionBinding SelectedItem.IsOpened, Mode=TwoWay}" Value="True">
|
||||
<DataTriggerBehavior Binding="{ReflectionBinding SelectedItem.IsOpened}" Value="True">
|
||||
<InvokeNavigationViewItemAction SelectedIndex="1" />
|
||||
</DataTriggerBehavior>
|
||||
</Interaction.Behaviors>
|
||||
|
||||
@@ -5,12 +5,13 @@
|
||||
xmlns:ui="using:FluentAvalonia.UI.Controls"
|
||||
xmlns:vm="using:Wallet"
|
||||
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 "
|
||||
BadgePlacement="BottomRight"
|
||||
BadgeSize="10"
|
||||
ContentTemplate="{x:Null}"
|
||||
Foreground="#4CAF50"
|
||||
IsBadgeVisible="True"
|
||||
IsBadgeVisible="{Binding IsOpened}"
|
||||
ListBoxExtension.IsItemInvokedEnabled="True"
|
||||
ToolTip.Tip="{Binding Name}">
|
||||
<OverflowItem.Resources>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using Avalonia.Controls;
|
||||
using System;
|
||||
using Toolkit.UI.Controls.Avalonia;
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ public class ArchiveItemHandler(IDecoratorService<Item<(Guid, string)>> decorato
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-3
@@ -1,6 +1,4 @@
|
||||
using Toolkit.Foundation;
|
||||
|
||||
namespace Wallet;
|
||||
namespace Wallet;
|
||||
|
||||
public record Closed
|
||||
{
|
||||
|
||||
@@ -38,9 +38,11 @@ public partial class CommentEntryCollectionViewModel(IServiceProvider provider,
|
||||
Add<CreateCommentEntryViewModel>();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Count > 0)
|
||||
{
|
||||
RemoveAt(Count - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -30,4 +30,3 @@ public class CommentEntryCollectionViewModelHandler(IServiceFactory serviceFacto
|
||||
return Task.FromResult<IItemEntryViewModel?>(default);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using Wallet.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.ChangeTracking;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using Toolkit.Foundation;
|
||||
using Wallet.Data;
|
||||
|
||||
namespace Wallet;
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ public class HyperlinkHandler :
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
namespace Wallet
|
||||
namespace Wallet
|
||||
{
|
||||
public interface IWalletConnectionFactory
|
||||
{
|
||||
|
||||
@@ -97,7 +97,6 @@ public partial class ItemEntryCollectionViewModel<TItem, TValue> :
|
||||
|
||||
protected virtual void OnStateChanged()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public Task Handle(ConfirmEventArgs<Item> args)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Wallet.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Text.Json;
|
||||
using Toolkit.Foundation;
|
||||
using Wallet.Data;
|
||||
|
||||
namespace Wallet;
|
||||
|
||||
@@ -43,7 +43,6 @@ public class ItemHandler(IDbContextFactory<WalletContext> dbContextFactory) :
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ public partial class ItemHeaderViewModel :
|
||||
private async Task Import() => ImageDescriptor = await Mediator.Handle<CreateEventArgs<ProfileImage>,
|
||||
IImageDescriptor>(Create.As<ProfileImage>());
|
||||
|
||||
partial void OnImageDescriptorChanged(IImageDescriptor? value)
|
||||
private partial void OnImageDescriptorChanged(IImageDescriptor? value)
|
||||
{
|
||||
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)
|
||||
{
|
||||
if (configuration is not null)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Wallet.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Toolkit.Foundation;
|
||||
using Wallet.Data;
|
||||
|
||||
namespace Wallet;
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Toolkit.Foundation;
|
||||
using Wallet.Data;
|
||||
|
||||
namespace Wallet;
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ public partial class LowercaseRule :
|
||||
public int CalculateScore(string password) =>
|
||||
Regex().IsMatch(password) ? 2 : 0;
|
||||
|
||||
|
||||
[GeneratedRegex(@"[a-z]")]
|
||||
private static partial Regex Regex();
|
||||
}
|
||||
@@ -32,7 +32,6 @@ public partial class MainViewModel :
|
||||
Reset(args =>
|
||||
{
|
||||
args.SetSource(wallet, () => wallet);
|
||||
SelectedItem = wallet;
|
||||
}, false);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -3,4 +3,3 @@
|
||||
public record ProfileImage;
|
||||
|
||||
public record ProfileImage<TValue>(TValue Value);
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Wallet.Data;
|
||||
using LinqKit;
|
||||
using LinqKit;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Toolkit.Foundation;
|
||||
using Wallet.Data;
|
||||
|
||||
namespace Wallet;
|
||||
|
||||
@@ -42,7 +42,6 @@ public class QueryWalletHandler(IDbContextFactory<WalletContext> dbContextFactor
|
||||
.And(x => EF.Functions.Like(x.Category, $"%{filter}%"));
|
||||
}
|
||||
|
||||
|
||||
if (text is { Length: > 0 })
|
||||
{
|
||||
predicate = predicate.And(x => EF.Functions.Like(x.Name, $"%{text}%"));
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using Wallet.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Text.Json;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using Toolkit.Foundation;
|
||||
using Wallet.Data;
|
||||
|
||||
namespace Wallet;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Wallet.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Toolkit.Foundation;
|
||||
using Wallet.Data;
|
||||
|
||||
namespace Wallet;
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using System.Linq;
|
||||
using System.Xml.Linq;
|
||||
using Toolkit.Foundation;
|
||||
|
||||
namespace Wallet;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Wallet.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Wallet.Data;
|
||||
|
||||
namespace Wallet;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Wallet.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Wallet.Data;
|
||||
|
||||
namespace Wallet;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user