Reader Fixes and Enhancements (#880)

* Don't show an exception when bookmarking doesn't have anything to change.

* Cleaned up the bookmark code a bit.

* Implemented fullscreen mode in the web reader. Refactored User Settings to move Password and 3rd Party Clients to a tab rather than accordion. Removed color filters for web reader.

* Implemented fullscreen mode into book reader

* Added some code for toggling fullscreen which re-renders the screen to ensure the fitting works optimially

* Fixed an issue where moving from FitToScreen -> Split (L/R) wouldn't render the screen correctly due to canvas not being reset.

* Fixed bad optimization and scaling when drawing fit to screen

* Removed left/right highlights on page direction change in favor for icons. Double arrow will dictate the page change.

* Reduced overlay auto close time to 3 seconds

* Updated the paginging direction overlay to use icons and colors. Added a blur effect on menus

* Removed debug flags
This commit is contained in:
Joseph Milazzo 2022-01-02 18:10:37 -07:00 committed by GitHub
parent ca5c67020e
commit 720c52f494
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 1620 additions and 166 deletions

View file

@ -468,18 +468,15 @@ namespace API.Controllers
_unitOfWork.UserRepository.Update(user);
}
if (await _unitOfWork.CommitAsync())
{
return Ok();
}
await _unitOfWork.CommitAsync();
}
catch (Exception)
{
await _unitOfWork.RollbackAsync();
return BadRequest("Could not save bookmark");
}
return BadRequest("Could not save bookmark");
return Ok();
}
/// <summary>

View file

@ -169,7 +169,7 @@ namespace API.Controllers
_logger.LogInformation("Server Settings updated");
_taskScheduler.ScheduleTasks();
await _taskScheduler.ScheduleTasks();
return Ok(updateSettingsDto);
}

View file

@ -18,4 +18,4 @@ namespace API.DTOs
public ReadingDirection BookReaderReadingDirection { get; set; }
public bool SiteDarkMode { get; set; }
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,26 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace API.Data.Migrations
{
public partial class FullscreenPref : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "FullscreenMode",
table: "AppUserPreferences",
type: "INTEGER",
nullable: false,
defaultValue: 0);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "FullscreenMode",
table: "AppUserPreferences");
}
}
}

View file

@ -183,6 +183,9 @@ namespace API.Data.Migrations
b.Property<bool>("BookReaderTapToPaginate")
.HasColumnType("INTEGER");
b.Property<int>("FullscreenMode")
.HasColumnType("INTEGER");
b.Property<int>("PageSplitOption")
.HasColumnType("INTEGER");

View file

@ -514,7 +514,7 @@ public class SeriesRepository : ISeriesRepository
var retSeries = query.Where(s => s.AppUserId == userId
&& s.PagesRead > 0
&& s.PagesRead < s.Series.Pages)
.OrderByDescending(s => s.LastModified)
.OrderByDescending(s => s.LastModified) // TODO: This needs to be Chapter Created (Max)
.ThenByDescending(s => s.Series.LastModified)
.Select(s => s.Series)
.ProjectTo<SeriesDto>(_mapper.ConfigurationProvider)

View file

@ -4,10 +4,19 @@ namespace API.Entities.Enums
{
public enum LibraryType
{
/// <summary>
/// Uses Manga regex for filename parsing
/// </summary>
[Description("Manga")]
Manga = 0,
/// <summary>
/// Uses Comic regex for filename parsing
/// </summary>
[Description("Comic")]
Comic = 1,
/// <summary>
/// Uses Manga regex for filename parsing also uses epub metadata
/// </summary>
[Description("Book")]
Book = 2,
}