MediaEditPage - photos management panel added

This commit is contained in:
2024-09-27 01:05:06 +02:00
Unverified
parent d02207a335
commit b56261b672
18 changed files with 403 additions and 19 deletions

View File

@@ -1,9 +1,26 @@
using System.Diagnostics.CodeAnalysis;
using WatchIt.Database.Model.Media;
namespace WatchIt.Common.Model.Photos;
public class PhotoBackgroundDataRequest : PhotoBackgroundData
{
#region CONSTRUCTORS
public PhotoBackgroundDataRequest() {}
[SetsRequiredMembers]
public PhotoBackgroundDataRequest(PhotoBackgroundData photoBackgroundData)
{
IsUniversalBackground = photoBackgroundData.IsUniversalBackground;
FirstGradientColor = photoBackgroundData.FirstGradientColor;
SecondGradientColor = photoBackgroundData.SecondGradientColor;
}
#endregion
#region PUBLIC METHODS
public MediaPhotoImageBackground CreateMediaPhotoImageBackground(Guid photoId) => new MediaPhotoImageBackground

View File

@@ -38,7 +38,7 @@ public class PhotoQueryParameters : QueryParameters<PhotoResponse>
&&
TestBoolean(item.Background is not null, IsBackground)
&&
TestBoolean(item.Background!.IsUniversalBackground, IsUniversalBackground)
TestBoolean(item.Background is not null && item.Background.IsUniversalBackground, IsUniversalBackground)
&&
TestComparable(item.UploadDate, UploadDate, UploadDateFrom, UploadDateTo)
);