Adding masonry cover images to login page
- Added new public api: /api/Image/random-series-cover - Updated login bg color to black - If no cover images, use the default library background (for new installs) - Added a cover masonry component - updated the splash container
This commit is contained in:
parent
5c5b0df814
commit
28c968ac4d
10 changed files with 322 additions and 15 deletions
|
|
@ -344,4 +344,22 @@ public class ImageController : BaseApiController
|
|||
|
||||
return PhysicalFile(path, MimeTypeMap.GetMimeType(format), _directoryService.FileSystem.Path.GetFileName(path));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns cover image for a random Series
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("random-series-cover")]
|
||||
public async Task<ActionResult> GetRandomSeriesCoverImage()
|
||||
{
|
||||
var path = Path.Join(_directoryService.CoverImageDirectory, await _unitOfWork.SeriesRepository.GetRandomSeriesCoverImageAsync());
|
||||
if (string.IsNullOrEmpty(path) || !_directoryService.FileSystem.File.Exists(path)) return BadRequest("No cover image found");
|
||||
var format = _directoryService.FileSystem.Path.GetExtension(path);
|
||||
|
||||
Response.Headers.Add("Cache-Control", "no-cache, no-store, must-revalidate");
|
||||
Response.Headers.Add("Pragma", "no-cache");
|
||||
Response.Headers.Add("Expires", "0");
|
||||
|
||||
return PhysicalFile(path, MimeTypeMap.GetMimeType(format), _directoryService.FileSystem.Path.GetFileName(path));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue