Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions FiloContainer.slnx
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<Solution>
<Folder Name="/app/">
<Project Path="app/FiloExplorer/FiloExplorer.csproj" Id="0865122a-f7f0-47d8-bf64-05f6426ae4fb">
<Platform Project="x64" />
<Deploy />
</Project>
</Folder>
<Folder Name="/src/">
<Project Path="src/Filo/Filo.csproj" />
</Folder>
Expand Down
16 changes: 16 additions & 0 deletions app/FiloExplorer/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Application
x:Class="FiloExplorer.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:FiloExplorer">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
<!-- Other merged dictionaries here -->
</ResourceDictionary.MergedDictionaries>
<!-- Other app resources here -->
</ResourceDictionary>
</Application.Resources>
</Application>
36 changes: 36 additions & 0 deletions app/FiloExplorer/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using Microsoft.UI.Xaml;
using Microsoft.Windows.AppNotifications;
using System;


namespace FiloExplorer;

/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
public partial class App : Application
{
private Window? _window;
public static IServiceProvider Services { get; private set; } = null!;

/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public App()
{
InitializeComponent();
}

/// <summary>
/// Invoked when the application is launched.
/// </summary>
/// <param name="args">Details about the launch request and process.</param>
protected override void OnLaunched(LaunchActivatedEventArgs args)
{
_window = new MainWindow();
_window.Activate();

AppNotificationManager.Default.Register();
}
}
Binary file added app/FiloExplorer/Assets/AppIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/FiloExplorer/Assets/AppLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/FiloExplorer/Assets/LargeTile.scale-100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/FiloExplorer/Assets/LargeTile.scale-125.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/FiloExplorer/Assets/LargeTile.scale-150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/FiloExplorer/Assets/LargeTile.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/FiloExplorer/Assets/LargeTile.scale-400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/FiloExplorer/Assets/LockScreenLogo.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/FiloExplorer/Assets/Remove text from lay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/FiloExplorer/Assets/SmallTile.scale-100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/FiloExplorer/Assets/SmallTile.scale-125.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/FiloExplorer/Assets/SmallTile.scale-150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/FiloExplorer/Assets/SmallTile.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/FiloExplorer/Assets/SmallTile.scale-400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/FiloExplorer/Assets/StoreLogo.backup.png
Binary file added app/FiloExplorer/Assets/StoreLogo.scale-100.png
Binary file added app/FiloExplorer/Assets/StoreLogo.scale-125.png
Binary file added app/FiloExplorer/Assets/StoreLogo.scale-150.png
Binary file added app/FiloExplorer/Assets/StoreLogo.scale-200.png
Binary file added app/FiloExplorer/Assets/StoreLogo.scale-400.png
Binary file added app/FiloExplorer/Assets/folder.png
Binary file added app/FiloExplorer/Assets/icon.png
Binary file added app/FiloExplorer/Assets/iconfilo.png
97 changes: 97 additions & 0 deletions app/FiloExplorer/FiloExplorer.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net10.0-windows10.0.22000.0</TargetFramework>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<RootNamespace>FiloExplorer</RootNamespace>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Platforms>x64</Platforms>
<RuntimeIdentifiers>win-x64</RuntimeIdentifiers>
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
<UseWinUI>true</UseWinUI>
<WinUISDKReferences>false</WinUISDKReferences>
<EnableMsixTooling>true</EnableMsixTooling>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Content Remove="Assets\folder.png" />
<Content Remove="Assets\iconfilo.png" />
<Content Remove="Assets\Remove text from lay.png" />
</ItemGroup>
<ItemGroup>
<None Remove="Views\HelpPage.xaml" />
<None Remove="Views\MainPage.xaml" />
<None Remove="Views\NewPage.xaml" />
<None Remove="Views\ViewPage.xaml" />
</ItemGroup>
<ItemGroup>
<Content Include="Assets\SplashScreen.scale-200.png" />
<Content Include="Assets\LockScreenLogo.scale-200.png" />
<Content Include="Assets\Square150x150Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
</ItemGroup>
<ItemGroup>
<Manifest Include="$(ApplicationManifest)" />
</ItemGroup>
<!--
Defining the "Msix" ProjectCapability here allows the Single-project MSIX Packaging
Tools extension to be activated for this project even if the Windows App SDK Nuget
package has not yet been restored.
-->
<ItemGroup Condition="'$(DisableMsixProjectCapabilityAddedByProject)'!='true' and '$(EnableMsixTooling)'=='true'">
<ProjectCapability Include="Msix" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.2" />
<PackageReference Include="Filo" Version="1.1.0" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.7705" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.8.260317003" />
</ItemGroup>
<ItemGroup>
<Page Update="Views\HelpPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Page Update="Views\ViewPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Page Update="Views\NewPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Page Update="Views\MainPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<!--
Defining the "HasPackageAndPublishMenuAddedByProject" property here allows the Solution
Explorer "Package and Publish" context menu entry to be enabled for this project even if
the Windows App SDK Nuget package has not yet been restored.
-->
<PropertyGroup Condition="'$(DisableHasPackageAndPublishMenuAddedByProject)'!='true' and '$(EnableMsixTooling)'=='true'">
<HasPackageAndPublishMenu>true</HasPackageAndPublishMenu>
</PropertyGroup>
<!-- Publish Properties -->
<PropertyGroup>
<PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
<PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">True</PublishReadyToRun>
<PublishTrimmed Condition="'$(Configuration)' == 'Debug'">False</PublishTrimmed>
<PublishTrimmed Condition="'$(Configuration)' != 'Debug'">False</PublishTrimmed>
<PackageCertificateThumbprint>01ABAD0860577FBCDFD634C13DB67FAAA6AF155A</PackageCertificateThumbprint>
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
<GenerateAppInstallerFile>True</GenerateAppInstallerFile>
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
<GenerateTestArtifacts>True</GenerateTestArtifacts>
<AppxBundle>Always</AppxBundle>
<AppxBundlePlatforms>x64</AppxBundlePlatforms>
<AppInstallerUri>E:\source\FiloContainer\app\FiloExplorer\AppPackages\App</AppInstallerUri>
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
</PropertyGroup>
</Project>
52 changes: 52 additions & 0 deletions app/FiloExplorer/Helpers/MimeHelper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
using System;
using System.Collections.Generic;
using System.IO;

namespace FiloExplorer.Helpers;

public static class MimeHelper
{
private static readonly Dictionary<string, string> _map = new(StringComparer.OrdinalIgnoreCase)
{
// Images
[".jpg"] = "image/jpeg",
[".jpeg"] = "image/jpeg",
[".png"] = "image/png",
[".gif"] = "image/gif",
[".bmp"] = "image/bmp",
[".webp"] = "image/webp",

// Video
[".mp4"] = "video/mp4",
[".mkv"] = "video/x-matroska",
[".webm"] = "video/webm",
[".avi"] = "video/x-msvideo",

// Audio
[".mp3"] = "audio/mpeg",
[".wav"] = "audio/wav",
[".aac"] = "audio/aac",
[".flac"] = "audio/flac",

// Text
[".txt"] = "text/plain",
[".json"] = "application/json",
[".xml"] = "application/xml",
[".html"] = "text/html",
[".css"] = "text/css",

// Other
[".pdf"] = "application/pdf",
[".zip"] = "application/zip",
};

public static string GetMimeType(string filePath)
{
var ext = Path.GetExtension(filePath);

if (!string.IsNullOrEmpty(ext) && _map.TryGetValue(ext, out var mime))
return mime;

return "application/octet-stream"; // fallback
}
}
87 changes: 87 additions & 0 deletions app/FiloExplorer/Helpers/MsgHelper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.Windows.AppNotifications;
using Microsoft.Windows.AppNotifications.Builder;
using System;
using System.Threading.Tasks;

namespace FiloExplorer.Helpers;

public static class MsgHelper
{
public static async Task ShowMessageDialogAsync(string title, string message, XamlRoot xamlRoot)
{
var dialog = new ContentDialog
{
Title = title,
Content = message,
CloseButtonText = "OK",
XamlRoot = xamlRoot,
};

await dialog.ShowAsync();
}

public static async Task<bool> ShowConfirmationDialogAsync(string title, string message, XamlRoot xamlRoot)
{
var dialog = new ContentDialog
{
Title = title,
Content = message,
PrimaryButtonText = "Yes",
SecondaryButtonText = "No",
DefaultButton = ContentDialogButton.Primary,
XamlRoot = xamlRoot
};
var result = await dialog.ShowAsync();
return result == ContentDialogResult.Primary;
}

public static async Task<string?> ShowPasswordDialogAsync(XamlRoot xamlRoot)
{
var passwordBox = new PasswordBox
{
PlaceholderText = "Enter container password",
Width = 320,
Margin = new Thickness(0, 12, 0, 0)
};

var content = new StackPanel
{
Spacing = 8,
Children =
{
new TextBlock
{
Text = "This container is encrypted with AES-256.\nPlease enter the correct password to unlock it.",
TextWrapping = TextWrapping.Wrap,
Margin = new Thickness(0, 0, 0, 8)
},
passwordBox
}
};

var dialog = new ContentDialog
{
Title = "Encrypted Filo Container",
Content = content,
PrimaryButtonText = "Unlock",
SecondaryButtonText = "Cancel",
DefaultButton = ContentDialogButton.Primary,
XamlRoot = xamlRoot
};

var result = await dialog.ShowAsync();
return result == ContentDialogResult.Primary ? passwordBox.Password?.Trim() : null;
}

public static void ShowToast(string title, string message)
{
var content = new AppNotificationBuilder()
.AddText(title)
.AddText(message)
.BuildNotification();

AppNotificationManager.Default.Show(content);
}
}
Loading
Loading