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
33 changes: 0 additions & 33 deletions Files.sln
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Files.Shared", "src\Files.S
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Files.App.Storage", "src\Files.App.Storage\Files.App.Storage.csproj", "{B8051E11-5BF2-49F7-A7C8-E3820DBB8209}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Files.Core", "src\Files.Core\Files.Core.csproj", "{74704E22-9A09-4675-AE35-7896DE81EC4A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Files.Core.Storage", "src\Files.Core.Storage\Files.Core.Storage.csproj", "{53371D77-7AC1-4975-9A2A-5E0EB0B37CE3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Files.App.BackgroundTasks", "src\Files.App.BackgroundTasks\Files.App.BackgroundTasks.csproj", "{BB1DA0B0-4E5B-4336-961E-DF389482C094}"
Expand Down Expand Up @@ -116,36 +114,6 @@ Global
{B8051E11-5BF2-49F7-A7C8-E3820DBB8209}.Store|x64.Build.0 = Store|x64
{B8051E11-5BF2-49F7-A7C8-E3820DBB8209}.Store|x86.ActiveCfg = Store|x86
{B8051E11-5BF2-49F7-A7C8-E3820DBB8209}.Store|x86.Build.0 = Store|x86
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Debug|arm64.ActiveCfg = Debug|arm64
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Debug|arm64.Build.0 = Debug|arm64
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Debug|x64.ActiveCfg = Debug|x64
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Debug|x64.Build.0 = Debug|x64
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Debug|x86.ActiveCfg = Debug|x86
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Debug|x86.Build.0 = Debug|x86
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Preview|arm64.ActiveCfg = Preview|arm64
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Preview|arm64.Build.0 = Preview|arm64
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Preview|x64.ActiveCfg = Preview|x64
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Preview|x64.Build.0 = Preview|x64
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Preview|x86.ActiveCfg = Preview|x86
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Preview|x86.Build.0 = Preview|x86
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Release|arm64.ActiveCfg = Release|arm64
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Release|arm64.Build.0 = Release|arm64
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Release|x64.ActiveCfg = Release|x64
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Release|x64.Build.0 = Release|x64
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Release|x86.ActiveCfg = Release|x86
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Release|x86.Build.0 = Release|x86
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Stable|arm64.ActiveCfg = Stable|arm64
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Stable|arm64.Build.0 = Stable|arm64
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Stable|x64.ActiveCfg = Stable|x64
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Stable|x64.Build.0 = Stable|x64
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Stable|x86.ActiveCfg = Stable|x86
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Stable|x86.Build.0 = Stable|x86
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Store|arm64.ActiveCfg = Store|arm64
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Store|arm64.Build.0 = Store|arm64
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Store|x64.ActiveCfg = Store|x64
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Store|x64.Build.0 = Store|x64
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Store|x86.ActiveCfg = Store|x86
{74704E22-9A09-4675-AE35-7896DE81EC4A}.Store|x86.Build.0 = Store|x86
{53371D77-7AC1-4975-9A2A-5E0EB0B37CE3}.Debug|arm64.ActiveCfg = Debug|arm64
{53371D77-7AC1-4975-9A2A-5E0EB0B37CE3}.Debug|arm64.Build.0 = Debug|arm64
{53371D77-7AC1-4975-9A2A-5E0EB0B37CE3}.Debug|x64.ActiveCfg = Debug|x64
Expand Down Expand Up @@ -452,7 +420,6 @@ Global
{9F36C2AD-005D-4EA5-A1F1-6BC42773FC85} = {A74DCE98-A744-4D71-A2B1-7EE4FED0936B}
{94F77692-D47C-48D8-A1A7-645192EF38A4} = {9F36C2AD-005D-4EA5-A1F1-6BC42773FC85}
{B8051E11-5BF2-49F7-A7C8-E3820DBB8209} = {A188C26B-E731-4E0B-9D17-D21CEBD9B43F}
{74704E22-9A09-4675-AE35-7896DE81EC4A} = {9F36C2AD-005D-4EA5-A1F1-6BC42773FC85}
{53371D77-7AC1-4975-9A2A-5E0EB0B37CE3} = {9F36C2AD-005D-4EA5-A1F1-6BC42773FC85}
{BB1DA0B0-4E5B-4336-961E-DF389482C094} = {A188C26B-E731-4E0B-9D17-D21CEBD9B43F}
{4ED01D20-8529-4DEF-8C1B-4E31031AE7E0} = {481DE2EA-E6CE-4A9C-A220-3B543B95AAA1}
Expand Down
9 changes: 9 additions & 0 deletions src/Files.App (Package)/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,15 @@
<Path>Files.App.Server\Files.App.Server.exe</Path>
<Instancing>singleInstance</Instancing>
<ActivatableClass ActivatableClassId="Files.App.Server.AppInstanceMonitor" />
<ActivatableClass ActivatableClassId="Files.App.Server.Database.FileTagsDatabase" />
<ActivatableClass ActivatableClassId="Files.App.Server.Database.LayoutPreferencesDatabase" />
<ActivatableClass ActivatableClassId="Files.App.Server.Database.LayoutPreferencesFilterPredicate" />
<ActivatableClass ActivatableClassId="Files.App.Server.Database.LayoutPreferencesUpdateAction" />
<ActivatableClass ActivatableClassId="Files.App.Server.Data.ColumnPreferences" />
<ActivatableClass ActivatableClassId="Files.App.Server.Data.ColumnPreferencesItem" />
<ActivatableClass ActivatableClassId="Files.App.Server.Data.TaggedFile" />
<ActivatableClass ActivatableClassId="Files.App.Server.Data.LayoutPreferences" />
<ActivatableClass ActivatableClassId="Files.App.Server.Data.LayoutPreferencesItem" />
</OutOfProcessServer>
</Extension>
</Extensions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.4" />
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.7" />
</ItemGroup>

</Project>
14 changes: 8 additions & 6 deletions src/Files.App.Launcher/Files.App.Launcher.vcxproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2024 Files Community. Licensed under the MIT License. See the LICENSE. -->
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\Microsoft.Windows.CppWinRT.2.0.230706.1\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.230706.1\build\native\Microsoft.Windows.CppWinRT.props')" />
<Import Project="..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|arm64">
<Configuration>Debug</Configuration>
Expand Down Expand Up @@ -321,21 +321,23 @@
<ClCompile Include="FilesLauncher.cpp" />
<ClCompile Include="OpenInFolder.cpp" />
<ClInclude Include="OpenInFolder.h" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.231028.1\build\native\Microsoft.Windows.ImplementationLibrary.targets" Condition="Exists('..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.231028.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" />
<Import Project="..\..\packages\Microsoft.Windows.CppWinRT.2.0.230706.1\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.230706.1\build\native\Microsoft.Windows.CppWinRT.targets')" />
<Import Project="..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets')" />
<Import Project="..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.240122.1\build\native\Microsoft.Windows.ImplementationLibrary.targets" Condition="Exists('..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.240122.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references a NuGet package that is not on this computer. To download those packages, use Restore NuGet Packages. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.231028.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.231028.1\build\native\Microsoft.Windows.ImplementationLibrary.targets'))" />
<Error Condition="!Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.230706.1\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.CppWinRT.2.0.230706.1\build\native\Microsoft.Windows.CppWinRT.props'))" />
<Error Condition="!Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.230706.1\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.CppWinRT.2.0.230706.1\build\native\Microsoft.Windows.CppWinRT.targets'))" />
<Error Condition="!Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props'))" />
<Error Condition="!Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets'))" />
<Error Condition="!Exists('..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.240122.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.240122.1\build\native\Microsoft.Windows.ImplementationLibrary.targets'))" />
</Target>
</Project>
4 changes: 2 additions & 2 deletions src/Files.App.Launcher/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.231028.1" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.240111.5" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.240122.1" targetFramework="native" />
</packages>
5 changes: 4 additions & 1 deletion src/Files.App.Server/AppInstanceMonitor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
using System.Diagnostics;
// Copyright (c) 2024 Files Community
// Licensed under the MIT License. See the LICENSE.

using System.Diagnostics;

namespace Files.App.Server;

Expand Down
24 changes: 24 additions & 0 deletions src/Files.App.Server/Data/ColumnPreferences.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright (c) 2024 Files Community
// Licensed under the MIT License. See the LICENSE.

namespace Files.App.Server.Data
{
public sealed class ColumnPreferences
{
public ColumnPreferencesItem GitStatusColumn { get; set; } = new();
public ColumnPreferencesItem GitLastCommitDateColumn { get; set; } = new();
public ColumnPreferencesItem GitLastCommitMessageColumn { get; set; } = new();
public ColumnPreferencesItem GitCommitAuthorColumn { get; set; } = new();
public ColumnPreferencesItem GitLastCommitShaColumn { get; set; } = new();
public ColumnPreferencesItem TagColumn { get; set; } = new();
public ColumnPreferencesItem NameColumn { get; set; } = new();
public ColumnPreferencesItem StatusColumn { get; set; } = new();
public ColumnPreferencesItem DateModifiedColumn { get; set; } = new();
public ColumnPreferencesItem PathColumn { get; set; } = new();
public ColumnPreferencesItem OriginalPathColumn { get; set; } = new();
public ColumnPreferencesItem ItemTypeColumn { get; set; } = new();
public ColumnPreferencesItem DateDeletedColumn { get; set; } = new();
public ColumnPreferencesItem DateCreatedColumn { get; set; } = new();
public ColumnPreferencesItem SizeColumn { get; set; } = new();
}
}
12 changes: 12 additions & 0 deletions src/Files.App.Server/Data/ColumnPreferencesItem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (c) 2024 Files Community
// Licensed under the MIT License. See the LICENSE.

namespace Files.App.Server.Data
{
public sealed class ColumnPreferencesItem
{
public double UserLengthPixels { get; set; }
public double NormalMaxLength { get; set; } = 800;
public bool UserCollapsed { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2024 Files Community
// Licensed under the MIT License. See the LICENSE.

namespace Files.Core.Data.Enums
namespace Files.App.Server.Data.Enums
{
public enum FolderLayoutModes
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright (c) 2024 Files Community
// Licensed under the MIT License. See the LICENSE.

namespace Files.Core.Data.Enums
namespace Files.App.Server.Data.Enums
{
public enum GroupByDateUnit : byte
public enum GroupByDateUnit
{
/// <summary>
/// Group items by year.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,75 +1,75 @@
// Copyright (c) 2024 Files Community
// Licensed under the MIT License. See the LICENSE.

namespace Files.Core.Data.Enums
namespace Files.App.Server.Data.Enums
{
public enum GroupOption : byte
public enum GroupOption
{
/// <summary>
/// No grouping.
/// </summary>
None,
None = 0,

/// <summary>
/// Group by name
/// </summary>
Name,
Name = 1,

/// <summary>
/// Group by date modified.
/// </summary>
DateModified,
DateModified = 2,

/// <summary>
/// Group by date created.
/// </summary>
DateCreated,
DateCreated = 3,

/// <summary>
/// Group by size.
/// </summary>
Size,
Size = 4,

/// <summary>
/// Group by file type.
/// </summary>
FileType,
FileType = 5,

/// <summary>
/// Group by sync status.
/// </summary>
/// <remarks>
/// Preserved for cloud drives.
/// </remarks>
SyncStatus,
SyncStatus = 6,

/// <summary>
/// Group by file tags.
/// </summary>
FileTag,
FileTag = 7,

/// <summary>
/// Group by original folder.
/// </summary>
/// <remarks>
/// Preserved for recycle bin.
/// </remarks>
OriginalFolder,
OriginalFolder = 8,

/// <summary>
/// Group by date deleted.
/// </summary>
/// <remarks>
/// Preserved for recycle bin.
/// </remarks>
DateDeleted,
DateDeleted = 9,

/// <summary>
/// Group by folder path.
/// </summary>
/// <remarks>
/// Preserved for libraries.
/// </remarks>
FolderPath,
FolderPath = 10,
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Copyright (c) 2024 Files Community
// Licensed under the MIT License. See the LICENSE.

namespace Files.Core.Data.Enums
namespace Files.App.Server.Data.Enums
{
/// <summary>
/// SortDirection is used instead of the CommunityToolkit equivalent because it is tied to the model
/// </summary>
public enum SortDirection : byte
public enum SortDirection
{
/// <summary>
/// Sort in ascending order.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,70 +1,70 @@
// Copyright (c) 2024 Files Community
// Licensed under the MIT License. See the LICENSE.

namespace Files.Core.Data.Enums
namespace Files.App.Server.Data.Enums
{
public enum SortOption : byte
public enum SortOption
{
/// <summary>
/// Sort by name.
/// </summary>
Name,
Name = 0,

/// <summary>
/// Sort by date modified.
/// </summary>
DateModified,
DateModified = 1,

/// <summary>
/// Sort by date created.
/// </summary>
DateCreated,
DateCreated = 2,

/// <summary>
/// Sort by size.
/// </summary>
Size,
Size = 3,

/// <summary>
/// Sort by file type.
/// </summary>
FileType,
FileType = 4,

/// <summary>
/// Sort by sync status.
/// </summary>
/// <remarks>
/// Reserved for cloud drives.
/// </remarks>
SyncStatus,
SyncStatus = 5,

/// <summary>
/// Sort by file tags.
/// </summary>
FileTag,
FileTag = 6,

/// <summary>
/// Sort by original folder.
/// </summary>
/// <remarks>
/// Preserved for recycle bin.
/// </remarks>
OriginalFolder,
OriginalFolder = 7,

/// <summary>
/// Sort by date deleted.
/// </summary>
/// <remarks>
/// Preserved for recycle bin.
/// </remarks>
DateDeleted,
DateDeleted = 8,

/// <summary>
/// Sort by path.
/// </summary>
/// <remarks>
/// Preserved for search results.
/// </remarks>
Path
Path = 9
}
}
17 changes: 17 additions & 0 deletions src/Files.App.Server/Data/LayoutPreferences.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (c) 2024 Files Community
// Licensed under the MIT License. See the LICENSE.

using LiteDB;

namespace Files.App.Server.Data
{
public sealed class LayoutPreferences
{
[BsonId]
public int Id { get; set; }
public ulong? Frn { get; set; }
public string FilePath { get; set; } = string.Empty;

public LayoutPreferencesItem LayoutPreferencesManager { get; set; } = new();
}
}
Loading