Skip to content

Commit 300cd54

Browse files
committed
Merge branch 'develop'
2 parents a6dfc2f + 6004b42 commit 300cd54

File tree

260 files changed

+5757
-6417
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

260 files changed

+5757
-6417
lines changed

.DS_Store

0 Bytes
Binary file not shown.

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- name: Setup Dotnet Environment
4444
uses: actions/setup-dotnet@v3
4545
with:
46-
dotnet-version: '8.0.100'
46+
dotnet-version: '9.0.101'
4747

4848
- name: Install WASM-Tools
4949
run: dotnet workload install wasm-tools

.github/workflows/damselfly-actions.yml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,25 +41,24 @@ jobs:
4141
run: sh scripts/makedesktop.sh ${{ matrix.target }}
4242

4343
- name: Upload desktop builds for Docker build
44-
uses: actions/upload-artifact@v3
44+
uses: actions/upload-artifact@v4
4545
with:
46-
name: Desktop-Dist
46+
name: Desktop-Dist-${{ matrix.target }}
4747
path: Damselfly.Web.Client/wwwroot/desktop/*.*
4848
retention-days: 5
4949

5050
build-server:
5151
runs-on: ${{ matrix.os }}
5252
strategy:
5353
matrix:
54-
# FIX Package restore for MacOS
55-
target: [windows, linux]
54+
target: [windows, linux, mac]
5655
include:
5756
- target: windows
5857
os: ubuntu-latest
5958
- target: linux
6059
os: ubuntu-latest
61-
# - target: mac
62-
# os: macos-latest
60+
- target: mac
61+
os: macos-latest
6362

6463
steps:
6564
- name: Clone Repository (latest)
@@ -75,7 +74,7 @@ jobs:
7574
- name: Setup Dotnet Environment
7675
uses: actions/setup-dotnet@v3
7776
with:
78-
dotnet-version: '8.0.100'
77+
dotnet-version: '9.0.101'
7978

8079
- name: Install WASM-Tools
8180
run: dotnet workload install wasm-tools
@@ -84,9 +83,9 @@ jobs:
8483
run: sh scripts/makeserver.sh ${{ matrix.target }}
8584

8685
- name: Upload server builds to artifacts
87-
uses: actions/upload-artifact@v3
86+
uses: actions/upload-artifact@v4
8887
with:
89-
name: Server-Dist
88+
name: Server-Dist-${{ matrix.target }}
9089
path: server/*.zip
9190
retention-days: 5
9291

@@ -116,9 +115,9 @@ jobs:
116115
run: echo "::set-output name=version::$(cat VERSION)"
117116

118117
- name: Download Server Build
119-
uses: actions/download-artifact@v2
118+
uses: actions/download-artifact@v4
120119
with:
121-
name: Server-Dist
120+
name: Server-Dist-${{ matrix.target }}
122121
path: server
123122

124123
- name: Unzip server into publish folder
@@ -132,9 +131,9 @@ jobs:
132131
echo "Server artifacts:"
133132
ls server
134133
- name: Download Desktop Builds into wwwroot folder
135-
uses: actions/download-artifact@v2
134+
uses: actions/download-artifact@v4
136135
with:
137-
name: Desktop-Dist
136+
name: Desktop-Dist-${{ matrix.target }}
138137
path: publish/wwwroot/desktop
139138

140139
- name: Validate Desktop artifacts
@@ -177,14 +176,14 @@ jobs:
177176

178177
- name: Download Desktop Artifacts
179178
if: github.ref == 'refs/heads/master'
180-
uses: actions/download-artifact@v3
179+
uses: actions/download-artifact@v4
181180
with:
182181
name: Desktop-Dist
183182
path: Damselfly.Web.Client/wwwroot/desktop
184183

185184
- name: Download Server Artifacts
186185
if: github.ref == 'refs/heads/master'
187-
uses: actions/download-artifact@v3
186+
uses: actions/download-artifact@v4
188187
with:
189188
name: Server-Dist
190189
path: server

Damselfly.Core.Constants/ConfigSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ public class ConfigSettings
44
{
55
public const bool DefaultEnableRolesAndAuth = true;
66

7-
public const string ThumbSize = "ThumbSize";
7+
public const string GridImageSize = "GridImageSize";
88
public const string RecentTags = "RecentTags";
99
public const string LoadedImages = "LoadedImages";
1010
public const string Theme = "Theme";
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace Damselfly.Core.Constants;
2+
3+
public enum GridImageSize
4+
{
5+
Large = 1,
6+
Medium = 2,
7+
Small = 3,
8+
Mini = 4
9+
}

Damselfly.Core.Constants/SearchTypes.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-

2-
namespace Damselfly.Core.Constants;
1+
namespace Damselfly.Core.Constants;
32

43
public enum SortOrderType
54
{
@@ -28,5 +27,4 @@ public enum OrientationType
2827
Portrait,
2928
Panorama,
3029
Square
31-
}
32-
30+
}

Damselfly.Core.Constants/TaskTypes.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
23
namespace Damselfly.Core.Constants;
34

45
public enum TaskType
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
using System;
2+
23
namespace Damselfly.Core.Constants;
3-
4+
45
public static class ZoomRange
56
{
67
public static int Minimum { get; } = 1;
78
public static int Maximum { get; } = 8;
8-
public static double ZoomStep { get;} = 0.2;
9-
}
10-
9+
public static double ZoomStep { get; } = 0.2;
10+
}

Damselfly.Core.DbModels/AuthorisationRegistration.cs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ namespace Damselfly.Core.DbModels;
1212

1313
public static class AuthorisationRegistration
1414
{
15-
private static bool IsAdminOrNoUsers( AuthorizationHandlerContext context, UserManager<AppIdentityUser> userManager )
15+
private static bool IsAdminOrNoUsers( AuthorizationHandlerContext context,
16+
UserManager<AppIdentityUser> userManager )
1617
{
17-
if (context.User != null && context.User.IsInRole(RoleDefinitions.s_AdminRole) )
18+
if ( context.User != null && context.User.IsInRole(RoleDefinitions.s_AdminRole) )
1819
return true;
1920

2021
// No logged in users. See if there are any users. If not, we allow it
21-
if (userManager != null && !userManager.Users.Any())
22+
if ( userManager != null && !userManager.Users.Any() )
2223
return true;
2324

2425
return false;
@@ -36,7 +37,7 @@ public static void SetupPolicies(this AuthorizationOptions config, IServiceColle
3637
var userManager = serviceProvider.GetService<UserManager<AppIdentityUser>>();
3738
var logger = serviceProvider.GetService<ILogger<AuthorizationOptions>>();
3839
var enablePolicies = configService!.GetBool(ConfigSettings.EnablePoliciesAndRoles,
39-
ConfigSettings.DefaultEnableRolesAndAuth);
40+
ConfigSettings.DefaultEnableRolesAndAuth);
4041

4142

4243
if ( enablePolicies )
@@ -52,13 +53,13 @@ public static void SetupPolicies(this AuthorizationOptions config, IServiceColle
5253

5354
// Users and Admins can edit content (keywords)
5455
config.AddPolicy(PolicyDefinitions.s_IsEditor, policy => policy.RequireRole(
55-
RoleDefinitions.s_AdminRole,
56-
RoleDefinitions.s_UserRole));
56+
RoleDefinitions.s_AdminRole,
57+
RoleDefinitions.s_UserRole));
5758

5859
// Special role for the user Admin page - only accessible if the current user
5960
// is an admin or there are no users defined at all.
6061
config.AddPolicy(PolicyDefinitions.s_IsAdminOrNoUsers, policy => policy.RequireAssertion(
61-
context => IsAdminOrNoUsers( context, userManager )));
62+
context => IsAdminOrNoUsers( context, userManager )));
6263

6364
// Admins, Users and ReadOnly users can download
6465
config.AddPolicy(PolicyDefinitions.s_IsDownloader, policy => policy.RequireRole(

Damselfly.Core.DbModels/Damselfly.Core.DbModels.csproj

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="Microsoft.EntityFrameworkCore" />
9-
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" />
10-
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" />
8+
<PackageReference Include="Microsoft.EntityFrameworkCore"/>
9+
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite"/>
10+
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies"/>
1111
<PackageReference Include="Microsoft.EntityFrameworkCore.Design">
1212
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1313
<PrivateAssets>all</PrivateAssets>
@@ -16,35 +16,35 @@
1616
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1717
<PrivateAssets>all</PrivateAssets>
1818
</PackageReference>
19-
<PackageReference Include="Microsoft.Extensions.Logging.Console" />
20-
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" />
21-
<PackageReference Include="FluentValidation" />
22-
<PackageReference Include="Microsoft.AspNetCore.Authorization" />
19+
<PackageReference Include="Microsoft.Extensions.Logging.Console"/>
20+
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore"/>
21+
<PackageReference Include="FluentValidation"/>
22+
<PackageReference Include="Microsoft.AspNetCore.Authorization"/>
2323
</ItemGroup>
2424

2525
<ItemGroup>
26-
<Folder Include="Authentication\" />
27-
<Folder Include="Utils\" />
28-
<Folder Include="Models\" />
29-
<Folder Include="Models\SideCars\" />
30-
<Folder Include="Images\" />
31-
<Folder Include="Models\ConfigSettings\" />
32-
<Folder Include="Models\TransformationModels\" />
26+
<Folder Include="Authentication\"/>
27+
<Folder Include="Utils\"/>
28+
<Folder Include="Models\"/>
29+
<Folder Include="Models\SideCars\"/>
30+
<Folder Include="Images\"/>
31+
<Folder Include="Models\ConfigSettings\"/>
32+
<Folder Include="Models\TransformationModels\"/>
3333
</ItemGroup>
3434
<ItemGroup>
35-
<ProjectReference Include="..\Damselfly.Core.Utils\Damselfly.Core.Utils.csproj" />
36-
<ProjectReference Include="..\Damselfly.Core.Interfaces\Damselfly.Core.Interfaces.csproj" />
37-
<ProjectReference Include="..\Damselfly.Shared.Utils\Damselfly.Shared.Utils.csproj" />
35+
<ProjectReference Include="..\Damselfly.Core.Utils\Damselfly.Core.Utils.csproj"/>
36+
<ProjectReference Include="..\Damselfly.Core.Interfaces\Damselfly.Core.Interfaces.csproj"/>
37+
<ProjectReference Include="..\Damselfly.Shared.Utils\Damselfly.Shared.Utils.csproj"/>
3838
</ItemGroup>
3939
<ItemGroup>
40-
<None Remove="Microsoft.AspNetCore.Identity.EntityFrameworkCore" />
41-
<None Remove="Models\" />
42-
<None Remove="Models\SideCars\" />
43-
<None Remove="FluentValidation" />
44-
<None Remove="Images\" />
45-
<None Remove="Microsoft.AspNetCore.Authorization" />
46-
<None Remove="Models\API Models\" />
47-
<None Remove="Models\ConfigSettings\" />
48-
<None Remove="Models\TransformationModels\" />
40+
<None Remove="Microsoft.AspNetCore.Identity.EntityFrameworkCore"/>
41+
<None Remove="Models\"/>
42+
<None Remove="Models\SideCars\"/>
43+
<None Remove="FluentValidation"/>
44+
<None Remove="Images\"/>
45+
<None Remove="Microsoft.AspNetCore.Authorization"/>
46+
<None Remove="Models\API Models\"/>
47+
<None Remove="Models\ConfigSettings\"/>
48+
<None Remove="Models\TransformationModels\"/>
4949
</ItemGroup>
5050
</Project>

0 commit comments

Comments
 (0)