- Create ImagePreview.razor component with self-contained url generation, keyboard handling, and download - Add Filename to AssetPreviewDto and AlbumAssetPreviewDto DTOs - Update AssetsMapper and AlbumMapper to populate FileName - Remove duplicate preview overlay HTML/CSS/code from Home.razor and AlbumDetail.razor - Fix AssetDto.FileName hiding inherited member from AssetPreviewDto
51 lines
1.7 KiB
C#
51 lines
1.7 KiB
C#
using Butter.Dtos.User;
|
|
using Butter.Types;
|
|
|
|
namespace Butter.Dtos.Asset;
|
|
|
|
/// <summary>
|
|
/// Represents the full information needed to display an asset on a detail page.
|
|
/// </summary>
|
|
public class AssetDto : AssetPreviewDto {
|
|
/// <summary>
|
|
/// Gets or sets the type of the asset (e.g., Image, Video).
|
|
/// </summary>
|
|
public EAssetType AssetType { get; set; }
|
|
/// <summary>
|
|
/// Gets or sets whether the asset is publicly shared.
|
|
/// </summary>
|
|
public bool IsPublic { get; set; }
|
|
/// <summary>
|
|
/// Gets or sets the owner of the asset.
|
|
/// </summary>
|
|
public required UserInfoDto Owner { get; set; }
|
|
/// <summary>
|
|
/// Gets or sets the creation date of the asset.
|
|
/// </summary>
|
|
public DateTime CreatedAt { get; set; }
|
|
/// <summary>
|
|
/// Gets or sets the last updated date of the asset.
|
|
/// </summary>
|
|
public DateTime? UpdatedAt { get; set; }
|
|
/// <summary>
|
|
/// Gets or sets the deletion date of the asset.
|
|
/// </summary>
|
|
public DateTime? DeletedAt { get; set; }
|
|
/// <summary>
|
|
/// Gets or sets the MIME type of the asset.
|
|
/// </summary>
|
|
public new string MimeType { get; set; } = string.Empty;
|
|
/// <summary>
|
|
/// Gets or sets the file size of the asset in bytes.
|
|
/// </summary>
|
|
public long FileSize { get; set; }
|
|
/// <summary>
|
|
/// Gets or sets the duration of the asset in seconds (for video/audio).
|
|
/// </summary>
|
|
public float Duration { get; set; }
|
|
/// <summary>
|
|
/// Gets or sets the frame rate of the asset (for video).
|
|
/// </summary>
|
|
public float FrameRate { get; set; }
|
|
}
|