Skip to content

(V3) Vault recycle bin #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 119 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
440a0bd
Added initial view models for recycle bin
d2dyno1 Jan 22, 2025
fa81470
Fixed settings page on Android
d2dyno1 Jan 23, 2025
cf91b02
Added restore method to service
d2dyno1 Jan 24, 2025
8b6fc2f
Moved methods to IRecycleBinService
d2dyno1 Jan 24, 2025
5a4fe6c
Upgraded dependencies
d2dyno1 Jan 26, 2025
4506334
Merge branch 'master' into f_recyclebin
d2dyno1 Jan 28, 2025
1e6425c
Upgraded to Uno 5.6
d2dyno1 Jan 29, 2025
1c62d31
Fixed implicit animations
d2dyno1 Jan 29, 2025
856fd63
Introduced KeyPair class
d2dyno1 Feb 8, 2025
0a4515d
Begin work on Recycle Bin tests
d2dyno1 Feb 17, 2025
9bf9363
Added more Recycle Bin tests
d2dyno1 Feb 17, 2025
ec1ae41
Fixed tests
d2dyno1 Feb 17, 2025
82abec0
Added "Lock" context menu option
d2dyno1 Feb 17, 2025
ec7e99e
Upgraded nuget packages
d2dyno1 Feb 17, 2025
4facf03
Update submodules
d2dyno1 Feb 17, 2025
f2c2b20
Begin work on logic for Android Recycle Bin
d2dyno1 Feb 21, 2025
8a8181f
More work on Recycle Bin for Android
d2dyno1 Feb 21, 2025
9d8c74b
Added IFilePicker and IFolderPicker
d2dyno1 Feb 22, 2025
46c8e06
Redesigned MAUI login page
d2dyno1 Feb 24, 2025
9e63098
Fixed some issues with iOS build
d2dyno1 Feb 25, 2025
bc1bf7b
Redesigned Wizard location page
d2dyno1 Feb 25, 2025
bcf5f91
Enabled edge-to-edge on Android
d2dyno1 Feb 26, 2025
d3c0806
Improved design of Wizard credentials page
d2dyno1 Feb 26, 2025
cccfe08
Added IsTransparent to ModernPicker
d2dyno1 Feb 27, 2025
ee9f02b
Removed empty spaces
d2dyno1 Feb 27, 2025
47b3825
Update nwebdav
d2dyno1 Feb 27, 2025
d799e54
Remove TableView in favor of OptionsControl
d2dyno1 Feb 28, 2025
f6039e7
Removed last TableView reference
d2dyno1 Feb 28, 2025
7b28664
Added MauiThemeHelper
d2dyno1 Mar 1, 2025
27d449d
Added rounded corners to popups
d2dyno1 Mar 3, 2025
9fdfdbd
Updated design of Key File login view
d2dyno1 Mar 3, 2025
9daead6
Fixed file browser background
d2dyno1 Mar 4, 2025
4d523be
Fix build
d2dyno1 Mar 4, 2025
51b7a68
Use CanContinue
d2dyno1 Mar 8, 2025
88f95f0
Fixed invisible icons
d2dyno1 Mar 16, 2025
871ce2d
Begin work on sorters
d2dyno1 Mar 17, 2025
5f1ca44
Added ViewOptionsViewModel
d2dyno1 Mar 17, 2025
a3abc18
Begin work on Sheet
d2dyno1 Mar 17, 2025
8ffa4f1
Removed InsertSorted method
d2dyno1 Mar 24, 2025
3669ad5
Begin work on view options implementation
d2dyno1 Mar 24, 2025
bf1a701
Implemented layout options
d2dyno1 Mar 24, 2025
c70060c
Fixed formatting
d2dyno1 Mar 24, 2025
471d655
Added properties popup
d2dyno1 Mar 25, 2025
201b123
Fixed layout options
d2dyno1 Mar 25, 2025
92a14db
Added image thumbnails
d2dyno1 Mar 26, 2025
8e725e0
Added video thumbnail generation
d2dyno1 Apr 2, 2025
9e7b760
Resize icon on Android
d2dyno1 Apr 4, 2025
751381f
Added TransferType.Select
d2dyno1 Apr 7, 2025
5966d1b
Added some missing localizations
d2dyno1 Apr 7, 2025
e5ae1ae
Update BrowserControl.xaml
d2dyno1 Apr 7, 2025
ba4e8d6
Implemented StreamedMediaSource
d2dyno1 Apr 8, 2025
11a8c6e
Added mock design to HealthPage
d2dyno1 Apr 8, 2025
12d2d5d
Fixed race condition in wizard location page
d2dyno1 Apr 10, 2025
4bb0022
Added new parameters for Argon2id
d2dyno1 Apr 10, 2025
ce251cd
Updated some dependencies
d2dyno1 Apr 10, 2025
97ca887
Added empty view to file browser
d2dyno1 Apr 10, 2025
b64ea00
Added missing IsCachingDirectoryIds
d2dyno1 Apr 10, 2025
ba32fe8
Try to upgrade MediaElement
d2dyno1 Apr 12, 2025
3e53cee
Improved thumbnail loading performance
d2dyno1 Apr 12, 2025
24a75f8
Dramatically improve item scrolling performance
d2dyno1 Apr 13, 2025
5ace02f
GridView improvements
d2dyno1 Apr 13, 2025
39d70e4
More work on the health page
d2dyno1 Apr 17, 2025
73c3510
Size-based Recycle Bin
d2dyno1 Apr 17, 2025
1ddabb6
Exception proofing
d2dyno1 Apr 17, 2025
3780ed9
Updated LiveCharts
d2dyno1 Apr 18, 2025
b9d2f9f
Implemented desktop.ini icons
d2dyno1 Apr 18, 2025
1a55271
Refactored health scanning view models
d2dyno1 Apr 19, 2025
a95ec32
Fixed formatting
d2dyno1 Apr 19, 2025
e0747f4
Removed Material.Components.Maui
d2dyno1 Apr 19, 2025
2a3ec54
Added password strength bar
d2dyno1 Apr 19, 2025
7713682
Fixed password strength bar on MAUI
d2dyno1 Apr 19, 2025
6ff8423
Partially fix cancelling folder picking
d2dyno1 Apr 20, 2025
0501165
Added a setting to disable file thumbnails
d2dyno1 Apr 21, 2025
6520aa8
Implemented recycle bin for Dokany
d2dyno1 Apr 21, 2025
ee379d3
Added issue resolving to MAUI
d2dyno1 Apr 22, 2025
eeb792f
Implement V3 vault format
d2dyno1 Apr 23, 2025
9dd36d8
Added FallbackPreviewer
d2dyno1 May 1, 2025
af97527
Added Android Biometrics authentication
d2dyno1 May 2, 2025
907fb33
Better reporting for transferred items
d2dyno1 May 2, 2025
d17e484
Adjust Argon2id parameters again
d2dyno1 May 4, 2025
afb1889
Added recycle bin size taken UI
d2dyno1 May 7, 2025
71ffbea
Added DeferredInitialization for file icons
d2dyno1 May 7, 2025
5d32c44
Added missing V3 migrator UI
d2dyno1 May 10, 2025
1ec0482
Update recycle bin configuration file
d2dyno1 May 11, 2025
cafd956
Added ProgressBar to RecycleBinDialog
d2dyno1 May 11, 2025
92265bc
Small fix
d2dyno1 May 12, 2025
478e848
Begin work on CarouselPreviewer
d2dyno1 May 17, 2025
61bcc90
Begin work on GalleryView
d2dyno1 May 23, 2025
aa63d3e
Use ContentPresentation in GalleryView
d2dyno1 May 23, 2025
8292cc6
Added PanRouter for MediaElement
d2dyno1 May 23, 2025
aa1d872
Implemented file browser adaptive layout
d2dyno1 May 23, 2025
5001192
Begin working on previewer title bar
d2dyno1 May 26, 2025
73f586a
Begin work on VLC media player
d2dyno1 May 26, 2025
d586d23
Added the option to disable encryption for debug
d2dyno1 May 26, 2025
762afba
Added show/hide animation to CommandBar
d2dyno1 May 26, 2025
bd79b3e
Fixed thumbnail rotation on Android
d2dyno1 May 27, 2025
b82c426
Added rename and create collision handling
d2dyno1 May 27, 2025
aa9443f
Added copy button to properties popup
d2dyno1 May 27, 2025
9cf3688
Only allow media files in GalleryView
d2dyno1 May 27, 2025
93fa484
Adjust formatting
d2dyno1 May 27, 2025
0a90bea
Added show/hide animations to TransferControl
d2dyno1 May 27, 2025
9d1564f
Downgrade BottomSheet to fix null BindingContext
d2dyno1 May 27, 2025
f0de0fb
Improve AndroidMediaService performance
d2dyno1 May 28, 2025
b495aca
Made CommandBar always on top in text previewer
d2dyno1 May 28, 2025
b268edb
Begin work on editable text documents
d2dyno1 May 28, 2025
7ee1a58
Added save functionality for text files
d2dyno1 May 28, 2025
21b47b5
Revert InputOutputStream
d2dyno1 May 29, 2025
09bd48f
Added platform specific resource dictionaries
d2dyno1 May 30, 2025
dc36772
Fixed Android template selector on iOS
d2dyno1 Jun 9, 2025
49ac593
Implemented thumbnails in DocumentsProvider
d2dyno1 Jun 10, 2025
f72aecb
Added login loading indicator
d2dyno1 Jun 14, 2025
eb8d97b
Made some work on the dark theme
d2dyno1 Jun 14, 2025
0f601b3
Small improvements to dark theme
d2dyno1 Jun 17, 2025
ae9bfe9
Fixed write operation using ChannelledStream
d2dyno1 Jun 17, 2025
71583ea
Added PDF previewer to MAUI
d2dyno1 Jun 22, 2025
9b7b0db
Temporarily removed pdf.js
d2dyno1 Jun 22, 2025
9e7387b
Added pdfjs53.zip file
d2dyno1 Jun 22, 2025
c672202
Update .gitignore
d2dyno1 Jun 22, 2025
02323f8
Fixed code formatting
d2dyno1 Jun 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
ApiKeys.Private.cs
SecureFolderFS.WinUI/settings/
SecureFolderFS.AvaloniaUI/settings/
pdfjs53/

# User-specific files
*.rsuser
Expand Down
7 changes: 5 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"msbuild-sdks": {
"Uno.Sdk": "5.4.10"
"Uno.Sdk": "5.6.37"
},
"sdk": {
"allowPrerelease": true
}
}
}
2 changes: 1 addition & 1 deletion lib/Tmds.Fuse
40 changes: 21 additions & 19 deletions src/Platforms/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,30 @@
<ItemGroup>
<PackageVersion Include="AathifMahir.Maui.MauiIcons.Cupertino" Version="4.0.0" />
<PackageVersion Include="AathifMahir.Maui.MauiIcons.Material" Version="4.0.0" />
<PackageVersion Include="CommunityToolkit.Maui" Version="9.1.1" />
<PackageVersion Include="CommunityToolkit.Maui.MediaElement" Version="4.1.2" />
<PackageVersion Include="CommunityToolkit.WinUI.UI.Animations" Version="7.1.2" />
<PackageVersion Include="CommunityToolkit.Maui" Version="11.2.0" />
<PackageVersion Include="CommunityToolkit.Maui.MediaElement" Version="6.0.2" />
<PackageVersion Include="CommunityToolkit.WinUI.Animations" Version="8.2.250402" />
<PackageVersion Include="CommunityToolkit.WinUI.UI.Controls.Markdown" Version="7.1.2" />
<PackageVersion Include="ContextMenuContainer" Version="1.2.3" />
<PackageVersion Include="H.NotifyIcon.Uno.WinUI" Version="2.1.4" />
<PackageVersion Include="H.NotifyIcon.Uno.WinUI" Version="2.3.0" />
<PackageVersion Include="IconPacks.Material" Version="1.0.8940.2-build" />
<PackageVersion Include="LiveChartsCore.SkiaSharpView.Uno.WinUI" Version="2.0.0-rc4.5" />
<PackageVersion Include="Material.Components.Maui" Version="0.2.2-preview" />
<PackageVersion Include="LibVLCSharp.MAUI" Version="3.9.3" />
<PackageVersion Include="LiveChartsCore.SkiaSharpView.Uno.WinUI" Version="2.0.0-rc5.3" />
<PackageVersion Include="Microsoft.AppCenter.Analytics" Version="5.0.3" />
<PackageVersion Include="Microsoft.AppCenter.Crashes" Version="5.0.3" />
<PackageVersion Include="Microsoft.Maui.Controls" Version="9.0.10" />
<PackageVersion Include="Microsoft.Maui.Controls.Compatibility" Version="9.0.10" />
<PackageVersion Include="Microsoft.Maui.Core" Version="9.0.10" />
<PackageVersion Include="Microsoft.Maui.Essentials" Version="9.0.10" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
<PackageVersion Include="Microsoft.Maui.Controls" Version="9.0.50" />
<PackageVersion Include="Microsoft.Maui.Controls.Compatibility" Version="9.0.50" />
<PackageVersion Include="Microsoft.Maui.Core" Version="9.0.50" />
<PackageVersion Include="Microsoft.Maui.Essentials" Version="9.0.50" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="9.0.4" />
<PackageVersion Include="Microsoft.Windows.Compatibility" Version="8.0.0" />
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" />
<PackageVersion Include="Octokit" Version="13.0.1" />
<PackageVersion Include="SkiaSharp.Views.Uno.WinUI" Version="2.88.9-preview.2.2" />
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="8.0.0" />
<PackageVersion Include="The49.Maui.BottomSheet" Version="8.0.3" />
<PackageVersion Include="Octokit" Version="14.0.0" />
<PackageVersion Include="Plugin.Maui.BottomSheet" Version="9.1.4" />
<PackageVersion Include="SkiaSharp" Version="3.116.1" />
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="9.0.4" />
<PackageVersion Include="Uno.CommunityToolkit.WinUI" Version="7.1.200" />
<PackageVersion Include="Uno.CommunityToolkit.WinUI.UI.Animations" Version="7.1.200" />
<PackageVersion Include="Uno.CommunityToolkit.WinUI.UI.Controls.Markdown" Version="7.1.203" />
<PackageVersion Include="Uno.CommunityToolkit.WinUI.UI.Controls.Markdown" Version="7.1.204" />
<PackageVersion Include="Uno.Core.Extensions.Logging" Version="4.1.1" />
<PackageVersion Include="Uno.Core.Extensions.Logging.Singleton" Version="4.1.1" />
<PackageVersion Include="Uno.Extensions.Logging.OSLog" Version="1.7.0" />
Expand All @@ -35,6 +34,9 @@
<PackageVersion Include="Uno.UniversalImageLoader" Version="1.9.37" />
<PackageVersion Include="Uno.WinUI" Version="5.3.90" />
<PackageVersion Include="Uno.WinUI.Lottie" Version="5.3.90" />
<PackageVersion Include="Vanara.PInvoke.ComCtl32" Version="4.0.4" />
<PackageVersion Include="Vanara.PInvoke.ComCtl32" Version="4.1.2" />
<PackageVersion Include="Vanara.PInvoke.Shell32" Version="4.1.2" />
<PackageVersion Include="VideoLAN.LibVLC.Android" Version="3.5.3" />
<PackageVersion Include="VideoLAN.LibVLC.iOS" Version="3.3.18" />
</ItemGroup>
</Project>
</Project>
9 changes: 3 additions & 6 deletions src/Platforms/SecureFolderFS.Maui/App.xaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
<Application
x:Class="SecureFolderFS.Maui.App"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:mds="clr-namespace:Material.Components.Maui.Styles;assembly=Material.Components.Maui">
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">

<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Resources/Styles/Colors.xaml" />
<ResourceDictionary Source="Resources/Styles/ColorStyles.xaml" />
<ResourceDictionary Source="Resources/Styles/ButtonStyles.xaml" />
<ResourceDictionary Source="Resources/Styles/Styles.xaml" />

<!-- Platform styles for Android -->
<mds:MaterialStyles Dark="#1791ff" Light="#158de0" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
Expand Down
31 changes: 23 additions & 8 deletions src/Platforms/SecureFolderFS.Maui/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
using CommunityToolkit.Mvvm.DependencyInjection;
using APES.UI.XF;
using SecureFolderFS.Maui.Extensions.Mappers;
using SecureFolderFS.Maui.Helpers;
using SecureFolderFS.Shared;
using SecureFolderFS.UI.Helpers;

namespace SecureFolderFS.Maui
{
public partial class App : Application
{
public static App Instance => (App)Application.Current!;
public static App Instance => (App)Current!;

public IServiceProvider? ServiceProvider { get; private set; }

public BaseLifecycleHelper ApplicationLifecycle { get; } =
Expand All @@ -18,23 +20,33 @@ public partial class App : Application
#else
null;
#endif

public event EventHandler? AppResumed;
public event EventHandler? AppPutToForeground;

public App()
{
InitializeComponent();

#if ANDROID
// Load Android-specific resource dictionaries
Resources.MergedDictionaries.Add(new Platforms.Android.Templates.AndroidDataTemplates());
#endif

// Configure mappers
CustomMappers.AddEntryMappers();
CustomMappers.AddLabelMappers();
CustomMappers.AddPickerMappers();

// Configure exception handlers
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
TaskScheduler.UnobservedTaskException += TaskScheduler_UnobservedTaskException;
}

protected override Window CreateWindow(IActivationState? activationState)
{
APES.UI.XF.ContextMenuContainer.Init();
ContextMenuContainer.Init();

var appShell = Task.Run(GetAppShellAsync).ConfigureAwait(false).GetAwaiter().GetResult();
return new Window(appShell);
}
Expand All @@ -49,10 +61,13 @@ private async Task<Page> GetAppShellAsync()

// Register IoC
DI.Default.SetServiceProvider(ServiceProvider);

// Create and initialize AppShell
var appShell = new AppShell();
await appShell.MainViewModel.InitAsync();
await appShell.MainViewModel.InitAsync().ConfigureAwait(false);

// Initialize ThemeHelper
await MauiThemeHelper.Instance.InitAsync().ConfigureAwait(false);

return appShell;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Some parts of the following code were used from https://github.com/dotnet/maui/issues/20772#issuecomment-2030914069

using Microsoft.Maui.Platform;

namespace SecureFolderFS.Maui.AppModels
{
internal sealed class CorrectedPanGestureRecognizer : PanGestureRecognizer, IPanGestureController
{
#if ANDROID
// Index 0 is X, index 1 is Y
private readonly int[] startingLocation = new int[2];
private readonly int[] currentLocation = new int[2];
#endif
public new event EventHandler<PanUpdatedEventArgs>? PanUpdated;

void IPanGestureController.SendPan(Element sender, double totalX, double totalY, int gestureId)
{
#if ANDROID
ArgumentNullException.ThrowIfNull(sender.Handler.MauiContext?.Context);
Android.Views.View view = sender.ToPlatform(sender.Handler.MauiContext);
view.GetLocationOnScreen(currentLocation);
totalX += sender.Handler.MauiContext.Context.FromPixels(currentLocation[0] - startingLocation[0]);
totalY += sender.Handler.MauiContext.Context.FromPixels(currentLocation[1] - startingLocation[1]);

#endif
PanUpdated?.Invoke(sender, new PanUpdatedEventArgs(GestureStatus.Running, gestureId, totalX, totalY));
}

void IPanGestureController.SendPanCanceled(Element sender, int gestureId)
{
PanUpdated?.Invoke(sender, new PanUpdatedEventArgs(GestureStatus.Canceled, gestureId));
}

void IPanGestureController.SendPanCompleted(Element sender, int gestureId)
{
PanUpdated?.Invoke(sender, new PanUpdatedEventArgs(GestureStatus.Completed, gestureId));
}

void IPanGestureController.SendPanStarted(Element sender, int gestureId)
{
#if ANDROID
ArgumentNullException.ThrowIfNull(sender.Handler.MauiContext);
Android.Views.View view = sender.ToPlatform(sender.Handler.MauiContext);
view.GetLocationOnScreen(startingLocation);
#endif
PanUpdated?.Invoke(sender, new PanUpdatedEventArgs(GestureStatus.Started, gestureId));
}
}
}
25 changes: 19 additions & 6 deletions src/Platforms/SecureFolderFS.Maui/AppModels/ImageStream.cs
Original file line number Diff line number Diff line change
@@ -1,25 +1,38 @@
using SecureFolderFS.Shared.ComponentModel;
using SecureFolderFS.Shared.Models;
using IImage = SecureFolderFS.Shared.ComponentModel.IImage;

namespace SecureFolderFS.Maui.AppModels
{
/// <inheritdoc cref="IImage"/>
internal sealed class ImageStream : IImage
internal sealed class ImageStream : IImageStream
{
private readonly Stream _stream;
public Stream Stream { get; }

public StreamImageSource Source { get; }

public ImageStream(Stream stream)
{
_stream = stream;
Stream = stream;
Source = new();
Source.Stream = (cancellationToken) => Task.FromResult(stream);
Source.Stream = (ct) => Task.FromResult(stream);
}

/// <inheritdoc/>
public async Task CopyToAsync(Stream destination, CancellationToken cancellationToken = default)
{
var savedPosition = Stream.Position;
await Stream.CopyToAsync(destination, cancellationToken);
Stream.Position = savedPosition;
}

/// <inheritdoc/>
public void Dispose()
{
_stream.Dispose();
if (Stream is OnDemandDisposableStream onDemandDisposableStream)
onDemandDisposableStream.ForceClose();
else
Stream.Dispose();
}
}
}
Loading