Skip to content

Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.

Custom Theme Support (#1077)

Joseph Milazzo568ea9fd3a41
diff --git a/.gitignore b/.gitignore
index 8bc302ff8..c8d68977f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -510,11 +510,13 @@ UI/Web/dist/
/API/config/backups/
/API/config/cache/
/API/config/temp/
+/API/config/themes/
/API/config/stats/
/API/config/bookmarks/
/API/config/kavita.db
/API/config/kavita.db-shm
/API/config/kavita.db-wal
+/API/config/kavita.db-journal
/API/config/Hangfire.db
/API/config/Hangfire-log.db
API/config/covers/
diff --git a/API.Tests/Services/SiteThemeServiceTests.cs b/API.Tests/Services/SiteThemeServiceTests.cs
new file mode 100644
index 000000000..a9198f26f
--- /dev/null
+++ b/API.Tests/Services/SiteThemeServiceTests.cs
@@ -0,0 +1,264 @@
+using System.Collections.Generic;
+using System.Data.Common;
+using System.IO.Abstractions.TestingHelpers;
+using System.Linq;
+using System.Threading.Tasks;
+using API.Data;
+using API.Entities;
+using API.Entities.Enums;
+using API.Entities.Enums.Theme;
+using API.Helpers;
+using API.Services;
+using API.Services.Tasks;
+using API.SignalR;
+using AutoMapper;
+using Kavita.Common;
+using Microsoft.AspNetCore.SignalR;
+using Microsoft.Data.Sqlite;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.Extensions.Logging;
+using NSubstitute;
+using Xunit;
+
+namespace API.Tests.Services;
+
+public class SiteThemeServiceTests
+{
+ private readonly ILogger<SiteThemeService> _logger = Substitute.For<ILogger<SiteThemeService>>();
+ private readonly IHubContext<MessageHub> _messageHub = Substitute.For<IHubContext<MessageHub>>();
+
+ private readonly DbConnection _connection;
+ private readonly DataContext _context;
+ private readonly IUnitOfWork _unitOfWork;
+
+ private const string CacheDirectory = "C:/kavita/config/cache/";
+ private const string CoverImageDirectory = "C:/kavita/config/covers/";
+ private const string BackupDirectory = "C:/kavita/config/backups/";
+ private const string BookmarkDirectory = "C:/kavita/config/bookmarks/";
+ private const string SiteThemeDirectory = "C:/kavita/config/themes/";
+
+ public SiteThemeServiceTests()
+ {
+ var contextOptions = new DbContextOptionsBuilder()
+ .UseSqlite(CreateInMemoryDatabase())
+ .Options;
+ _connection = RelationalOptionsExtension.Extract(contextOptions).Connection;
+
+ _context = new DataContext(contextOptions);
+ Task.Run(SeedDb).GetAwaiter().GetResult();
+
+ var config = new MapperConfiguration(cfg => cfg.AddProfile<AutoMapperProfiles>());
+ var mapper = config.CreateMapper();
+ _unitOfWork = new UnitOfWork(_context, mapper, null);
+ }
+
+ #region Setup
+
+ private static DbConnection CreateInMemoryDatabase()
+ {
+ var connection = new SqliteConnection("Filename=:memory:");
+
+ connection.Open();
+
+ return connection;
+ }
+
+ private async Task<bool> SeedDb()
+ {
+ await _context.Database.MigrateAsync();
+ var filesystem = CreateFileSystem();
+
+ await Seed.SeedSettings(_context, new DirectoryService(Substitute.For<ILogger<DirectoryService>>(), filesystem));
+
+ var setting = await _context.ServerSetting.Where(s => s.Key == ServerSettingKey.CacheDirectory).SingleAsync();
+ setting.Value = CacheDirectory;
+
+ setting = await _context.ServerSetting.Where(s => s.Key == ServerSettingKey.BackupDirectory).SingleAsync();
+ setting.Value = BackupDirectory;
+
+ setting = await _context.ServerSetting.Where(s => s.Key == ServerSettingKey.BookmarkDirectory).SingleAsync();
+ setting.Value = BookmarkDirectory;
+
+ _context.ServerSetting.Update(setting);
+
+ _context.AppUser.Add(new AppUser()
+ {
+ UserName = "Joe",
+ UserPreferences = new AppUserPreferences
+ {
+ Theme = Seed.DefaultThemes[1]
+ }
+ });
+
+ _context.Library.Add(new Library()
+ {
+ Name = "Manga",
+ Folders = new List<FolderPath>()
+ {
+ new FolderPath()
+ {
+ Path = "C:/data/"
+ }
+ }
+ });
+ return await _context.SaveChangesAsync() > 0;
+ }
+
+ private static MockFileSystem CreateFileSystem()
+ {
+ var fileSystem = new MockFileSystem();
+ fileSystem.Directory.SetCurrentDirectory("C:/kavita/");
+ fileSystem.AddDirectory("C:/kavita/config/");
+ fileSystem.AddDirectory(CacheDirectory);
+ fileSystem.AddDirectory(CoverImageDirectory);
+ fileSystem.AddDirectory(BackupDirectory);
+ fileSystem.AddDirectory(BookmarkDirectory);
+ fileSystem.AddDirectory(SiteThemeDirectory);
+ fileSystem.AddDirectory("C:/data/");
+
+ return fileSystem;
+ }
+
+ private async Task ResetDb()
+ {
+ _context.SiteTheme.RemoveRange(_context.SiteTheme);
+ await _context.SaveChangesAsync();
+ }
+
+ #endregion
+
+ [Fact]
+ public async Task Scan_ShouldFindCustomFile()
+ {
+ await ResetDb();
+ var filesystem = CreateFileSystem();
+ filesystem.AddFile($"{SiteThemeDirectory}custom.css", new MockFileData(""));
+ var ds = new DirectoryService(Substitute.For<ILogger<DirectoryService>>(), filesystem);
+ var siteThemeService = new SiteThemeService(ds, _unitOfWork, _messageHub);
+ await siteThemeService.Scan();
+
+ Assert.NotNull(await _unitOfWork.SiteThemeRepository.GetThemeDtoByName("custom"));
+ }
+
+ [Fact]
+ public async Task Scan_ShouldOnlyInsertOnceOnSecondScan()
+ {
+ await ResetDb();
+ var filesystem = CreateFileSystem();
+ filesystem.AddFile($"{SiteThemeDirectory}custom.css", new MockFileData(""));
+ var ds = new DirectoryService(Substitute.For<ILogger<DirectoryService>>(), filesystem);
+ var siteThemeService = new SiteThemeService(ds, _unitOfWork, _messageHub);
+ await siteThemeService.Scan();
+
+ Assert.NotNull(await _unitOfWork.SiteThemeRepository.GetThemeDtoByName("custom"));
+
+ await siteThemeService.Scan();
+
+ var customThemes = (await _unitOfWork.SiteThemeRepository.GetThemeDtos()).Where(t =>
+ API.Parser.Parser.Normalize(t.Name).Equals(API.Parser.Parser.Normalize("custom")));
+ Assert.Single(customThemes);
+ }
+
+ [Fact]
+ public async Task Scan_ShouldDeleteWhenFileDoesntExistOnSecondScan()
+ {
+ await ResetDb();
+ var filesystem = CreateFileSystem();
+ filesystem.AddFile($"{SiteThemeDirectory}custom.css", new MockFileData(""));
+ var ds = new DirectoryService(Substitute.For<ILogger<DirectoryService>>(), filesystem);
+ var siteThemeService = new SiteThemeService(ds, _unitOfWork, _messageHub);
+ await siteThemeService.Scan();
+
+ Assert.NotNull(await _unitOfWork.SiteThemeRepository.GetThemeDtoByName("custom"));
+
+ filesystem.RemoveFile($"{SiteThemeDirectory}custom.css");
+ await siteThemeService.Scan();
+
+ var customThemes = (await _unitOfWork.SiteThemeRepository.GetThemeDtos()).Where(t =>
+ API.Parser.Parser.Normalize(t.Name).Equals(API.Parser.Parser.Normalize("custom")));
+
+ Assert.Empty(customThemes);
+ }
+
+ [Fact]
+ public async Task GetContent_ShouldReturnContent()
+ {
+ await ResetDb();
+ var filesystem = CreateFileSystem();
+ filesystem.AddFile($"{SiteThemeDirectory}custom.css", new MockFileData("123"));
+ var ds = new DirectoryService(Substitute.For<ILogger<DirectoryService>>(), filesystem);
+ var siteThemeService = new SiteThemeService(ds, _unitOfWork, _messageHub);
+
+ _context.SiteTheme.Add(new SiteTheme()
+ {
+ Name = "Custom",
+ NormalizedName = API.Parser.Parser.Normalize("Custom"),
+ Provider = ThemeProvider.User,
+ FileName = "custom.css",
+ IsDefault = false
+ });
+ await _context.SaveChangesAsync();
+
+ var content = await siteThemeService.GetContent((await _unitOfWork.SiteThemeRepository.GetThemeDtoByName("Custom")).Id);
+ Assert.NotNull(content);
+ Assert.NotEmpty(content);
+ Assert.Equal("123", content);
+ }
+
+ [Fact]
+ public async Task UpdateDefault_ShouldHaveOneDefault()
+ {
+ await ResetDb();
+ var filesystem = CreateFileSystem();
+ filesystem.AddFile($"{SiteThemeDirectory}custom.css", new MockFileData("123"));
+ var ds = new DirectoryService(Substitute.For<ILogger<DirectoryService>>(), filesystem);
+ var siteThemeService = new SiteThemeService(ds, _unitOfWork, _messageHub);
+
+ _context.SiteTheme.Add(new SiteTheme()
+ {
+ Name = "Custom",
+ NormalizedName = API.Parser.Parser.Normalize("Custom"),
+ Provider = ThemeProvider.User,
+ FileName = "custom.css",
+ IsDefault = false
+ });
+ await _context.SaveChangesAsync();
+
+ var customTheme = (await _unitOfWork.SiteThemeRepository.GetThemeDtoByName("Custom"));
+
+ await siteThemeService.UpdateDefault(customTheme.Id);
+
+
+
+ Assert.Equal(customTheme.Id, (await _unitOfWork.SiteThemeRepository.GetDefaultTheme()).Id);
+ }
+
+ [Fact]
+ public async Task UpdateDefault_ShouldThrowOnInvalidId()
+ {
+ await ResetDb();
+ var filesystem = CreateFileSystem();
+ filesystem.AddFile($"{SiteThemeDirectory}custom.css", new MockFileData("123"));
+ var ds = new DirectoryService(Substitute.For<ILogger<DirectoryService>>(), filesystem);
+ var siteThemeService = new SiteThemeService(ds, _unitOfWork, _messageHub);
+
+ _context.SiteTheme.Add(new SiteTheme()
+ {
+ Name = "Custom",
+ NormalizedName = API.Parser.Parser.Normalize("Custom"),
+ Provider = ThemeProvider.User,
+ FileName = "custom.css",
+ IsDefault = false
+ });
+ await _context.SaveChangesAsync();
+
+
+
+ var ex = await Assert.ThrowsAsync<KavitaException>(async () => await siteThemeService.UpdateDefault(10));
+ Assert.Equal("Theme file missing or invalid", ex.Message);
+
+ }
+
+
+}
diff --git a/API/API.csproj b/API/API.csproj
index 42e0d1107..a95863aa7 100644
--- a/API/API.csproj
+++ b/API/API.csproj
@@ -310,4 +310,8 @@
<Reference Include="System.Drawing.Common" />
</ItemGroup>
+ <ItemGroup>
+ <Folder Include="config\themes" />
+ </ItemGroup>
+
</Project>
diff --git a/API/Controllers/AccountController.cs b/API/Controllers/AccountController.cs
index 9765f700e..913f53133 100644
--- a/API/Controllers/AccountController.cs
+++ b/API/Controllers/AccountController.cs
@@ -106,7 +106,10 @@ namespace API.Controllers
{
UserName = registerDto.Username,
Email = registerDto.Email,
- UserPreferences = new AppUserPreferences(),
+ UserPreferences = new AppUserPreferences
+ {
+ Theme = await _unitOfWork.SiteThemeRepository.GetDefaultTheme()
+ },
ApiKey = HashUtil.ApiKey()
};
@@ -179,22 +182,23 @@ namespace API.Controllers
// Update LastActive on account
user.LastActive = DateTime.Now;
- user.UserPreferences ??= new AppUserPreferences();
+ user.UserPreferences ??= new AppUserPreferences
+ {
+ Theme = await _unitOfWork.SiteThemeRepository.GetDefaultTheme()
+ };
_unitOfWork.UserRepository.Update(user);
await _unitOfWork.CommitAsync();
_logger.LogInformation("{UserName} logged in at {Time}", user.UserName, user.LastActive);
- return new UserDto
- {
- Username = user.UserName,
- Email = user.Email,
- Token = await _tokenService.CreateToken(user),
- RefreshToken = await _tokenService.CreateRefreshToken(user),
- ApiKey = user.ApiKey,
- Preferences = _mapper.Map<UserPreferencesDto>(user.UserPreferences)
- };
+ var dto = _mapper.Map<UserDto>(user);
+ dto.Token = await _tokenService.CreateToken(user);
+ dto.RefreshToken = await _tokenService.CreateRefreshToken(user);
+ var pref = await _unitOfWork.UserRepository.GetPreferencesAsync(user.UserName);
+ pref.Theme ??= await _unitOfWork.SiteThemeRepository.GetDefaultTheme();
+ dto.Preferences = _mapper.Map<UserPreferencesDto>(pref);
+ return dto;
}
[HttpPost("refresh-token")]
@@ -358,7 +362,10 @@ namespace API.Controllers
UserName = dto.Email,
Email = dto.Email,
ApiKey = HashUtil.ApiKey(),
- UserPreferences = new AppUserPreferences()
+ UserPreferences = new AppUserPreferences
+ {
+ Theme = await _unitOfWork.SiteThemeRepository.GetDefaultTheme()
+ }
};
try
diff --git a/API/Controllers/ThemeController.cs b/API/Controllers/ThemeController.cs
new file mode 100644
index 000000000..f6775d2dc
--- /dev/null
+++ b/API/Controllers/ThemeController.cs
@@ -0,0 +1,64 @@
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using API.Data;
+using API.DTOs.Theme;
+using API.Services;
+using API.Services.Tasks;
+using Kavita.Common;
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Mvc;
+
+namespace API.Controllers;
+
+public class ThemeController : BaseApiController
+{
+ private readonly IUnitOfWork _unitOfWork;
+ private readonly ISiteThemeService _siteThemeService;
+ private readonly ITaskScheduler _taskScheduler;
+
+ public ThemeController(IUnitOfWork unitOfWork, ISiteThemeService siteThemeService, ITaskScheduler taskScheduler)
+ {
+ _unitOfWork = unitOfWork;
+ _siteThemeService = siteThemeService;
+ _taskScheduler = taskScheduler;
+ }
+
+ [HttpGet]
+ public async Task<ActionResult<IEnumerable<SiteThemeDto>>> GetThemes()
+ {
+ return Ok(await _unitOfWork.SiteThemeRepository.GetThemeDtos());
+ }
+
+ [Authorize("RequireAdminRole")]
+ [HttpPost("scan")]
+ public ActionResult Scan()
+ {
+ _taskScheduler.ScanSiteThemes();
+ return Ok();
+ }
+
+ [Authorize("RequireAdminRole")]
+ [HttpPost("update-default")]
+ public async Task<ActionResult> UpdateDefault(UpdateDefaultSiteThemeDto dto)
+ {
+ await _siteThemeService.UpdateDefault(dto.ThemeId);
+ return Ok();
+ }
+
+ /// <summary>
+ /// Returns css content to the UI. UI is expected to escape the content
+ /// </summary>
+ /// <returns></returns>
+ [HttpGet("download-content")]
+ public async Task<ActionResult<string>> GetThemeContent(int themeId)
+ {
+ try
+ {
+ return Ok(await _siteThemeService.GetContent(themeId));
+ }
+ catch (KavitaException ex)
+ {
+ return BadRequest(ex.Message);
+ }
+ }
+}
diff --git a/API/Controllers/UsersController.cs b/API/Controllers/UsersController.cs
index dd6e975ab..3569aca2a 100644
--- a/API/Controllers/UsersController.cs
+++ b/API/Controllers/UsersController.cs
@@ -78,7 +78,8 @@ namespace API.Controllers
existingPreferences.BookReaderDarkMode = preferencesDto.BookReaderDarkMode;
existingPreferences.BookReaderFontSize = preferencesDto.BookReaderFontSize;
existingPreferences.BookReaderTapToPaginate = preferencesDto.BookReaderTapToPaginate;
- existingPreferences.SiteDarkMode = preferencesDto.SiteDarkMode;
+ existingPreferences.BookReaderReadingDirection = preferencesDto.BookReaderReadingDirection;
+ existingPreferences.Theme = await _unitOfWork.SiteThemeRepository.GetThemeById(preferencesDto.Theme.Id);
_unitOfWork.UserRepository.Update(existingPreferences);
diff --git a/API/DTOs/Theme/SiteThemeDto.cs b/API/DTOs/Theme/SiteThemeDto.cs
new file mode 100644
index 000000000..e8b0460f9
--- /dev/null
+++ b/API/DTOs/Theme/SiteThemeDto.cs
@@ -0,0 +1,30 @@
+using System;
+using API.Entities.Enums.Theme;
+using API.Services;
+
+namespace API.DTOs.Theme;
+
+public class SiteThemeDto
+{
+ public int Id { get; set; }
+ /// <summary>
+ /// Name of the Theme
+ /// </summary>
+ public string Name { get; set; }
+ /// <summary>
+ /// File path to the content. Stored under <see cref="DirectoryService.SiteThemeDirectory"/>.
+ /// Must be a .css file
+ /// </summary>
+ public string FileName { get; set; }
+ /// <summary>
+ /// Only one theme can have this. Will auto-set this as default for new user accounts
+ /// </summary>
+ public bool IsDefault { get; set; }
+ /// <summary>
+ /// Where did the theme come from
+ /// </summary>
+ public ThemeProvider Provider { get; set; }
+ public DateTime Created { get; set; }
+ public DateTime LastModified { get; set; }
+ public string Selector => "bg-" + Name.ToLower();
+}
diff --git a/API/DTOs/Theme/UpdateDefaultSiteThemeDto.cs b/API/DTOs/Theme/UpdateDefaultSiteThemeDto.cs
new file mode 100644
index 000000000..d4bdb8e09
--- /dev/null
+++ b/API/DTOs/Theme/UpdateDefaultSiteThemeDto.cs
@@ -0,0 +1,6 @@
+namespace API.DTOs.Theme;
+
+public class UpdateDefaultSiteThemeDto
+{
+ public int ThemeId { get; set; }
+}
diff --git a/API/DTOs/UserDto.cs b/API/DTOs/UserDto.cs
index 7a7a234e7..dc6fc8b43 100644
--- a/API/DTOs/UserDto.cs
+++ b/API/DTOs/UserDto.cs
@@ -5,8 +5,8 @@ namespace API.DTOs
{
public string Username { get; init; }
public string Email { get; init; }
- public string Token { get; init; }
- public string RefreshToken { get; init; }
+ public string Token { get; set; }
+ public string RefreshToken { get; set; }
public string ApiKey { get; init; }
public UserPreferencesDto Preferences { get; set; }
}
diff --git a/API/DTOs/UserPreferencesDto.cs b/API/DTOs/UserPreferencesDto.cs
index c36c9d146..6881cd0ae 100644
--- a/API/DTOs/UserPreferencesDto.cs
+++ b/API/DTOs/UserPreferencesDto.cs
@@ -1,4 +1,5 @@
-using API.Entities.Enums;
+using API.Entities;
+using API.Entities.Enums;
namespace API.DTOs
{
@@ -16,6 +17,6 @@ namespace API.DTOs
public string BookReaderFontFamily { get; set; }
public bool BookReaderTapToPaginate { get; set; }
public ReadingDirection BookReaderReadingDirection { get; set; }
- public bool SiteDarkMode { get; set; }
+ public SiteTheme Theme { get; set; }
}
}
diff --git a/API/Data/DataContext.cs b/API/Data/DataContext.cs
index c1e100d48..6822467a8 100644
--- a/API/Data/DataContext.cs
+++ b/API/Data/DataContext.cs
@@ -40,6 +40,7 @@ namespace API.Data
public DbSet<Person> Person { get; set; }
public DbSet<Genre> Genre { get; set; }
public DbSet<Tag> Tag { get; set; }
+ public DbSet<SiteTheme> SiteTheme { get; set; }
protected override void OnModelCreating(ModelBuilder builder)
diff --git a/API/Data/Migrations/20220215163317_SiteTheme.Designer.cs b/API/Data/Migrations/20220215163317_SiteTheme.Designer.cs
new file mode 100644
index 000000000..43b538c9a
--- /dev/null
+++ b/API/Data/Migrations/20220215163317_SiteTheme.Designer.cs
@@ -0,0 +1,1391 @@
+// <auto-generated />
+using System;
+using API.Data;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace API.Data.Migrations
+{
+ [DbContext(typeof(DataContext))]
+ [Migration("20220215163317_SiteTheme")]
+ partial class SiteTheme
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder.HasAnnotation("ProductVersion", "6.0.1");
+
+ modelBuilder.Entity("API.Entities.AppRole", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Name")
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property<string>("NormalizedName")
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("NormalizedName")
+ .IsUnique()
+ .HasDatabaseName("RoleNameIndex");
+
+ b.ToTable("AspNetRoles", (string)null);
+ });
+
+ modelBuilder.Entity("API.Entities.AppUser", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("AccessFailedCount")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("ApiKey")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime>("Created")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Email")
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property<bool>("EmailConfirmed")
+ .HasColumnType("INTEGER");
+
+ b.Property<DateTime>("LastActive")
+ .HasColumnType("TEXT");
+
+ b.Property<bool>("LockoutEnabled")
+ .HasColumnType("INTEGER");
+
+ b.Property<DateTimeOffset?>("LockoutEnd")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("NormalizedEmail")
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property<string>("NormalizedUserName")
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property<string>("PasswordHash")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("PhoneNumber")
+ .HasColumnType("TEXT");
+
+ b.Property<bool>("PhoneNumberConfirmed")
+ .HasColumnType("INTEGER");
+
+ b.Property<uint>("RowVersion")
+ .IsConcurrencyToken()
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("SecurityStamp")
+ .HasColumnType("TEXT");
+
+ b.Property<bool>("TwoFactorEnabled")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("UserName")
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("NormalizedEmail")
+ .HasDatabaseName("EmailIndex");
+
+ b.HasIndex("NormalizedUserName")
+ .IsUnique()
+ .HasDatabaseName("UserNameIndex");
+
+ b.ToTable("AspNetUsers", (string)null);
+ });
+
+ modelBuilder.Entity("API.Entities.AppUserBookmark", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("AppUserId")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("ChapterId")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("FileName")
+ .HasColumnType("TEXT");
+
+ b.Property<int>("Page")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("SeriesId")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("VolumeId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AppUserId");
+
+ b.ToTable("AppUserBookmark");
+ });
+
+ modelBuilder.Entity("API.Entities.AppUserPreferences", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("AppUserId")
+ .HasColumnType("INTEGER");
+
+ b.Property<bool>("AutoCloseMenu")
+ .HasColumnType("INTEGER");
+
+ b.Property<bool>("BookReaderDarkMode")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("BookReaderFontFamily")
+ .HasColumnType("TEXT");
+
+ b.Property<int>("BookReaderFontSize")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("BookReaderLineSpacing")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("BookReaderMargin")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("BookReaderReadingDirection")
+ .HasColumnType("INTEGER");
+
+ b.Property<bool>("BookReaderTapToPaginate")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("PageSplitOption")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("ReaderMode")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("ReadingDirection")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("ScalingOption")
+ .HasColumnType("INTEGER");
+
+ b.Property<int?>("ThemeId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AppUserId")
+ .IsUnique();
+
+ b.HasIndex("ThemeId");
+
+ b.ToTable("AppUserPreferences");
+ });
+
+ modelBuilder.Entity("API.Entities.AppUserProgress", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("AppUserId")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("BookScrollId")
+ .HasColumnType("TEXT");
+
+ b.Property<int>("ChapterId")
+ .HasColumnType("INTEGER");
+
+ b.Property<DateTime>("Created")
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime>("LastModified")
+ .HasColumnType("TEXT");
+
+ b.Property<int>("PagesRead")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("SeriesId")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("VolumeId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AppUserId");
+
+ b.HasIndex("SeriesId");
+
+ b.ToTable("AppUserProgresses");
+ });
+
+ modelBuilder.Entity("API.Entities.AppUserRating", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("AppUserId")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("Rating")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("Review")
+ .HasColumnType("TEXT");
+
+ b.Property<int>("SeriesId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AppUserId");
+
+ b.HasIndex("SeriesId");
+
+ b.ToTable("AppUserRating");
+ });
+
+ modelBuilder.Entity("API.Entities.AppUserRole", b =>
+ {
+ b.Property<int>("UserId")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("RoleId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("UserId", "RoleId");
+
+ b.HasIndex("RoleId");
+
+ b.ToTable("AspNetUserRoles", (string)null);
+ });
+
+ modelBuilder.Entity("API.Entities.Chapter", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("AgeRating")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("Count")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("CoverImage")
+ .HasColumnType("TEXT");
+
+ b.Property<bool>("CoverImageLocked")
+ .HasColumnType("INTEGER");
+
+ b.Property<DateTime>("Created")
+ .HasColumnType("TEXT");
+
+ b.Property<bool>("IsSpecial")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("Language")
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime>("LastModified")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Number")
+ .HasColumnType("TEXT");
+
+ b.Property<int>("Pages")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("Range")
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime>("ReleaseDate")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Summary")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Title")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("TitleName")
+ .HasColumnType("TEXT");
+
+ b.Property<int>("TotalCount")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("VolumeId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("VolumeId");
+
+ b.ToTable("Chapter");
+ });
+
+ modelBuilder.Entity("API.Entities.CollectionTag", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("CoverImage")
+ .HasColumnType("TEXT");
+
+ b.Property<bool>("CoverImageLocked")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("NormalizedTitle")
+ .HasColumnType("TEXT");
+
+ b.Property<bool>("Promoted")
+ .HasColumnType("INTEGER");
+
+ b.Property<uint>("RowVersion")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("Summary")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Title")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Id", "Promoted")
+ .IsUnique();
+
+ b.ToTable("CollectionTag");
+ });
+
+ modelBuilder.Entity("API.Entities.FolderPath", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<DateTime>("LastScanned")
+ .HasColumnType("TEXT");
+
+ b.Property<int>("LibraryId")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("Path")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("LibraryId");
+
+ b.ToTable("FolderPath");
+ });
+
+ modelBuilder.Entity("API.Entities.Genre", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<bool>("ExternalTag")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("NormalizedTitle")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Title")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("NormalizedTitle", "ExternalTag")
+ .IsUnique();
+
+ b.ToTable("Genre");
+ });
+
+ modelBuilder.Entity("API.Entities.Library", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("CoverImage")
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime>("Created")
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime>("LastModified")
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime>("LastScanned")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Name")
+ .HasColumnType("TEXT");
+
+ b.Property<int>("Type")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.ToTable("Library");
+ });
+
+ modelBuilder.Entity("API.Entities.MangaFile", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("ChapterId")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("FilePath")
+ .HasColumnType("TEXT");
+
+ b.Property<int>("Format")
+ .HasColumnType("INTEGER");
+
+ b.Property<DateTime>("LastModified")
+ .HasColumnType("TEXT");
+
+ b.Property<int>("Pages")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ChapterId");
+
+ b.ToTable("MangaFile");
+ });
+
+ modelBuilder.Entity("API.Entities.Metadata.SeriesMetadata", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("AgeRating")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("Count")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("Language")
+ .HasColumnType("TEXT");
+
+ b.Property<int>("PublicationStatus")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("ReleaseYear")
+ .HasColumnType("INTEGER");
+
+ b.Property<uint>("RowVersion")
+ .IsConcurrencyToken()
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("SeriesId")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("Summary")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("SeriesId")
+ .IsUnique();
+
+ b.HasIndex("Id", "SeriesId")
+ .IsUnique();
+
+ b.ToTable("SeriesMetadata");
+ });
+
+ modelBuilder.Entity("API.Entities.Person", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("Name")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("NormalizedName")
+ .HasColumnType("TEXT");
+
+ b.Property<int>("Role")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.ToTable("Person");
+ });
+
+ modelBuilder.Entity("API.Entities.ReadingList", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("AppUserId")
+ .HasColumnType("INTEGER");
+
+ b.Property<DateTime>("Created")
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime>("LastModified")
+ .HasColumnType("TEXT");
+
+ b.Property<bool>("Promoted")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("Summary")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Title")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AppUserId");
+
+ b.ToTable("ReadingList");
+ });
+
+ modelBuilder.Entity("API.Entities.ReadingListItem", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("ChapterId")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("Order")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("ReadingListId")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("SeriesId")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("VolumeId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ChapterId");
+
+ b.HasIndex("ReadingListId");
+
+ b.HasIndex("SeriesId");
+
+ b.HasIndex("VolumeId");
+
+ b.ToTable("ReadingListItem");
+ });
+
+ modelBuilder.Entity("API.Entities.Series", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("CoverImage")
+ .HasColumnType("TEXT");
+
+ b.Property<bool>("CoverImageLocked")
+ .HasColumnType("INTEGER");
+
+ b.Property<DateTime>("Created")
+ .HasColumnType("TEXT");
+
+ b.Property<int>("Format")
+ .HasColumnType("INTEGER");
+
+ b.Property<DateTime>("LastModified")
+ .HasColumnType("TEXT");
+
+ b.Property<int>("LibraryId")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("LocalizedName")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Name")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("NormalizedName")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("OriginalName")
+ .HasColumnType("TEXT");
+
+ b.Property<int>("Pages")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("SortName")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("LibraryId");
+
+ b.HasIndex("Name", "NormalizedName", "LocalizedName", "LibraryId", "Format")
+ .IsUnique();
+
+ b.ToTable("Series");
+ });
+
+ modelBuilder.Entity("API.Entities.ServerSetting", b =>
+ {
+ b.Property<int>("Key")
+ .HasColumnType("INTEGER");
+
+ b.Property<uint>("RowVersion")
+ .IsConcurrencyToken()
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("Value")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Key");
+
+ b.ToTable("ServerSetting");
+ });
+
+ modelBuilder.Entity("API.Entities.SiteTheme", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<DateTime>("Created")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("FileName")
+ .HasColumnType("TEXT");
+
+ b.Property<bool>("IsDefault")
+ .HasColumnType("INTEGER");
+
+ b.Property<DateTime>("LastModified")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Name")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("NormalizedName")
+ .HasColumnType("TEXT");
+
+ b.Property<int>("Provider")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.ToTable("SiteTheme");
+ });
+
+ modelBuilder.Entity("API.Entities.Tag", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<bool>("ExternalTag")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("NormalizedTitle")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Title")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("NormalizedTitle", "ExternalTag")
+ .IsUnique();
+
+ b.ToTable("Tag");
+ });
+
+ modelBuilder.Entity("API.Entities.Volume", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("CoverImage")
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime>("Created")
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime>("LastModified")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Name")
+ .HasColumnType("TEXT");
+
+ b.Property<int>("Number")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("Pages")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("SeriesId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("SeriesId");
+
+ b.ToTable("Volume");
+ });
+
+ modelBuilder.Entity("AppUserLibrary", b =>
+ {
+ b.Property<int>("AppUsersId")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("LibrariesId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("AppUsersId", "LibrariesId");
+
+ b.HasIndex("LibrariesId");
+
+ b.ToTable("AppUserLibrary");
+ });
+
+ modelBuilder.Entity("ChapterGenre", b =>
+ {
+ b.Property<int>("ChaptersId")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("GenresId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("ChaptersId", "GenresId");
+
+ b.HasIndex("GenresId");
+
+ b.ToTable("ChapterGenre");
+ });
+
+ modelBuilder.Entity("ChapterPerson", b =>
+ {
+ b.Property<int>("ChapterMetadatasId")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("PeopleId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("ChapterMetadatasId", "PeopleId");
+
+ b.HasIndex("PeopleId");
+
+ b.ToTable("ChapterPerson");
+ });
+
+ modelBuilder.Entity("ChapterTag", b =>
+ {
+ b.Property<int>("ChaptersId")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("TagsId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("ChaptersId", "TagsId");
+
+ b.HasIndex("TagsId");
+
+ b.ToTable("ChapterTag");
+ });
+
+ modelBuilder.Entity("CollectionTagSeriesMetadata", b =>
+ {
+ b.Property<int>("CollectionTagsId")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("SeriesMetadatasId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("CollectionTagsId", "SeriesMetadatasId");
+
+ b.HasIndex("SeriesMetadatasId");
+
+ b.ToTable("CollectionTagSeriesMetadata");
+ });
+
+ modelBuilder.Entity("GenreSeriesMetadata", b =>
+ {
+ b.Property<int>("GenresId")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("SeriesMetadatasId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("GenresId", "SeriesMetadatasId");
+
+ b.HasIndex("SeriesMetadatasId");
+
+ b.ToTable("GenreSeriesMetadata");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("ClaimType")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("ClaimValue")
+ .HasColumnType("TEXT");
+
+ b.Property<int>("RoleId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("RoleId");
+
+ b.ToTable("AspNetRoleClaims", (string)null);
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("ClaimType")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("ClaimValue")
+ .HasColumnType("TEXT");
+
+ b.Property<int>("UserId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("AspNetUserClaims", (string)null);
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
+ {
+ b.Property<string>("LoginProvider")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("ProviderKey")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("ProviderDisplayName")
+ .HasColumnType("TEXT");
+
+ b.Property<int>("UserId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("LoginProvider", "ProviderKey");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("AspNetUserLogins", (string)null);
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
+ {
+ b.Property<int>("UserId")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("LoginProvider")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Name")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Value")
+ .HasColumnType("TEXT");
+
+ b.HasKey("UserId", "LoginProvider", "Name");
+
+ b.ToTable("AspNetUserTokens", (string)null);
+ });
+
+ modelBuilder.Entity("PersonSeriesMetadata", b =>
+ {
+ b.Property<int>("PeopleId")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("SeriesMetadatasId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("PeopleId", "SeriesMetadatasId");
+
+ b.HasIndex("SeriesMetadatasId");
+
+ b.ToTable("PersonSeriesMetadata");
+ });
+
+ modelBuilder.Entity("SeriesMetadataTag", b =>
+ {
+ b.Property<int>("SeriesMetadatasId")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("TagsId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("SeriesMetadatasId", "TagsId");
+
+ b.HasIndex("TagsId");
+
+ b.ToTable("SeriesMetadataTag");
+ });
+
+ modelBuilder.Entity("API.Entities.AppUserBookmark", b =>
+ {
+ b.HasOne("API.Entities.AppUser", "AppUser")
+ .WithMany("Bookmarks")
+ .HasForeignKey("AppUserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("AppUser");
+ });
+
+ modelBuilder.Entity("API.Entities.AppUserPreferences", b =>
+ {
+ b.HasOne("API.Entities.AppUser", "AppUser")
+ .WithOne("UserPreferences")
+ .HasForeignKey("API.Entities.AppUserPreferences", "AppUserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("API.Entities.SiteTheme", "Theme")
+ .WithMany()
+ .HasForeignKey("ThemeId");
+
+ b.Navigation("AppUser");
+
+ b.Navigation("Theme");
+ });
+
+ modelBuilder.Entity("API.Entities.AppUserProgress", b =>
+ {
+ b.HasOne("API.Entities.AppUser", "AppUser")
+ .WithMany("Progresses")
+ .HasForeignKey("AppUserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("API.Entities.Series", null)
+ .WithMany("Progress")
+ .HasForeignKey("SeriesId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("AppUser");
+ });
+
+ modelBuilder.Entity("API.Entities.AppUserRating", b =>
+ {
+ b.HasOne("API.Entities.AppUser", "AppUser")
+ .WithMany("Ratings")
+ .HasForeignKey("AppUserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("API.Entities.Series", null)
+ .WithMany("Ratings")
+ .HasForeignKey("SeriesId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("AppUser");
+ });
+
+ modelBuilder.Entity("API.Entities.AppUserRole", b =>
+ {
+ b.HasOne("API.Entities.AppRole", "Role")
+ .WithMany("UserRoles")
+ .HasForeignKey("RoleId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("API.Entities.AppUser", "User")
+ .WithMany("UserRoles")
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Role");
+
+ b.Navigation("User");
+ });
+
+ modelBuilder.Entity("API.Entities.Chapter", b =>
+ {
+ b.HasOne("API.Entities.Volume", "Volume")
+ .WithMany("Chapters")
+ .HasForeignKey("VolumeId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Volume");
+ });
+
+ modelBuilder.Entity("API.Entities.FolderPath", b =>
+ {
+ b.HasOne("API.Entities.Library", "Library")
+ .WithMany("Folders")
+ .HasForeignKey("LibraryId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Library");
+ });
+
+ modelBuilder.Entity("API.Entities.MangaFile", b =>
+ {
+ b.HasOne("API.Entities.Chapter", "Chapter")
+ .WithMany("Files")
+ .HasForeignKey("ChapterId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Chapter");
+ });
+
+ modelBuilder.Entity("API.Entities.Metadata.SeriesMetadata", b =>
+ {
+ b.HasOne("API.Entities.Series", "Series")
+ .WithOne("Metadata")
+ .HasForeignKey("API.Entities.Metadata.SeriesMetadata", "SeriesId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Series");
+ });
+
+ modelBuilder.Entity("API.Entities.ReadingList", b =>
+ {
+ b.HasOne("API.Entities.AppUser", "AppUser")
+ .WithMany("ReadingLists")
+ .HasForeignKey("AppUserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("AppUser");
+ });
+
+ modelBuilder.Entity("API.Entities.ReadingListItem", b =>
+ {
+ b.HasOne("API.Entities.Chapter", "Chapter")
+ .WithMany()
+ .HasForeignKey("ChapterId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("API.Entities.ReadingList", "ReadingList")
+ .WithMany("Items")
+ .HasForeignKey("ReadingListId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("API.Entities.Series", "Series")
+ .WithMany()
+ .HasForeignKey("SeriesId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("API.Entities.Volume", "Volume")
+ .WithMany()
+ .HasForeignKey("VolumeId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Chapter");
+
+ b.Navigation("ReadingList");
+
+ b.Navigation("Series");
+
+ b.Navigation("Volume");
+ });
+
+ modelBuilder.Entity("API.Entities.Series", b =>
+ {
+ b.HasOne("API.Entities.Library", "Library")
+ .WithMany("Series")
+ .HasForeignKey("LibraryId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Library");
+ });
+
+ modelBuilder.Entity("API.Entities.Volume", b =>
+ {
+ b.HasOne("API.Entities.Series", "Series")
+ .WithMany("Volumes")
+ .HasForeignKey("SeriesId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Series");
+ });
+
+ modelBuilder.Entity("AppUserLibrary", b =>
+ {
+ b.HasOne("API.Entities.AppUser", null)
+ .WithMany()
+ .HasForeignKey("AppUsersId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("API.Entities.Library", null)
+ .WithMany()
+ .HasForeignKey("LibrariesId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("ChapterGenre", b =>
+ {
+ b.HasOne("API.Entities.Chapter", null)
+ .WithMany()
+ .HasForeignKey("ChaptersId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("API.Entities.Genre", null)
+ .WithMany()
+ .HasForeignKey("GenresId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("ChapterPerson", b =>
+ {
+ b.HasOne("API.Entities.Chapter", null)
+ .WithMany()
+ .HasForeignKey("ChapterMetadatasId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("API.Entities.Person", null)
+ .WithMany()
+ .HasForeignKey("PeopleId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("ChapterTag", b =>
+ {
+ b.HasOne("API.Entities.Chapter", null)
+ .WithMany()
+ .HasForeignKey("ChaptersId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("API.Entities.Tag", null)
+ .WithMany()
+ .HasForeignKey("TagsId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("CollectionTagSeriesMetadata", b =>
+ {
+ b.HasOne("API.Entities.CollectionTag", null)
+ .WithMany()
+ .HasForeignKey("CollectionTagsId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("API.Entities.Metadata.SeriesMetadata", null)
+ .WithMany()
+ .HasForeignKey("SeriesMetadatasId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("GenreSeriesMetadata", b =>
+ {
+ b.HasOne("API.Entities.Genre", null)
+ .WithMany()
+ .HasForeignKey("GenresId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("API.Entities.Metadata.SeriesMetadata", null)
+ .WithMany()
+ .HasForeignKey("SeriesMetadatasId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
+ {
+ b.HasOne("API.Entities.AppRole", null)
+ .WithMany()
+ .HasForeignKey("RoleId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
+ {
+ b.HasOne("API.Entities.AppUser", null)
+ .WithMany()
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
+ {
+ b.HasOne("API.Entities.AppUser", null)
+ .WithMany()
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
+ {
+ b.HasOne("API.Entities.AppUser", null)
+ .WithMany()
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("PersonSeriesMetadata", b =>
+ {
+ b.HasOne("API.Entities.Person", null)
+ .WithMany()
+ .HasForeignKey("PeopleId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("API.Entities.Metadata.SeriesMetadata", null)
+ .WithMany()
+ .HasForeignKey("SeriesMetadatasId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("SeriesMetadataTag", b =>
+ {
+ b.HasOne("API.Entities.Metadata.SeriesMetadata", null)
+ .WithMany()
+ .HasForeignKey("SeriesMetadatasId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("API.Entities.Tag", null)
+ .WithMany()
+ .HasForeignKey("TagsId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("API.Entities.AppRole", b =>
+ {
+ b.Navigation("UserRoles");
+ });
+
+ modelBuilder.Entity("API.Entities.AppUser", b =>
+ {
+ b.Navigation("Bookmarks");
+
+ b.Navigation("Progresses");
+
+ b.Navigation("Ratings");
+
+ b.Navigation("ReadingLists");
+
+ b.Navigation("UserPreferences");
+
+ b.Navigation("UserRoles");
+ });
+
+ modelBuilder.Entity("API.Entities.Chapter", b =>
+ {
+ b.Navigation("Files");
+ });
+
+ modelBuilder.Entity("API.Entities.Library", b =>
+ {
+ b.Navigation("Folders");
+
+ b.Navigation("Series");
+ });
+
+ modelBuilder.Entity("API.Entities.ReadingList", b =>
+ {
+ b.Navigation("Items");
+ });
+
+ modelBuilder.Entity("API.Entities.Series", b =>
+ {
+ b.Navigation("Metadata");
+
+ b.Navigation("Progress");
+
+ b.Navigation("Ratings");
+
+ b.Navigation("Volumes");
+ });
+
+ modelBuilder.Entity("API.Entities.Volume", b =>
+ {
+ b.Navigation("Chapters");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/API/Data/Migrations/20220215163317_SiteTheme.cs b/API/Data/Migrations/20220215163317_SiteTheme.cs
new file mode 100644
index 000000000..e2f519f8b
--- /dev/null
+++ b/API/Data/Migrations/20220215163317_SiteTheme.cs
@@ -0,0 +1,79 @@
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace API.Data.Migrations
+{
+ public partial class SiteTheme : Migration
+ {
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropColumn(
+ name: "SiteDarkMode",
+ table: "AppUserPreferences");
+
+ migrationBuilder.AddColumn<int>(
+ name: "ThemeId",
+ table: "AppUserPreferences",
+ type: "INTEGER",
+ nullable: true);
+
+ migrationBuilder.CreateTable(
+ name: "SiteTheme",
+ columns: table => new
+ {
+ Id = table.Column<int>(type: "INTEGER", nullable: false)
+ .Annotation("Sqlite:Autoincrement", true),
+ Name = table.Column<string>(type: "TEXT", nullable: true),
+ NormalizedName = table.Column<string>(type: "TEXT", nullable: true),
+ FileName = table.Column<string>(type: "TEXT", nullable: true),
+ IsDefault = table.Column<bool>(type: "INTEGER", nullable: false),
+ Provider = table.Column<int>(type: "INTEGER", nullable: false),
+ Created = table.Column<DateTime>(type: "TEXT", nullable: false),
+ LastModified = table.Column<DateTime>(type: "TEXT", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_SiteTheme", x => x.Id);
+ });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AppUserPreferences_ThemeId",
+ table: "AppUserPreferences",
+ column: "ThemeId");
+
+ migrationBuilder.AddForeignKey(
+ name: "FK_AppUserPreferences_SiteTheme_ThemeId",
+ table: "AppUserPreferences",
+ column: "ThemeId",
+ principalTable: "SiteTheme",
+ principalColumn: "Id");
+ }
+
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropForeignKey(
+ name: "FK_AppUserPreferences_SiteTheme_ThemeId",
+ table: "AppUserPreferences");
+
+ migrationBuilder.DropTable(
+ name: "SiteTheme");
+
+ migrationBuilder.DropIndex(
+ name: "IX_AppUserPreferences_ThemeId",
+ table: "AppUserPreferences");
+
+ migrationBuilder.DropColumn(
+ name: "ThemeId",
+ table: "AppUserPreferences");
+
+ migrationBuilder.AddColumn<bool>(
+ name: "SiteDarkMode",
+ table: "AppUserPreferences",
+ type: "INTEGER",
+ nullable: false,
+ defaultValue: false);
+ }
+ }
+}
diff --git a/API/Data/Migrations/DataContextModelSnapshot.cs b/API/Data/Migrations/DataContextModelSnapshot.cs
index c0aefbcd2..ff8d50df9 100644
--- a/API/Data/Migrations/DataContextModelSnapshot.cs
+++ b/API/Data/Migrations/DataContextModelSnapshot.cs
@@ -15,7 +15,7 @@ namespace API.Data.Migrations
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
- modelBuilder.HasAnnotation("ProductVersion", "6.0.0");
+ modelBuilder.HasAnnotation("ProductVersion", "6.0.1");
modelBuilder.Entity("API.Entities.AppRole", b =>
{
@@ -198,7 +198,7 @@ namespace API.Data.Migrations
b.Property<int>("ScalingOption")
.HasColumnType("INTEGER");
- b.Property<bool>("SiteDarkMode")
+ b.Property<int?>("ThemeId")
.HasColumnType("INTEGER");
b.HasKey("Id");
@@ -206,6 +206,8 @@ namespace API.Data.Migrations
b.HasIndex("AppUserId")
.IsUnique();
+ b.HasIndex("ThemeId");
+
b.ToTable("AppUserPreferences");
});
@@ -687,6 +689,38 @@ namespace API.Data.Migrations
b.ToTable("ServerSetting");
});
+ modelBuilder.Entity("API.Entities.SiteTheme", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<DateTime>("Created")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("FileName")
+ .HasColumnType("TEXT");
+
+ b.Property<bool>("IsDefault")
+ .HasColumnType("INTEGER");
+
+ b.Property<DateTime>("LastModified")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Name")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("NormalizedName")
+ .HasColumnType("TEXT");
+
+ b.Property<int>("Provider")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.ToTable("SiteTheme");
+ });
+
modelBuilder.Entity("API.Entities.Tag", b =>
{
b.Property<int>("Id")
@@ -967,7 +1001,13 @@ namespace API.Data.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
+ b.HasOne("API.Entities.SiteTheme", "Theme")
+ .WithMany()
+ .HasForeignKey("ThemeId");
+
b.Navigation("AppUser");
+
+ b.Navigation("Theme");
});
modelBuilder.Entity("API.Entities.AppUserProgress", b =>
diff --git a/API/Data/Repositories/SiteThemeRepository.cs b/API/Data/Repositories/SiteThemeRepository.cs
new file mode 100644
index 000000000..a95fcda23
--- /dev/null
+++ b/API/Data/Repositories/SiteThemeRepository.cs
@@ -0,0 +1,107 @@
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using API.DTOs.Theme;
+using API.Entities;
+using AutoMapper;
+using AutoMapper.QueryableExtensions;
+using Microsoft.EntityFrameworkCore;
+
+namespace API.Data.Repositories;
+
+public interface ISiteThemeRepository
+{
+ void Add(SiteTheme theme);
+ void Remove(SiteTheme theme);
+ void Update(SiteTheme siteTheme);
+ Task<IEnumerable<SiteThemeDto>> GetThemeDtos();
+ Task<SiteThemeDto> GetThemeDto(int themeId);
+ Task<SiteThemeDto> GetThemeDtoByName(string themeName);
+ Task<SiteTheme> GetDefaultTheme();
+ Task<IEnumerable<SiteTheme>> GetThemes();
+
+ Task<SiteTheme> GetThemeById(int themeId);
+}
+
+public class SiteThemeRepository : ISiteThemeRepository
+{
+ private readonly DataContext _context;
+ private readonly IMapper _mapper;
+
+ public SiteThemeRepository(DataContext context, IMapper mapper)
+ {
+ _context = context;
+ _mapper = mapper;
+ }
+
+ public void Add(SiteTheme theme)
+ {
+ _context.Add(theme);
+ }
+
+ public void Remove(SiteTheme theme)
+ {
+ _context.Remove(theme);
+ }
+
+ public void Update(SiteTheme siteTheme)
+ {
+ _context.Entry(siteTheme).State = EntityState.Modified;
+ }
+
+ public async Task<IEnumerable<SiteThemeDto>> GetThemeDtos()
+ {
+ return await _context.SiteTheme
+ .ProjectTo<SiteThemeDto>(_mapper.ConfigurationProvider)
+ .ToListAsync();
+ }
+
+ public async Task<SiteThemeDto> GetThemeDtoByName(string themeName)
+ {
+ return await _context.SiteTheme
+ .Where(t => t.Name.Equals(themeName))
+ .ProjectTo<SiteThemeDto>(_mapper.ConfigurationProvider)
+ .SingleOrDefaultAsync();
+ }
+
+ /// <summary>
+ /// Returns default theme, if the default theme is not available, returns the dark theme
+ /// </summary>
+ /// <returns></returns>
+ public async Task<SiteTheme> GetDefaultTheme()
+ {
+ var result = await _context.SiteTheme
+ .Where(t => t.IsDefault)
+ .SingleOrDefaultAsync();
+
+ if (result == null)
+ {
+ return await _context.SiteTheme
+ .Where(t => t.NormalizedName == "dark")
+ .SingleOrDefaultAsync();
+ }
+
+ return result;
+ }
+
+ public async Task<IEnumerable<SiteTheme>> GetThemes()
+ {
+ return await _context.SiteTheme
+ .ToListAsync();
+ }
+
+ public async Task<SiteTheme> GetThemeById(int themeId)
+ {
+ return await _context.SiteTheme
+ .Where(t => t.Id == themeId)
+ .SingleOrDefaultAsync();
+ }
+
+ public async Task<SiteThemeDto> GetThemeDto(int themeId)
+ {
+ return await _context.SiteTheme
+ .Where(t => t.Id == themeId)
+ .ProjectTo<SiteThemeDto>(_mapper.ConfigurationProvider)
+ .SingleOrDefaultAsync();
+ }
+}
diff --git a/API/Data/Repositories/UserRepository.cs b/API/Data/Repositories/UserRepository.cs
index b926abe9c..e41849c92 100644
--- a/API/Data/Repositories/UserRepository.cs
+++ b/API/Data/Repositories/UserRepository.cs
@@ -55,6 +55,7 @@ public interface IUserRepository
Task<AppUser> GetUserByEmailAsync(string email);
Task<IEnumerable<AppUser>> GetAllUsers();
+ Task<IEnumerable<AppUserPreferences>> GetAllPreferencesByThemeAsync(int themeId);
}
public class UserRepository : IUserRepository
@@ -227,6 +228,15 @@ public class UserRepository : IUserRepository
return await _context.AppUser.ToListAsync();
}
+ public async Task<IEnumerable<AppUserPreferences>> GetAllPreferencesByThemeAsync(int themeId)
+ {
+ return await _context.AppUserPreferences
+ .Include(p => p.Theme)
+ .Where(p => p.Theme.Id == themeId)
+ .AsSplitQuery()
+ .ToListAsync();
+ }
+
public async Task<IEnumerable<AppUser>> GetAdminUsersAsync()
{
return await _userManager.GetUsersInRoleAsync(PolicyConstants.AdminRole);
@@ -244,7 +254,8 @@ public class UserRepository : IUserRepository
public async Task<AppUserRating> GetUserRatingAsync(int seriesId, int userId)
{
- return await _context.AppUserRating.Where(r => r.SeriesId == seriesId && r.AppUserId == userId)
+ return await _context.AppUserRating
+ .Where(r => r.SeriesId == seriesId && r.AppUserId == userId)
.SingleOrDefaultAsync();
}
@@ -252,6 +263,8 @@ public class UserRepository : IUserRepository
{
return await _context.AppUserPreferences
.Include(p => p.AppUser)
+ .Include(p => p.Theme)
+ .AsSplitQuery()
.SingleOrDefaultAsync(p => p.AppUser.UserName == username);
}
diff --git a/API/Data/Seed.cs b/API/Data/Seed.cs
index 3dd8ecc5f..071d1eaae 100644
--- a/API/Data/Seed.cs
+++ b/API/Data/Seed.cs
@@ -1,4 +1,5 @@
using System.Collections.Generic;
+using System.Collections.Immutable;
using System.IO;
using System.Linq;
using System.Reflection;
@@ -6,6 +7,7 @@ using System.Threading.Tasks;
using API.Constants;
using API.Entities;
using API.Entities.Enums;
+using API.Entities.Enums.Theme;
using API.Services;
using Kavita.Common;
using Kavita.Common.EnvironmentInfo;
@@ -21,6 +23,34 @@ namespace API.Data
/// </summary>
public static IList<ServerSetting> DefaultSettings;
+ public static readonly IList<SiteTheme> DefaultThemes = new List<SiteTheme>
+ {
+ new()
+ {
+ Name = "Dark",
+ NormalizedName = Parser.Parser.Normalize("Dark"),
+ Provider = ThemeProvider.System,
+ FileName = "dark.scss",
+ IsDefault = true,
+ },
+ new()
+ {
+ Name = "Light",
+ NormalizedName = Parser.Parser.Normalize("Light"),
+ Provider = ThemeProvider.System,
+ FileName = "light.scss",
+ IsDefault = false,
+ },
+ new()
+ {
+ Name = "E-Ink",
+ NormalizedName = Parser.Parser.Normalize("E-Ink"),
+ Provider = ThemeProvider.System,
+ FileName = "eink.scss",
+ IsDefault = false,
+ },
+ };
+
public static async Task SeedRoles(RoleManager<AppRole> roleManager)
{
var roles = typeof(PolicyConstants)
@@ -41,6 +71,22 @@ namespace API.Data
}
}
+ public static async Task SeedThemes(DataContext context)
+ {
+ await context.Database.EnsureCreatedAsync();
+
+ foreach (var theme in DefaultThemes)
+ {
+ var existing = context.SiteTheme.FirstOrDefault(s => s.Name.Equals(theme.Name));
+ if (existing == null)
+ {
+ await context.SiteTheme.AddAsync(theme);
+ }
+ }
+
+ await context.SaveChangesAsync();
+ }
+
public static async Task SeedSettings(DataContext context, IDirectoryService directoryService)
{
await context.Database.EnsureCreatedAsync();
diff --git a/API/Data/UnitOfWork.cs b/API/Data/UnitOfWork.cs
index 82046ca2a..fb3e28c07 100644
--- a/API/Data/UnitOfWork.cs
+++ b/API/Data/UnitOfWork.cs
@@ -21,6 +21,7 @@ public interface IUnitOfWork
IPersonRepository PersonRepository { get; }
IGenreRepository GenreRepository { get; }
ITagRepository TagRepository { get; }
+ ISiteThemeRepository SiteThemeRepository { get; }
bool Commit();
Task<bool> CommitAsync();
bool HasChanges();
@@ -56,6 +57,7 @@ public class UnitOfWork : IUnitOfWork
public IPersonRepository PersonRepository => new PersonRepository(_context, _mapper);
public IGenreRepository GenreRepository => new GenreRepository(_context, _mapper);
public ITagRepository TagRepository => new TagRepository(_context, _mapper);
+ public ISiteThemeRepository SiteThemeRepository => new SiteThemeRepository(_context, _mapper);
/// <summary>
/// Commits changes to the DB. Completes the open transaction.
diff --git a/API/Entities/AppUserPreferences.cs b/API/Entities/AppUserPreferences.cs
index 01587431b..38f95cf42 100644
--- a/API/Entities/AppUserPreferences.cs
+++ b/API/Entities/AppUserPreferences.cs
@@ -58,11 +58,11 @@ namespace API.Entities
/// Book Reader Option: What direction should the next/prev page buttons go
/// </summary>
public ReadingDirection BookReaderReadingDirection { get; set; } = ReadingDirection.LeftToRight;
-
/// <summary>
- /// UI Site Global Setting: Whether the UI should render in Dark mode or not.
+ /// UI Site Global Setting: The UI theme the user should use.
/// </summary>
- public bool SiteDarkMode { get; set; } = true;
+ /// <remarks>Should default to Dark</remarks>
+ public SiteTheme Theme { get; set; }
diff --git a/API/Entities/Enums/Theme/ThemeProvider.cs b/API/Entities/Enums/Theme/ThemeProvider.cs
new file mode 100644
index 000000000..45af2d94b
--- /dev/null
+++ b/API/Entities/Enums/Theme/ThemeProvider.cs
@@ -0,0 +1,17 @@
+using System.ComponentModel;
+
+namespace API.Entities.Enums.Theme;
+
+public enum ThemeProvider
+{
+ /// <summary>
+ /// Theme is provided by System
+ /// </summary>
+ [Description("System")]
+ System = 1,
+ /// <summary>
+ /// Theme is provided by the User (ie it's custom)
+ /// </summary>
+ [Description("User")]
+ User = 2
+}
diff --git a/API/Entities/SiteTheme.cs b/API/Entities/SiteTheme.cs
new file mode 100644
index 000000000..87ebe95b1
--- /dev/null
+++ b/API/Entities/SiteTheme.cs
@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using API.Entities.Enums.Theme;
+using API.Entities.Interfaces;
+using API.Services;
+
+namespace API.Entities;
+/// <summary>
+/// Represents a set of css overrides the user can upload to Kavita and will load into webui
+/// </summary>
+public class SiteTheme : IEntityDate
+{
+ public int Id { get; set; }
+ /// <summary>
+ /// Name of the Theme
+ /// </summary>
+ public string Name { get; set; }
+ /// <summary>
+ /// Normalized name for lookups
+ /// </summary>
+ public string NormalizedName { get; set; }
+ /// <summary>
+ /// File path to the content. Stored under <see cref="DirectoryService.SiteThemeDirectory"/>.
+ /// Must be a .css file
+ /// </summary>
+ public string FileName { get; set; }
+ /// <summary>
+ /// Only one theme can have this. Will auto-set this as default for new user accounts
+ /// </summary>
+ public bool IsDefault { get; set; }
+ /// <summary>
+ /// Where did the theme come from
+ /// </summary>
+ public ThemeProvider Provider { get; set; }
+ public DateTime Created { get; set; }
+ public DateTime LastModified { get; set; }
+}
diff --git a/API/Extensions/ApplicationServiceExtensions.cs b/API/Extensions/ApplicationServiceExtensions.cs
index f11f0a8d1..146647393 100644
--- a/API/Extensions/ApplicationServiceExtensions.cs
+++ b/API/Extensions/ApplicationServiceExtensions.cs
@@ -39,6 +39,7 @@ namespace API.Extensions
services.AddScoped<IAccountService, AccountService>();
services.AddScoped<IEmailService, EmailService>();
services.AddScoped<IBookmarkService, BookmarkService>();
+ services.AddScoped<ISiteThemeService, SiteThemeService>();
services.AddScoped<IFileSystem, FileSystem>();
services.AddScoped<IFileService, FileService>();
diff --git a/API/Helpers/AutoMapperProfiles.cs b/API/Helpers/AutoMapperProfiles.cs
index 6ac4aeee5..0b81f2d7f 100644
--- a/API/Helpers/AutoMapperProfiles.cs
+++ b/API/Helpers/AutoMapperProfiles.cs
@@ -7,6 +7,7 @@ using API.DTOs.Reader;
using API.DTOs.ReadingLists;
using API.DTOs.Search;
using API.DTOs.Settings;
+using API.DTOs.Theme;
using API.Entities;
using API.Entities.Enums;
using API.Entities.Metadata;
@@ -119,10 +120,14 @@ namespace API.Helpers
opt.MapFrom(src => src.People.Where(p => p.Role == PersonRole.Editor)));
+ CreateMap<AppUser, UserDto>();
+ CreateMap<SiteTheme, SiteThemeDto>();
+ CreateMap<AppUserPreferences, UserPreferencesDto>()
+ .ForMember(dest => dest.Theme,
+ opt =>
+ opt.MapFrom(src => src.Theme));
- CreateMap<AppUserPreferences, UserPreferencesDto>();
-
CreateMap<AppUserBookmark, BookmarkDto>();
CreateMap<ReadingList, ReadingListDto>();
@@ -146,6 +151,7 @@ namespace API.Helpers
CreateMap<RegisterDto, AppUser>();
+
CreateMap<IEnumerable<ServerSetting>, ServerSettingDto>()
.ConvertUsing<ServerSettingConverter>();
}
diff --git a/API/Program.cs b/API/Program.cs
index 3a0d9ab25..b81fe61d5 100644
--- a/API/Program.cs
+++ b/API/Program.cs
@@ -77,6 +77,7 @@ namespace API
await Seed.SeedRoles(roleManager);
await Seed.SeedSettings(context, directoryService);
+ await Seed.SeedThemes(context);
await Seed.SeedUserApiKeys(context);
diff --git a/API/Services/DirectoryService.cs b/API/Services/DirectoryService.cs
index 0edf51ffc..89981d43f 100644
--- a/API/Services/DirectoryService.cs
+++ b/API/Services/DirectoryService.cs
@@ -19,6 +19,7 @@ namespace API.Services
string LogDirectory { get; }
string TempDirectory { get; }
string ConfigDirectory { get; }
+ string SiteThemeDirectory { get; }
/// <summary>
/// Original BookmarkDirectory. Only used for resetting directory. Use <see cref="ServerSettingKey.BackupDirectory"/> for actual path.
/// </summary>
@@ -64,6 +65,7 @@ namespace API.Services
public string TempDirectory { get; }
public string ConfigDirectory { get; }
public string BookmarkDirectory { get; }
+ public string SiteThemeDirectory { get; }
private readonly ILogger<DirectoryService> _logger;
private static readonly Regex ExcludeDirectories = new Regex(
@@ -81,6 +83,7 @@ namespace API.Services
TempDirectory = FileSystem.Path.Join(FileSystem.Directory.GetCurrentDirectory(), "config", "temp");
ConfigDirectory = FileSystem.Path.Join(FileSystem.Directory.GetCurrentDirectory(), "config");
BookmarkDirectory = FileSystem.Path.Join(FileSystem.Directory.GetCurrentDirectory(), "config", "bookmarks");
+ SiteThemeDirectory = FileSystem.Path.Join(FileSystem.Directory.GetCurrentDirectory(), "config", "themes");
}
/// <summary>
diff --git a/API/Services/TaskScheduler.cs b/API/Services/TaskScheduler.cs
index 6c1d914cf..35dc332c6 100644
--- a/API/Services/TaskScheduler.cs
+++ b/API/Services/TaskScheduler.cs
@@ -22,6 +22,7 @@ public interface ITaskScheduler
void ScanSeries(int libraryId, int seriesId, bool forceUpdate = false);
void CancelStatsTasks();
Task RunStatCollection();
+ void ScanSiteThemes();
}
public class TaskScheduler : ITaskScheduler
{
@@ -35,6 +36,7 @@ public class TaskScheduler : ITaskScheduler
private readonly IStatsService _statsService;
private readonly IVersionUpdaterService _versionUpdaterService;
+ private readonly ISiteThemeService _siteThemeService;
public static BackgroundJobServer Client => new BackgroundJobServer();
private static readonly Random Rnd = new Random();
@@ -42,7 +44,8 @@ public class TaskScheduler : ITaskScheduler
public TaskScheduler(ICacheService cacheService, ILogger<TaskScheduler> logger, IScannerService scannerService,
IUnitOfWork unitOfWork, IMetadataService metadataService, IBackupService backupService,
- ICleanupService cleanupService, IStatsService statsService, IVersionUpdaterService versionUpdaterService)
+ ICleanupService cleanupService, IStatsService statsService, IVersionUpdaterService versionUpdaterService,
+ ISiteThemeService siteThemeService)
{
_cacheService = cacheService;
_logger = logger;
@@ -53,6 +56,7 @@ public class TaskScheduler : ITaskScheduler
_cleanupService = cleanupService;
_statsService = statsService;
_versionUpdaterService = versionUpdaterService;
+ _siteThemeService = siteThemeService;
}
public async Task ScheduleTasks()
@@ -124,6 +128,12 @@ public class TaskScheduler : ITaskScheduler
BackgroundJob.Enqueue(() => _statsService.Send());
}
+ public void ScanSiteThemes()
+ {
+ _logger.LogInformation("Starting Site Theme scan");
+ BackgroundJob.Enqueue(() => _siteThemeService.Scan());
+ }
+
#endregion
#region UpdateTasks
diff --git a/API/Services/Tasks/SiteThemeService.cs b/API/Services/Tasks/SiteThemeService.cs
new file mode 100644
index 000000000..e474adf06
--- /dev/null
+++ b/API/Services/Tasks/SiteThemeService.cs
@@ -0,0 +1,163 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using API.Data;
+using API.Entities;
+using API.Entities.Enums.Theme;
+using API.SignalR;
+using Kavita.Common;
+using Microsoft.AspNetCore.SignalR;
+
+namespace API.Services.Tasks;
+
+public interface ISiteThemeService
+{
+ Task<string> GetContent(int themeId);
+ Task Scan();
+ Task UpdateDefault(int themeId);
+}
+
+public class SiteThemeService : ISiteThemeService
+{
+ private readonly IDirectoryService _directoryService;
+ private readonly IUnitOfWork _unitOfWork;
+ private readonly IHubContext<MessageHub> _messageHub;
+
+ public SiteThemeService(IDirectoryService directoryService, IUnitOfWork unitOfWork, IHubContext<MessageHub> messageHub)
+ {
+ _directoryService = directoryService;
+ _unitOfWork = unitOfWork;
+ _messageHub = messageHub;
+ }
+
+ /// <summary>
+ /// Given a themeId, return the content inside that file
+ /// </summary>
+ /// <param name="themeId"></param>
+ /// <returns></returns>
+ /// <exception cref="KavitaException"></exception>
+ public async Task<string> GetContent(int themeId)
+ {
+ var theme = await _unitOfWork.SiteThemeRepository.GetThemeDto(themeId);
+ if (theme == null) throw new KavitaException("Theme file missing or invalid");
+ var themeFile = _directoryService.FileSystem.Path.Join(_directoryService.SiteThemeDirectory, theme.FileName);
+ if (string.IsNullOrEmpty(themeFile) || !_directoryService.FileSystem.File.Exists(themeFile))
+ throw new KavitaException("Theme file missing or invalid");
+
+ return await _directoryService.FileSystem.File.ReadAllTextAsync(themeFile);
+ }
+
+ /// <summary>
+ /// Scans the site theme directory for custom css files and updates what the system has on store
+ /// </summary>
+ public async Task Scan()
+ {
+ _directoryService.ExistOrCreate(_directoryService.SiteThemeDirectory);
+ var reservedNames = Seed.DefaultThemes.Select(t => t.NormalizedName).ToList();
+ var themeFiles = _directoryService.GetFilesWithExtension(Parser.Parser.NormalizePath(_directoryService.SiteThemeDirectory), @"\.css")
+ .Where(name => !reservedNames.Contains(Parser.Parser.Normalize(name))).ToList();
+
+ var allThemes = (await _unitOfWork.SiteThemeRepository.GetThemes()).ToList();
+ var totalThemesToIterate = themeFiles.Count;
+ var themeIteratedCount = 0;
+
+ // First remove any files from allThemes that are User Defined and not on disk
+ var userThemes = allThemes.Where(t => t.Provider == ThemeProvider.User).ToList();
+ foreach (var userTheme in userThemes)
+ {
+ var filepath = Parser.Parser.NormalizePath(
+ _directoryService.FileSystem.Path.Join(_directoryService.SiteThemeDirectory, userTheme.FileName));
+ if (!_directoryService.FileSystem.File.Exists(filepath))
+ {
+ // I need to do the removal different. I need to update all userpreferences to use DefaultTheme
+ allThemes.Remove(userTheme);
+ await RemoveTheme(userTheme);
+
+ await _messageHub.Clients.All.SendAsync(SignalREvents.SiteThemeProgress,
+ MessageFactory.SiteThemeProgressEvent(1, totalThemesToIterate, userTheme.FileName, 0F));
+ }
+ }
+
+ // Add new custom themes
+ var allThemeNames = allThemes.Select(t => t.NormalizedName).ToList();
+ foreach (var themeFile in themeFiles)
+ {
+ var themeName =
+ Parser.Parser.Normalize(_directoryService.FileSystem.Path.GetFileNameWithoutExtension(themeFile));
+ if (allThemeNames.Contains(themeName))
+ {
+ themeIteratedCount += 1;
+ continue;
+ }
+ _unitOfWork.SiteThemeRepository.Add(new SiteTheme()
+ {
+ Name = _directoryService.FileSystem.Path.GetFileNameWithoutExtension(themeFile),
+ NormalizedName = themeName,
+ FileName = _directoryService.FileSystem.Path.GetFileName(themeFile),
+ Provider = ThemeProvider.User,
+ IsDefault = false,
+ });
+ await _messageHub.Clients.All.SendAsync(SignalREvents.SiteThemeProgress,
+ MessageFactory.SiteThemeProgressEvent(themeIteratedCount, totalThemesToIterate, themeName, themeIteratedCount / (totalThemesToIterate * 1.0f)));
+ themeIteratedCount += 1;
+ }
+
+
+ if (_unitOfWork.HasChanges())
+ {
+ await _unitOfWork.CommitAsync();
+ }
+
+ await _messageHub.Clients.All.SendAsync(SignalREvents.SiteThemeProgress,
+ MessageFactory.SiteThemeProgressEvent(totalThemesToIterate, totalThemesToIterate, "", 1F));
+
+ }
+
+ /// <summary>
+ /// Removes the theme and any references to it from Pref and sets them to the default at the time.
+ /// This commits to DB.
+ /// </summary>
+ /// <param name="theme"></param>
+ private async Task RemoveTheme(SiteTheme theme)
+ {
+ var prefs = await _unitOfWork.UserRepository.GetAllPreferencesByThemeAsync(theme.Id);
+ var defaultTheme = await _unitOfWork.SiteThemeRepository.GetDefaultTheme();
+ foreach (var pref in prefs)
+ {
+ pref.Theme = defaultTheme;
+ _unitOfWork.UserRepository.Update(pref);
+ }
+ _unitOfWork.SiteThemeRepository.Remove(theme);
+ await _unitOfWork.CommitAsync();
+ }
+
+ /// <summary>
+ /// Updates the themeId to the default theme, all others are marked as non-default
+ /// </summary>
+ /// <param name="themeId"></param>
+ /// <returns></returns>
+ /// <exception cref="KavitaException">If theme does not exist</exception>
+ public async Task UpdateDefault(int themeId)
+ {
+ try
+ {
+ var theme = await _unitOfWork.SiteThemeRepository.GetThemeDto(themeId);
+ if (theme == null) throw new KavitaException("Theme file missing or invalid");
+
+ foreach (var siteTheme in await _unitOfWork.SiteThemeRepository.GetThemes())
+ {
+ siteTheme.IsDefault = (siteTheme.Id == themeId);
+ _unitOfWork.SiteThemeRepository.Update(siteTheme);
+ }
+
+ if (!_unitOfWork.HasChanges()) return;
+ await _unitOfWork.CommitAsync();
+ }
+ catch (Exception)
+ {
+ await _unitOfWork.RollbackAsync();
+ throw;
+ }
+ }
+}
diff --git a/API/SignalR/MessageFactory.cs b/API/SignalR/MessageFactory.cs
index bf7c649bf..c2f661973 100644
--- a/API/SignalR/MessageFactory.cs
+++ b/API/SignalR/MessageFactory.cs
@@ -1,4 +1,5 @@
using System;
+using System.Threading;
using API.DTOs.Update;
namespace API.SignalR
@@ -160,5 +161,20 @@ namespace API.SignalR
}
};
}
+
+ public static SignalRMessage SiteThemeProgressEvent(int themeIteratedCount, int totalThemesToIterate, string themeName, float progress)
+ {
+ return new SignalRMessage()
+ {
+ Name = SignalREvents.SiteThemeProgress,
+ Body = new
+ {
+ TotalUpdates = totalThemesToIterate,
+ CurrentCount = themeIteratedCount,
+ ThemeName = themeName,
+ Progress = progress
+ }
+ };
+ }
}
}
diff --git a/API/SignalR/SignalREvents.cs b/API/SignalR/SignalREvents.cs
index 1da613455..7f9f44cf9 100644
--- a/API/SignalR/SignalREvents.cs
+++ b/API/SignalR/SignalREvents.cs
@@ -54,5 +54,10 @@
/// A cover was updated
/// </summary>
public const string CoverUpdate = "CoverUpdate";
+ /// <summary>
+ /// A custom site theme was removed or added
+ /// </summary>
+ public const string SiteThemeProgress = "SiteThemeProgress";
+
}
}
diff --git a/INSTALL.txt b/INSTALL.txt
index 9119da82c..753236e9a 100644
--- a/INSTALL.txt
+++ b/INSTALL.txt
@@ -4,4 +4,5 @@
3. Run Kavita executable.
4. Open localhost:5000 and setup your account and libraries in the UI.
-If updating, copy everything but the config/ directory over. Restart Kavita.
+How to Update
+1. Copy everything but the config/ directory over. Restart Kavita.
diff --git a/UI/Web/angular.json b/UI/Web/angular.json
index 10aefdb56..56bc8a3e1 100644
--- a/UI/Web/angular.json
+++ b/UI/Web/angular.json
@@ -49,7 +49,7 @@
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
- "optimization": true,
+ "optimization": false,
"namedChunks": true
},
"configurations": {
diff --git a/UI/Web/package-lock.json b/UI/Web/package-lock.json
index fe67970cf..85739725d 100644
--- a/UI/Web/package-lock.json
+++ b/UI/Web/package-lock.json
@@ -2405,18 +2405,11 @@
}
},
"@ng-bootstrap/ng-bootstrap": {
- "version": "11.0.0",
- "resolved": "https://registry.npmjs.org/@ng-bootstrap/ng-bootstrap/-/ng-bootstrap-11.0.0.tgz",
- "integrity": "sha512-qDnB0+jbpQ4wjXpM4NPRAtwmgTDUCjGavoeRDZHOvFfYvx/MBf1RTjZEqTJ1Yqq1pKP4BWpzxCgVTunfnpmsjA==",
+ "version": "12.0.0-beta.4",
+ "resolved": "https://registry.npmjs.org/@ng-bootstrap/ng-bootstrap/-/ng-bootstrap-12.0.0-beta.4.tgz",
+ "integrity": "sha512-iOXZT4FLouAGJDRw4ruogyR+lg648nywNWKUxW7l+mtMC9i4kdpfo4beQ/nqb4Uq2zMDs9zj4MbKVI391+kMnA==",
"requires": {
"tslib": "^2.3.0"
- },
- "dependencies": {
- "tslib": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
- "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
- }
}
},
"@ngtools/webpack": {
@@ -2581,6 +2574,11 @@
"resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz",
"integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g=="
},
+ "@popperjs/core": {
+ "version": "2.11.2",
+ "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.2.tgz",
+ "integrity": "sha512-92FRmppjjqz29VMJ2dn+xdyXZBrMlE42AV6Kq6BwjWV7CNUW1hs2FtxSNLQE+gJhaZ6AAmYuO9y8dshhcBl7vA=="
+ },
"@schematics/angular": {
"version": "13.2.3",
"resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-13.2.3.tgz",
@@ -3841,9 +3839,9 @@
"dev": true
},
"bootstrap": {
- "version": "4.6.1",
- "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.6.1.tgz",
- "integrity": "sha512-0dj+VgI9Ecom+rvvpNZ4MUZJz8dcX7WCX+eTID9+/8HgOkv3dsRzi8BGeZJCQU6flWQVYxwTQnEZFrmJSEO7og=="
+ "version": "5.1.3",
+ "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.1.3.tgz",
+ "integrity": "sha512-fcQztozJ8jToQWXxVuEyXWW+dSo8AiXWKwiSSrKWsRB/Qt+Ewwza+JWoLKiTuQLaEPhdNAJ7+Dosc9DOIqNy7Q=="
},
"bowser": {
"version": "2.11.0",
@@ -11848,9 +11846,9 @@
"dev": true
},
"swiper": {
- "version": "8.0.3",
- "resolved": "https://registry.npmjs.org/swiper/-/swiper-8.0.3.tgz",
- "integrity": "sha512-mpw7v/Lkh48LQUxtJuFD+3Lls8LViNi3j1fbk45fNo9DXZxXK/e7NMixxS27OxvC5wx+5H3bet1O2pdjk7akBA==",
+ "version": "8.0.6",
+ "resolved": "https://registry.npmjs.org/swiper/-/swiper-8.0.6.tgz",
+ "integrity": "sha512-Ssyu1+FeNATF/G8e84QG+ZUNtUOAZ5vngdgxzczh0oWZPhGUVgkdv+BoePUuaCXLAFXnwVpNjgLIcGnxMdmWPA==",
"requires": {
"dom7": "^4.0.4",
"ssr-window": "^4.0.2"
diff --git a/UI/Web/package.json b/UI/Web/package.json
index 4eb73bd67..fd021a1c8 100644
--- a/UI/Web/package.json
+++ b/UI/Web/package.json
@@ -28,11 +28,12 @@
"@angular/router": "~13.2.2",
"@fortawesome/fontawesome-free": "^6.0.0",
"@microsoft/signalr": "^6.0.2",
- "@ng-bootstrap/ng-bootstrap": "^11.0.0",
+ "@ng-bootstrap/ng-bootstrap": "^12.0.0-beta.4",
"@ngx-lite/nav-drawer": "^0.4.7",
"@ngx-lite/util": "0.0.1",
+ "@popperjs/core": "^2.11.2",
"@types/file-saver": "^2.0.5",
- "bootstrap": "^4.6.1",
+ "bootstrap": "^5.1.2",
"bowser": "^2.11.0",
"file-saver": "^2.0.5",
"lazysizes": "^5.3.2",
@@ -41,7 +42,7 @@
"ngx-file-drop": "^13.0.0",
"ngx-toastr": "^14.2.1",
"rxjs": "~7.5.4",
- "swiper": "^8.0.3",
+ "swiper": "^8.0.6",
"tslib": "^2.3.1",
"webpack-bundle-analyzer": "^4.5.0",
"zone.js": "~0.11.4"
diff --git a/UI/Web/src/app/_modals/review-series-modal/review-series-modal.component.html b/UI/Web/src/app/_modals/review-series-modal/review-series-modal.component.html
index b6fbedd6c..cfb00e0a8 100644
--- a/UI/Web/src/app/_modals/review-series-modal/review-series-modal.component.html
+++ b/UI/Web/src/app/_modals/review-series-modal/review-series-modal.component.html
@@ -2,29 +2,29 @@
<div class="modal-header">
<h4 class="modal-title" id="modal-basic-title">
{{series.name}} Review</h4>
- <button type="button" class="close" aria-label="Close" (click)="close()">
- <span aria-hidden="true">&times;</span>
+ <button type="button" class="btn-close" aria-label="Close" (click)="close()">
+
</button>
</div>
<div class="modal-body">
<form [formGroup]="reviewGroup">
- <div class="form-group">
- <label for="rating">Rating</label>
+ <div class="row g-0">
+ <label for="rating" class="form-label">Rating</label>
<div>
<ngb-rating style="margin-top: 2px; font-size: 1.5rem;" formControlName="rating"></ngb-rating>
- <button class="btn btn-information ml-2" (click)="clearRating()"><i aria-hidden="true" class="fa fa-ban"></i><span class="phone-hidden">&nbsp;Clear</span></button>
+ <button class="btn btn-icon ms-2" (click)="clearRating()"><i aria-hidden="true" class="fa fa-ban"></i><span class="phone-hidden">&nbsp;Clear</span></button>
</div>
</div>
- <div class="form-group">
- <label for="review">Review</label>
+ <div class="row g-0">
+ <label for="review" class="form-label">Review</label>
<textarea id="review" class="form-control" formControlName="review" rows="3"></textarea>
</div>
</form>
</div>
<div class="modal-footer">
- <button type="submit" class="btn btn-secondary" (click)="close()">Close</button>
+ <button class="btn btn-secondary" (click)="close()">Close</button>
<button type="submit" class="btn btn-primary" (click)="save()">Save</button>
</div>
</div>
diff --git a/UI/Web/src/app/_models/events/site-theme-progress-event.ts b/UI/Web/src/app/_models/events/site-theme-progress-event.ts
new file mode 100644
index 000000000..24228c113
--- /dev/null
+++ b/UI/Web/src/app/_models/events/site-theme-progress-event.ts
@@ -0,0 +1,7 @@
+export interface SiteThemeProgressEvent {
+ totalUpdates: number;
+ currentCount: number;
+ themeName: string;
+ progress: number;
+ eventTime: string;
+}
\ No newline at end of file
diff --git a/UI/Web/src/app/_models/preferences/preferences.ts b/UI/Web/src/app/_models/preferences/preferences.ts
index 664afb7f7..2b0c885b0 100644
--- a/UI/Web/src/app/_models/preferences/preferences.ts
+++ b/UI/Web/src/app/_models/preferences/preferences.ts
@@ -3,6 +3,7 @@ import { PageSplitOption } from './page-split-option';
import { READER_MODE } from './reader-mode';
import { ReadingDirection } from './reading-direction';
import { ScalingOption } from './scaling-option';
+import { SiteTheme } from './site-theme';
export interface Preferences {
// Manga Reader
@@ -22,7 +23,7 @@ export interface Preferences {
bookReaderReadingDirection: ReadingDirection;
// Global
- siteDarkMode: boolean;
+ theme: SiteTheme;
}
export const readingDirections = [{text: 'Left to Right', value: ReadingDirection.LeftToRight}, {text: 'Right to Left', value: ReadingDirection.RightToLeft}];
diff --git a/UI/Web/src/app/_models/preferences/site-theme.ts b/UI/Web/src/app/_models/preferences/site-theme.ts
new file mode 100644
index 000000000..7a5e919e6
--- /dev/null
+++ b/UI/Web/src/app/_models/preferences/site-theme.ts
@@ -0,0 +1,22 @@
+/**
+ * Where does the theme come from
+ */
+ export enum ThemeProvider {
+ System = 1,
+ User = 2
+ }
+
+ /**
+ * Theme for the whole instance
+ */
+ export interface SiteTheme {
+ id: number;
+ name: string;
+ filePath: string;
+ isDefault: boolean;
+ provider: ThemeProvider;
+ /**
+ * The actual class the root is defined against. It is generated at the backend.
+ */
+ selector: string;
+ }
\ No newline at end of file
diff --git a/UI/Web/src/app/_services/account.service.ts b/UI/Web/src/app/_services/account.service.ts
index 56df8fca6..1894e8efd 100644
--- a/UI/Web/src/app/_services/account.service.ts
+++ b/UI/Web/src/app/_services/account.service.ts
@@ -7,6 +7,7 @@ import { Preferences } from '../_models/preferences/preferences';
import { User } from '../_models/user';
import { Router } from '@angular/router';
import { MessageHubService } from './message-hub.service';
+import { ThemeService } from '../theme.service';
@Injectable({
providedIn: 'root'
@@ -33,7 +34,7 @@ export class AccountService implements OnDestroy {
private readonly onDestroy = new Subject<void>();
constructor(private httpClient: HttpClient, private router: Router,
- private messageHub: MessageHubService) {}
+ private messageHub: MessageHubService, private themeService: ThemeService) {}
ngOnDestroy(): void {
this.onDestroy.next();
@@ -61,6 +62,7 @@ export class AccountService implements OnDestroy {
map((response: User) => {
const user = response;
if (user) {
+ console.log('Login: ', user);
this.setCurrentUser(user);
this.messageHub.createHubConnection(user, this.hasAdminRole(user));
}
@@ -77,6 +79,11 @@ export class AccountService implements OnDestroy {
localStorage.setItem(this.userKey, JSON.stringify(user));
localStorage.setItem(this.lastLoginKey, user.username);
+ if (user.preferences) {
+ this.themeService.setTheme(user.preferences.theme.name);
+ } else {
+ this.themeService.setTheme(this.themeService.defaultTheme);
+ }
}
this.currentUserSource.next(user);
diff --git a/UI/Web/src/app/_services/image.service.ts b/UI/Web/src/app/_services/image.service.ts
index 7b76539ab..aaedd133a 100644
--- a/UI/Web/src/app/_services/image.service.ts
+++ b/UI/Web/src/app/_services/image.service.ts
@@ -1,7 +1,9 @@
-import { Injectable, OnDestroy } from '@angular/core';
+import { DOCUMENT } from '@angular/common';
+import { Inject, Injectable, OnDestroy } from '@angular/core';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { environment } from 'src/environments/environment';
+import { ThemeService } from '../theme.service';
import { RecentlyAddedItem } from '../_models/recently-added-item';
import { AccountService } from './account.service';
import { NavService } from './nav.service';
@@ -19,9 +21,9 @@ export class ImageService implements OnDestroy {
private onDestroy: Subject<void> = new Subject();
- constructor(private navSerivce: NavService, private accountService: AccountService) {
- this.navSerivce.darkMode$.subscribe(res => {
- if (res) {
+ constructor(private accountService: AccountService, private themeService: ThemeService) {
+ this.themeService.currentTheme$.pipe(takeUntil(this.onDestroy)).subscribe(theme => {
+ if (this.themeService.isDarkTheme()) {
this.placeholderImage = 'assets/images/image-placeholder.dark-min.png';
this.errorImage = 'assets/images/error-placeholder2.dark-min.png';
} else {
diff --git a/UI/Web/src/app/_services/message-hub.service.ts b/UI/Web/src/app/_services/message-hub.service.ts
index 7547bf243..b09b17343 100644
--- a/UI/Web/src/app/_services/message-hub.service.ts
+++ b/UI/Web/src/app/_services/message-hub.service.ts
@@ -1,15 +1,13 @@
import { EventEmitter, Injectable } from '@angular/core';
import { Router } from '@angular/router';
import { HubConnection, HubConnectionBuilder } from '@microsoft/signalr';
-import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
import { ToastrService } from 'ngx-toastr';
import { BehaviorSubject, ReplaySubject } from 'rxjs';
import { environment } from 'src/environments/environment';
-import { UpdateNotificationModalComponent } from '../shared/update-notification/update-notification-modal.component';
-import { RefreshMetadataEvent } from '../_models/events/refresh-metadata-event';
import { ProgressEvent } from '../_models/events/scan-library-progress-event';
import { ScanSeriesEvent } from '../_models/events/scan-series-event';
import { SeriesAddedEvent } from '../_models/events/series-added-event';
+import { SiteThemeProgressEvent } from '../_models/events/site-theme-progress-event';
import { User } from '../_models/user';
export enum EVENTS {
@@ -25,6 +23,10 @@ export enum EVENTS {
BackupDatabaseProgress = 'BackupDatabaseProgress',
CleanupProgress = 'CleanupProgress',
DownloadProgress = 'DownloadProgress',
+ /**
+ * A custom user site theme is added or removed during a scan
+ */
+ SiteThemeProgress = 'SiteThemeProgress',
/**
* A cover is updated
*/
@@ -122,6 +124,13 @@ export class MessageHubService {
});
});
+ this.hubConnection.on(EVENTS.SiteThemeProgress, resp => {
+ this.messagesSource.next({
+ event: EVENTS.SiteThemeProgress,
+ payload: resp.body as SiteThemeProgressEvent
+ });
+ });
+
this.hubConnection.on(EVENTS.SeriesAddedToCollection, resp => {
this.messagesSource.next({
event: EVENTS.SeriesAddedToCollection,
diff --git a/UI/Web/src/app/_services/nav.service.ts b/UI/Web/src/app/_services/nav.service.ts
index 74ccc3339..c1ca3f0ad 100644
--- a/UI/Web/src/app/_services/nav.service.ts
+++ b/UI/Web/src/app/_services/nav.service.ts
@@ -1,4 +1,4 @@
-import { Injectable, Renderer2, RendererFactory2 } from '@angular/core';
+import { Injectable } from '@angular/core';
import { ReplaySubject } from 'rxjs';
@Injectable({
@@ -9,14 +9,7 @@ export class NavService {
private navbarVisibleSource = new ReplaySubject<boolean>(1);
navbarVisible$ = this.navbarVisibleSource.asObservable();
- private darkMode: boolean = true;
- private darkModeSource = new ReplaySubject<boolean>(1);
- darkMode$ = this.darkModeSource.asObservable();
-
- private renderer: Renderer2;
-
- constructor(rendererFactory: RendererFactory2) {
- this.renderer = rendererFactory.createRenderer(null, null);
+ constructor() {
this.showNavBar();
}
@@ -27,26 +20,4 @@ export class NavService {
hideNavBar() {
this.navbarVisibleSource.next(false);
}
-
- toggleDarkMode() {
- this.darkMode = !this.darkMode;
- this.updateColorScheme();
- this.darkModeSource.next(this.darkMode);
- }
-
- setDarkMode(mode: boolean) {
- this.darkMode = mode;
- this.updateColorScheme();
- this.darkModeSource.next(this.darkMode);
- }
-
- private updateColorScheme() {
- if (this.darkMode) {
- this.renderer.setStyle(document.querySelector('html'), 'color-scheme', 'dark');
- } else {
- this.renderer.setStyle(document.querySelector('html'), 'color-scheme', 'light');
- }
- }
-
-
}
diff --git a/UI/Web/src/app/admin/_modals/directory-picker/directory-picker.component.html b/UI/Web/src/app/admin/_modals/directory-picker/directory-picker.component.html
index 60debc54d..58a9ec9d3 100644
--- a/UI/Web/src/app/admin/_modals/directory-picker/directory-picker.component.html
+++ b/UI/Web/src/app/admin/_modals/directory-picker/directory-picker.component.html
@@ -1,30 +1,25 @@
-
<div class="modal-header">
<h4 class="modal-title" id="modal-basic-title">Choose a Directory</h4>
- <button type="button" class="close" aria-label="Close" (click)="close()">
- <span aria-hidden="true">&times;</span>
- </button>
+ <button type="button" class="btn-close" aria-label="Close" (click)="close()"></button>
</div>
<div class="modal-body">
- <div class="form-group">
- <label for="filter">Filter</label>
+ <div class="mb-3">
+ <label for="filter" class="form-label">Filter</label>
<div class="input-group">
<input id="filter" autocomplete="off" class="form-control" [(ngModel)]="filterQuery" type="text" aria-describedby="reset-input">
- <div class="input-group-append">
- <button class="btn btn-outline-secondary" type="button" id="reset-input" (click)="filterQuery = '';">Clear</button>
- </div>
+ <button class="btn btn-outline-secondary" type="button" id="reset-input" (click)="filterQuery = '';">Clear</button>
</div>
</div>
<nav aria-label="directory breadcrumb">
<ol class="breadcrumb" *ngIf="routeStack.peek() !== undefined; else noBreadcrumb">
- <li class="breadcrumb-item {{route === routeStack.peek() ? 'active' : ''}}" *ngFor="let route of routeStack.items; let index = index">
+ <li class="breadcrumb-item {{route === routeStack.peek() ? 'active' : ''}}" *ngFor="let route of routeStack.items; let index = index">
<ng-container *ngIf="route === routeStack.peek(); else nonActive">
{{route}}
</ng-container>
<ng-template #nonActive>
<a href="javascript:void(0);" (click)="navigateTo(index)">{{route}}</a>
</ng-template>
- </li>
+ </li>
</ol>
<ng-template #noBreadcrumb>
<div class="breadcrumb">Select a folder to view breadcrumb. Don't see your directory, try checking / first.</div>
@@ -33,17 +28,17 @@
<ul class="list-group">
<div class="list-group-item list-group-item-action">
<button (click)="goBack()" class="btn btn-secondary" [disabled]="routeStack.peek() === undefined">
- <i class="fa fa-arrow-left mr-2" aria-hidden="true"></i>
+ <i class="fa fa-arrow-left me-2" aria-hidden="true"></i>
Back
</button>
- <button type="button" class="btn btn-primary float-right" [disabled]="routeStack.peek() === undefined" (click)="shareFolder('', $event)">Share</button>
+ <button type="button" class="btn btn-primary float-end" [disabled]="routeStack.peek() === undefined" (click)="shareFolder('', $event)">Share</button>
</div>
</ul>
<ul class="list-group scrollable">
<button *ngFor="let folder of folders | filter: filterFolder" class="list-group-item list-group-item-action" (click)="selectNode(folder)">
<span>{{getStem(folder)}}</span>
- <button type="button" class="btn btn-primary float-right" (click)="shareFolder(folder, $event)">Share</button>
+ <button type="button" class="btn btn-primary float-end" (click)="shareFolder(folder, $event)">Share</button>
</button>
<div class="list-group-item text-center" *ngIf="folders.length === 0">
There are no folders here
@@ -51,6 +46,6 @@
</ul>
</div>
<div class="modal-footer">
- <a class="btn btn-info" *ngIf="helpUrl.length > 0" href="{{helpUrl}}" target="_blank">Help</a>
+ <a class="btn btn-icon" *ngIf="helpUrl.length > 0" href="{{helpUrl}}" target="_blank">Help</a>
<button type="button" class="btn btn-secondary" (click)="close()">Cancel</button>
-</div>
+</div>
\ No newline at end of file
diff --git a/UI/Web/src/app/admin/_modals/library-access-modal/library-access-modal.component.html b/UI/Web/src/app/admin/_modals/library-access-modal/library-access-modal.component.html
index e97c96179..886584b95 100644
--- a/UI/Web/src/app/admin/_modals/library-access-modal/library-access-modal.component.html
+++ b/UI/Web/src/app/admin/_modals/library-access-modal/library-access-modal.component.html
@@ -1,8 +1,8 @@
<div class="modal-header">
<h4 class="modal-title" id="modal-basic-title">Library Access</h4>
- <button type="button" class="close" aria-label="Close" (click)="close()">
- <span aria-hidden="true">&times;</span>
+ <button type="button" class="btn-close" aria-label="Close" (click)="close()">
+
</button>
</div>
<div class="modal-body">
diff --git a/UI/Web/src/app/admin/_modals/library-editor-modal/library-editor-modal.component.html b/UI/Web/src/app/admin/_modals/library-editor-modal/library-editor-modal.component.html
index a972328c3..53c434ce5 100644
--- a/UI/Web/src/app/admin/_modals/library-editor-modal/library-editor-modal.component.html
+++ b/UI/Web/src/app/admin/_modals/library-editor-modal/library-editor-modal.component.html
@@ -2,35 +2,35 @@
<form [formGroup]="libraryForm">
<div class="modal-header">
<h4 class="modal-title" id="modal-basic-title">{{this.library !== undefined ? 'Edit' : 'New'}} Library</h4>
- <button type="button" class="close" aria-label="Close" (click)="close()">
- <span aria-hidden="true">&times;</span>
+ <button type="button" class="btn-close" aria-label="Close" (click)="close()">
+
</button>
</div>
<div class="modal-body">
<div class="alert alert-info" *ngIf="errorMessage !== ''">
<strong>Error: </strong> {{errorMessage}}
</div>
- <div class="form-group">
- <label for="library-name">Name</label>
+ <div class="mb-3">
+ <label for="library-name" class="form-label">Name</label>
<input id="library-name" class="form-control" formControlName="name" type="text">
</div>
- <div class="form-group">
- <label for="library-type">Type</label>&nbsp;<i class="fa fa-info-circle" placement="right" [ngbTooltip]="typeTooltip" role="button" tabindex="0"></i>
+ <div class="mb-3">
+ <label for="library-type" class="form-label">Type</label>&nbsp;<i class="fa fa-info-circle" placement="right" [ngbTooltip]="typeTooltip" role="button" tabindex="0"></i>
<ng-template #typeTooltip>Library type determines how filenames are parsed and if the UI shows Chapters (Manga) vs Issues (Comics). Book work the same way as Manga but fall back to embedded data.</ng-template>
- <span class="sr-only" id="library-type-help">Library type determines how filenames are parsed and if the UI shows Chapters (Manga) vs Issues (Comics). Book work the same way as Manga but fall back to embedded data.</span>
- <select class="form-control" id="library-type" formControlName="type" [attr.disabled]="this.library" aria-describedby="library-type-help">
+ <span class="visually-hidden" id="library-type-help">Library type determines how filenames are parsed and if the UI shows Chapters (Manga) vs Issues (Comics). Book work the same way as Manga but fall back to embedded data.</span>
+ <select class="form-select" id="library-type" formControlName="type" [attr.disabled]="this.library" aria-describedby="library-type-help">
<option [value]="i" *ngFor="let opt of libraryTypes; let i = index">{{opt}}</option>
</select>
</div>
- <h4>Folders <button type="button" class="btn float-right btn-sm" (click)="openDirectoryPicker()"><i class="fa fa-plus" aria-hidden="true"></i></button></h4>
+ <h4>Folders <button type="button" class="btn float-end btn-sm" (click)="openDirectoryPicker()"><i class="fa fa-plus" aria-hidden="true"></i></button></h4>
<ul class="list-group" style="width: 100%">
<li class="list-group-item" *ngFor="let folder of selectedFolders; let i = index">
{{folder}}
- <button class="btn float-right btn-sm" (click)="removeFolder(folder)"><i class="fa fa-times-circle" aria-hidden="true"></i></button>
+ <button class="btn float-end btn-sm" (click)="removeFolder(folder)"><i class="fa fa-times-circle" aria-hidden="true"></i></button>
</li>
</ul>
</div>
diff --git a/UI/Web/src/app/admin/_modals/reset-password-modal/reset-password-modal.component.html b/UI/Web/src/app/admin/_modals/reset-password-modal/reset-password-modal.component.html
index 323f4b35f..580a26e41 100644
--- a/UI/Web/src/app/admin/_modals/reset-password-modal/reset-password-modal.component.html
+++ b/UI/Web/src/app/admin/_modals/reset-password-modal/reset-password-modal.component.html
@@ -1,16 +1,16 @@
<form [formGroup]="resetPasswordForm">
<div class="modal-header">
<h4 class="modal-title" id="modal-basic-title">Reset {{member.username | sentenceCase}}'s Password</h4>
- <button type="button" class="close" aria-label="Close" (click)="close()">
- <span aria-hidden="true">&times;</span>
+ <button type="button" class="btn-close" aria-label="Close" (click)="close()">
+
</button>
</div>
<div class="modal-body">
<div class="alert alert-info" *ngIf="errorMessage !== ''">
<strong>Error: </strong> {{errorMessage}}
</div>
- <div class="form-group">
- <label for="password">New Password</label>
+ <div class="mb-3">
+ <label for="password" class="form-label">New Password</label>
<input id="password" class="form-control" minlength="4" formControlName="password" type="password">
</div>
</div>
diff --git a/UI/Web/src/app/admin/changelog/changelog.component.html b/UI/Web/src/app/admin/changelog/changelog.component.html
index 10709f0ed..481544f9e 100644
--- a/UI/Web/src/app/admin/changelog/changelog.component.html
+++ b/UI/Web/src/app/admin/changelog/changelog.component.html
@@ -3,13 +3,13 @@
<div class="card w-100 mb-2" style="width: 18rem;">
<div class="card-body">
<h4 class="card-title">{{update.updateTitle}}&nbsp;
- <span class="badge badge-secondary" *ngIf="update.updateVersion === installedVersion">Installed</span>
- <span class="badge badge-secondary" *ngIf="update.updateVersion > installedVersion">Available</span>
+ <span class="badge bg-secondary" *ngIf="update.updateVersion === installedVersion">Installed</span>
+ <span class="badge bg-secondary" *ngIf="update.updateVersion > installedVersion">Available</span>
</h4>
<h6 class="card-subtitle mb-2 text-muted">Published: {{update.publishDate | date: 'short'}}</h6>
<pre class="card-text update-body" [innerHtml]="update.updateBody | safeHtml"></pre>
- <a *ngIf="!update.isDocker" href="{{update.updateUrl}}" class="btn btn-{{indx === 0 ? 'primary' : 'secondary'}} float-right" target="_blank">Download</a>
+ <a *ngIf="!update.isDocker" href="{{update.updateUrl}}" class="btn btn-{{indx === 0 ? 'primary' : 'secondary'}} float-end" target="_blank">Download</a>
</div>
</div>
</ng-container>
diff --git a/UI/Web/src/app/admin/dashboard/dashboard.component.html b/UI/Web/src/app/admin/dashboard/dashboard.component.html
index fdf09ea33..84a81d506 100644
--- a/UI/Web/src/app/admin/dashboard/dashboard.component.html
+++ b/UI/Web/src/app/admin/dashboard/dashboard.component.html
@@ -1,7 +1,7 @@
<div class="container">
<h2>Admin Dashboard</h2>
- <ul ngbNav #nav="ngbNav" [(activeId)]="active" class="nav-tabs nav-pills">
+ <ul ngbNav #nav="ngbNav" [(activeId)]="active" class="nav nav-tabs">
<li *ngFor="let tab of tabs" [ngbNavItem]="tab">
<a ngbNavLink routerLink="." [fragment]="tab.fragment">{{ tab.title | sentenceCase }}</a>
<ng-template ngbNavContent>
diff --git a/UI/Web/src/app/admin/dashboard/dashboard.component.scss b/UI/Web/src/app/admin/dashboard/dashboard.component.scss
index e69de29bb..b58dd97a9 100644
--- a/UI/Web/src/app/admin/dashboard/dashboard.component.scss
+++ b/UI/Web/src/app/admin/dashboard/dashboard.component.scss
@@ -0,0 +1,3 @@
+.container {
+ padding-top: 10px;
+}
\ No newline at end of file
diff --git a/UI/Web/src/app/admin/edit-user/edit-user.component.html b/UI/Web/src/app/admin/edit-user/edit-user.component.html
index db7af4508..4ab5c3d0f 100644
--- a/UI/Web/src/app/admin/edit-user/edit-user.component.html
+++ b/UI/Web/src/app/admin/edit-user/edit-user.component.html
@@ -1,16 +1,16 @@
<div class="modal-header">
<h4 class="modal-title" id="modal-basic-title">Edit {{member.username | sentenceCase}}</h4>
- <button type="button" class="close" aria-label="Close" (click)="close()">
- <span aria-hidden="true">&times;</span>
+ <button type="button" class="btn-close" aria-label="Close" (click)="close()">
+
</button>
</div>
<div class="modal-body">
<form [formGroup]="userForm">
- <div class="row no-gutters">
- <div class="col-md-6 col-sm-12 pr-2">
- <div class="form-group">
- <label for="username">Username</label>
+ <div class="row g-0">
+ <div class="col-md-6 col-sm-12 pe-2">
+ <div class="mb-3">
+ <label for="username" class="form-label">Username</label>
<input id="username" class="form-control" formControlName="username" type="text">
<div id="inviteForm-validations" class="invalid-feedback" *ngIf="userForm.dirty || userForm.touched">
<div *ngIf="userForm.get('username')?.errors?.required">
@@ -20,8 +20,8 @@
</div>
</div>
<div class="col-md-6 col-sm-12">
- <div class="form-group" style="width:100%">
- <label for="email">Email</label>
+ <div class="mb-3" style="width:100%">
+ <label for="email" class="form-label">Email</label>
<input class="form-control" type="email" id="email" formControlName="email" [disabled]="true">
<div id="inviteForm-validations" class="invalid-feedback" *ngIf="userForm.dirty || userForm.touched">
<div *ngIf="userForm.get('email')?.errors?.required">
@@ -35,7 +35,7 @@
</div>
</div>
- <div class="row no-gutters">
+ <div class="row g-0">
<div class="col-md-6">
<app-role-selector (selected)="updateRoleSelection($event)" [allowAdmin]="true" [member]="member"></app-role-selector>
</div>
diff --git a/UI/Web/src/app/admin/invite-user/invite-user.component.html b/UI/Web/src/app/admin/invite-user/invite-user.component.html
index 034420235..83fbb86eb 100644
--- a/UI/Web/src/app/admin/invite-user/invite-user.component.html
+++ b/UI/Web/src/app/admin/invite-user/invite-user.component.html
@@ -1,7 +1,7 @@
<div class="modal-header">
<h4 class="modal-title" id="modal-basic-title">Invite User</h4>
- <button type="button" class="close" aria-label="Close" (click)="close()">
- <span aria-hidden="true">&times;</span>
+ <button type="button" class="btn-close" aria-label="Close" (click)="close()">
+
</button>
</div>
<div class="modal-body">
@@ -16,9 +16,9 @@
<form [formGroup]="inviteForm">
- <div class="row no-gutters">
- <div class="form-group" style="width:100%">
- <label for="email">Email</label>
+ <div class="row g-0">
+ <div class="mb-3" style="width:100%">
+ <label for="email" class="form-label">Email</label>
<input class="form-control" type="email" id="email" formControlName="email" required>
<div id="inviteForm-validations" class="invalid-feedback" *ngIf="inviteForm.dirty || inviteForm.touched">
<div *ngIf="email?.errors?.required">
@@ -33,7 +33,7 @@
<a class="email-link" href="{{emailLink}}" target="_blank">{{emailLink}}</a>
</ng-container>
- <div class="row no-gutters">
+ <div class="row g-0">
<div class="col-md-6">
<app-role-selector (selected)="updateRoleSelection($event)" [allowAdmin]="true"></app-role-selector>
</div>
diff --git a/UI/Web/src/app/admin/manage-library/manage-library.component.html b/UI/Web/src/app/admin/manage-library/manage-library.component.html
index fbd9809e5..ba80c0a5e 100644
--- a/UI/Web/src/app/admin/manage-library/manage-library.component.html
+++ b/UI/Web/src/app/admin/manage-library/manage-library.component.html
@@ -1,19 +1,19 @@
<div class="container-fluid">
<div class="row mb-2">
<div class="col-8"><h3>Libraries</h3></div>
- <div class="col-4"><button class="btn btn-primary float-right" (click)="addLibrary()"><i class="fa fa-plus" aria-hidden="true"></i><span class="phone-hidden">&nbsp;Add Library</span></button></div>
+ <div class="col-4"><button class="btn btn-primary float-end" (click)="addLibrary()"><i class="fa fa-plus" aria-hidden="true"></i><span class="phone-hidden">&nbsp;Add Library</span></button></div>
</div>
<ul class="list-group" *ngIf="!createLibraryToggle; else createLibrary">
- <li *ngFor="let library of libraries; let idx = index; trackby: trackbyLibrary" class="list-group-item">
+ <li *ngFor="let library of libraries; let idx = index; trackby: trackbyLibrary" class="list-group-item no-hover">
<div>
<h4>
<span id="library-name--{{idx}}">{{library.name}}</span>&nbsp;
<div class="spinner-border text-primary" style="width: 1.5rem; height: 1.5rem;" role="status" *ngIf="scanInProgress.hasOwnProperty(library.id) && scanInProgress[library.id].progress" title="Scan in progress. Started at {{scanInProgress[library.id].timestamp | date: 'short'}}">
- <span class="sr-only">Scan for {{library.name}} in progress</span>
+ <span class="visually-hidden">Scan for {{library.name}} in progress</span>
</div>
- <div class="float-right">
- <button class="btn btn-secondary mr-2 btn-sm" (click)="scanLibrary(library)" placement="top" ngbTooltip="Scan Library" attr.aria-label="Scan Library"><i class="fa fa-sync-alt" title="Scan"></i></button>
- <button class="btn btn-danger mr-2 btn-sm" [disabled]="deletionInProgress" (click)="deleteLibrary(library)"><i class="fa fa-trash" placement="top" ngbTooltip="Delete Library" attr.aria-label="Delete {{library.name | sentenceCase}}"></i></button>
+ <div class="float-end">
+ <button class="btn btn-secondary me-2 btn-sm" (click)="scanLibrary(library)" placement="top" ngbTooltip="Scan Library" attr.aria-label="Scan Library"><i class="fa fa-sync-alt" title="Scan"></i></button>
+ <button class="btn btn-danger me-2 btn-sm" [disabled]="deletionInProgress" (click)="deleteLibrary(library)"><i class="fa fa-trash" placement="top" ngbTooltip="Delete Library" attr.aria-label="Delete {{library.name | sentenceCase}}"></i></button>
<button class="btn btn-primary btn-sm" (click)="editLibrary(library)"><i class="fa fa-pen" placement="top" ngbTooltip="Edit" attr.aria-label="Edit {{library.name | sentenceCase}}"></i></button>
</div>
</h4>
diff --git a/UI/Web/src/app/admin/manage-settings/manage-settings.component.html b/UI/Web/src/app/admin/manage-settings/manage-settings.component.html
index 344fc374f..b8b747b45 100644
--- a/UI/Web/src/app/admin/manage-settings/manage-settings.component.html
+++ b/UI/Web/src/app/admin/manage-settings/manage-settings.component.html
@@ -1,65 +1,63 @@
<div class="container-fluid">
<form [formGroup]="settingsForm" *ngIf="serverSettings !== undefined">
<p class="text-warning pt-2">Port and Logging Level require a manual restart of Kavita to take effect.</p>
- <div class="form-group">
- <label for="settings-cachedir">Cache Directory</label>&nbsp;<i class="fa fa-info-circle" placement="right" [ngbTooltip]="cacheDirectoryTooltip" role="button" tabindex="0"></i>
+ <div class="mb-3">
+ <label for="settings-cachedir" class="form-label">Cache Directory</label>&nbsp;<i class="fa fa-info-circle" placement="right" [ngbTooltip]="cacheDirectoryTooltip" role="button" tabindex="0"></i>
<ng-template #cacheDirectoryTooltip>Where the server place temporary files when reading. This will be cleaned up on a regular basis.</ng-template>
- <span class="sr-only" id="settings-cachedir-help">Where the server place temporary files when reading. This will be cleaned up on a regular basis.</span>
+ <span class="visually-hidden" id="settings-cachedir-help">Where the server place temporary files when reading. This will be cleaned up on a regular basis.</span>
<input readonly id="settings-cachedir" aria-describedby="settings-cachedir-help" class="form-control" formControlName="cacheDirectory" type="text">
</div>
- <div class="form-group">
- <label for="settings-bookmarksdir">Bookmarks Directory</label>&nbsp;<i class="fa fa-info-circle" placement="right" [ngbTooltip]="bookmarksDirectoryTooltip" role="button" tabindex="0"></i>
+ <div class="mb-3">
+ <label for="settings-bookmarksdir" class="form-label">Bookmarks Directory</label>&nbsp;<i class="fa fa-info-circle" placement="right" [ngbTooltip]="bookmarksDirectoryTooltip" role="button" tabindex="0"></i>
<ng-template #bookmarksDirectoryTooltip>Location where bookmarks will be stored. Bookmarks are source files and can be large. Choose a location with adequate storage. Directory is managed, other files within directory will be deleted.</ng-template>
- <span class="sr-only" id="settings-bookmarksdir-help"><ng-container [ngTemplateOutlet]="bookmarksDirectoryTooltip"></ng-container></span>
+ <span class="visually-hidden" id="settings-bookmarksdir-help"><ng-container [ngTemplateOutlet]="bookmarksDirectoryTooltip"></ng-container></span>
<div class="input-group">
<input readonly id="settings-bookmarksdir" aria-describedby="settings-bookmarksdir-help" class="form-control" formControlName="bookmarksDirectory" type="text" aria-describedby="change-bookmarks-dir">
- <div class="input-group-append">
- <button id="change-bookmarks-dir" class="btn btn-primary" (click)="openDirectoryChooser(settingsForm.get('bookmarksDirectory')?.value, 'bookmarksDirectory')">
- Change
- </button>
- </div>
+ <button id="change-bookmarks-dir" class="btn btn-primary" (click)="openDirectoryChooser(settingsForm.get('bookmarksDirectory')?.value, 'bookmarksDirectory')">
+ Change
+ </button>
</div>
</div>
- <!-- <div class="form-group">
+ <!-- <div class="mb-3">
<label for="settings-baseurl">Base Url</label>&nbsp;<i class="fa fa-info-circle" placement="right" [ngbTooltip]="baseUrlTooltip" role="button" tabindex="0"></i>
<ng-template #baseUrlTooltip>Use this if you want to host Kavita on a base url ie) yourdomain.com/kavita</ng-template>
- <span class="sr-only" id="settings-baseurl-help">Use this if you want to host Kavita on a base url ie) yourdomain.com/kavita</span>
+ <span class="visually-hidden" id="settings-baseurl-help">Use this if you want to host Kavita on a base url ie) yourdomain.com/kavita</span>
<input id="settings-baseurl" aria-describedby="settings-baseurl-help" class="form-control" formControlName="baseUrl" type="text">
</div> -->
- <div class="row no-gutters">
- <div class="form-group col-md-6 col-sm-12 pr-2">
- <label for="settings-port">Port</label>&nbsp;<i class="fa fa-info-circle" placement="right" [ngbTooltip]="portTooltip" role="button" tabindex="0"></i>
+ <div class="row g-0 mb-2">
+ <div class="form-group col-md-6 col-sm-12 pe-2">
+ <label for="settings-port" class="form-label">Port</label>&nbsp;<i class="fa fa-info-circle" placement="right" [ngbTooltip]="portTooltip" role="button" tabindex="0"></i>
<ng-template #portTooltip>Port the server listens on. This is fixed if you are running on Docker. Requires restart to take effect.</ng-template>
- <span class="sr-only" id="settings-port-help">Port the server listens on. This is fixed if you are running on Docker. Requires restart to take effect.</span>
+ <span class="visually-hidden" id="settings-port-help">Port the server listens on. This is fixed if you are running on Docker. Requires restart to take effect.</span>
<input id="settings-port" aria-describedby="settings-port-help" class="form-control" formControlName="port" type="number" step="1" min="1" onkeypress="return event.charCode >= 48 && event.charCode <= 57">
</div>
<div class="form-group col-md-6 col-sm-12">
- <label for="logging-level-port">Logging Level</label>&nbsp;<i class="fa fa-info-circle" placement="right" [ngbTooltip]="loggingLevelTooltip" role="button" tabindex="0"></i>
+ <label for="logging-level-port" class="form-label">Logging Level</label>&nbsp;<i class="fa fa-info-circle" placement="right" [ngbTooltip]="loggingLevelTooltip" role="button" tabindex="0"></i>
<ng-template #loggingLevelTooltip>Use debug to help identify issues. Debug can eat up a lot of disk space. Requires restart to take effect.</ng-template>
- <span class="sr-only" id="logging-level-port-help">Port the server listens on. Requires restart to take effect.</span>
- <select id="logging-level-port" aria-describedby="logging-level-port-help" class="form-control" aria-describedby="settings-tasks-scan-help" formControlName="loggingLevel">
+ <span class="visually-hidden" id="logging-level-port-help">Port the server listens on. Requires restart to take effect.</span>
+ <select id="logging-level-port" aria-describedby="logging-level-port-help" class="form-select" aria-describedby="settings-tasks-scan-help" formControlName="loggingLevel">
<option *ngFor="let level of logLevels" [value]="level">{{level | titlecase}}</option>
</select>
</div>
</div>
- <div class="form-group">
- <label for="stat-collection" aria-describedby="collection-info">Allow Anonymous Usage Collection</label>
+ <div class="mb-3">
+ <label for="stat-collection" class="form-label" aria-describedby="collection-info">Allow Anonymous Usage Collection</label>
<p class="accent" id="collection-info">Send anonymous usage and error information to Kavita's servers. This includes information on your browser, error reporting as well as OS and runtime version. We will use this information to prioritize features, bug fixes, and preformance tuning. Requires restart to take effect.</p>
- <div class="form-check">
+ <div class="form-check form-switch">
<input id="stat-collection" type="checkbox" aria-label="Stat Collection" class="form-check-input" formControlName="allowStatCollection">
<label for="stat-collection" class="form-check-label">Send Data</label>
</div>
</div>
- <div class="form-group">
- <label for="opds" aria-describedby="opds-info">OPDS</label>
+ <div class="mb-3">
+ <label for="opds" aria-describedby="opds-info" class="form-label">OPDS</label>
<p class="accent" id="opds-info">OPDS support will allow all users to use OPDS to read and download content from the server. If OPDS is enabled, a user will not need download permissions to download media while using it.</p>
- <div class="form-check">
+ <div class="form-check form-switch">
<input id="opds" type="checkbox" aria-label="OPDS Support" class="form-check-input" formControlName="enableOpds">
<label for="opds" class="form-check-label">Enable OPDS</label>
</div>
@@ -70,47 +68,45 @@
email service. Set the url of the email service and use the Test button to ensure it works. At any time you can reset to ours. There is no way to disable emails althought confirmation links will always
be saved to logs.
</p>
- <div class="form-group">
- <label for="settings-emailservice">Email Service Url</label>&nbsp;<i class="fa fa-info-circle" placement="right" [ngbTooltip]="emailServiceTooltip" role="button" tabindex="0"></i>
+ <div class="mb-3">
+ <label for="settings-emailservice" class="form-label">Email Service Url</label>&nbsp;<i class="fa fa-info-circle" placement="right" [ngbTooltip]="emailServiceTooltip" role="button" tabindex="0"></i>
<ng-template #emailServiceTooltip>Use fully qualified url of the email service. Do not include ending slash.</ng-template>
- <span class="sr-only" id="settings-emailservice-help"><ng-container [ngTemplateOutlet]="emailServiceTooltip"></ng-container></span>
+ <span class="visually-hidden" id="settings-emailservice-help"><ng-container [ngTemplateOutlet]="emailServiceTooltip"></ng-container></span>
<div class="input-group">
<input id="settings-emailservice" aria-describedby="settings-emailservice-help" class="form-control" formControlName="emailServiceUrl" type="text" aria-describedby="change-bookmarks-dir">
- <div class="input-group-append">
- <button class="btn btn-secondary" (click)="resetEmailServiceUrl()">
- Reset
- </button>
- <button class="btn btn-secondary" (click)="testEmailServiceUrl()">
- Test
- </button>
- </div>
+ <button class="btn btn-outline-secondary" (click)="resetEmailServiceUrl()">
+ Reset
+ </button>
+ <button class="btn btn-outline-secondary" (click)="testEmailServiceUrl()">
+ Test
+ </button>
</div>
</div>
<h4>Reoccuring Tasks</h4>
- <div class="form-group">
- <label for="settings-tasks-scan">Library Scan</label>&nbsp;<i class="fa fa-info-circle" placement="right" [ngbTooltip]="taskScanTooltip" role="button" tabindex="0"></i>
+ <div class="mb-3">
+ <label for="settings-tasks-scan" class="form-label">Library Scan</label>&nbsp;<i class="fa fa-info-circle" placement="right" [ngbTooltip]="taskScanTooltip" role="button" tabindex="0"></i>
<ng-template #taskScanTooltip>How often Kavita will scan and refresh metatdata around manga files.</ng-template>
- <span class="sr-only" id="settings-tasks-scan-help">How often Kavita will scan and refresh metatdata around manga files.</span>
- <select class="form-control" aria-describedby="settings-tasks-scan-help" formControlName="taskScan" id="settings-tasks-scan">
+ <span class="visually-hidden" id="settings-tasks-scan-help">How often Kavita will scan and refresh metatdata around manga files.</span>
+ <select class="form-select" aria-describedby="settings-tasks-scan-help" formControlName="taskScan" id="settings-tasks-scan">
<option *ngFor="let freq of taskFrequencies" [value]="freq">{{freq | titlecase}}</option>
</select>
</div>
- <div class="form-group">
- <label for="settings-tasks-backup">Library Database Backup</label>&nbsp;<i class="fa fa-info-circle" placement="right" [ngbTooltip]="taskBackupTooltip" role="button" tabindex="0"></i>
+ <div class="mb-3">
+ <label for="settings-tasks-backup" class="form-label">Library Database Backup</label>&nbsp;<i class="fa fa-info-circle" placement="right" [ngbTooltip]="taskBackupTooltip" role="button" tabindex="0"></i>
<ng-template #taskBackupTooltip>How often Kavita will backup the database.</ng-template>
- <span class="sr-only" id="settings-tasks-backup-help">How often Kavita will backup the database.</span>
- <select class="form-control" aria-describedby="settings-tasks-backup-help" formControlName="taskBackup" id="settings-tasks-backup">
+ <span class="visually-hidden" id="settings-tasks-backup-help">How often Kavita will backup the database.</span>
+ <select class="form-select" aria-describedby="settings-tasks-backup-help" formControlName="taskBackup" id="settings-tasks-backup">
<option *ngFor="let freq of taskFrequencies" [value]="freq">{{freq | titlecase}}</option>
</select>
</div>
- <div class="float-right">
- <button type="button" class="btn btn-secondary mr-2" (click)="resetToDefaults()">Reset to Default</button>
- <button type="button" class="btn btn-secondary mr-2" (click)="resetForm()">Reset</button>
- <button type="submit" class="btn btn-primary" (click)="saveSettings()" [disabled]="!settingsForm.touched && !settingsForm.dirty">Save</button>
+ <div class="col-auto d-flex d-md-block justify-content-sm-center text-md-end">
+ <button type="button" class="flex-fill btn btn-secondary me-2" (click)="resetToDefaults()">Reset to Default</button>
+ <button type="button" class="flex-fill btn btn-secondary me-2" (click)="resetForm()">Reset</button>
+ <button type="submit" class="flex-fill btn btn-primary" (click)="saveSettings()" [disabled]="!settingsForm.touched && !settingsForm.dirty">Save</button>
</div>
</form>
</div>
\ No newline at end of file
diff --git a/UI/Web/src/app/admin/manage-system/manage-system.component.html b/UI/Web/src/app/admin/manage-system/manage-system.component.html
index a45e55955..47032dfb3 100644
--- a/UI/Web/src/app/admin/manage-system/manage-system.component.html
+++ b/UI/Web/src/app/admin/manage-system/manage-system.component.html
@@ -1,11 +1,11 @@
<div class="container-fluid">
- <div class="float-right">
+ <div class="float-end">
<div class="d-inline-block" ngbDropdown #myDrop="ngbDropdown">
- <button class="btn btn-outline-primary mr-2" id="dropdownManual" ngbDropdownToggle>
+ <button class="btn btn-outline-primary me-2" id="dropdownManual" ngbDropdownToggle>
<ng-container *ngIf="backupDBInProgress || clearCacheInProgress || isCheckingForUpdate || downloadLogsInProgress">
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
- <span class="sr-only">Loading...</span>
+ <span class="visually-hidden">Loading...</span>
</ng-container>
Actions
</button>
@@ -28,7 +28,7 @@
<h3>About System</h3>
<hr/>
- <div class="form-group" *ngIf="serverInfo">
+ <div class="mb-3" *ngIf="serverInfo">
<dl>
<dt>Version</dt>
<dd>{{serverInfo.kavitaVersion}}</dd>
diff --git a/UI/Web/src/app/admin/manage-users/manage-users.component.html b/UI/Web/src/app/admin/manage-users/manage-users.component.html
index 8256f7f79..ac8538f63 100644
--- a/UI/Web/src/app/admin/manage-users/manage-users.component.html
+++ b/UI/Web/src/app/admin/manage-users/manage-users.component.html
@@ -4,28 +4,28 @@
<ng-container>
<div class="row mb-2">
<div class="col-8"><h3>Pending Invites</h3></div>
- <div class="col-4"><button class="btn btn-primary float-right" (click)="inviteUser()"><i class="fa fa-plus" aria-hidden="true"></i><span class="phone-hidden">&nbsp;Invite</span></button></div>
+ <div class="col-4"><button class="btn btn-primary float-end" (click)="inviteUser()"><i class="fa fa-plus" aria-hidden="true"></i><span class="phone-hidden">&nbsp;Invite</span></button></div>
</div>
<ul class="list-group">
- <li class="list-group-item" *ngFor="let invite of pendingInvites; let idx = index;">
+ <li class="list-group-item no-hover" *ngFor="let invite of pendingInvites; let idx = index;">
<div>
<h4>
<span id="member-name--{{idx}}">{{invite.username | titlecase}} </span>
- <div class="float-right">
- <button class="btn btn-danger mr-2" (click)="deleteUser(invite)">Cancel</button>
- <button class="btn btn-secondary mr-2" (click)="resendEmail(invite)">Resend</button>
+ <div class="float-end">
+ <button class="btn btn-danger me-2" (click)="deleteUser(invite)">Cancel</button>
+ <button class="btn btn-secondary me-2" (click)="resendEmail(invite)">Resend</button>
</div>
</h4>
<div>Invited: {{invite.created | date: 'short'}}</div>
</div>
</li>
- <li *ngIf="loadingMembers" class="list-group-item">
+ <li *ngIf="loadingMembers" class="list-group-item no-hover">
<div class="spinner-border text-secondary" role="status">
<span class="invisible">Loading...</span>
</div>
</li>
- <li class="list-group-item" *ngIf="pendingInvites.length === 0 && !loadingMembers">
+ <li class="list-group-item no-hover" *ngIf="pendingInvites.length === 0 && !loadingMembers">
There are no invited Users
</li>
</ul>
@@ -35,18 +35,18 @@
<h3 class="mt-3">Active Users</h3>
<ul class="list-group">
- <li *ngFor="let member of members; let idx = index;" class="list-group-item">
+ <li *ngFor="let member of members; let idx = index;" class="list-group-item no-hover">
<div>
<h4>
<i class="presence fa fa-circle" title="Active" aria-hidden="true" *ngIf="false && (messageHub.onlineUsers$ | async)?.includes(member.username)"></i>
<span id="member-name--{{idx}}">{{member.username | titlecase}} </span>
<span *ngIf="member.username === loggedInUsername">
<i class="fas fa-star" aria-hidden="true"></i>
- <span class="sr-only">(You)</span>
+ <span class="visually-hidden">(You)</span>
</span>
- <div class="float-right" *ngIf="canEditMember(member)">
- <button class="btn btn-danger mr-2" (click)="deleteUser(member)" placement="top" ngbTooltip="Delete User" attr.aria-label="Delete User {{member.username | titlecase}}"><i class="fa fa-trash" aria-hidden="true"></i></button>
- <button class="btn btn-secondary mr-2" (click)="updatePassword(member)" placement="top" ngbTooltip="Change Password" attr.aria-label="Change Password for {{member.username | titlecase}}"><i class="fa fa-key" aria-hidden="true"></i></button>
+ <div class="float-end" *ngIf="canEditMember(member)">
+ <button class="btn btn-danger me-2" (click)="deleteUser(member)" placement="top" ngbTooltip="Delete User" attr.aria-label="Delete User {{member.username | titlecase}}"><i class="fa fa-trash" aria-hidden="true"></i></button>
+ <button class="btn btn-secondary me-2" (click)="updatePassword(member)" placement="top" ngbTooltip="Change Password" attr.aria-label="Change Password for {{member.username | titlecase}}"><i class="fa fa-key" aria-hidden="true"></i></button>
<button class="btn btn-primary" (click)="openEditUser(member)" placement="top" ngbTooltip="Edit" attr.aria-label="Edit {{member.username | titlecase}}"><i class="fa fa-pen" aria-hidden="true"></i></button>
</div>
</h4>
@@ -57,10 +57,10 @@
</ng-template>
</div>
<div *ngIf="!hasAdminRole(member)">Sharing: {{formatLibraries(member)}}</div>
- <div>
+ <div class="row g-0">
Roles: <span *ngIf="getRoles(member).length === 0; else showRoles">None</span>
<ng-template #showRoles>
- <app-tag-badge *ngFor="let role of getRoles(member)">{{role}}</app-tag-badge>
+ <app-tag-badge *ngFor="let role of getRoles(member)" class="col-auto">{{role}}</app-tag-badge>
</ng-template>
</div>
</div>
diff --git a/UI/Web/src/app/app-routing.module.ts b/UI/Web/src/app/app-routing.module.ts
index 87eb0cfba..14763cbb3 100644
--- a/UI/Web/src/app/app-routing.module.ts
+++ b/UI/Web/src/app/app-routing.module.ts
@@ -11,6 +11,7 @@ import { OnDeckComponent } from './on-deck/on-deck.component';
import { DashboardComponent } from './dashboard/dashboard.component';
import { AllSeriesComponent } from './all-series/all-series.component';
import { AdminGuard } from './_guards/admin.guard';
+import { ThemeTestComponent } from './theme-test/theme-test.component';
// TODO: Once we modularize the components, use this and measure performance impact: https://angular.io/guide/lazy-loading-ngmodules#preloading-modules
@@ -71,6 +72,7 @@ const routes: Routes = [
},
{path: 'login', component: UserLoginComponent}, // TODO: move this to registration module
{path: 'no-connection', component: NotConnectedComponent},
+ {path: 'theme', component: ThemeTestComponent},
{path: '**', component: UserLoginComponent, pathMatch: 'full'}
];
diff --git a/UI/Web/src/app/app.component.html b/UI/Web/src/app/app.component.html
index 5b37261b3..43b951ba9 100644
--- a/UI/Web/src/app/app.component.html
+++ b/UI/Web/src/app/app.component.html
@@ -1,5 +1,5 @@
<app-nav-header></app-nav-header>
-<div [ngStyle]="(navService?.navbarVisible$ | async) ? {'padding-top': 'calc(56px + 5px)', 'height': '100%'} : {}">
+<div [ngStyle]="(navService?.navbarVisible$ | async) ? {'padding-top': 'calc(57px)', 'height': '100%'} : {}">
<a id="content"></a>
<router-outlet></router-outlet>
</div>
diff --git a/UI/Web/src/app/app.component.ts b/UI/Web/src/app/app.component.ts
index 1378a292a..071339229 100644
--- a/UI/Web/src/app/app.component.ts
+++ b/UI/Web/src/app/app.component.ts
@@ -1,4 +1,4 @@
-import { Component, OnInit } from '@angular/core';
+import { Component, HostListener, Inject, OnInit } from '@angular/core';
import { NavigationStart, Router } from '@angular/router';
import { take } from 'rxjs/operators';
import { AccountService } from './_services/account.service';
@@ -7,6 +7,8 @@ import { MessageHubService } from './_services/message-hub.service';
import { NavService } from './_services/nav.service';
import { filter } from 'rxjs/operators';
import { NgbModal, NgbRatingConfig } from '@ng-bootstrap/ng-bootstrap';
+import { DOCUMENT } from '@angular/common';
+import { ThemeService } from './theme.service';
@Component({
selector: 'app-root',
@@ -17,7 +19,8 @@ export class AppComponent implements OnInit {
constructor(private accountService: AccountService, public navService: NavService,
private messageHub: MessageHubService, private libraryService: LibraryService,
- private router: Router, private ngbModal: NgbModal, private ratingConfig: NgbRatingConfig) {
+ router: Router, private ngbModal: NgbModal, ratingConfig: NgbRatingConfig,
+ @Inject(DOCUMENT) private document: Document) {
// Setup default rating config
ratingConfig.max = 5;
@@ -33,22 +36,34 @@ export class AppComponent implements OnInit {
});
}
+ @HostListener('resize')
+ onResize() {
+ this.setDocHeight();
+ }
+
+ @HostListener('orientationchange')
+ onOrientationChange() {
+ this.setDocHeight();
+ }
+
ngOnInit(): void {
this.setCurrentUser();
- }
+ this.setDocHeight();
+ }
setCurrentUser() {
const user = this.accountService.getUserFromLocalStorage();
this.accountService.setCurrentUser(user);
if (user) {
- this.navService.setDarkMode(user.preferences.siteDarkMode);
this.messageHub.createHubConnection(user, this.accountService.hasAdminRole(user));
this.libraryService.getLibraryNames().pipe(take(1)).subscribe(() => {/* No Operation */});
- } else {
- this.navService.setDarkMode(true);
}
}
-}
+ setDocHeight() {
+ // Sets a CSS variable for the actual device viewport height. Needed for mobile dev.
+ this.document.documentElement.style.setProperty('--vh', `${window.innerHeight/100}px`);
+ }
+}
diff --git a/UI/Web/src/app/app.module.ts b/UI/Web/src/app/app.module.ts
index c013a3de5..5b79f3a42 100644
--- a/UI/Web/src/app/app.module.ts
+++ b/UI/Web/src/app/app.module.ts
@@ -37,6 +37,7 @@ import { AllSeriesComponent } from './all-series/all-series.component';
import { PublicationStatusPipe } from './publication-status.pipe';
import { RegistrationModule } from './registration/registration.module';
import { GroupedTypeaheadComponent } from './grouped-typeahead/grouped-typeahead.component';
+import { ThemeTestComponent } from './theme-test/theme-test.component';
@NgModule({
@@ -58,6 +59,7 @@ import { GroupedTypeaheadComponent } from './grouped-typeahead/grouped-typeahead
SeriesMetadataDetailComponent,
AllSeriesComponent,
GroupedTypeaheadComponent,
+ ThemeTestComponent,
],
imports: [
HttpClientModule,
diff --git a/UI/Web/src/app/book-reader/book-reader/book-reader.component.html b/UI/Web/src/app/book-reader/book-reader/book-reader.component.html
index 4d9669345..b9ca69c0a 100644
--- a/UI/Web/src/app/book-reader/book-reader/book-reader.component.html
+++ b/UI/Web/src/app/book-reader/book-reader/book-reader.component.html
@@ -1,12 +1,12 @@
<div class="container-flex {{darkMode ? 'dark-mode' : ''}} reader-container" tabindex="0" #reader>
<div class="fixed-top" #stickyTop>
- <a class="sr-only sr-only-focusable focus-visible" href="javascript:void(0);" (click)="moveFocus()">Skip to main content</a>
+ <a class="visually-hidden-focusable focus-visible" href="javascript:void(0);" (click)="moveFocus()">Skip to main content</a>
<ng-container [ngTemplateOutlet]="actionBar"></ng-container>
<app-drawer #commentDrawer="drawer" [isOpen]="drawerOpen" [style.--drawer-width]="'300px'" [options]="{topOffset: topOffset}" [style.--drawer-background-color]="drawerBackgroundColor" (drawerClosed)="closeDrawer()">
<div header>
<h2 style="margin-top: 0.5rem">Book Settings
- <button type="button" class="close" aria-label="Close" (click)="commentDrawer.close()">
- <span aria-hidden="true">&times;</span>
+ <button type="button" class="btn-close" aria-label="Close" (click)="commentDrawer.close()">
+
</button>
</h2>
@@ -16,8 +16,8 @@
<div class="controls">
<form [formGroup]="settingsForm">
- <div class="form-group">
- <label for="library-type">Font Family</label>
+ <div class="mb-3">
+ <label for="library-type" class="form-label">Font Family</label>
<select class="form-control" id="library-type" formControlName="bookReaderFontFamily">
<option [value]="opt" *ngFor="let opt of fontFamilies; let i = index">{{opt | titlecase}}</option>
</select>
@@ -25,42 +25,42 @@
</form>
</div>
<div class="controls">
- <label id="fontsize">Font Size</label>
+ <label id="fontsize" class="form-label">Font Size</label>
<button (click)="updateFontSize(-10)" class="btn btn-icon" title="Decrease" aria-labelledby="fontsize"><i class="fa fa-minus" aria-hidden="true"></i></button>
<span>{{pageStyles['font-size']}}</span>
<button (click)="updateFontSize(10)" class="btn btn-icon" title="Increase" aria-labelledby="fontsize"><i class="fa fa-plus" aria-hidden="true"></i></button>
</div>
<div class="controls">
- <label id="linespacing">Line Spacing</label>
+ <label id="linespacing" class="form-label">Line Spacing</label>
<button (click)="updateLineSpacing(-10)" class="btn btn-icon" title="Decrease" aria-labelledby="linespacing"><i class="fa fa-minus" aria-hidden="true"></i></button>
<span>{{pageStyles['line-height']}}</span>
<button (click)="updateLineSpacing(10)" class="btn btn-icon" title="Increase" aria-labelledby="linespacing"><i class="fa fa-plus" aria-hidden="true"></i></button>
</div>
<div class="controls">
- <label id="margin">Margin</label>
+ <label id="margin" class="form-label">Margin</label>
<button (click)="updateMargin(-5)" class="btn btn-icon" title="Remove Margin" aria-labelledby="margin"><i class="fa fa-minus" aria-hidden="true"></i></button>
<span>{{pageStyles['margin-right']}}</span>
<button (click)="updateMargin(5)" class="btn btn-icon" title="Add Margin" aria-labelledby="margin"><i class="fa fa-plus" aria-hidden="true"></i></button>
</div>
<div class="controls">
- <label id="readingdirection">Reading Direction</label>
+ <label id="readingdirection" class="form-label">Reading Direction</label>
<button (click)="toggleReadingDirection()" class="btn btn-icon" aria-labelledby="readingdirection" title="{{readingDirection === 0 ? 'Left to Right' : 'Right to Left'}}"><i class="fa {{readingDirection === 0 ? 'fa-arrow-right' : 'fa-arrow-left'}} " aria-hidden="true"></i><span class="phone-hidden">&nbsp;{{readingDirection === 0 ? 'Left to Right' : 'Right to Left'}}</span></button>
</div>
<div class="controls">
- <label id="darkmode">Dark Mode</label>
+ <label id="darkmode" class="form-label">Dark Mode</label>
<button (click)="toggleDarkMode(false)" class="btn btn-icon" aria-labelledby="darkmode" title="Off"><i class="fa fa-sun" aria-hidden="true"></i></button>
<button (click)="toggleDarkMode(true)" class="btn btn-icon" aria-labelledby="darkmode" title="On"><i class="fa fa-moon" aria-hidden="true"></i></button>
</div>
<div class="controls">
- <label id="tap-pagination">Tap Pagination&nbsp;<i class="fa fa-info-circle" aria-hidden="true" placement="top" [ngbTooltip]="tapPaginationTooltip" role="button" tabindex="0" aria-describedby="tap-pagination-help"></i></label>
+ <label id="tap-pagination" class="form-label">Tap Pagination&nbsp;<i class="fa fa-info-circle" aria-hidden="true" placement="top" [ngbTooltip]="tapPaginationTooltip" role="button" tabindex="0" aria-describedby="tap-pagination-help"></i></label>
<ng-template #tapPaginationTooltip>The ability to click the sides of the page to page left and right</ng-template>
- <span class="sr-only" id="tap-pagination-help">The ability to click the sides of the page to page left and right</span>
+ <span class="visually-hidden" id="tap-pagination-help">The ability to click the sides of the page to page left and right</span>
<button (click)="toggleClickToPaginate()" class="btn btn-icon" aria-labelledby="tap-pagination"><i class="fa fa-arrows-alt-h {{clickToPaginate ? 'icon-primary-color' : ''}}" aria-hidden="true"></i><span *ngIf="darkMode">&nbsp;{{clickToPaginate ? 'On' : 'Off'}}</span></button>
</div>
<div class="controls">
- <label id="fullscreen">Fullscreen&nbsp;<i class="fa fa-info-circle" aria-hidden="true" placement="top" [ngbTooltip]="fullscreenTooltip" role="button" tabindex="0" aria-describedby="fullscreen-help"></i></label>
+ <label id="fullscreen" class="form-label">Fullscreen&nbsp;<i class="fa fa-info-circle" aria-hidden="true" placement="top" [ngbTooltip]="fullscreenTooltip" role="button" tabindex="0" aria-describedby="fullscreen-help"></i></label>
<ng-template #fullscreenTooltip>Put reader in fullscreen mode</ng-template>
- <span class="sr-only" id="fullscreen-help">
+ <span class="visually-hidden" id="fullscreen-help">
<ng-container [ngTemplateOutlet]="fullscreenTooltip"></ng-container>
</span>
<button (click)="toggleFullscreen()" class="btn btn-icon" aria-labelledby="fullscreen">
@@ -68,11 +68,11 @@
<span *ngIf="darkMode">&nbsp;{{isFullscreen ? 'Exit' : 'Enter'}}</span>
</button>
</div>
- <div class="row no-gutters justify-content-between">
+ <div class="row g-0 justify-content-between">
<button (click)="resetSettings()" class="btn btn-primary col">Reset to Defaults</button>
</div>
</div>
- <div class="row no-gutters">
+ <div class="row g-0">
<button class="btn btn-small btn-icon col-1" [disabled]="prevChapterDisabled" (click)="loadPrevChapter()" title="Prev Chapter/Volume"><i class="fa fa-fast-backward" aria-hidden="true"></i></button>
<div class="col-1 page-stub">{{pageNum}}</div>
<div class="col-8" style="margin-top: 15px;padding-right:10px">
@@ -125,7 +125,7 @@
</div>
<ng-template #actionBar>
- <div class="reading-bar row no-gutters justify-content-between">
+ <div class="reading-bar row g-0 justify-content-between">
<button class="btn btn-outline-secondary btn-icon col-2 col-xs-1" (click)="prevPage()"
[disabled]="IsPrevDisabled"
title="{{readingDirection === ReadingDirection.LeftToRight ? 'Previous' : 'Next'}} Page">
@@ -137,12 +137,12 @@
<div class="book-title col-2 phone-hidden">
<ng-container *ngIf="isLoading; else showTitle">
<div class="spinner-border spinner-border-sm text-primary" style="border-radius: 50%;" role="status">
- <span class="sr-only">Loading book...</span>
+ <span class="visually-hidden">Loading book...</span>
</div>
</ng-container>
<ng-template #showTitle>
{{bookTitle}}
- <span *ngIf="incognitoMode" (click)="turnOffIncognito()" role="button" aria-label="Incognito mode is on. Toggle to turn off.">(<i class="fa fa-glasses" aria-hidden="true"></i><span class="sr-only">Incognito Mode</span>)</span>
+ <span *ngIf="incognitoMode" (click)="turnOffIncognito()" role="button" aria-label="Incognito mode is on. Toggle to turn off.">(<i class="fa fa-glasses" aria-hidden="true"></i><span class="visually-hidden">Incognito Mode</span>)</span>
</ng-template>
</div>
<button class="btn btn-secondary col-2 col-xs-1" (click)="closeReader()"><i class="fa fa-times-circle" aria-hidden="true"></i><span class="phone-hidden">&nbsp;Close</span></button>
diff --git a/UI/Web/src/app/book-reader/book-reader/book-reader.component.ts b/UI/Web/src/app/book-reader/book-reader/book-reader.component.ts
index 0e474968a..6f5bd20ee 100644
--- a/UI/Web/src/app/book-reader/book-reader/book-reader.component.ts
+++ b/UI/Web/src/app/book-reader/book-reader/book-reader.component.ts
@@ -24,6 +24,7 @@ import { ScrollService } from 'src/app/scroll.service';
import { MangaFormat } from 'src/app/_models/manga-format';
import { LibraryService } from 'src/app/_services/library.service';
import { LibraryType } from 'src/app/_models/library';
+import { ThemeService } from 'src/app/theme.service';
interface PageStyle {
@@ -260,7 +261,7 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
private renderer: Renderer2, private navService: NavService, private toastr: ToastrService,
private domSanitizer: DomSanitizer, private bookService: BookService, private memberService: MemberService,
private scrollService: ScrollService, private utilityService: UtilityService, private libraryService: LibraryService,
- @Inject(DOCUMENT) private document: Document) {
+ @Inject(DOCUMENT) private document: Document, private themeService: ThemeService) {
this.navService.hideNavBar();
this.darkModeStyleElem = this.renderer.createElement('style');
@@ -382,7 +383,7 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
const bodyNode = this.document.querySelector('body');
if (bodyNode !== undefined && bodyNode !== null && this.originalBodyColor !== undefined) {
bodyNode.style.background = this.originalBodyColor;
- if (this.user.preferences.siteDarkMode) {
+ if (this.themeService.isDarkTheme()) {
bodyNode.classList.add('bg-dark');
}
}
@@ -968,7 +969,7 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
setOverrideStyles() {
const bodyNode = this.document.querySelector('body');
if (bodyNode !== undefined && bodyNode !== null) {
- if (this.user.preferences.siteDarkMode) {
+ if (this.themeService.isDarkTheme()) {
bodyNode.classList.remove('bg-dark');
}
diff --git a/UI/Web/src/app/cards/_modals/bookmarks-modal/bookmarks-modal.component.html b/UI/Web/src/app/cards/_modals/bookmarks-modal/bookmarks-modal.component.html
index 2dd4b93e1..606ed1384 100644
--- a/UI/Web/src/app/cards/_modals/bookmarks-modal/bookmarks-modal.component.html
+++ b/UI/Web/src/app/cards/_modals/bookmarks-modal/bookmarks-modal.component.html
@@ -1,7 +1,7 @@
<div class="modal-header">
<h4 class="modal-title" id="modal-basic-title">{{title}} Bookmarks</h4>
- <button type="button" class="close" aria-label="Close" (click)="close()">
- <span aria-hidden="true">&times;</span>
+ <button type="button" class="btn-close" aria-label="Close" (click)="close()">
+
</button>
</div>
<div class="modal-body">
@@ -10,7 +10,7 @@
</p>
<ng-template #noBookmarks>No bookmarks yet</ng-template>
- <div class="row no-gutters">
+ <div class="row g-0">
<div *ngFor="let bookmark of bookmarks; let idx = index">
<app-bookmark [bookmark]="bookmark" (bookmarkRemoved)="removeBookmark(bookmark, idx)" class="col-auto"></app-bookmark>
</div>
diff --git a/UI/Web/src/app/cards/_modals/bulk-add-to-collection/bulk-add-to-collection.component.html b/UI/Web/src/app/cards/_modals/bulk-add-to-collection/bulk-add-to-collection.component.html
index 2e7dcecb2..ed72bb89c 100644
--- a/UI/Web/src/app/cards/_modals/bulk-add-to-collection/bulk-add-to-collection.component.html
+++ b/UI/Web/src/app/cards/_modals/bulk-add-to-collection/bulk-add-to-collection.component.html
@@ -1,19 +1,17 @@
<div class="modal-header">
<h4 class="modal-title" id="modal-basic-title">Add to Collection</h4>
- <button type="button" class="close" aria-label="Close" (click)="close()">
- <span aria-hidden="true">&times;</span>
+ <button type="button" class="btn-close" aria-label="Close" (click)="close()">
+
</button>
</div>
<form style="width: 100%" [formGroup]="listForm">
<div class="modal-body">
- <div class="form-group" *ngIf="lists.length >= 5">
- <label for="filter">Filter</label>
+ <div class="mb-3" *ngIf="lists.length >= 5">
+ <label for="filter" class="form-label">Filter</label>
<div class="input-group">
<input id="filter" autocomplete="off" class="form-control" formControlName="filterQuery" type="text" aria-describedby="reset-input">
- <div class="input-group-append">
- <button class="btn btn-outline-secondary" type="button" id="reset-input" (click)="listForm.get('filterQuery')?.setValue('');">Clear</button>
- </div>
+ <button class="btn btn-outline-secondary" type="button" id="reset-input" (click)="listForm.get('filterQuery')?.setValue('');">Clear</button>
</div>
</div>
<ul class="list-group">
@@ -23,7 +21,7 @@
<li class="list-group-item" *ngIf="lists.length === 0 && !loading">No collections created yet</li>
<li class="list-group-item" *ngIf="loading">
<div class="spinner-border text-secondary" role="status">
- <span class="sr-only">Loading...</span>
+ <span class="visually-hidden">Loading...</span>
</div>
</li>
</ul>
@@ -32,7 +30,7 @@
<div style="width: 100%;">
<div class="form-row">
<div class="col-9 col-lg-10">
- <label class="sr-only" for="add-rlist">Collection</label>
+ <label class="visually-hidden" class="form-label" for="add-rlist">Collection</label>
<input width="100%" #title ngbAutofocus type="text" class="form-control mb-2" id="add-rlist" formControlName="title">
</div>
<div class="col-2">
diff --git a/UI/Web/src/app/cards/_modals/card-details-modal/card-details-modal.component.html b/UI/Web/src/app/cards/_modals/card-details-modal/card-details-modal.component.html
index 4bc78fb09..a6f68943a 100644
--- a/UI/Web/src/app/cards/_modals/card-details-modal/card-details-modal.component.html
+++ b/UI/Web/src/app/cards/_modals/card-details-modal/card-details-modal.component.html
@@ -5,8 +5,8 @@
<ng-template #comicHeader><h4 class="modal-title" id="modal-basic-title">
{{parentName}} - {{data.number != 0 ? (isChapter ? 'Issue #' : 'Volume ') + data.number : 'Special'}} Details</h4>
</ng-template>
- <button type="button" class="close" aria-label="Close" (click)="close()">
- <span aria-hidden="true">&times;</span>
+ <button type="button" class="btn-close" aria-label="Close" (click)="close()">
+
</button>
</div>
<div class="modal-body scrollable-modal" *ngIf="utilityService.isChapter(data)">
@@ -18,15 +18,15 @@
<h4 *ngIf="utilityService.isVolume(data)">Information</h4>
<ng-container *ngIf="utilityService.isVolume(data) || utilityService.isChapter(data)">
- <div class="row no-gutters">
+ <div class="row g-0">
<div class="col">
Id: {{data.id}}
</div>
<div class="col" *ngIf="series !== undefined">
- Format: <span class="badge badge-secondary">{{utilityService.mangaFormat(series.format) | sentenceCase}}</span>
+ Format: <span class="badge bg-secondary">{{utilityService.mangaFormat(series.format) | sentenceCase}}</span>
</div>
</div>
- <div class="row no-gutters">
+ <div class="row g-0">
<div class="col" *ngIf="data.hasOwnProperty('created')">
Added: {{(data.created | date: 'short') || '-'}}
</div>
@@ -38,18 +38,18 @@
<h4 *ngIf="!utilityService.isChapter(data)">{{utilityService.formatChapterName(libraryType) + 's'}}</h4>
<ul class="list-unstyled">
- <li class="media my-4" *ngFor="let chapter of chapters">
+ <li class="d-flex my-4" *ngFor="let chapter of chapters">
<a (click)="readChapter(chapter)" href="javascript:void(0);" title="Read {{libraryType !== LibraryType.Comic ? 'Chapter ' : 'Issue #'}} {{chapter.number}}">
- <app-image class="mr-2" width="74px" [imageUrl]="chapter.coverImage"></app-image>
+ <app-image class="me-2" width="74px" [imageUrl]="chapter.coverImage"></app-image>
</a>
- <div class="media-body">
+ <div class="flex-grow-1">
<h5 class="mt-0 mb-1">
<span *ngIf="chapter.number !== '0'; else specialHeader">
<span >
<app-card-actionables (actionHandler)="performAction($event, chapter)" [actions]="chapterActions" [labelBy]="utilityService.formatChapterName(libraryType, true, true) + formatChapterNumber(chapter)"></app-card-actionables>&nbsp;
{{utilityService.formatChapterName(libraryType, true, false) }} {{formatChapterNumber(chapter)}}
</span>
- <span class="badge badge-primary badge-pill">
+ <span class="badge bg-primary rounded-pill">
<span *ngIf="chapter.pagesRead > 0 && chapter.pagesRead < chapter.pages">{{chapter.pagesRead}} / {{chapter.pages}}</span>
<span *ngIf="chapter.pagesRead === 0">UNREAD</span>
<span *ngIf="chapter.pagesRead === chapter.pages">READ</span>
@@ -58,9 +58,9 @@
<ng-template #specialHeader>File(s)</ng-template>
</h5>
<ul class="list-group">
- <li *ngFor="let file of chapter.files" class="list-group-item">
+ <li *ngFor="let file of chapter.files" class="list-group-item no-hover">
<span>{{file.filePath}}</span>
- <div class="row no-gutters">
+ <div class="row g-0">
<div class="col">
Pages: {{file.pages}}
</div>
@@ -76,7 +76,7 @@
</div>
<div class="modal-footer">
- <button type="button" class="btn btn-info" [disabled]="!isAdmin" (click)="updateCover()">Update Cover</button>
+ <button type="button" class="btn btn-secondary" [disabled]="!isAdmin" (click)="updateCover()">Update Cover</button>
<button type="submit" class="btn btn-primary" (click)="close()">Close</button>
</div>
</div>
diff --git a/UI/Web/src/app/cards/_modals/edit-collection-tags/edit-collection-tags.component.html b/UI/Web/src/app/cards/_modals/edit-collection-tags/edit-collection-tags.component.html
index ee6215417..27a3916f2 100644
--- a/UI/Web/src/app/cards/_modals/edit-collection-tags/edit-collection-tags.component.html
+++ b/UI/Web/src/app/cards/_modals/edit-collection-tags/edit-collection-tags.component.html
@@ -1,8 +1,8 @@
<div class="modal-header">
<h4 class="modal-title" id="modal-basic-title">Edit {{tag?.title}} Collection</h4>
- <button type="button" class="close" aria-label="Close" (click)="close()">
- <span aria-hidden="true">&times;</span>
+ <button type="button" class="btn-close" aria-label="Close" (click)="close()">
+
</button>
</div>
<div class="modal-body">
@@ -16,8 +16,8 @@
<a ngbNavLink>{{tabs[0]}}</a>
<ng-template ngbNavContent>
<form [formGroup]="collectionTagForm">
- <div class="form-group">
- <label for="summary">Summary</label>
+ <div class="mb-3">
+ <label for="summary" class="form-label">Summary</label>
<textarea id="summary" class="form-control" formControlName="summary" rows="3"></textarea>
</div>
</form>
@@ -67,6 +67,6 @@
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" (click)="close()">Cancel</button>
- <button type="button" class="btn btn-info" (click)="togglePromotion()">{{tag?.promoted ? 'Demote' : 'Promote'}}</button>
+ <button type="button" class="btn btn-secondary alt" (click)="togglePromotion()">{{tag?.promoted ? 'Demote' : 'Promote'}}</button>
<button type="button" class="btn btn-primary" (click)="save()">Save</button>
</div>
diff --git a/UI/Web/src/app/cards/_modals/edit-series-modal/edit-series-modal.component.html b/UI/Web/src/app/cards/_modals/edit-series-modal/edit-series-modal.component.html
index a81b3bbff..d6aee5d42 100644
--- a/UI/Web/src/app/cards/_modals/edit-series-modal/edit-series-modal.component.html
+++ b/UI/Web/src/app/cards/_modals/edit-series-modal/edit-series-modal.component.html
@@ -2,8 +2,8 @@
<div class="modal-header">
<h4 class="modal-title">
{{this.series.name}} Details</h4>
- <button type="button" class="close" aria-label="Close" (click)="close()">
- <span aria-hidden="true">&times;</span>
+ <button type="button" class="btn-close" aria-label="Close" (click)="close()">
+
</button>
</div>
<div class="modal-body scrollable-modal {{utilityService.getActiveBreakpoint() === Breakpoint.Mobile ? '' : 'd-flex'}}">
@@ -13,52 +13,52 @@
<a ngbNavLink>{{tabs[0]}}</a>
<ng-template ngbNavContent>
<form [formGroup]="editSeriesForm">
- <div class="row no-gutters">
- <div class="form-group" style="width: 100%">
- <label for="name">Name</label>
+ <div class="row g-0">
+ <div class="mb-3" style="width: 100%">
+ <label for="name" class="form-label">Name</label>
<input id="name" class="form-control" formControlName="name" type="text">
</div>
</div>
- <div class="row no-gutters">
- <div class="form-group" style="width: 100%">
- <label for="sort-name">Sort Name</label>
+ <div class="row g-0">
+ <div class="mb-3" style="width: 100%">
+ <label for="sort-name" class="form-label">Sort Name</label>
<input id="sort-name" class="form-control" formControlName="sortName" type="text">
</div>
</div>
- <div class="row no-gutters">
- <div class="form-group" style="width: 100%">
- <label for="localized-name">Localized Name</label>
+ <div class="row g-0">
+ <div class="mb-3" style="width: 100%">
+ <label for="localized-name" class="form-label">Localized Name</label>
<input id="localized-name" class="form-control" formControlName="localizedName" type="text">
</div>
</div>
- <div class="row no-gutters" *ngIf="metadata">
+ <div class="row g-0" *ngIf="metadata">
<div class="col-md-6">
- <div class="form-group">
- <label for="author">Author</label>
+ <div class="mb-3">
+ <label for="author" class="form-label">Author</label>
<input id="author" class="form-control" placeholder="Not Implemented" readonly="true" formControlName="author" type="text">
</div>
</div>
<div class="col-md-6">
- <div class="form-group">
- <label for="artist">Artist</label>
+ <div class="mb-3">
+ <label for="artist" class="form-label">Artist</label>
<input id="artist" class="form-control" placeholder="Not Implemented" readonly="true" formControlName="artist" type="text">
</div>
</div>
</div>
- <div class="row no-gutters" *ngIf="metadata">
+ <div class="row g-0" *ngIf="metadata">
<div class="col-md-6">
- <div class="form-group">
- <label for="genres">Genres</label>
+ <div class="mb-3">
+ <label for="genres" class="form-label">Genres</label>
<input id="genres" class="form-control" placeholder="Not Implemented" readonly="true" formControlName="genres" type="text">
</div>
</div>
<div class="col-md-6">
- <div class="form-group">
- <label for="collections">Collections</label>
+ <div class="mb-3">
+ <label for="collections" class="form-label">Collections</label>
<app-typeahead (selectedData)="updateCollections($event)" [settings]="settings">
<ng-template #badgeItem let-item let-position="idx">
{{item.title}}
@@ -71,9 +71,9 @@
</div>
</div>
- <div class="row no-gutters">
- <div class="form-group" style="width: 100%">
- <label for="summary">Summary</label>
+ <div class="row g-0">
+ <div class="mb-3" style="width: 100%">
+ <label for="summary" class="form-label">Summary</label>
<textarea id="summary" class="form-control" formControlName="summary" rows="4"></textarea>
</div>
</div>
@@ -94,7 +94,7 @@
<a ngbNavLink>{{tabs[2]}}</a>
<ng-template ngbNavContent>
<h4>Information</h4>
- <div class="row no-gutters mb-2">
+ <div class="row g-0 mb-2">
<div class="col-md-6" *ngIf="libraryName">Library: {{libraryName | sentenceCase}}</div>
<div class="col-md-6">Format: <app-tag-badge>{{utilityService.mangaFormat(series.format)}}</app-tag-badge></div>
</div>
@@ -103,12 +103,12 @@
<span class="invisible">Loading...</span>
</div>
<ul class="list-unstyled" *ngIf="!isLoadingVolumes">
- <li class="media my-4" *ngFor="let volume of seriesVolumes">
- <app-image class="mr-3" style="width: 74px;" width="74px" [imageUrl]="imageService.getVolumeCoverImage(volume.id)"></app-image>
- <div class="media-body">
+ <li class="d-flex my-4" *ngFor="let volume of seriesVolumes">
+ <app-image class="me-3" style="width: 74px;" width="74px" [imageUrl]="imageService.getVolumeCoverImage(volume.id)"></app-image>
+ <div class="flex-grow-1">
<h5 class="mt-0 mb-1">Volume {{volume.name}}</h5>
<div>
- <div class="row no-gutters">
+ <div class="row g-0">
<div class="col">
Added: {{volume.created | date: 'short'}}
</div>
@@ -116,7 +116,7 @@
Last Modified: {{volume.lastModified | date: 'short'}}
</div>
</div>
- <div class="row no-gutters">
+ <div class="row g-0">
<div class="col">
<button type="button" class="btn btn-outline-primary" (click)="collapse.toggle()" [attr.aria-expanded]="!volumeCollapsed[volume.name]">
View Files
@@ -131,7 +131,7 @@
<ul class="list-group mt-2">
<li *ngFor="let file of volume.volumeFiles.sort()" class="list-group-item">
<span>{{file.filePath}}</span>
- <div class="row no-gutters">
+ <div class="row g-0">
<div class="col">
Chapter: {{file.chapter}}
</div>
@@ -153,7 +153,7 @@
</li>
</ul>
- <div [ngbNavOutlet]="nav" class="tab-content {{utilityService.getActiveBreakpoint() === Breakpoint.Mobile ? 'mt-3' : 'ml-4 flex-fill'}}"></div>
+ <div [ngbNavOutlet]="nav" class="tab-content {{utilityService.getActiveBreakpoint() === Breakpoint.Mobile ? 'mt-3' : 'ms-4 flex-fill'}}"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" (click)="close()">Close</button>
diff --git a/UI/Web/src/app/cards/bookmark/bookmark.component.html b/UI/Web/src/app/cards/bookmark/bookmark.component.html
index 7ef42efa6..6ad8fdf40 100644
--- a/UI/Web/src/app/cards/bookmark/bookmark.component.html
+++ b/UI/Web/src/app/cards/bookmark/bookmark.component.html
@@ -6,12 +6,12 @@
<span class="card-title" tabindex="0">
Page {{bookmark.page + 1}}
</span>
- <span class="card-actions float-right" *ngIf="series != undefined">
+ <span class="card-actions float-end" *ngIf="series != undefined">
<button attr.aria-labelledby="series--{{series.name}}" class="btn btn-danger btn-sm" (click)="removeBookmark()"
[disabled]="isClearing" placement="top" ngbTooltip="Remove Bookmark" attr.aria-label="Remove Bookmark">
<ng-container *ngIf="isClearing; else notClearing">
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
- <span class="sr-only">Loading...</span>
+ <span class="visually-hidden">Loading...</span>
</ng-container>
<ng-template #notClearing>
<i class="fa fa-trash-alt" aria-hidden="true"></i>
diff --git a/UI/Web/src/app/cards/bulk-operations/bulk-operations.component.html b/UI/Web/src/app/cards/bulk-operations/bulk-operations.component.html
index 2d328bfb3..8b5a60120 100644
--- a/UI/Web/src/app/cards/bulk-operations/bulk-operations.component.html
+++ b/UI/Web/src/app/cards/bulk-operations/bulk-operations.component.html
@@ -2,7 +2,7 @@
<div class="d-flex justify-content-around align-items-center">
<span class="highlight"><i class="fa fa-check" aria-hidden="true"></i>&nbsp;{{bulkSelectionService.totalSelections()}} selected</span>
<app-card-actionables [actions]="actions" labelBy="bulk-actions-header" iconClass="fa-ellipsis-h" (actionHandler)="performAction($event)"></app-card-actionables>
- <span id="bulk-actions-header" class="sr-only">Bulk Actions</span>
+ <span id="bulk-actions-header" class="visually-hidden">Bulk Actions</span>
<button class="btn btn-icon" (click)="bulkSelectionService.deselectAll()"><i class="fa fa-times" aria-hidden="true"></i>&nbsp;Deselect All</button>
</div>
</div>
\ No newline at end of file
diff --git a/UI/Web/src/app/cards/bulk-operations/bulk-operations.component.scss b/UI/Web/src/app/cards/bulk-operations/bulk-operations.component.scss
index 54df9f40d..629afb960 100644
--- a/UI/Web/src/app/cards/bulk-operations/bulk-operations.component.scss
+++ b/UI/Web/src/app/cards/bulk-operations/bulk-operations.component.scss
@@ -1,15 +1,9 @@
-@use "../../../theme/colors";
-
.bulk-select {
- background-color: colors.$dark-form-background-no-opacity;
- border-bottom: 2px solid colors.$primary-color;
- color: white;
-}
-
-.btn-icon {
- color: white;
+ background-color: var(--navbar-bg-color);
+ border-bottom: 2px solid var(--primary-color);
+ color: var(--navbar-text-color);
}
.highlight {
- color: colors.$primary-color !important;
+ color: var(--primary-color) !important;
}
\ No newline at end of file
diff --git a/UI/Web/src/app/cards/card-detail-layout/card-detail-layout.component.html b/UI/Web/src/app/cards/card-detail-layout/card-detail-layout.component.html
index 19626e296..fb73c2d87 100644
--- a/UI/Web/src/app/cards/card-detail-layout/card-detail-layout.component.html
+++ b/UI/Web/src/app/cards/card-detail-layout/card-detail-layout.component.html
@@ -1,18 +1,20 @@
<div class="container-fluid" style="padding-top: 10px">
- <div class="row no-gutters pb-2">
- <div class="col mr-auto">
+ <div class="row g-0 pb-2">
+ <div class="col me-auto">
<h2 style="display: inline-block">
<span *ngIf="actions.length > 0" class="">
<app-card-actionables (actionHandler)="performAction($event)" [actions]="actions" [labelBy]="header"></app-card-actionables>&nbsp;
</span>{{header}}&nbsp;
- <span class="badge badge-primary badge-pill" attr.aria-label="{{pagination.totalItems}} total items" *ngIf="pagination != undefined">{{pagination.totalItems}}</span>
+ <span class="badge bg-primary rounded-pill" attr.aria-label="{{pagination.totalItems}} total items" *ngIf="pagination != undefined">{{pagination.totalItems}}</span>
</h2>
</div>
- <button *ngIf="!filteringDisabled" class="btn btn-secondary btn-small" (click)="collapse.toggle()" [attr.aria-expanded]="!filteringCollapsed" placement="left" ngbTooltip="{{filteringCollapsed ? 'Open' : 'Close'}} Filtering and Sorting" attr.aria-label="{{filteringCollapsed ? 'Open' : 'Close'}} Filtering and Sorting">
- <i class="fa fa-filter" aria-hidden="true"></i>
- <span class="sr-only">Sort / Filter</span>
- </button>
+ <div class="col-auto align-self-end">
+ <button *ngIf="!filteringDisabled" class="btn btn-secondary btn-small" (click)="collapse.toggle()" [attr.aria-expanded]="!filteringCollapsed" placement="left" ngbTooltip="{{filteringCollapsed ? 'Open' : 'Close'}} Filtering and Sorting" attr.aria-label="{{filteringCollapsed ? 'Open' : 'Close'}} Filtering and Sorting">
+ <i class="fa fa-filter" aria-hidden="true"></i>
+ <span class="visually-hidden">Sort / Filter</span>
+ </button>
+ </div>
</div>
<div class="phone-hidden">
@@ -25,8 +27,8 @@
<app-drawer #commentDrawer="drawer" [isOpen]="!filteringCollapsed" [style.--drawer-width]="'300px'" [style.--drawer-background-color]="'#010409'" (drawerClosed)="filteringCollapsed = !filteringCollapsed">
<div header>
<h2 style="margin-top: 0.5rem">Book Settings
- <button type="button" class="close" aria-label="Close" (click)="commentDrawer.close()">
- <span aria-hidden="true">&times;</span>
+ <button type="button" class="btn-close" aria-label="Close" (click)="commentDrawer.close()">
+
</button>
</h2>
@@ -40,11 +42,11 @@
<ng-template #filterSection>
<ng-template #globalFilterTooltip>This is library agnostic</ng-template>
<div class="filter-section mx-auto pb-3">
- <div class="row justify-content-center no-gutters">
- <div class="col-md-2 mr-3" *ngIf="!filterSettings.formatDisabled">
- <div class="form-group">
- <label for="format">Format</label>&nbsp;<i class="fa fa-info-circle" aria-hidden="true" placement="right" [ngbTooltip]="globalFilterTooltip" role="button" tabindex="0"></i>
- <span class="sr-only" id="filter-global-format-help"><ng-container [ngTemplateOutlet]="globalFilterTooltip"></ng-container></span>
+ <div class="row justify-content-center g-0">
+ <div class="col-md-2 me-3" *ngIf="!filterSettings.formatDisabled">
+ <div class="mb-3">
+ <label for="format" class="form-label">Format</label>&nbsp;<i class="fa fa-info-circle" aria-hidden="true" placement="right" [ngbTooltip]="globalFilterTooltip" role="button" tabindex="0"></i>
+ <span class="visually-hidden" id="filter-global-format-help"><ng-container [ngTemplateOutlet]="globalFilterTooltip"></ng-container></span>
<app-typeahead (selectedData)="updateFormatFilters($event)" [settings]="formatSettings" [reset]="resetTypeaheads">
<ng-template #badgeItem let-item let-position="idx">
{{item.title}}
@@ -56,9 +58,9 @@
</div>
</div>
- <div class="col-md-2 mr-3"*ngIf="!filterSettings.libraryDisabled">
- <div class="form-group">
- <label for="libraries">Libraries</label>
+ <div class="col-md-2 me-3"*ngIf="!filterSettings.libraryDisabled">
+ <div class="mb-3">
+ <label for="libraries" class="form-label">Libraries</label>
<app-typeahead (selectedData)="updateLibraryFilters($event)" [settings]="librarySettings" [reset]="resetTypeaheads">
<ng-template #badgeItem let-item let-position="idx">
{{item.name}}
@@ -70,10 +72,10 @@
</div>
</div>
- <div class="col-md-2 mr-3" *ngIf="!filterSettings.collectionDisabled">
- <div class="form-group">
- <label for="collections">Collections</label>&nbsp;<i class="fa fa-info-circle" aria-hidden="true" placement="right" [ngbTooltip]="globalFilterTooltip" role="button" tabindex="0"></i>
- <span class="sr-only" id="filter-global-collections-help"><ng-container [ngTemplateOutlet]="globalFilterTooltip"></ng-container></span>
+ <div class="col-md-2 me-3" *ngIf="!filterSettings.collectionDisabled">
+ <div class="mb-3">
+ <label for="collections" class="form-label">Collections</label>&nbsp;<i class="fa fa-info-circle" aria-hidden="true" placement="right" [ngbTooltip]="globalFilterTooltip" role="button" tabindex="0"></i>
+ <span class="visually-hidden" id="filter-global-collections-help"><ng-container [ngTemplateOutlet]="globalFilterTooltip"></ng-container></span>
<app-typeahead (selectedData)="updateCollectionFilters($event)" [settings]="collectionSettings" [reset]="resetTypeaheads">
<ng-template #badgeItem let-item let-position="idx">
{{item.title}}
@@ -85,9 +87,9 @@
</div>
</div>
- <div class="col-md-2 mr-3" *ngIf="!filterSettings.genresDisabled">
- <div class="form-group">
- <label for="genres">Genres</label>
+ <div class="col-md-2 me-3" *ngIf="!filterSettings.genresDisabled">
+ <div class="mb-3">
+ <label for="genres" class="form-label">Genres</label>
<app-typeahead (selectedData)="updateGenreFilters($event)" [settings]="genreSettings" [reset]="resetTypeaheads">
<ng-template #badgeItem let-item let-position="idx">
{{item.title}}
@@ -99,9 +101,9 @@
</div>
</div>
- <div class="col-md-2 mr-3" *ngIf="!filterSettings.tagsDisabled">
- <div class="form-group">
- <label for="tags">Tags</label>
+ <div class="col-md-2 me-3" *ngIf="!filterSettings.tagsDisabled">
+ <div class="mb-3">
+ <label for="tags" class="form-label">Tags</label>
<app-typeahead (selectedData)="updateTagFilters($event)" [settings]="tagsSettings" [reset]="resetTypeaheads">
<ng-template #badgeItem let-item let-position="idx">
{{item.title}}
@@ -113,11 +115,11 @@
</div>
</div>
</div>
- <div class="row justify-content-center no-gutters">
+ <div class="row justify-content-center g-0">
<!-- The People row -->
- <div class="col-md-2 mr-3" *ngIf="peopleSettings.hasOwnProperty(PersonRole.CoverArtist)">
- <div class="form-group">
- <label for="cover-artist">Cover Artists</label>
+ <div class="col-md-2 me-3" *ngIf="peopleSettings.hasOwnProperty(PersonRole.CoverArtist)">
+ <div class="mb-3">
+ <label for="cover-artist" class="form-label">Cover Artists</label>
<app-typeahead (selectedData)="updatePersonFilters($event, PersonRole.CoverArtist)" [settings]="getPersonsSettings(PersonRole.CoverArtist)" [reset]="resetTypeaheads">
<ng-template #badgeItem let-item let-position="idx">
{{item.name}}
@@ -129,9 +131,9 @@
</div>
</div>
- <div class="col-md-2 mr-3" *ngIf="peopleSettings.hasOwnProperty(PersonRole.Writer)">
- <div class="form-group">
- <label for="writers">Writers</label>
+ <div class="col-md-2 me-3" *ngIf="peopleSettings.hasOwnProperty(PersonRole.Writer)">
+ <div class="mb-3">
+ <label for="writers" class="form-label">Writers</label>
<app-typeahead (selectedData)="updatePersonFilters($event, PersonRole.Writer)" [settings]="getPersonsSettings(PersonRole.Writer)" [reset]="resetTypeaheads">
<ng-template #badgeItem let-item let-position="idx">
{{item.name}}
@@ -143,9 +145,9 @@
</div>
</div>
- <div class="col-md-2 mr-3" *ngIf="peopleSettings.hasOwnProperty(PersonRole.Publisher)">
- <div class="form-group">
- <label for="publisher">Publisher</label>
+ <div class="col-md-2 me-3" *ngIf="peopleSettings.hasOwnProperty(PersonRole.Publisher)">
+ <div class="mb-3">
+ <label for="publisher" class="form-label">Publisher</label>
<app-typeahead (selectedData)="updatePersonFilters($event, PersonRole.Publisher)" [settings]="getPersonsSettings(PersonRole.Publisher)" [reset]="resetTypeaheads">
<ng-template #badgeItem let-item let-position="idx">
{{item.name}}
@@ -157,9 +159,9 @@
</div>
</div>
- <div class="col-md-2 mr-3" *ngIf="peopleSettings.hasOwnProperty(PersonRole.Penciller)">
- <div class="form-group">
- <label for="penciller">Penciller</label>
+ <div class="col-md-2 me-3" *ngIf="peopleSettings.hasOwnProperty(PersonRole.Penciller)">
+ <div class="mb-3">
+ <label for="penciller" class="form-label">Penciller</label>
<app-typeahead (selectedData)="updatePersonFilters($event, PersonRole.Penciller)" [settings]="getPersonsSettings(PersonRole.Penciller)" [reset]="resetTypeaheads">
<ng-template #badgeItem let-item let-position="idx">
{{item.name}}
@@ -171,9 +173,9 @@
</div>
</div>
- <div class="col-md-2 mr-3" *ngIf="peopleSettings.hasOwnProperty(PersonRole.Letterer)">
- <div class="form-group">
- <label for="letterer">Letterer</label>
+ <div class="col-md-2 me-3" *ngIf="peopleSettings.hasOwnProperty(PersonRole.Letterer)">
+ <div class="mb-3">
+ <label for="letterer" class="form-label">Letterer</label>
<app-typeahead (selectedData)="updatePersonFilters($event, PersonRole.Letterer)" [settings]="getPersonsSettings(PersonRole.Letterer)" [reset]="resetTypeaheads">
<ng-template #badgeItem let-item let-position="idx">
{{item.name}}
@@ -185,9 +187,9 @@
</div>
</div>
- <div class="col-md-2 mr-3" *ngIf="peopleSettings.hasOwnProperty(PersonRole.Inker)">
- <div class="form-group">
- <label for="inker">Inker</label>
+ <div class="col-md-2 me-3" *ngIf="peopleSettings.hasOwnProperty(PersonRole.Inker)">
+ <div class="mb-3">
+ <label for="inker" class="form-label">Inker</label>
<app-typeahead (selectedData)="updatePersonFilters($event, PersonRole.Inker)" [settings]="getPersonsSettings(PersonRole.Inker)" [reset]="resetTypeaheads">
<ng-template #badgeItem let-item let-position="idx">
{{item.name}}
@@ -199,9 +201,9 @@
</div>
</div>
- <div class="col-md-2 mr-3" *ngIf="peopleSettings.hasOwnProperty(PersonRole.Editor)">
- <div class="form-group">
- <label for="editor">Editor</label>
+ <div class="col-md-2 me-3" *ngIf="peopleSettings.hasOwnProperty(PersonRole.Editor)">
+ <div class="mb-3">
+ <label for="editor" class="form-label">Editor</label>
<app-typeahead (selectedData)="updatePersonFilters($event, PersonRole.Editor)" [settings]="getPersonsSettings(PersonRole.Editor)" [reset]="resetTypeaheads">
<ng-template #badgeItem let-item let-position="idx">
{{item.name}}
@@ -213,9 +215,9 @@
</div>
</div>
- <div class="col-md-2 mr-3" *ngIf="peopleSettings.hasOwnProperty(PersonRole.Colorist)">
- <div class="form-group">
- <label for="colorist">Colorist</label>
+ <div class="col-md-2 me-3" *ngIf="peopleSettings.hasOwnProperty(PersonRole.Colorist)">
+ <div class="mb-3">
+ <label for="colorist" class="form-label">Colorist</label>
<app-typeahead (selectedData)="updatePersonFilters($event, PersonRole.Colorist)" [settings]="getPersonsSettings(PersonRole.Colorist)" [reset]="resetTypeaheads">
<ng-template #badgeItem let-item let-position="idx">
{{item.name}}
@@ -227,9 +229,9 @@
</div>
</div>
- <div class="col-md-2 mr-3" *ngIf="peopleSettings.hasOwnProperty(PersonRole.Character)">
- <div class="form-group">
- <label for="character">Character</label>
+ <div class="col-md-2 me-3" *ngIf="peopleSettings.hasOwnProperty(PersonRole.Character)">
+ <div class="mb-3">
+ <label for="character" class="form-label">Character</label>
<app-typeahead (selectedData)="updatePersonFilters($event, PersonRole.Character)" [settings]="getPersonsSettings(PersonRole.Character)" [reset]="resetTypeaheads">
<ng-template #badgeItem let-item let-position="idx">
{{item.name}}
@@ -241,9 +243,9 @@
</div>
</div>
- <div class="col-md-2 mr-3" *ngIf="peopleSettings.hasOwnProperty(PersonRole.Translator)">
- <div class="form-group">
- <label for="translators">Translators</label>
+ <div class="col-md-2 me-3" *ngIf="peopleSettings.hasOwnProperty(PersonRole.Translator)">
+ <div class="mb-3">
+ <label for="translators" class="form-label">Translators</label>
<app-typeahead (selectedData)="updatePersonFilters($event, PersonRole.Translator)" [settings]="getPersonsSettings(PersonRole.Translator)" [reset]="resetTypeaheads">
<ng-template #badgeItem let-item let-position="idx">
{{item.name}}
@@ -255,9 +257,9 @@
</div>
</div>
</div>
- <div class="row justify-content-center no-gutters">
- <div class="col-md-2 mr-3" *ngIf="!filterSettings.readProgressDisabled">
- <label>Read Progress</label>
+ <div class="row justify-content-center g-0">
+ <div class="col-md-2 me-3" *ngIf="!filterSettings.readProgressDisabled">
+ <label class="form-label">Read Progress</label>
<form [formGroup]="readProgressGroup">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" id="notread" formControlName="notRead">
@@ -274,8 +276,8 @@
</form>
</div>
- <div class="col-md-2 mr-3" *ngIf="!filterSettings.ratingDisabled">
- <label for="ratings">Rating</label>
+ <div class="col-md-2 me-3" *ngIf="!filterSettings.ratingDisabled">
+ <label for="ratings" class="form-label">Rating</label>
<form class="form-inline">
<ngb-rating class="rating-star" [(rate)]="filter.rating" (rateChange)="updateRating($event)" [resettable]="true">
<ng-template let-fill="fill" let-index="index">
@@ -285,8 +287,8 @@
</form>
</div>
- <div class="col-md-2 mr-3" *ngIf="!filterSettings.ageRatingDisabled">
- <label for="age-rating">Age Rating</label>
+ <div class="col-md-2 me-3" *ngIf="!filterSettings.ageRatingDisabled">
+ <label for="age-rating" class="form-label">Age Rating</label>
<app-typeahead (selectedData)="updateAgeRating($event)" [settings]="ageRatingSettings" [reset]="resetTypeaheads">
<ng-template #badgeItem let-item let-position="idx">
{{item.title}}
@@ -297,8 +299,8 @@
</app-typeahead>
</div>
- <div class="col-md-2 mr-3" *ngIf="!filterSettings.languageDisabled">
- <label for="languages">Language</label>
+ <div class="col-md-2 me-3" *ngIf="!filterSettings.languageDisabled">
+ <label for="languages" class="form-label">Language</label>
<app-typeahead (selectedData)="updateLanguageRating($event)" [settings]="languageSettings" [reset]="resetTypeaheads">
<ng-template #badgeItem let-item let-position="idx">
{{item.title}}
@@ -309,8 +311,8 @@
</app-typeahead>
</div>
- <div class="col-md-2 mr-3" *ngIf="!filterSettings.publicationStatusDisabled">
- <label for="publication-status">Publication Status</label>
+ <div class="col-md-2 me-3" *ngIf="!filterSettings.publicationStatusDisabled">
+ <label for="publication-status" class="form-label">Publication Status</label>
<app-typeahead (selectedData)="updatePublicationStatus($event)" [settings]="publicationStatusSettings" [reset]="resetTypeaheads">
<ng-template #badgeItem let-item let-position="idx">
{{item.title}}
@@ -320,13 +322,13 @@
</ng-template>
</app-typeahead>
</div>
- <div class="col-md-2 mr-3"></div>
+ <div class="col-md-2 me-3"></div>
</div>
- <div class="row justify-content-center no-gutters">
- <div class="col-md-2 mr-3" *ngIf="!filterSettings.sortDisabled">
+ <div class="row justify-content-center g-0">
+ <div class="col-md-2 me-3" *ngIf="!filterSettings.sortDisabled">
<form [formGroup]="sortGroup">
- <div class="form-group">
- <label for="sort-options">Sort By</label>
+ <div class="mb-3">
+ <label for="sort-options" class="form-label">Sort By</label>
<button class="btn btn-sm btn-secondary-outline" (click)="updateSortOrder()" style="height: 25px; padding-bottom: 0px;">
<i class="fa fa-arrow-up" title="Ascending" *ngIf="isAscendingSort; else descSort"></i>
<ng-template #descSort>
@@ -341,14 +343,14 @@
</div>
</form>
</div>
- <div class="col-md-2 mr-3" *ngIf="filterSettings.sortDisabled"></div>
- <div class="col-md-2 mr-3"></div>
- <div class="col-md-2 mr-3"></div>
- <div class="col-md-2 mr-3 mt-4">
- <button class="btn btn-secondary btn-block" (click)="clear()">Clear</button>
+ <div class="col-md-2 me-3" *ngIf="filterSettings.sortDisabled"></div>
+ <div class="col-md-2 me-3"></div>
+ <div class="col-md-2 me-3"></div>
+ <div class="col-md-2 me-3">
+ <button class="btn btn-secondary col-12" (click)="clear()">Clear</button>
</div>
- <div class="col-md-2 mr-3 mt-4">
- <button class="btn btn-primary btn-block" (click)="apply()">Apply</button>
+ <div class="col-md-2 me-3">
+ <button class="btn btn-primary col-12" (click)="apply()">Apply</button>
</div>
</div>
</div>
@@ -357,7 +359,7 @@
<ng-container [ngTemplateOutlet]="paginationTemplate" [ngTemplateOutletContext]="{ id: 'top' }"></ng-container>
- <div class="row no-gutters">
+ <div class="row g-0">
<div class="col-auto" *ngFor="let item of items; trackBy:trackByIdentity; index as i">
<ng-container [ngTemplateOutlet]="itemTemplate" [ngTemplateOutletContext]="{ $implicit: item, idx: i }"></ng-container>
</div>
@@ -388,7 +390,7 @@
<label
id="paginationInputLabel-{{id}}"
for="paginationInput-{{id}}"
- class="col-form-label mr-2 ml-1"
+ class="col-form-label me-2 ms-1 form-label"
>Page</label>
<input #i
type="text"
diff --git a/UI/Web/src/app/cards/card-detail-layout/card-detail-layout.component.scss b/UI/Web/src/app/cards/card-detail-layout/card-detail-layout.component.scss
index 23d8c738a..e69de29bb 100644
--- a/UI/Web/src/app/cards/card-detail-layout/card-detail-layout.component.scss
+++ b/UI/Web/src/app/cards/card-detail-layout/card-detail-layout.component.scss
@@ -1,9 +0,0 @@
-@use '../../../theme/colors';
-
-.star {
- font-size: 1.5rem;
- color: colors.$rating-empty;
-}
-.filled {
- color: colors.$rating-filled;
-}
\ No newline at end of file
diff --git a/UI/Web/src/app/cards/card-item/card-item.component.html b/UI/Web/src/app/cards/card-item/card-item.component.html
index aafe5b88a..5f2aecde5 100644
--- a/UI/Web/src/app/cards/card-item/card-item.component.html
+++ b/UI/Web/src/app/cards/card-item/card-item.component.html
@@ -12,7 +12,7 @@
<span class="download" *ngIf="download$ | async as download">
<app-circular-loader [currentValue]="download.progress"></app-circular-loader>
- <span class="sr-only" role="status">
+ <span class="visually-hidden" role="status">
{{download.progress}}% downloaded
</span>
</span>
@@ -27,8 +27,9 @@
</div>
<div class="count" *ngIf="count > 1">
- <span class="badge badge-primary">{{count}}</span>
+ <span class="badge bg-primary">{{count}}</span>
</div>
+ <div class="card-overlay"></div>
</div>
<div class="card-body" *ngIf="title.length > 0 || actions.length > 0">
@@ -36,12 +37,12 @@
<span class="card-title" placement="top" id="{{title}}_{{entity?.id}}" [ngbTooltip]="tooltipTitle" (click)="handleClick()" tabindex="0">
<span *ngIf="isPromoted()">
<i class="fa fa-angle-double-up" aria-hidden="true"></i>
- <span class="sr-only">(promoted)</span>
+ <span class="visually-hidden">(promoted)</span>
</span>
- <i class="fa {{utilityService.mangaFormatIcon(format)}}" aria-hidden="true" *ngIf="format != MangaFormat.UNKNOWN" title="{{utilityService.mangaFormat(format)}}"></i><span class="sr-only">{{utilityService.mangaFormat(format)}}</span>
+ <i class="fa {{utilityService.mangaFormatIcon(format)}}" aria-hidden="true" *ngIf="format != MangaFormat.UNKNOWN" title="{{utilityService.mangaFormat(format)}}"></i><span class="visually-hidden">{{utilityService.mangaFormat(format)}}</span>
&nbsp;{{title}}
</span>
- <span class="card-actions float-right">
+ <span class="card-actions float-end">
<app-card-actionables (actionHandler)="performAction($event)" [actions]="actions" [labelBy]="title"></app-card-actionables>
</span>
</div>
diff --git a/UI/Web/src/app/cards/card-item/card-item.component.scss b/UI/Web/src/app/cards/card-item/card-item.component.scss
index f6dd70bdd..171697a1e 100644
--- a/UI/Web/src/app/cards/card-item/card-item.component.scss
+++ b/UI/Web/src/app/cards/card-item/card-item.component.scss
@@ -1,4 +1,4 @@
-@use '../../../theme/colors';
+
$triangle-size: 30px;
$image-height: 230px;
@@ -7,7 +7,7 @@ $image-width: 160px;
.error-banner {
width: 160px;
height: 18px;
- background-color: colors.$error-color;
+ background-color: var(--toast-error-bg-color);
font-size: 12px;
color: white;
text-transform: uppercase;
@@ -25,6 +25,11 @@ $image-width: 160px;
padding-left: 0px;
padding-right: 0px;
box-sizing: border-box;
+ position: relative;
+ background-color: var(--card-bg-color);
+ color: var(--card-text-color);
+ border-color: var(--card-border-color);
+
}
.card-title {
@@ -39,7 +44,7 @@ $image-width: 160px;
}
.selected-highlight {
- outline: 2px solid colors.$primary-color;
+ outline: 2px solid var(--primary-color);
}
@@ -52,7 +57,7 @@ $image-width: 160px;
height: 5px;
.progress {
- color: colors.$primary-color;
+ color: var(--card-progress-bar-color);
background-color: transparent;
}
}
@@ -73,7 +78,7 @@ $image-width: 160px;
height: 0;
border-style: solid;
border-width: 0 $triangle-size $triangle-size 0;
- border-color: transparent colors.$primary-color transparent transparent;
+ border-color: transparent var(--primary-color) transparent transparent;
}
@@ -106,10 +111,12 @@ $image-width: 160px;
.bulk-mode {
visibility: visible;
+ z-index: 110;
}
.overlay-item {
visibility: visible;
+ z-index: 100;
}
}
@@ -142,3 +149,17 @@ $image-width: 160px;
text-decoration: none;
margin-top: 0px;
}
+
+.card-overlay {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 230px;
+ z-index: 10;
+ transition: opacity 0.2s;
+}
+
+.card-overlay:hover {
+ opacity: 0;
+}
diff --git a/UI/Web/src/app/cards/chapter-metadata-detail/chapter-metadata-detail.component.html b/UI/Web/src/app/cards/chapter-metadata-detail/chapter-metadata-detail.component.html
index 064225057..716ebd02f 100644
--- a/UI/Web/src/app/cards/chapter-metadata-detail/chapter-metadata-detail.component.html
+++ b/UI/Web/src/app/cards/chapter-metadata-detail/chapter-metadata-detail.component.html
@@ -4,13 +4,13 @@
<!-- Arc Information -->
- <div class="row no-gutters">
+ <div class="row g-0">
<div class="col">
Id: {{chapter.id}}
</div>
</div>
- <div class="row no-gutters">
+ <div class="row g-0">
<div class="col">
Title: {{chapter.titleName || '-'}}
</div>
@@ -19,7 +19,7 @@
</div>
</div>
- <div class="row no-gutters">
+ <div class="row g-0">
<div class="col" *ngIf="chapter.hasOwnProperty('created')">
Added: {{(chapter.created | date: 'short') || '-'}}
</div>
@@ -30,11 +30,11 @@
</div>
<ul class="list-unstyled" >
- <li class="media my-4">
+ <li class="d-flex my-4">
<a (click)="readChapter(chapter)" href="javascript:void(0);" title="Read {{libraryType !== LibraryType.Comic ? 'Chapter ' : 'Issue #'}} {{chapter.number}}">
- <app-image class="mr-3" width="74px" [imageUrl]="chapter.coverImage"></app-image>
+ <app-image class="me-3" width="74px" [imageUrl]="chapter.coverImage"></app-image>
</a>
- <div class="media-body">
+ <div class="flex-grow-1">
<h5 class="mt-0 mb-1">
<span *ngIf="chapter.number !== '0'; else specialHeader">
<!-- TODO: Add back in
@@ -42,7 +42,7 @@
<app-card-actionables (actionHandler)="performAction($event, chapter)" [actions]="chapterActions" [labelBy]="utilityService.formatChapterName(libraryType, true, true) + formatChapterNumber(chapter)"></app-card-actionables>&nbsp;
{{utilityService.formatChapterName(libraryType, true, false) }} {{formatChapterNumber(chapter)}}
</span> -->
- <span class="badge badge-primary badge-pill">
+ <span class="badge bg-primary rounded-pill">
<span *ngIf="chapter.pagesRead > 0 && chapter.pagesRead < chapter.pages">{{chapter.pagesRead}} / {{chapter.pages}}</span>
<span *ngIf="chapter.pagesRead === 0">UNREAD</span>
<span *ngIf="chapter.pagesRead === chapter.pages">READ</span>
@@ -56,7 +56,7 @@
<ng-container>
- <div class="row no-gutters mt-1" *ngIf="chapter.writers && chapter.writers.length > 0">
+ <div class="row g-0 mt-1" *ngIf="chapter.writers && chapter.writers.length > 0">
<div class="col-md-4">
<h5>Writers</h5>
</div>
@@ -65,7 +65,7 @@
</div>
</div>
- <div class="row no-gutters mt-1" *ngIf="chapter.coverArtist && chapter.coverArtist.length > 0">
+ <div class="row g-0 mt-1" *ngIf="chapter.coverArtist && chapter.coverArtist.length > 0">
<div class="col-md-4">
<h5>Artists</h5>
</div>
@@ -74,7 +74,7 @@
</div>
</div>
- <div class="row no-gutters mt-1" *ngIf="chapter.publisher && chapter.publisher.length > 0">
+ <div class="row g-0 mt-1" *ngIf="chapter.publisher && chapter.publisher.length > 0">
<div class="col-md-4">
<h5>Publishers</h5>
</div>
@@ -98,7 +98,7 @@
Arc Information
- <div class="row no-gutters">
+ <div class="row g-0">
<div class="col">
Id: {{chapter.id}}
</div>
@@ -107,7 +107,7 @@
</div>
</div>
- <div class="row no-gutters">
+ <div class="row g-0">
<div class="col" *ngIf="chapter.hasOwnProperty('created')">
Added: {{(chapter.created | date: 'short') || '-'}}
</div>
diff --git a/UI/Web/src/app/cards/cover-image-chooser/cover-image-chooser.component.html b/UI/Web/src/app/cards/cover-image-chooser/cover-image-chooser.component.html
index 24a0703b9..9edfe9c44 100644
--- a/UI/Web/src/app/cards/cover-image-chooser/cover-image-chooser.component.html
+++ b/UI/Web/src/app/cards/cover-image-chooser/cover-image-chooser.component.html
@@ -3,13 +3,13 @@
<ngx-file-drop (onFileDrop)="dropped($event)"
(onFileOver)="fileOver($event)" (onFileLeave)="fileLeave($event)" accept=".png,.jpg,.jpeg" [directory]="false" dropZoneClassName="file-upload" contentClassName="file-upload-zone" [directory]="false">
<ng-template ngx-file-drop-content-tmp let-openFileSelector="openFileSelector">
- <div class="row no-gutters mt-3 pb-3" *ngIf="mode === 'all'">
+ <div class="row g-0 mt-3 pb-3" *ngIf="mode === 'all'">
<div class="mx-auto">
- <div class="row no-gutters mb-3">
+ <div class="row g-0 mb-3">
<i class="fa fa-file-upload mx-auto" style="font-size: 24px;" aria-hidden="true"></i>
</div>
- <div class="row no-gutters">
+ <div class="row g-0">
<div class="mx-auto">
<a class="col" style="padding-right:0px" href="javascript:void(0)" (click)="mode = 'url'; setupEnterHandler()"><span class="phone-hidden">Enter a </span>Url</a>
<span class="col" style="padding-right:0px">•</span>
@@ -23,17 +23,16 @@
<ng-container *ngIf="mode === 'url'">
- <div class="row no-gutters mt-3 pb-3 ml-md-2 mr-md-2">
- <div class="input-group col-md-10 mr-md-2" style="width: 100%">
+ <div class="row g-0 mt-3 pb-3 ms-md-2 me-md-2">
+ <div class="input-group col-md-10 me-md-2" style="width: 100%">
+ <!-- TOOD: Bootstrap migration: This should be replaced with just the label-->
<div class="input-group-prepend">
- <label class="input-group-text" for="load-image">Url</label>
+ <label class="input-group-text form-label" for="load-image">Url</label>
</div>
<input type="text" autocomplete="off" class="form-control" formControlName="coverImageUrl" placeholder="https://" id="load-image" class="form-control">
- <div class="input-group-append">
- <button class="btn btn-outline-secondary" type="button" id="load-image-addon" (click)="loadImage(); mode='all';" [disabled]="form.get('coverImageUrl')?.value.length === 0">
- Load
- </button>
- </div>
+ <button class="btn btn-outline-secondary" type="button" id="load-image-addon" (click)="loadImage(); mode='all';" [disabled]="form.get('coverImageUrl')?.value.length === 0">
+ Load
+ </button>
</div>
<button class="col btn btn-secondary" href="javascript:void(0)" (click)="mode = 'all'" aria-label="Back">
<i class="fas fa-share" aria-hidden="true" style="transform: rotateY(180deg)"></i>&nbsp;
@@ -51,7 +50,7 @@
</ng-template>
</form>
- <div class="row no-gutters chooser" style="padding-top: 10px">
+ <div class="row g-0 chooser" style="padding-top: 10px">
<div class="image-card col-auto {{selectedIndex === idx ? 'selected' : ''}}" *ngFor="let url of imageUrls; let idx = index;" tabindex="0" attr.aria-label="Image {{idx + 1}}" (click)="selectImage(idx)">
<app-image class="card-img-top" height="230px" width="158px" [imageUrl]="url"></app-image>
</div>
diff --git a/UI/Web/src/app/cards/cover-image-chooser/cover-image-chooser.component.scss b/UI/Web/src/app/cards/cover-image-chooser/cover-image-chooser.component.scss
index 5932325a4..7ee37380c 100644
--- a/UI/Web/src/app/cards/cover-image-chooser/cover-image-chooser.component.scss
+++ b/UI/Web/src/app/cards/cover-image-chooser/cover-image-chooser.component.scss
@@ -1,4 +1,3 @@
-@use '../../../theme/colors';
$image-height: 230px;
$image-width: 160px;
@@ -14,7 +13,7 @@ $image-width: 160px;
}
.selected {
- outline: 5px solid colors.$primary-color;
+ outline: 5px solid var(--primary-color);
outline-width: medium;
outline-offset: -1px;
}
@@ -22,7 +21,7 @@ $image-width: 160px;
ngx-file-drop ::ng-deep > div {
// styling for the outer drop box
width: 100%;
- border: 2px solid colors.$primary-color;
+ border: 2px solid var(--primary-color);
border-radius: 5px;
height: 100px;
margin: auto;
diff --git a/UI/Web/src/app/cards/file-info/file-info.component.html b/UI/Web/src/app/cards/file-info/file-info.component.html
index f409c2f09..4f93b1b8f 100644
--- a/UI/Web/src/app/cards/file-info/file-info.component.html
+++ b/UI/Web/src/app/cards/file-info/file-info.component.html
@@ -1,6 +1,6 @@
<li class="list-group-item">
<span>{{file.filePath}}</span>
- <div class="row no-gutters">
+ <div class="row g-0">
<div class="col">
Pages: {{file.pages}}
</div>
diff --git a/UI/Web/src/app/cards/library-card/library-card.component.scss b/UI/Web/src/app/cards/library-card/library-card.component.scss
index 3ece78d0f..d2345feaa 100644
--- a/UI/Web/src/app/cards/library-card/library-card.component.scss
+++ b/UI/Web/src/app/cards/library-card/library-card.component.scss
@@ -1,4 +1,3 @@
-$primary-color: #cc7b19;
.card {
margin: 10px;
@@ -28,7 +27,6 @@ $primary-color: #cc7b19;
.overlay {
height: 160px;
&:hover {
- background-color: rgba(0, 0, 0, 0.4);
visibility: visible;
.overlay-item {
diff --git a/UI/Web/src/app/carousel/carousel-reel/carousel-reel.component.html b/UI/Web/src/app/carousel/carousel-reel/carousel-reel.component.html
index 0106eec3c..8faa38656 100644
--- a/UI/Web/src/app/carousel/carousel-reel/carousel-reel.component.html
+++ b/UI/Web/src/app/carousel/carousel-reel/carousel-reel.component.html
@@ -1,9 +1,9 @@
<div class="carousel-container" *ngIf="items.length > 0">
<div>
<h2 style="display: inline-block;"><a href="javascript:void(0)" (click)="sectionClicked($event)" class="section-title">{{title}}</a></h2>
- <div class="float-right">
- <button class="btn btn-icon" [disabled]="isBeginning" (click)="prevPage()"><i class="fa fa-angle-left" aria-hidden="true"></i><span class="sr-only">Previous Items</span></button>
- <button class="btn btn-icon" [disabled]="isEnd" (click)="nextPage()"><i class="fa fa-angle-right" aria-hidden="true"></i><span class="sr-only">Next Items</span></button>
+ <div class="float-end">
+ <button class="btn btn-icon" [disabled]="isBeginning" (click)="prevPage()"><i class="fa fa-angle-left" aria-hidden="true"></i><span class="visually-hidden">Previous Items</span></button>
+ <button class="btn btn-icon" [disabled]="isEnd" (click)="nextPage()"><i class="fa fa-angle-right" aria-hidden="true"></i><span class="visually-hidden">Next Items</span></button>
</div>
</div>
<div>
diff --git a/UI/Web/src/app/carousel/carousel-reel/carousel-reel.component.scss b/UI/Web/src/app/carousel/carousel-reel/carousel-reel.component.scss
index b16ff9de3..6e707c502 100644
--- a/UI/Web/src/app/carousel/carousel-reel/carousel-reel.component.scss
+++ b/UI/Web/src/app/carousel/carousel-reel/carousel-reel.component.scss
@@ -8,41 +8,20 @@
flex-direction: column;
}
-.section-title {
- font-size: 1.6rem;
- font-weight: 400;
- margin-left: 10px;
- color: black;
-
- :hover {
- text-decoration: underline;
- }
-
- :active {
- text-decoration: underline;
- }
-
- :focus {
- text-decoration: underline;
- }
-}
-
-::ng-deep .bg-light {
- .section-title {
- color: black !important;
- }
-
-}
-// These are needed due to nested css within another component
-::ng-deep .bg-dark {
+.carousel-container {
.section-title {
- color: #efefef !important;
+ font-size: 1.6rem;
+ font-weight: 400;
+ margin-left: 10px;
+ color: var(--carousel-header-text-color);
+ text-decoration: var(--carousel-header-text-decoration);
+
+ &:hover, &:focus, &:active {
+ text-decoration: var(--carousel-hover-header-text-decoration);
+ }
}
}
-::ng-deep .swiper-slide {
- width: auto !important;
-}
::ng-deep .swiper-slide {
width: auto !important;
diff --git a/UI/Web/src/app/carousel/carousel-reel/carousel-reel.component.ts b/UI/Web/src/app/carousel/carousel-reel/carousel-reel.component.ts
index a1bc4a340..6500570f1 100644
--- a/UI/Web/src/app/carousel/carousel-reel/carousel-reel.component.ts
+++ b/UI/Web/src/app/carousel/carousel-reel/carousel-reel.component.ts
@@ -1,7 +1,6 @@
import { Component, ContentChild, EventEmitter, Input, OnInit, Output, TemplateRef, ViewChild } from '@angular/core';
import { SwiperComponent } from 'swiper/angular';
-//import Swiper from 'swiper';
-//import { SwiperEvents, Swiper } from 'swiper/types';
+import { Swiper, SwiperEvents } from 'swiper/types';
@Component({
selector: 'app-carousel-reel',
@@ -15,18 +14,17 @@ export class CarouselReelComponent implements OnInit {
@Input() title = '';
@Output() sectionClick = new EventEmitter<string>();
- @ViewChild('swiper', { static: false }) swiper?: SwiperComponent;
+ swiper: Swiper | undefined;
- //swiper!: Swiper;
trackByIdentity: (index: number, item: any) => string;
get isEnd() {
- return this.swiper?.swiperRef.isEnd;
+ return this.swiper?.isEnd;
}
get isBeginning() {
- return this.swiper?.swiperRef.isBeginning;
+ return this.swiper?.isBeginning;
}
constructor() {
@@ -36,14 +34,16 @@ export class CarouselReelComponent implements OnInit {
ngOnInit(): void {}
nextPage() {
+ if (this.isEnd) return;
if (this.swiper) {
- this.swiper.swiperRef.setProgress(this.swiper.swiperRef.progress + 0.25, 600);
+ this.swiper.setProgress(this.swiper.progress + 0.25, 600);
}
}
prevPage() {
+ if (this.isBeginning) return;
if (this.swiper) {
- this.swiper.swiperRef.setProgress(this.swiper.swiperRef.progress - 0.25, 600);
+ this.swiper.setProgress(this.swiper.progress - 0.25, 600);
}
}
@@ -51,14 +51,7 @@ export class CarouselReelComponent implements OnInit {
this.sectionClick.emit(this.title);
}
- // onSwiper(eventParams: Parameters<SwiperEvents['init']>) {
- // console.log('swiper: ', eventParams);
- // [this.swiper] = eventParams;
- // }
-
- // onSwiper(params: Swiper) {
- // // const [swiper] = params;
- // // console.log(swiper);
- // // return params;
- // }
+ onSwiper(eventParams: Parameters<SwiperEvents['init']>) {
+ [this.swiper] = eventParams;
+ }
}
diff --git a/UI/Web/src/app/collections/collection-detail/collection-detail.component.html b/UI/Web/src/app/collections/collection-detail/collection-detail.component.html
index 1d33472ea..08c97266b 100644
--- a/UI/Web/src/app/collections/collection-detail/collection-detail.component.html
+++ b/UI/Web/src/app/collections/collection-detail/collection-detail.component.html
@@ -4,14 +4,14 @@
<app-image class="poster" maxWidth="481px" [imageUrl]="tagImage"></app-image>
</div>
<div class="col-md-10 col-xs-8 col-sm-6">
- <div class="row no-gutters">
+ <div class="row g-0">
<h2>
{{collectionTag.title}}
</h2>
</div>
- <div class="row no-gutters mt-2 mb-2">
- <div class="ml-2" *ngIf="isAdmin">
+ <div class="row g-0 mt-2 mb-2">
+ <div class="ms-2" *ngIf="isAdmin">
<button class="btn btn-secondary" (click)="openEditCollectionTagModal(collectionTag)" title="Edit Series information">
<span>
<i class="fa fa-pen" aria-hidden="true"></i>
@@ -19,7 +19,7 @@
</button>
</div>
</div>
- <div class="row no-gutters">
+ <div class="row g-0">
<app-read-more [text]="collectionTag.summary" [maxLength]="250"></app-read-more>
</div>
</div>
diff --git a/UI/Web/src/app/grouped-typeahead/grouped-typeahead.component.html b/UI/Web/src/app/grouped-typeahead/grouped-typeahead.component.html
index 565ead373..1d9445841 100644
--- a/UI/Web/src/app/grouped-typeahead/grouped-typeahead.component.html
+++ b/UI/Web/src/app/grouped-typeahead/grouped-typeahead.component.html
@@ -1,15 +1,15 @@
<form [formGroup]="typeaheadForm" class="grouped-typeahead">
<div class="typeahead-input" [ngClass]="{'focused': hasFocus == true}" (click)="onInputFocus($event)">
- <div>
+ <div class="search">
<input #input [id]="id" type="text" autocomplete="off" formControlName="typeahead" [placeholder]="placeholder"
aria-haspopup="listbox" aria-owns="dropdown" aria-expanded="hasFocus && (grouppedData.persons.length || grouppedData.collections.length || grouppedData.series.length || grouppedData.persons.length || grouppedData.tags.length || grouppedData.genres.length)"
aria-autocomplete="list" (focusout)="close($event)" (focus)="open($event)"
>
<div class="spinner-border spinner-border-sm" role="status" *ngIf="isLoading">
- <span class="sr-only">Loading...</span>
+ <span class="visually-hidden">Loading...</span>
</div>
- <button type="button" class="close" aria-label="Close" (click)="resetField()">
- <span aria-hidden="true">&times;</span>
+ <button type="button" class="btn-close float-end" aria-label="Close" (click)="resetField()">
+
</button>
</div>
</div>
diff --git a/UI/Web/src/app/grouped-typeahead/grouped-typeahead.component.scss b/UI/Web/src/app/grouped-typeahead/grouped-typeahead.component.scss
index a6bbd01f0..6dcd08e5f 100644
--- a/UI/Web/src/app/grouped-typeahead/grouped-typeahead.component.scss
+++ b/UI/Web/src/app/grouped-typeahead/grouped-typeahead.component.scss
@@ -1,20 +1,24 @@
-@use "../../theme/colors";
form {
max-height: 38px;
}
-input {
- width: 15px;
- opacity: 1;
- position: relative;
- left: 4px;
- border: none;
-}
+// input {
+// width: 15px;
+// opacity: 1;
+// position: relative;
+// left: 4px;
+// border: none;
+// }
.search-result img {
width: 100% !important;
}
+.btn-close {
+ margin-top: 8px;
+ font-size: 0.8rem;
+}
+
.typeahead-input {
border: 1px solid transparent;
@@ -27,32 +31,35 @@ input {
box-sizing: border-box;
box-shadow: none;
cursor: text;
- background-color: #fff;
+ background-color: var(--input-bg-color);
+ color: var(--body-text-color);
min-height: 38px;
transition-property: all;
transition-duration: 0.3s;
display: block;
-
- .close {
- cursor: pointer;
- position: absolute;
- top: 7px;
- right: 10px;
+ .search {
+ display: flex;
}
- @media only screen and (max-width:650px) {
- .close {
- top: 50%;
- transform: translate(0, -60%);
- }
- }
+ // .close {
+ // cursor: pointer;
+ // position: absolute;
+ // top: 7px;
+ // right: 10px;
+ // }
+
+ // @media only screen and (max-width:650px) {
+ // .close {
+ // top: 50%;
+ // transform: translate(0, -60%);
+ // }
+ // }
input {
outline: 0 !important;
border-radius: .28571429rem;
- display: inline-block !important;
padding: 0px !important;
min-height: 0px !important;
max-width: 100% !important;
@@ -60,32 +67,35 @@ input {
text-indent: 0 !important;
line-height: inherit !important;
box-shadow: none !important;
- width: 300px;
+ width: 200px;
transition-property: all;
transition-duration: 0.3s;
display: block;
- }
+ opacity: 1;
+ position: relative;
+ left: 4px;
+ border: none;
- input:focus-visible {
- width: calc(100vw - 400px);
+ &:focus-visible {
+ width: calc(100vw - 400px);
+ }
+
+ &:empty {
+ padding-top: 6px !important;
+ }
}
- input:empty {
- padding-top: 6px !important;
+ &.focused {
+ width: 100%;
+ border-color: var(--input-focused-border-color);
}
-}
-.typeahead-input.focused {
- width: 100%;
- border-color: #ccc;
}
+
+
/* small devices (phones, 650px and down) */
@media only screen and (max-width:650px) {
- .typeahead-input {
- width: 120px;
- }
-
input {
width: 100%
}
@@ -95,21 +105,20 @@ input {
}
}
-::ng-deep .bg-dark .typeahead-input {
- color: #efefef;
- background-color: colors.$dark-bg-color;
-}
-// Causes bleedover
-::ng-deep .bg-dark .dropdown .list-group-item.hover {
- background-color: colors.$dark-hover-color;
-}
+.section-header {
+ color: var(--body-text-color);
+ &:hover {
+ background-color: var(--list-group-item-bg-color) !important;
+ cursor: default;
+ }
+}
.dropdown {
width: 100vw;
height: calc(100vh - 57px); //header offset
- background: rgba(0,0,0,0.5);
+ background: var(--dropdown-overlay-color);
position: fixed;
justify-content: center;
left: 0;
@@ -155,39 +164,6 @@ ul ul {
border-radius: 0px !important;
}
-.list-group-item {
- cursor: pointer;
-}
-
-::ng-deep .bg-dark {
- & .section-header {
-
- background: colors.$dark-item-accent-bg;
- cursor: default;
- }
-
- & .section-header:hover {
- background-color: colors.$dark-item-accent-bg !important;
- }
-}
-
-::ng-deep .bg-light {
- & .section-header {
-
- background: colors.$white-item-accent-bg;
- cursor: default;
- }
-
- & .section-header:hover, .list-group-item.section-header:hover {
- background: colors.$white-item-accent-bg !important;
- }
-
- & .list-group-item:hover {
- background-color: colors.$primary-color !important;
- }
-
-
-}
.spinner-border {
position: absolute;
diff --git a/UI/Web/src/app/manga-reader/infinite-scroller/infinite-scroller.component.html b/UI/Web/src/app/manga-reader/infinite-scroller/infinite-scroller.component.html
index 1f8477c62..51cee1c53 100644
--- a/UI/Web/src/app/manga-reader/infinite-scroller/infinite-scroller.component.html
+++ b/UI/Web/src/app/manga-reader/infinite-scroller/infinite-scroller.component.html
@@ -22,7 +22,7 @@
<button class="btn btn-icon mx-auto">
<i class="fa fa-angle-double-up animate" aria-hidden="true"></i>
</button>
- <span class="sr-only">Scroll up to move to next chapter</span>
+ <span class="visually-hidden">Scroll up to move to next chapter</span>
</div>
</div>
<ng-container *ngFor="let item of webtoonImages | async; let index = index;">
@@ -40,7 +40,7 @@
<button class="btn btn-icon mx-auto">
<i class="fa fa-angle-double-down animate" aria-hidden="true"></i>
</button>
- <span class="sr-only">Scroll down to move to next chapter</span>
+ <span class="visually-hidden">Scroll down to move to next chapter</span>
</div>
<div style="height: 200px"></div>
</div>
diff --git a/UI/Web/src/app/manga-reader/manga-reader.component.html b/UI/Web/src/app/manga-reader/manga-reader.component.html
index 4adc3ec04..c33e90171 100644
--- a/UI/Web/src/app/manga-reader/manga-reader.component.html
+++ b/UI/Web/src/app/manga-reader/manga-reader.component.html
@@ -3,17 +3,17 @@
<div style="display: flex; margin-top: 5px;">
<button class="btn btn-icon" style="height: 100%" title="Back" (click)="closeReader()">
<i class="fa fa-arrow-left" aria-hidden="true"></i>
- <span class="sr-only">Back</span>
+ <span class="visually-hidden">Back</span>
</button>
<div>
- <div style="font-weight: bold;">{{title}} <span class="clickable" *ngIf="incognitoMode" (click)="turnOffIncognito()" role="button" aria-label="Incognito mode is on. Toggle to turn off.">(<i class="fa fa-glasses" aria-hidden="true"></i><span class="sr-only">Incognito Mode:</span>)</span></div>
+ <div style="font-weight: bold;">{{title}} <span class="clickable" *ngIf="incognitoMode" (click)="turnOffIncognito()" role="button" aria-label="Incognito mode is on. Toggle to turn off.">(<i class="fa fa-glasses" aria-hidden="true"></i><span class="visually-hidden">Incognito Mode:</span>)</span></div>
<div class="subtitle">
{{subtitle}}
</div>
</div>
<div style="margin-left: auto; padding-right: 3%;">
- <button class="btn btn-icon btn-small" role="checkbox" [attr.aria-checked]="pageBookmarked" title="{{pageBookmarked ? 'Unbookmark Page' : 'Bookmark Page'}}" (click)="bookmarkPage()"><i class="{{pageBookmarked ? 'fa' : 'far'}} fa-bookmark" aria-hidden="true"></i><span class="sr-only">{{pageBookmarked ? 'Unbookmark Page' : 'Bookmark Page'}}</span></button>
+ <button class="btn btn-icon btn-small" role="checkbox" [attr.aria-checked]="pageBookmarked" title="{{pageBookmarked ? 'Unbookmark Page' : 'Bookmark Page'}}" (click)="bookmarkPage()"><i class="{{pageBookmarked ? 'fa' : 'far'}} fa-bookmark" aria-hidden="true"></i><span class="visually-hidden">{{pageBookmarked ? 'Unbookmark Page' : 'Bookmark Page'}}</span></button>
</div>
</div>
</div>
@@ -56,9 +56,9 @@
</div>
<div class="fixed-bottom overlay" *ngIf="menuOpen" [@slideFromBottom]="menuOpen">
- <div class="form-group" *ngIf="pageOptions != undefined && pageOptions.ceil != undefined">
- <span class="sr-only" id="slider-info"></span>
- <div class="row no-gutters">
+ <div class="mb-3" *ngIf="pageOptions != undefined && pageOptions.ceil != undefined">
+ <span class="visually-hidden" id="slider-info"></span>
+ <div class="row g-0">
<button class="btn btn-small btn-icon col-1" [disabled]="prevChapterDisabled" (click)="loadPrevChapter();resetMenuCloseTimer();" title="Prev Chapter/Volume"><i class="fa fa-fast-backward" aria-hidden="true"></i></button>
<button class="btn btn-small btn-icon col-1" [disabled]="prevPageDisabled || pageNum === 0" (click)="goToPage(0);resetMenuCloseTimer();" title="First Page"><i class="fa fa-step-backward" aria-hidden="true"></i></button>
<div class="col custom-slider" *ngIf="pageOptions.ceil > 0; else noSlider">
@@ -75,29 +75,29 @@
</div>
- <div class="row pt-4 ml-2 mr-2">
+ <div class="row pt-4 ms-2 me-2">
<div class="col">
<button class="btn btn-icon" (click)="setReadingDirection();resetMenuCloseTimer();" [disabled]="readerMode === READER_MODE.WEBTOON || readerMode === READER_MODE.MANGA_UD" aria-describedby="reading-direction" title="Reading Direction: {{readingDirection === ReadingDirection.LeftToRight ? 'Left to Right' : 'Right to Left'}}">
<i class="fa fa-angle-double-{{readingDirection === ReadingDirection.LeftToRight ? 'right' : 'left'}}" aria-hidden="true"></i>
- <span id="reading-direction" class="sr-only">{{readingDirection === ReadingDirection.LeftToRight ? 'Left to Right' : 'Right to Left'}}</span>
+ <span id="reading-direction" class="visually-hidden">{{readingDirection === ReadingDirection.LeftToRight ? 'Left to Right' : 'Right to Left'}}</span>
</button>
</div>
<div class="col">
<button class="btn btn-icon" title="Reading Mode" (click)="toggleReaderMode();resetMenuCloseTimer();">
<i class="fa {{readerModeIcon}}" aria-hidden="true"></i>
- <span class="sr-only">Reading Mode</span>
+ <span class="visually-hidden">Reading Mode</span>
</button>
</div>
<div class="col">
<button class="btn btn-icon" title="{{this.isFullscreen ? 'Collapse' : 'Fullscreen'}}" (click)="toggleFullscreen();resetMenuCloseTimer();">
<i class="fa {{this.isFullscreen ? 'fa-compress-alt' : 'fa-expand-alt'}}" aria-hidden="true"></i>
- <span class="sr-only">{{this.isFullscreen ? 'Collapse' : 'Fullscreen'}}</span>
+ <span class="visually-hidden">{{this.isFullscreen ? 'Collapse' : 'Fullscreen'}}</span>
</button>
</div>
<div class="col">
<button class="btn btn-icon" title="Settings" (click)="settingsOpen = !settingsOpen;resetMenuCloseTimer();">
<i class="fa fa-sliders-h" aria-hidden="true"></i>
- <span class="sr-only">Settings</span>
+ <span class="visually-hidden">Settings</span>
</button>
</div>
</div>
@@ -105,13 +105,13 @@
<form [formGroup]="generalSettingsForm">
<div class="row">
<div class="col-6">
- <label for="page-splitting">Image Splitting</label>&nbsp;
+ <label for="page-splitting" class="form-label">Image Splitting</label>&nbsp;
<div class="split fa fa-image">
<div class="{{splitIconClass}}"></div>
</div>
</div>
<div class="col-6">
- <div class="form-group">
+ <div class="mb-3">
<select class="form-control" id="page-splitting" formControlName="pageSplitOption">
<option *ngFor="let opt of pageSplitOptions" [value]="opt.value">{{opt.text}}</option>
</select>
@@ -121,7 +121,7 @@
<div class="row">
<div class="col-6">
- <label for="page-fitting">Image Scaling</label>&nbsp;<i class="fa {{getFittingIcon()}}" aria-hidden="true"></i>
+ <label for="page-fitting" class="form-label">Image Scaling</label>&nbsp;<i class="fa {{getFittingIcon()}}" aria-hidden="true"></i>
</div>
<div class="col-6">
<select class="form-control" id="page-fitting" formControlName="fittingOption">
diff --git a/UI/Web/src/app/manga-reader/manga-reader.component.scss b/UI/Web/src/app/manga-reader/manga-reader.component.scss
index 451f5ff0c..d3d4917ab 100644
--- a/UI/Web/src/app/manga-reader/manga-reader.component.scss
+++ b/UI/Web/src/app/manga-reader/manga-reader.component.scss
@@ -1,5 +1,3 @@
-@use '../../theme/colors';
-
$center-width: 50%;
$side-width: 25%;
@@ -16,16 +14,16 @@ $pointer-offset: 5px;
}
}
-.btn-icon {
- color: white;
-}
+// .btn-icon {
+// color: white;
+// }
canvas {
position: absolute;
}
.reader {
- background-color: black;
+ background-color: var(--manga-reader-bg-color);
overflow: auto;
img {
@@ -58,9 +56,9 @@ canvas {
.overlay {
- background-color: rgba(0,0,0,0.5);
- backdrop-filter: blur(10px); // BUG: This doesn't work on Firefox
- color: white;
+ background-color: var(--manga-reader-overlay-bg-color);
+ backdrop-filter: var(--manga-reader-overlay-filter); // BUG: This doesn't work on Firefox
+ color: var(--manga-reader-overlay-text-color);
}
// Fitting Options
@@ -175,7 +173,7 @@ canvas {
height: 2px;
}
.custom-slider .ngx-slider .ngx-slider-selection {
- background: colors.$primary-color;
+ background: var(--primary-color);
}
.custom-slider .ngx-slider .ngx-slider-pointer {
@@ -183,7 +181,7 @@ canvas {
height: 16px;
top: auto; /* to remove the default positioning */
bottom: 0;
- background-color: colors.$primary-color; // #333;
+ background-color: var(--primary-color); // #333;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
}
@@ -214,7 +212,7 @@ canvas {
}
.custom-slider .ngx-slider .ngx-slider-tick.ngx-slider-selected {
- background: colors.$primary-color;
+ background: var(--primary-color);
}
}
@@ -235,12 +233,12 @@ canvas {
}
.highlight {
- background-color: rgba(65, 225, 100, 0.5) !important;
+ background-color: var(--manga-reader-next-highlight-bg-color) !important;
animation: fadein .5s both;
backdrop-filter: blur(10px);
}
.highlight-2 {
- background-color: rgba(65, 105, 225, 0.5) !important;
+ background-color: var(--manga-reader-prev-highlight-bg-color) !important;
animation: fadein .5s both;
backdrop-filter: blur(10px);
}
@@ -255,6 +253,6 @@ canvas {
border: 0px;
}
50% {
- border: 5px solid colors.$primary-color;
+ border: 5px solid var(--primary-color);
}
}
\ No newline at end of file
diff --git a/UI/Web/src/app/nav-events-toggle/nav-events-toggle.component.html b/UI/Web/src/app/nav-events-toggle/nav-events-toggle.component.html
index 4ff6c8643..8a73923a8 100644
--- a/UI/Web/src/app/nav-events-toggle/nav-events-toggle.component.html
+++ b/UI/Web/src/app/nav-events-toggle/nav-events-toggle.component.html
@@ -2,7 +2,7 @@
<button type="button" class="btn btn-icon {{(progressEventsSource.getValue().length > 0 || updateAvailable) ? 'colored' : ''}}"
[ngbPopover]="popContent" title="Activity" placement="bottom" [popoverClass]="'nav-events'">
- <i aria-hidden="true" class="fa fa-wave-square"></i>
+ <i aria-hidden="true" class="fa fa-wave-square nav"></i>
</button>
<ng-template #popContent>
@@ -11,7 +11,7 @@
<div class="spinner-border text-primary small-spinner"
role="status" title="Started at {{event.timestamp | date: 'short'}}"
attr.aria-valuetext="{{prettyPrintProgress(event.progress)}}%" [attr.aria-valuenow]="prettyPrintProgress(event.progress)">
- <span class="sr-only">Scan for {{event.libraryName}} in progress</span>
+ <span class="visually-hidden">Scan for {{event.libraryName}} in progress</span>
</div>
{{prettyPrintProgress(event.progress)}}%
{{prettyPrintEvent(event.eventType, event)}} {{event.libraryName}}
diff --git a/UI/Web/src/app/nav-events-toggle/nav-events-toggle.component.scss b/UI/Web/src/app/nav-events-toggle/nav-events-toggle.component.scss
index f19123aa7..02e4a2a56 100644
--- a/UI/Web/src/app/nav-events-toggle/nav-events-toggle.component.scss
+++ b/UI/Web/src/app/nav-events-toggle/nav-events-toggle.component.scss
@@ -1,4 +1,28 @@
-@use "../../theme/colors";
+// NOTE: I'm leaving this not fully customized because I'm planning to rewrite the whole design in v0.5.2/3
+// These are customizations for events nav
+.dark-menu {
+ background-color: var(--navbar-bg-color);
+ border-color: rgba(1, 4, 9, 0.5);
+}
+
+.dark-menu-item {
+ color: var(--body-text-color);
+ background-color: rgb(1, 4, 9);
+ border-color: rgba(1, 4, 9, 0.5);
+}
+
+// Popovers need to be their own component
+::ng-deep .bs-popover-bottom > .popover-arrow::after, .bs-popover-bottom > .popover-arrow::before {
+ border-bottom-color: transparent;
+}
+
+.nav-events {
+ background-color: var(--navbar-bg-color);
+}
+
+// .nav-events {
+// background-color: white;
+// }
.btn:focus, .btn:hover {
@@ -10,9 +34,7 @@
height: 1rem;
}
-.nav-events {
- background-color: white;
-}
+
.nav-events .popover-body {
padding: 0px;
@@ -23,7 +45,7 @@
}
.colored {
- background-color: colors.$primary-color;
+ background-color: var(--primary-color);
border-radius: 60px;
}
@@ -31,7 +53,7 @@
cursor: pointer;
i.fa {
- color: colors.$primary-color !important;
+ color: var(--primary-color) !important;
}
- color: colors.$primary-color;
+ color: var(--primary-color);
}
\ No newline at end of file
diff --git a/UI/Web/src/app/nav-events-toggle/nav-events-toggle.component.ts b/UI/Web/src/app/nav-events-toggle/nav-events-toggle.component.ts
index 59a7f7599..ff8f1f300 100644
--- a/UI/Web/src/app/nav-events-toggle/nav-events-toggle.component.ts
+++ b/UI/Web/src/app/nav-events-toggle/nav-events-toggle.component.ts
@@ -19,8 +19,9 @@ interface ProcessedEvent {
type ProgressType = EVENTS.ScanLibraryProgress | EVENTS.RefreshMetadataProgress | EVENTS.BackupDatabaseProgress | EVENTS.CleanupProgress;
-const acceptedEvents = [EVENTS.ScanLibraryProgress, EVENTS.RefreshMetadataProgress, EVENTS.BackupDatabaseProgress, EVENTS.CleanupProgress, EVENTS.DownloadProgress];
+const acceptedEvents = [EVENTS.ScanLibraryProgress, EVENTS.RefreshMetadataProgress, EVENTS.BackupDatabaseProgress, EVENTS.CleanupProgress, EVENTS.DownloadProgress, EVENTS.SiteThemeProgress];
+// TODO: Rename this to events widget
@Component({
selector: 'app-nav-events-toggle',
templateUrl: './nav-events-toggle.component.html',
diff --git a/UI/Web/src/app/nav-header/nav-header.component.html b/UI/Web/src/app/nav-header/nav-header.component.html
index 458a73a5b..c589629e9 100644
--- a/UI/Web/src/app/nav-header/nav-header.component.html
+++ b/UI/Web/src/app/nav-header/nav-header.component.html
@@ -1,112 +1,106 @@
<nav class="navbar navbar-expand-md navbar-dark fixed-top" *ngIf="navService?.navbarVisible$ | async">
<div class="container-fluid">
- <a class="sr-only sr-only-focusable focus-visible" href="javascript:void(0);" (click)="moveFocus()">Skip to main content</a>
- <a class="navbar-brand dark-exempt" routerLink="/library" routerLinkActive="active"><img class="logo" src="../../assets/images/logo.png" alt="kavita icon" aria-hidden="true"/><span class="phone-hidden"> Kavita</span></a>
- <ul class="navbar-nav col mr-auto">
+ <a class="visually-hidden-focusable focus-visible" href="javascript:void(0);" (click)="moveFocus()">Skip to main content</a>
+ <a class="navbar-brand dark-exempt" routerLink="/library" routerLinkActive="active"><img class="logo" src="../../assets/images/logo.png" alt="kavita icon" aria-hidden="true"/><span class="d-none d-md-inline"> Kavita</span></a>
+ <ul class="navbar-nav col me-auto">
<div class="nav-item" *ngIf="(accountService.currentUser$ | async) as user">
- <div>
- <fieldset class="form-inline">
- <div class="form-group" style="margin-bottom: 0px;">
- <label for="nav-search" class="sr-only">Search series</label>
- <div class="ng-autocomplete">
- <app-grouped-typeahead
- #search
- id="nav-search"
- [minQueryLength]="2"
- initialValue=""
- placeholder="Search…"
- [grouppedData]="searchResults"
- (inputChanged)="onChangeSearch($event)"
- (clearField)="clearSearch()"
- (focusChanged)="focusUpdate($event)"
- >
+ <label for="nav-search" class="form-label visually-hidden">Search series</label>
+ <div class="ng-autocomplete">
+ <app-grouped-typeahead
+ #search
+ id="nav-search"
+ [minQueryLength]="2"
+ initialValue=""
+ placeholder="Search…"
+ [grouppedData]="searchResults"
+ (inputChanged)="onChangeSearch($event)"
+ (clearField)="clearSearch()"
+ (focusChanged)="focusUpdate($event)"
+ >
- <ng-template #libraryTemplate let-item>
- <div style="display: flex;padding: 5px;" (click)="clickLibraryResult(item)">
- <div class="ml-1">
- <span>{{item.name}}</span>
- </div>
- </div>
- </ng-template>
+ <ng-template #libraryTemplate let-item>
+ <div style="display: flex;padding: 5px;" (click)="clickLibraryResult(item)">
+ <div class="ms-1">
+ <span>{{item.name}}</span>
+ </div>
+ </div>
+ </ng-template>
- <ng-template #seriesTemplate let-item>
- <div style="display: flex;padding: 5px;" (click)="clickSeriesSearchResult(item)">
- <div style="width: 24px" class="mr-1">
- <app-image class="mr-3 search-result" width="24px" [imageUrl]="imageService.getSeriesCoverImage(item.seriesId)"></app-image>
- </div>
- <div class="ml-1">
- <app-series-format [format]="item.format"></app-series-format>
- <span *ngIf="item.name.toLowerCase().trim().indexOf(searchTerm) >= 0; else localizedName">{{item.name}}</span>
- <ng-template #localizedName>
- <span [innerHTML]="item.localizedName"></span>
- </ng-template>
- <span class="form-text" style="font-size: 0.8rem;">in {{item.libraryName}}</span>
- </div>
- </div>
+ <ng-template #seriesTemplate let-item>
+ <div style="display: flex;padding: 5px;" (click)="clickSeriesSearchResult(item)">
+ <div style="width: 24px" class="me-1">
+ <app-image class="me-3 search-result" width="24px" [imageUrl]="imageService.getSeriesCoverImage(item.seriesId)"></app-image>
+ </div>
+ <div class="ms-1">
+ <app-series-format [format]="item.format"></app-series-format>
+ <span *ngIf="item.name.toLowerCase().trim().indexOf(searchTerm) >= 0; else localizedName">{{item.name}}</span>
+ <ng-template #localizedName>
+ <span [innerHTML]="item.localizedName"></span>
</ng-template>
+ <div class="form-text" style="font-size: 0.8rem;">in {{item.libraryName}}</div>
+ </div>
+ </div>
+ </ng-template>
- <ng-template #collectionTemplate let-item>
- <div style="display: flex;padding: 5px;" (click)="clickCollectionSearchResult(item)">
- <div style="width: 24px" class="mr-1">
- <app-image class="mr-3 search-result" width="24px" [imageUrl]="imageService.getCollectionCoverImage(item.id)"></app-image>
- </div>
- <div class="ml-1">
- <span>{{item.title}}</span>
- <span *ngIf="item.promoted">
- &nbsp;<i class="fa fa-angle-double-up" aria-hidden="true" title="Promoted"></i>
- <span class="sr-only">(promoted)</span>
- </span>
- </div>
- </div>
- </ng-template>
+ <ng-template #collectionTemplate let-item>
+ <div style="display: flex;padding: 5px;" (click)="clickCollectionSearchResult(item)">
+ <div style="width: 24px" class="me-1">
+ <app-image class="me-3 search-result" width="24px" [imageUrl]="imageService.getCollectionCoverImage(item.id)"></app-image>
+ </div>
+ <div class="ms-1">
+ <span>{{item.title}}</span>
+ <span *ngIf="item.promoted">
+ &nbsp;<i class="fa fa-angle-double-up" aria-hidden="true" title="Promoted"></i>
+ <span class="visually-hidden">(promoted)</span>
+ </span>
+ </div>
+ </div>
+ </ng-template>
- <ng-template #readingListTemplate let-item>
- <div style="display: flex;padding: 5px;" (click)="clickReadingListSearchResult(item)">
- <div class="ml-1">
- <span>{{item.title}}</span>
- <span *ngIf="item.promoted">
- &nbsp;<i class="fa fa-angle-double-up" aria-hidden="true" title="Promoted"></i>
- <span class="sr-only">(promoted)</span>
- </span>
- </div>
- </div>
- </ng-template>
+ <ng-template #readingListTemplate let-item>
+ <div style="display: flex;padding: 5px;" (click)="clickReadingListSearchResult(item)">
+ <div class="ms-1">
+ <span>{{item.title}}</span>
+ <span *ngIf="item.promoted">
+ &nbsp;<i class="fa fa-angle-double-up" aria-hidden="true" title="Promoted"></i>
+ <span class="visually-hidden">(promoted)</span>
+ </span>
+ </div>
+ </div>
+ </ng-template>
- <ng-template #tagTemplate let-item>
- <div style="display: flex;padding: 5px;" (click)="goTo('tags', item.id)">
- <div class="ml-1">
- <span>{{item.title}}</span>
- </div>
- </div>
- </ng-template>
+ <ng-template #tagTemplate let-item>
+ <div style="display: flex;padding: 5px;" (click)="goTo('tags', item.id)">
+ <div class="ms-1">
+ <span>{{item.title}}</span>
+ </div>
+ </div>
+ </ng-template>
- <ng-template #personTemplate let-item>
- <div style="display: flex;padding: 5px;" class="clickable" (click)="goToPerson(item.role, item.id)">
- <div class="ml-1">
-
- <div [innerHTML]="item.name"></div>
- <div>{{item.role | personRole}}</div>
- </div>
- </div>
- </ng-template>
+ <ng-template #personTemplate let-item>
+ <div style="display: flex;padding: 5px;" class="clickable" (click)="goToPerson(item.role, item.id)">
+ <div class="ms-1">
+
+ <div [innerHTML]="item.name"></div>
+ <div>{{item.role | personRole}}</div>
+ </div>
+ </div>
+ </ng-template>
- <ng-template #genreTemplate let-item>
- <div style="display: flex;padding: 5px;" class="clickable" (click)="goTo('genres', item.id)">
- <div class="ml-1">
- <div [innerHTML]="item.title"></div>
- </div>
- </div>
- </ng-template>
+ <ng-template #genreTemplate let-item>
+ <div style="display: flex;padding: 5px;" class="clickable" (click)="goTo('genres', item.id)">
+ <div class="ms-1">
+ <div [innerHTML]="item.title"></div>
+ </div>
+ </div>
+ </ng-template>
- <ng-template #noResultsTemplate let-notFound>
- No results found
- </ng-template>
+ <ng-template #noResultsTemplate let-notFound>
+ No results found
+ </ng-template>
- </app-grouped-typeahead>
- </div>
- </div>
- </fieldset>
+ </app-grouped-typeahead>
</div>
</div>
</ul>
@@ -114,8 +108,8 @@
<ng-container *ngIf="!searchFocused">
<div class="back-to-top">
<button class="btn btn-icon scroll-to-top" (click)="scrollToTop()" *ngIf="backToTopNeeded">
- <i class="fa fa-angle-double-up" style="color: white" aria-hidden="true"></i>
- <span class="sr-only">Scroll to Top</span>
+ <i class="fa fa-angle-double-up nav" aria-hidden="true"></i>
+ <span class="visually-hidden">Scroll to Top</span>
</button>
</div>
@@ -123,10 +117,10 @@
<div class="nav-item">
<app-nav-events-toggle [user]="user"></app-nav-events-toggle>
</div>
- <div class="nav-item pr-2 not-xs-only">
- <a routerLink="/admin/dashboard" *ngIf="user.roles.includes('Admin')" class="dark-exempt btn btn-icon">
- <i class="fa fa-cogs" aria-hidden="true" style="color: white"></i>
- <span class="sr-only">Server Settings</span>
+ <div class="nav-item pe-2 not-xs-only">
+ <a routerLink="/admin/dashboard" *ngIf="user.roles.includes('Admin')" class="dark-exempt btn btn-icon" title="Server Settings">
+ <i class="fa fa-cogs nav" aria-hidden="true"></i>
+ <span class="visually-hidden">Server Settings</span>
</a>
</div>
diff --git a/UI/Web/src/app/nav-header/nav-header.component.scss b/UI/Web/src/app/nav-header/nav-header.component.scss
index 1ff9cc3f0..0b77525fa 100644
--- a/UI/Web/src/app/nav-header/nav-header.component.scss
+++ b/UI/Web/src/app/nav-header/nav-header.component.scss
@@ -1,24 +1,21 @@
-@import '~bootstrap/scss/mixins/_breakpoints.scss';
-
-$primary-color: white;
-$bg-color: rgb(22, 27, 34);
.btn:focus, .btn:hover {
- box-shadow: 0 0 0 0.1rem rgba(255, 255, 255, 1);
+ box-shadow: 0 0 0 0.1rem var(--navbar-btn-hover-outline-color);
}
.navbar {
- background-color: $bg-color;
+ background-color: var(--navbar-bg-color);
}
/* small devices (phones, 650px and down) */
-@media only screen and (max-width:650px) { //370
+@media only screen and (max-width:650px) {
.navbar-nav {
width: 0;
}
}
// On Really small screens, hide the server settings wheel and show it in nav
+// TODO: Look into doing this with bootstrap 5 (and moving to _utilities.scss)
.xs-only {
display: none;
}
@@ -39,7 +36,7 @@ $bg-color: rgb(22, 27, 34);
}
.navbar-brand {
- font-family: "Spartan", sans-serif;
+ font-family: var(--brand-font-family);
font-weight: bold;
.logo {
@@ -54,7 +51,7 @@ $bg-color: rgb(22, 27, 34);
.focus-visible:focus {
visibility: visible;
- color: white;
+ color: var(--nav-header-text-color);
}
.ng-autocomplete {
@@ -62,7 +59,7 @@ $bg-color: rgb(22, 27, 34);
}
.primary-text {
- color: $primary-color;
+ color: var(--nav-header-text-color);
border: none;
}
@@ -75,27 +72,12 @@ $bg-color: rgb(22, 27, 34);
width: 100%;
}
-@media (min-width: 576px) {
+@media (min-width: var(--grid-breakpoints-sm)) {
.form-inline .form-group {
width: 100%;
}
}
-@include media-breakpoint-down(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)) {
- .ng-autocomplete {
- width: 100%; // 232px
- }
-}
-
.scroll-to-top:hover {
animation: MoveUpDown 1s linear infinite;
}
-
-@keyframes MoveUpDown {
- 0%, 100% {
- transform: translateY(0);
- }
- 50% {
- transform: translateY(-10px);
- }
-}
\ No newline at end of file
diff --git a/UI/Web/src/app/nav-header/nav-header.component.ts b/UI/Web/src/app/nav-header/nav-header.component.ts
index 3ec02889d..808f92f72 100644
--- a/UI/Web/src/app/nav-header/nav-header.component.ts
+++ b/UI/Web/src/app/nav-header/nav-header.component.ts
@@ -50,15 +50,15 @@ export class NavHeaderComponent implements OnInit, OnDestroy {
private scrollService: ScrollService) { }
ngOnInit(): void {
- this.navService.darkMode$.pipe(takeUntil(this.onDestroy)).subscribe(res => {
- if (res) {
- this.document.body.classList.remove('bg-light');
- this.document.body.classList.add('bg-dark');
- } else {
- this.document.body.classList.remove('bg-dark');
- this.document.body.classList.add('bg-light');
- }
- });
+ // this.navService.darkMode$.pipe(takeUntil(this.onDestroy)).subscribe(res => {
+ // if (res) {
+ // this.document.body.classList.remove('bg-light');
+ // this.document.body.classList.add('bg-dark');
+ // } else {
+ // this.document.body.classList.remove('bg-dark');
+ // this.document.body.classList.add('bg-light');
+ // }
+ // });
}
@HostListener("window:scroll", [])
diff --git a/UI/Web/src/app/reading-list/_modals/add-to-list-modal/add-to-list-modal.component.html b/UI/Web/src/app/reading-list/_modals/add-to-list-modal/add-to-list-modal.component.html
index fbcf8083d..49d698f84 100644
--- a/UI/Web/src/app/reading-list/_modals/add-to-list-modal/add-to-list-modal.component.html
+++ b/UI/Web/src/app/reading-list/_modals/add-to-list-modal/add-to-list-modal.component.html
@@ -1,19 +1,17 @@
<div class="modal-header">
<h4 class="modal-title" id="modal-basic-title">Add to Reading List</h4>
- <button type="button" class="close" aria-label="Close" (click)="close()">
- <span aria-hidden="true">&times;</span>
+ <button type="button" class="btn-close" aria-label="Close" (click)="close()">
+
</button>
</div>
<form style="width: 100%" [formGroup]="listForm">
<div class="modal-body">
- <div class="form-group" *ngIf="lists.length >= 5">
- <label for="filter">Filter</label>
+ <div class="mb-3" *ngIf="lists.length >= 5">
+ <label for="filter" class="form-label">Filter</label>
<div class="input-group">
<input id="filter" autocomplete="off" class="form-control" formControlName="filterQuery" type="text" aria-describedby="reset-input">
- <div class="input-group-append">
- <button class="btn btn-outline-secondary" type="button" id="reset-input" (click)="listForm.get('filterQuery')?.setValue('');">Clear</button>
- </div>
+ <button class="btn btn-outline-secondary" type="button" id="reset-input" (click)="listForm.get('filterQuery')?.setValue('');">Clear</button>
</div>
</div>
<ul class="list-group">
@@ -23,7 +21,7 @@
<li class="list-group-item" *ngIf="lists.length === 0 && !loading">No lists created yet</li>
<li class="list-group-item" *ngIf="loading">
<div class="spinner-border text-secondary" role="status">
- <span class="sr-only">Loading...</span>
+ <span class="visually-hidden">Loading...</span>
</div>
</li>
</ul>
@@ -32,7 +30,7 @@
<div style="width: 100%;">
<div class="form-row">
<div class="col-9 col-lg-10">
- <label class="sr-only" for="add-rlist">Reading List</label>
+ <label class="form-label visually-hidden" for="add-rlist">Reading List</label>
<input width="100%" #title ngbAutofocus type="text" class="form-control mb-2" id="add-rlist" formControlName="title">
</div>
<div class="col-2">
diff --git a/UI/Web/src/app/reading-list/_modals/add-to-list-modal/add-to-list-modal.component.scss b/UI/Web/src/app/reading-list/_modals/add-to-list-modal/add-to-list-modal.component.scss
index aaaf2376c..7bd92fb84 100644
--- a/UI/Web/src/app/reading-list/_modals/add-to-list-modal/add-to-list-modal.component.scss
+++ b/UI/Web/src/app/reading-list/_modals/add-to-list-modal/add-to-list-modal.component.scss
@@ -1,9 +1,4 @@
-@use '../../../../theme/colors';
-.clickable {
- cursor: pointer;
-}
-
.clickable:hover, .clickable:focus {
- background-color: colors.$primary-color;
+ background-color: var(--primary-color);
}
\ No newline at end of file
diff --git a/UI/Web/src/app/reading-list/_modals/edit-reading-list-modal/edit-reading-list-modal.component.html b/UI/Web/src/app/reading-list/_modals/edit-reading-list-modal/edit-reading-list-modal.component.html
index c07d65d6a..1c52b09dc 100644
--- a/UI/Web/src/app/reading-list/_modals/edit-reading-list-modal/edit-reading-list-modal.component.html
+++ b/UI/Web/src/app/reading-list/_modals/edit-reading-list-modal/edit-reading-list-modal.component.html
@@ -1,8 +1,8 @@
<div class="modal-header">
<h4 class="modal-title" id="modal-basic-title">Edit {{readingList.title}} Reading List</h4>
- <button type="button" class="close" aria-label="Close" (click)="close()">
- <span aria-hidden="true">&times;</span>
+ <button type="button" class="btn-close" aria-label="Close" (click)="close()">
+
</button>
</div>
<div class="modal-body">
@@ -11,20 +11,20 @@
Promotion means that the list can be seen server-wide, not just for admin users. All series that are within this list will still have user-access restrictions placed on them.
</p>
<form [formGroup]="reviewGroup">
- <div class="form-group">
- <label for="title">Name</label>
+ <div class="mb-3">
+ <label for="title" class="form-label">Name</label>
<input id="title" class="form-control" formControlName="title" type="text">
</div>
- <div class="form-group">
- <label for="summary">Summary</label>
+ <div class="mb-3">
+ <label for="summary" class="form-label">Summary</label>
<textarea id="summary" class="form-control" formControlName="summary" rows="3"></textarea>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" (click)="close()">Close</button>
- <button type="button" class="btn btn-info" (click)="togglePromotion()">{{readingList.promoted ? 'Demote' : 'Promote'}}</button>
+ <button type="button" class="btn btn-secondary alt" (click)="togglePromotion()">{{readingList.promoted ? 'Demote' : 'Promote'}}</button>
<button type="submit" class="btn btn-primary" [disabled]="reviewGroup.get('title')?.value.trim().length === 0" (click)="save()">Save</button>
</div>
diff --git a/UI/Web/src/app/reading-list/dragable-ordered-list/dragable-ordered-list.component.html b/UI/Web/src/app/reading-list/dragable-ordered-list/dragable-ordered-list.component.html
index 3bee8ee51..b88a821b0 100644
--- a/UI/Web/src/app/reading-list/dragable-ordered-list/dragable-ordered-list.component.html
+++ b/UI/Web/src/app/reading-list/dragable-ordered-list/dragable-ordered-list.component.html
@@ -1,23 +1,23 @@
<div cdkDropList class="{{items.length > 0 ? 'example-list list-group-flush' : ''}}" (cdkDropListDropped)="drop($event)">
<div class="example-box" *ngFor="let item of items; index as i" cdkDrag [cdkDragData]="item" cdkDragBoundary=".example-list">
- <div class="mr-3 align-middle">
+ <div class="me-3 align-middle">
<i class="fa fa-grip-vertical drag-handle" aria-hidden="true" cdkDragHandle></i>
</div>
<ng-container style="display: inline-block" [ngTemplateOutlet]="itemTemplate" [ngTemplateOutletContext]="{ $implicit: item, idx: i }"></ng-container>
<div class="align-middle" style="padding-top: 40px">
- <label for="reorder-{{i}}" class="sr-only">Reorder</label>
+ <label for="reorder-{{i}}" class="form-label visually-hidden">Reorder</label>
<input *ngIf="accessibilityMode" id="reorder-{{i}}" type="number" min="0" [max]="items.length - 1" [value]="i" style="width: 40px" (focusout)="updateIndex(i, item)" (keydown.enter)="updateIndex(i, item)" aria-describedby="instructions">
</div>
<button class="btn btn-icon pull-right" (click)="removeItem(item, i)">
<i class="fa fa-times" aria-hidden="true"></i>
- <span class="sr-only" attr.aria-labelledby="item.id--{{i}}">Remove item</span>
+ <span class="visually-hidden" attr.aria-labelledby="item.id--{{i}}">Remove item</span>
</button>
</div>
</div>
-<p class="sr-only" id="instructions">
+<p class="visually-hidden" id="instructions">
</p>
\ No newline at end of file
diff --git a/UI/Web/src/app/reading-list/reading-list-detail/reading-list-detail.component.html b/UI/Web/src/app/reading-list/reading-list-detail/reading-list-detail.component.html
index 09f74709d..a21a12561 100644
--- a/UI/Web/src/app/reading-list/reading-list-detail/reading-list-detail.component.html
+++ b/UI/Web/src/app/reading-list/reading-list-detail/reading-list-detail.component.html
@@ -1,19 +1,19 @@
<div class="container-fluid mt-2" *ngIf="readingList">
<div class="mb-3">
<!-- Title row-->
- <div class="row no-gutters">
+ <div class="row g-0">
<h2 style="display: inline-block">
<span *ngIf="actions.length > 0">
<app-card-actionables (actionHandler)="performAction($event)" [actions]="actions" [labelBy]="readingList.title"></app-card-actionables>&nbsp;
</span>
{{readingList.title}}&nbsp;<span *ngIf="readingList?.promoted">(<i class="fa fa-angle-double-up" aria-hidden="true"></i>)</span>&nbsp;
- <span class="badge badge-primary badge-pill" attr.aria-label="{{items.length}} total items">{{items.length}}</span>
+ <span class="badge bg-primary rounded-pill" attr.aria-label="{{items.length}} total items">{{items.length}}</span>
</h2>
</div>
<!-- Action row-->
- <div class="row no-gutters">
- <div class="mr-2">
+ <div class="row g-0">
+ <div class="col-auto me-2">
<button class="btn btn-primary" title="Read" (click)="read()">
<span>
<i class="fa fa-book-open" aria-hidden="true"></i>
@@ -21,7 +21,7 @@
</span>
</button>
</div>
- <div>
+ <div class="col-auto">
<button class="btn btn-secondary" (click)="removeRead()" [disabled]="readingList?.promoted && !this.isAdmin">
<span>
<i class="fa fa-check"></i>
@@ -29,7 +29,7 @@
<span class="read-btn--text">&nbsp;Remove Read</span>
</button>
</div>
- <div class="ml-2 mt-2" *ngIf="!(readingList?.promoted && !this.isAdmin)">
+ <div class="col-auto ms-2 mt-2" *ngIf="!(readingList?.promoted && !this.isAdmin)">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" id="accessibilit-mode" [value]="accessibilityMode" (change)="accessibilityMode = !accessibilityMode">
<label class="form-check-label" for="accessibilit-mode">Order Numbers</label>
@@ -37,7 +37,7 @@
</div>
</div>
<!-- Summary row-->
- <div class="row no-gutters mt-2">
+ <div class="row g-0 mt-2">
<app-read-more [text]="readingList.summary" [maxLength]="250"></app-read-more>
</div>
</div>
@@ -48,18 +48,18 @@
<app-dragable-ordered-list [items]="items" (orderUpdated)="orderUpdated($event)" (itemRemove)="itemRemoved($event)" [accessibilityMode]="accessibilityMode">
<ng-template #draggableItem let-item let-position="idx">
- <div class="media" style="width: 100%;">
- <app-image width="74px" class="img-top mr-3" [imageUrl]="imageService.getChapterCoverImage(item.chapterId)"></app-image>
- <div class="media-body">
+ <div class="d-flex" style="width: 100%;">
+ <app-image width="74px" class="img-top me-3" [imageUrl]="imageService.getChapterCoverImage(item.chapterId)"></app-image>
+ <div class="flex-grow-1">
<h5 class="mt-0 mb-1" id="item.id--{{position}}">{{formatTitle(item)}}&nbsp;
- <span class="badge badge-primary badge-pill">
+ <span class="badge bg-primary rounded-pill">
<span *ngIf="item.pagesRead > 0 && item.pagesRead < item.pagesTotal">{{item.pagesRead}} / {{item.pagesTotal}}</span>
<span *ngIf="item.pagesRead === 0">UNREAD</span>
<span *ngIf="item.pagesRead === item.pagesTotal">READ</span>
</span>
</h5>
<i class="fa {{utilityService.mangaFormatIcon(item.seriesFormat)}}" aria-hidden="true" *ngIf="item.seriesFormat != MangaFormat.UNKNOWN" title="{{utilityService.mangaFormat(item.seriesFormat)}}"></i>
- <span class="sr-only">{{utilityService.mangaFormat(item.seriesFormat)}}</span>&nbsp;
+ <span class="visually-hidden">{{utilityService.mangaFormat(item.seriesFormat)}}</span>&nbsp;
<a href="/library/{{item.libraryId}}/series/{{item.seriesId}}">{{item.seriesName}}</a>
<span *ngIf="item.promoted">
diff --git a/UI/Web/src/app/registration/add-email-to-account-migration-modal/add-email-to-account-migration-modal.component.html b/UI/Web/src/app/registration/add-email-to-account-migration-modal/add-email-to-account-migration-modal.component.html
index a7ed81685..cc38eb503 100644
--- a/UI/Web/src/app/registration/add-email-to-account-migration-modal/add-email-to-account-migration-modal.component.html
+++ b/UI/Web/src/app/registration/add-email-to-account-migration-modal/add-email-to-account-migration-modal.component.html
@@ -1,7 +1,7 @@
<div class="modal-header">
<h4 class="modal-title" id="modal-basic-title">Account Migration</h4>
- <button type="button" class="close" aria-label="Close" (click)="close()">
- <span aria-hidden="true">&times;</span>
+ <button type="button" class="btn-close" aria-label="Close" (click)="close()">
+
</button>
</div>
<div class="modal-body">
@@ -12,8 +12,8 @@
<p class="text-danger" *ngIf="error.length > 0">{{error}}</p>
<form [formGroup]="registerForm">
- <div class="form-group">
- <label for="username">Username</label>
+ <div class="mb-3">
+ <label for="username" class="form-label">Username</label>
<input id="username" class="form-control" formControlName="username" type="text">
<div id="inviteForm-validations" class="invalid-feedback" *ngIf="registerForm.dirty || registerForm.touched">
<div *ngIf="registerForm.get('username')?.errors?.required">
@@ -22,8 +22,8 @@
</div>
</div>
- <div class="form-group" style="width:100%">
- <label for="email">Email</label>
+ <div class="mb-3" style="width:100%">
+ <label for="email" class="form-label">Email</label>
<input class="form-control" type="email" id="email" formControlName="email" required>
<div id="inviteForm-validations" class="invalid-feedback" *ngIf="registerForm.dirty || registerForm.touched">
<div *ngIf="registerForm.get('email')?.errors?.required">
@@ -35,8 +35,8 @@
</div>
</div>
- <div class="form-group">
- <label for="password">Password</label>
+ <div class="mb-3">
+ <label for="password" class="form-label">Password</label>
<input id="password" class="form-control" maxlength="32" minlength="6" formControlName="password" type="password" aria-describedby="password-help">
<div id="inviteForm-validations" class="invalid-feedback" *ngIf="registerForm.dirty || registerForm.touched">
<div *ngIf="registerForm.get('password')?.errors?.required">
diff --git a/UI/Web/src/app/registration/confirm-email/confirm-email.component.html b/UI/Web/src/app/registration/confirm-email/confirm-email.component.html
index 9b0d2fcb4..c829fad68 100644
--- a/UI/Web/src/app/registration/confirm-email/confirm-email.component.html
+++ b/UI/Web/src/app/registration/confirm-email/confirm-email.component.html
@@ -10,8 +10,8 @@
</ul>
</div>
<form [formGroup]="registerForm" (ngSubmit)="submit()">
- <div class="form-group">
- <label for="username">Username</label>
+ <div class="mb-3">
+ <label for="username" class="form-label">Username</label>
<input id="username" class="form-control" formControlName="username" type="text">
<div id="inviteForm-validations" class="invalid-feedback" *ngIf="registerForm.dirty || registerForm.touched">
<div *ngIf="registerForm.get('username')?.errors?.required">
@@ -20,8 +20,8 @@
</div>
</div>
- <div class="form-group" style="width:100%">
- <label for="email">Email</label>
+ <div class="mb-3" style="width:100%">
+ <label for="email" class="form-label">Email</label>
<input class="form-control" type="email" id="email" formControlName="email" required>
<div id="inviteForm-validations" class="invalid-feedback" *ngIf="registerForm.dirty || registerForm.touched">
<div *ngIf="registerForm.get('email')?.errors?.required">
@@ -33,12 +33,12 @@
</div>
</div>
- <div class="form-group">
- <label for="password">Password</label>&nbsp;<i class="fa fa-info-circle" placement="right" [ngbTooltip]="passwordTooltip" role="button" tabindex="0"></i>
+ <div class="mb-3">
+ <label for="password" class="form-label">Password</label>&nbsp;<i class="fa fa-info-circle" placement="right" [ngbTooltip]="passwordTooltip" role="button" tabindex="0"></i>
<ng-template #passwordTooltip>
Password must be between 6 and 32 characters in length
</ng-template>
- <span class="sr-only" id="password-help"><ng-container [ngTemplateOutlet]="passwordTooltip"></ng-container></span>
+ <span class="visually-hidden" id="password-help"><ng-container [ngTemplateOutlet]="passwordTooltip"></ng-container></span>
<input id="password" class="form-control" maxlength="32" minlength="6" formControlName="password" type="password" aria-describedby="password-help">
<div id="inviteForm-validations" class="invalid-feedback" *ngIf="registerForm.dirty || registerForm.touched">
<div *ngIf="registerForm.get('password')?.errors?.required">
@@ -50,7 +50,7 @@
</div>
</div>
- <div class="float-right">
+ <div class="float-end">
<button class="btn btn-secondary alt" type="submit">Register</button>
</div>
</form>
diff --git a/UI/Web/src/app/registration/confirm-email/confirm-email.component.ts b/UI/Web/src/app/registration/confirm-email/confirm-email.component.ts
index 96b5faf1e..f6e385e7a 100644
--- a/UI/Web/src/app/registration/confirm-email/confirm-email.component.ts
+++ b/UI/Web/src/app/registration/confirm-email/confirm-email.component.ts
@@ -2,6 +2,7 @@ import { Component, Input, OnInit } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
import { ToastrService } from 'ngx-toastr';
+import { ThemeService } from 'src/app/theme.service';
import { AccountService } from 'src/app/_services/account.service';
@Component({
@@ -10,8 +11,6 @@ import { AccountService } from 'src/app/_services/account.service';
styleUrls: ['./confirm-email.component.scss']
})
export class ConfirmEmailComponent implements OnInit {
-
-
/**
* Email token used for validating
*/
@@ -29,8 +28,9 @@ export class ConfirmEmailComponent implements OnInit {
errors: Array<string> = [];
- constructor(private route: ActivatedRoute, private router: Router, private accountService: AccountService, private toastr: ToastrService) {
-
+ constructor(private route: ActivatedRoute, private router: Router, private accountService: AccountService,
+ private toastr: ToastrService, private themeService: ThemeService) {
+ this.themeService.setTheme(this.themeService.defaultTheme);
const token = this.route.snapshot.queryParamMap.get('token');
const email = this.route.snapshot.queryParamMap.get('email');
if (token == undefined || token === '' || token === null) {
diff --git a/UI/Web/src/app/registration/confirm-migration-email/confirm-migration-email.component.ts b/UI/Web/src/app/registration/confirm-migration-email/confirm-migration-email.component.ts
index 554dd9d30..dcc83fe09 100644
--- a/UI/Web/src/app/registration/confirm-migration-email/confirm-migration-email.component.ts
+++ b/UI/Web/src/app/registration/confirm-migration-email/confirm-migration-email.component.ts
@@ -1,6 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { ToastrService } from 'ngx-toastr';
+import { ThemeService } from 'src/app/theme.service';
import { AccountService } from 'src/app/_services/account.service';
@Component({
@@ -10,8 +11,9 @@ import { AccountService } from 'src/app/_services/account.service';
})
export class ConfirmMigrationEmailComponent implements OnInit {
- constructor(private route: ActivatedRoute, private router: Router, private accountService: AccountService, private toastr: ToastrService) {
+ constructor(private route: ActivatedRoute, private router: Router, private accountService: AccountService, private toastr: ToastrService, private themeService: ThemeService) {
+ this.themeService.setTheme(this.themeService.defaultTheme);
const token = this.route.snapshot.queryParamMap.get('token');
const email = this.route.snapshot.queryParamMap.get('email');
if (token === undefined || token === '' || token === null || email === undefined || email === '' || email === null) {
diff --git a/UI/Web/src/app/registration/confirm-reset-password/confirm-reset-password.component.html b/UI/Web/src/app/registration/confirm-reset-password/confirm-reset-password.component.html
index 9046a1fbe..5b5422bdf 100644
--- a/UI/Web/src/app/registration/confirm-reset-password/confirm-reset-password.component.html
+++ b/UI/Web/src/app/registration/confirm-reset-password/confirm-reset-password.component.html
@@ -3,12 +3,12 @@
<ng-container body>
<p>Enter the email of your account. We will send you an email </p>
<form [formGroup]="registerForm" (ngSubmit)="submit()">
- <div class="form-group">
- <label for="password">Password</label>&nbsp;<i class="fa fa-info-circle" placement="right" [ngbTooltip]="passwordTooltip" role="button" tabindex="0"></i>
+ <div class="mb-3">
+ <label for="password" class="form-label">Password</label>&nbsp;<i class="fa fa-info-circle" placement="right" [ngbTooltip]="passwordTooltip" role="button" tabindex="0"></i>
<ng-template #passwordTooltip>
Password must be between 6 and 32 characters in length
</ng-template>
- <span class="sr-only" id="password-help"><ng-container [ngTemplateOutlet]="passwordTooltip"></ng-container></span>
+ <span class="visually-hidden" id="password-help"><ng-container [ngTemplateOutlet]="passwordTooltip"></ng-container></span>
<input id="password" class="form-control" maxlength="32" minlength="6" formControlName="password" type="password" aria-describedby="password-help">
<div id="inviteForm-validations" class="invalid-feedback" *ngIf="registerForm.dirty || registerForm.touched">
<div *ngIf="registerForm.get('password')?.errors?.required">
@@ -20,7 +20,7 @@
</div>
</div>
- <div class="float-right">
+ <div class="float-end">
<button class="btn btn-secondary alt" type="submit">Submit</button>
</div>
</form>
diff --git a/UI/Web/src/app/registration/register/register.component.html b/UI/Web/src/app/registration/register/register.component.html
index c87826e68..3370032d2 100644
--- a/UI/Web/src/app/registration/register/register.component.html
+++ b/UI/Web/src/app/registration/register/register.component.html
@@ -3,8 +3,8 @@
<ng-container body>
<p>Complete the form to register an admin account</p>
<form [formGroup]="registerForm" (ngSubmit)="submit()">
- <div class="form-group">
- <label for="username">Username</label>
+ <div class="mb-3">
+ <label for="username" class="form-label">Username</label>
<input id="username" class="form-control" formControlName="username" type="text">
<div id="inviteForm-validations" class="invalid-feedback" *ngIf="registerForm.dirty || registerForm.touched">
<div *ngIf="registerForm.get('username')?.errors?.required">
@@ -13,8 +13,8 @@
</div>
</div>
- <div class="form-group" style="width:100%">
- <label for="email">Email</label>
+ <div class="mb-3" style="width:100%">
+ <label for="email" class="form-label">Email</label>
<input class="form-control" type="email" id="email" formControlName="email" required>
<div id="inviteForm-validations" class="invalid-feedback" *ngIf="registerForm.dirty || registerForm.touched">
<div *ngIf="registerForm.get('email')?.errors?.required">
@@ -26,12 +26,12 @@
</div>
</div>
- <div class="form-group">
- <label for="password">Password</label>&nbsp;<i class="fa fa-info-circle" placement="right" [ngbTooltip]="passwordTooltip" role="button" tabindex="0"></i>
+ <div class="mb-3">
+ <label for="password" class="form-label">Password</label>&nbsp;<i class="fa fa-info-circle" placement="right" [ngbTooltip]="passwordTooltip" role="button" tabindex="0"></i>
<ng-template #passwordTooltip>
Password must be between 6 and 32 characters in length
</ng-template>
- <span class="sr-only" id="password-help"><ng-container [ngTemplateOutlet]="passwordTooltip"></ng-container></span>
+ <span class="visually-hidden" id="password-help"><ng-container [ngTemplateOutlet]="passwordTooltip"></ng-container></span>
<input id="password" class="form-control" maxlength="32" minlength="6" formControlName="password" type="password" aria-describedby="password-help">
<div id="inviteForm-validations" class="invalid-feedback" *ngIf="registerForm.dirty || registerForm.touched">
<div *ngIf="registerForm.get('password')?.errors?.required">
@@ -43,7 +43,7 @@
</div>
</div>
- <div class="float-right">
+ <div class="float-end">
<button class="btn btn-secondary alt" type="submit">Register</button>
</div>
</form>
diff --git a/UI/Web/src/app/registration/reset-password/reset-password.component.html b/UI/Web/src/app/registration/reset-password/reset-password.component.html
index ed3eaedc8..5d8a34494 100644
--- a/UI/Web/src/app/registration/reset-password/reset-password.component.html
+++ b/UI/Web/src/app/registration/reset-password/reset-password.component.html
@@ -3,9 +3,9 @@
<ng-container body>
<p>Enter the email of your account. We will send you an email </p>
<form [formGroup]="registerForm" (ngSubmit)="submit()">
- <div class="form-group" style="width:100%">
- <label for="email">Email</label>
- <input class="form-control" type="email" id="email" formControlName="email" required>
+ <div class="mb-3" style="width:100%">
+ <label for="email" class="form-label">Email</label>
+ <input class="form-control custom-input" type="email" id="email" formControlName="email" required>
<div id="inviteForm-validations" class="invalid-feedback" *ngIf="registerForm.dirty || registerForm.touched">
<div *ngIf="registerForm.get('email')?.errors?.required">
This field is required
@@ -16,7 +16,7 @@
</div>
</div>
- <div class="float-right">
+ <div>
<button class="btn btn-secondary alt" type="submit">Submit</button>
</div>
</form>
diff --git a/UI/Web/src/app/registration/reset-password/reset-password.component.scss b/UI/Web/src/app/registration/reset-password/reset-password.component.scss
index e69de29bb..9aedb3438 100644
--- a/UI/Web/src/app/registration/reset-password/reset-password.component.scss
+++ b/UI/Web/src/app/registration/reset-password/reset-password.component.scss
@@ -0,0 +1,8 @@
+.btn {
+ width: 100%
+}
+
+.custom-input {
+ background-color: #fff !important;
+ color: black;
+}
\ No newline at end of file
diff --git a/UI/Web/src/app/registration/splash-container/splash-container.component.html b/UI/Web/src/app/registration/splash-container/splash-container.component.html
index 04ec3d8c8..3c07ea1b0 100644
--- a/UI/Web/src/app/registration/splash-container/splash-container.component.html
+++ b/UI/Web/src/app/registration/splash-container/splash-container.component.html
@@ -1,7 +1,7 @@
<div class="mx-auto login">
<div class="row row-cols-4 row-cols-md-4 row-cols-sm-2 row-cols-xs-2">
- <div class="col align-self-center card p-3 m-3" style="max-width: 12rem;">
+ <div class="col align-self-center card p-3">
<span>
<div class="logo-container">
<h3 class="card-title text-center">
diff --git a/UI/Web/src/app/registration/splash-container/splash-container.component.scss b/UI/Web/src/app/registration/splash-container/splash-container.component.scss
index 40255e600..caba64f6c 100644
--- a/UI/Web/src/app/registration/splash-container/splash-container.component.scss
+++ b/UI/Web/src/app/registration/splash-container/splash-container.component.scss
@@ -1,13 +1,8 @@
-@use "../../../theme/colors";
-
-
-
.login {
display: flex;
align-items: center;
justify-content: center;
- margin-top: -61px; // To offset the navbar
- height: calc(100vh);
+ height: calc(var(--vh, 1vh) * 100 - 57px);
min-height: 289px;
position: relative;
width: 100vw;
@@ -33,14 +28,11 @@
}
}
- .row {
- margin-top: 10vh;
- }
-
.card {
- background-color: colors.$primary-color;
+ background-color: var(--primary-color);
color: #fff;
min-width: 300px;
+ max-width: 12rem;
&:focus {
border: 2px solid white;
@@ -59,34 +51,5 @@
.card-text {
font-family: "EBGaramond", "Helvetica Neue", sans-serif;
}
-
- .alt {
- background-color: #424c72;
- border-color: #444f75;
- }
-
- .alt:hover {
- background-color: #3b4466;
- }
-
- .alt:focus {
- background-color: #343c59;
- box-shadow: 0 0 0 0.2rem rgb(68 79 117 / 50%);
- }
}
-
- ::ng-deep input {
- background-color: #fff !important;
- color: black;
- }
-
- ::ng-deep a {
- color: white;
- }
-}
-
-.invalid-feedback {
- display: inline-block;
- color: #343c59;
}
-
diff --git a/UI/Web/src/app/series-detail/series-detail.component.html b/UI/Web/src/app/series-detail/series-detail.component.html
index 668f7baa6..7e2de3001 100644
--- a/UI/Web/src/app/series-detail/series-detail.component.html
+++ b/UI/Web/src/app/series-detail/series-detail.component.html
@@ -4,14 +4,14 @@
<app-image class="poster" maxWidth="300px" [imageUrl]="seriesImage"></app-image>
</div>
<div class="col-md-10 col-xs-8 col-sm-6">
- <div class="row no-gutters">
+ <div class="row g-0">
<h2>
{{series?.name}}
</h2>
</div>
- <div class="row no-gutters">
- <div>
+ <div class="row g-0">
+ <div class="col-auto">
<button class="btn btn-primary" (click)="read()" [disabled]="isLoading">
<span>
<i class="fa {{showBook ? 'fa-book-open' : 'fa-book'}}"></i>
@@ -19,35 +19,35 @@
<span class="read-btn--text">&nbsp;{{(hasReadingProgress) ? 'Continue' : 'Read'}}</span>
</button>
</div>
- <div class="ml-2" *ngIf="isAdmin">
+ <div class="col-auto ms-2" *ngIf="isAdmin">
<button class="btn btn-secondary" (click)="openEditSeriesModal()" title="Edit Series information">
<span>
<i class="fa fa-pen" aria-hidden="true"></i>
</span>
</button>
</div>
- <div class="ml-2" *ngIf="isAdmin || hasDownloadingRole">
+ <div class="col-auto ms-2" *ngIf="isAdmin || hasDownloadingRole">
<button class="btn btn-secondary" (click)="downloadSeries()" title="Download Series" [disabled]="downloadInProgress">
<ng-container *ngIf="downloadInProgress; else notDownloading">
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
- <span class="sr-only">Downloading...</span>
+ <span class="visually-hidden">Downloading...</span>
</ng-container>
<ng-template #notDownloading>
<i class="fa fa-arrow-alt-circle-down" aria-hidden="true"></i>
</ng-template>
</button>
</div>
- <div class="ml-2">
+ <div class="col-auto ms-2">
<div class="card-actions">
<app-card-actionables [disabled]="actionInProgress" (actionHandler)="performAction($event)" [actions]="seriesActions" [labelBy]="series.name" iconClass="fa-ellipsis-h" btnClass="btn-secondary"></app-card-actionables>
</div>
</div>
- <div class="ml-2">
+ <div class="col-auto ms-2">
<ngb-rating class="rating-star" [(rate)]="series!.userRating" (rateChange)="updateRating($event)" (click)="promptToReview()"></ngb-rating>
<button *ngIf="series?.userRating || series.userRating" class="btn btn-sm btn-icon" (click)="openReviewModal(true)" placement="top" ngbTooltip="Edit Review" attr.aria-label="Edit Review"><i class="fa fa-pen" aria-hidden="true"></i></button>
</div>
</div>
- <div class="row no-gutters">
+ <div class="row g-0">
<!-- TODO: This will be the first of reviews section. Reviews will show your plus other peoples reviews in media cards like Plex does and this will be below metadata -->
<app-read-more class="user-review {{userReview ? 'mt-1' : ''}}" [text]="series?.userReview || ''" [maxLength]="250"></app-read-more>
</div>
@@ -59,13 +59,13 @@
</div>
</div>
- <div>
+ <ng-container>
<app-bulk-operations [actionCallback]="bulkActionCallback"></app-bulk-operations>
- <ul ngbNav #nav="ngbNav" [(activeId)]="activeTabId" class="nav-tabs nav-pills" [destroyOnHide]="false" (navChange)="onNavChange($event)">
+ <ul ngbNav #nav="ngbNav" [(activeId)]="activeTabId" class="nav nav-tabs" [destroyOnHide]="false" (navChange)="onNavChange($event)">
<li [ngbNavItem]="TabID.Specials" *ngIf="hasSpecials">
<a ngbNavLink>Specials</a>
<ng-template ngbNavContent>
- <div class="row no-gutters">
+ <div class="row g-0">
<div *ngFor="let chapter of specials; let idx = index; trackBy: trackByChapterIdentity">
<app-card-item class="col-auto" *ngIf="chapter.isSpecial" [entity]="chapter" [title]="chapter.title || chapter.range" (click)="openChapter(chapter)"
[imageUrl]="imageService.getChapterCoverImage(chapter.id)"
@@ -77,47 +77,47 @@
<li [ngbNavItem]="TabID.Storyline" *ngIf="libraryType !== LibraryType.Book && (hasNonSpecialVolumeChapters || hasNonSpecialNonVolumeChapters)">
<a ngbNavLink>Storyline</a>
<ng-template ngbNavContent>
- <div class="row no-gutters">
- <div *ngFor="let volume of volumes; let idx = index; trackBy: trackByVolumeIdentity">
+ <div class="row g-0">
+ <ng-container *ngFor="let volume of volumes; let idx = index; trackBy: trackByVolumeIdentity">
<app-card-item class="col-auto" *ngIf="volume.number != 0" [entity]="volume" [title]="formatVolumeTitle(volume)" (click)="openVolume(volume)"
[imageUrl]="imageService.getVolumeCoverImage(volume.id) + '&offset=' + coverImageOffset"
[read]="volume.pagesRead" [total]="volume.pages" [actions]="volumeActions" (selection)="bulkSelectionService.handleCardSelection('volume', idx, volumes.length, $event)" [selected]="bulkSelectionService.isCardSelected('volume', idx)" [allowSelection]="true"></app-card-item>
- </div>
- <div *ngFor="let chapter of storyChapters; let idx = index; trackBy: trackByChapterIdentity">
+ </ng-container>
+ <ng-container *ngFor="let chapter of storyChapters; let idx = index; trackBy: trackByChapterIdentity">
<app-card-item class="col-auto" *ngIf="!chapter.isSpecial" [entity]="chapter" [title]="formatChapterTitle(chapter)" (click)="openChapter(chapter)"
[imageUrl]="imageService.getChapterCoverImage(chapter.id) + '&offset=' + coverImageOffset"
[read]="chapter.pagesRead" [total]="chapter.pages" [actions]="chapterActions" (selection)="bulkSelectionService.handleCardSelection('chapter', idx, storyChapters.length, $event)" [selected]="bulkSelectionService.isCardSelected('chapter', idx)" [allowSelection]="true"></app-card-item>
- </div>
+ </ng-container>
</div>
</ng-template>
</li>
<li [ngbNavItem]="TabID.Volumes" *ngIf="hasNonSpecialVolumeChapters">
<a ngbNavLink>Volumes</a>
<ng-template ngbNavContent>
- <div class="row no-gutters">
- <div *ngFor="let volume of volumes; let idx = index; trackBy: trackByVolumeIdentity">
+ <div class="row g-0">
+ <ng-container *ngFor="let volume of volumes; let idx = index; trackBy: trackByVolumeIdentity">
<app-card-item class="col-auto" *ngIf="volume.number != 0" [entity]="volume" [title]="formatVolumeTitle(volume)" (click)="openVolume(volume)"
[imageUrl]="imageService.getVolumeCoverImage(volume.id) + '&offset=' + coverImageOffset"
[read]="volume.pagesRead" [total]="volume.pages" [actions]="volumeActions" (selection)="bulkSelectionService.handleCardSelection('volume', idx, volumes.length, $event)" [selected]="bulkSelectionService.isCardSelected('volume', idx)" [allowSelection]="true"></app-card-item>
- </div>
+ </ng-container>
</div>
</ng-template>
</li>
<li [ngbNavItem]="TabID.Chapters" *ngIf="hasNonSpecialNonVolumeChapters">
<a ngbNavLink>{{utilityService.formatChapterName(libraryType) + 's'}}</a>
<ng-template ngbNavContent>
- <div class="row no-gutters">
- <div *ngFor="let chapter of chapters; let idx = index; trackBy: trackByChapterIdentity">
+ <div class="row g-0">
+ <ng-container *ngFor="let chapter of chapters; let idx = index; trackBy: trackByChapterIdentity">
<app-card-item class="col-auto" *ngIf="!chapter.isSpecial" [entity]="chapter" [title]="formatChapterTitle(chapter)" (click)="openChapter(chapter)"
[imageUrl]="imageService.getChapterCoverImage(chapter.id) + '&offset=' + coverImageOffset"
[read]="chapter.pagesRead" [total]="chapter.pages" [actions]="chapterActions" (selection)="bulkSelectionService.handleCardSelection('chapter', idx, chapters.length, $event)" [selected]="bulkSelectionService.isCardSelected('chapter', idx)" [allowSelection]="true"></app-card-item>
- </div>
+ </ng-container>
</div>
</ng-template>
</li>
- </ul>
- <div [ngbNavOutlet]="nav"></div>
- </div>
+ </ul>
+ <div [ngbNavOutlet]="nav"></div>
+ </ng-container>
<div class="mx-auto" *ngIf="isLoading" style="width: 200px;">
<div class="spinner-border text-secondary loading" role="status">
diff --git a/UI/Web/src/app/series-detail/series-detail.component.scss b/UI/Web/src/app/series-detail/series-detail.component.scss
index ae7e20a70..4c204f40a 100644
--- a/UI/Web/src/app/series-detail/series-detail.component.scss
+++ b/UI/Web/src/app/series-detail/series-detail.component.scss
@@ -1,9 +1,5 @@
-@import '~bootstrap/scss/mixins/_breakpoints.scss';
-
-
.user-review {
font-style: italic;
-
}
.rating-star {
@@ -16,15 +12,13 @@
max-width: 300px;
}
-
-// Including breakpoint has issue with resovling variable, so copying gridpoints here
-@include media-breakpoint-down(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)) {
- .poster {
- display: none;
- }
+@media(max-width: var(--grid-breakpoints-sm)) {
+ .poster {
+ display: none;
+ }
}
-@include media-breakpoint-down(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)) {
+@media(max-width: var(--grid-breakpoints-sm)) {
.read-btn--text {
display: none;
}
diff --git a/UI/Web/src/app/series-metadata-detail/series-metadata-detail.component.html b/UI/Web/src/app/series-metadata-detail/series-metadata-detail.component.html
index 4969261a5..5c35e4069 100644
--- a/UI/Web/src/app/series-metadata-detail/series-metadata-detail.component.html
+++ b/UI/Web/src/app/series-metadata-detail/series-metadata-detail.component.html
@@ -1,190 +1,190 @@
-<div class="row no-gutters mt-2 mb-2">
+<div class="row g-0 mt-2 mb-2">
<app-read-more [text]="seriesSummary" [maxLength]="250"></app-read-more>
</div>
<!-- This first row will have random information about the series-->
-<div class="row no-gutters mb-2">
- <app-tag-badge title="Age Rating" *ngIf="seriesMetadata.ageRating" a11y-click="13,32" class="clickable" (click)="goTo('ageRating', seriesMetadata.ageRating)" [selectionMode]="TagBadgeCursor.Clickable">{{metadataService.getAgeRating(this.seriesMetadata.ageRating) | async}}</app-tag-badge>
+<div class="row g-0 mb-2">
+ <app-tag-badge title="Age Rating" *ngIf="seriesMetadata.ageRating" a11y-click="13,32" class="clickable col-auto" (click)="goTo('ageRating', seriesMetadata.ageRating)" [selectionMode]="TagBadgeCursor.Clickable">{{metadataService.getAgeRating(this.seriesMetadata.ageRating) | async}}</app-tag-badge>
<ng-container *ngIf="series">
<!-- Maybe we can put the library this resides in to make it easier to get back -->
<!-- tooltip here explaining how this is year of first issue -->
- <app-tag-badge *ngIf="seriesMetadata.releaseYear > 0" title="Release date">{{seriesMetadata.releaseYear}}</app-tag-badge>
- <app-tag-badge *ngIf="seriesMetadata.language !== null && seriesMetadata.language !== ''" title="Language" a11y-click="13,32" class="clickable" (click)="goTo('languages', seriesMetadata.language)" [selectionMode]="TagBadgeCursor.Clickable">{{seriesMetadata.language}}</app-tag-badge>
- <app-tag-badge title="Publication Status" a11y-click="13,32" class="clickable" (click)="goTo('publicationStatus', seriesMetadata.publicationStatus)" [selectionMode]="TagBadgeCursor.Clickable">{{seriesMetadata.publicationStatus | publicationStatus}}</app-tag-badge>
- <app-tag-badge a11y-click="13,32" class="clickable" (click)="goTo('format', series.format)" [selectionMode]="TagBadgeCursor.Clickable">
+ <app-tag-badge *ngIf="seriesMetadata.releaseYear > 0" title="Release date" class="col-auto">{{seriesMetadata.releaseYear}}</app-tag-badge>
+ <app-tag-badge *ngIf="seriesMetadata.language !== null && seriesMetadata.language !== ''" title="Language" a11y-click="13,32" class="col-auto" (click)="goTo('languages', seriesMetadata.language)" [selectionMode]="TagBadgeCursor.Clickable">{{seriesMetadata.language}}</app-tag-badge>
+ <app-tag-badge title="Publication Status" a11y-click="13,32" class="col-auto" (click)="goTo('publicationStatus', seriesMetadata.publicationStatus)" [selectionMode]="TagBadgeCursor.Clickable">{{seriesMetadata.publicationStatus | publicationStatus}}</app-tag-badge>
+ <app-tag-badge a11y-click="13,32" class="col-auto" (click)="goTo('format', series.format)" [selectionMode]="TagBadgeCursor.Clickable">
<app-series-format [format]="series.format">{{utilityService.mangaFormat(series.format)}}</app-series-format>
</app-tag-badge>
</ng-container>
</div>
-<div class="row no-gutters" *ngIf="seriesMetadata.genres && seriesMetadata.genres.length > 0">
+<div class="row g-0" *ngIf="seriesMetadata.genres && seriesMetadata.genres.length > 0">
<div class="col-md-4">
<h5>Genres</h5>
</div>
<div class="col-md-8">
<app-badge-expander [items]="seriesMetadata.genres">
<ng-template #badgeExpanderItem let-item let-position="idx">
- <app-tag-badge a11y-click="13,32" class="clickable" (click)="goTo('genres', item.id)" [selectionMode]="TagBadgeCursor.Clickable">{{item.title}}</app-tag-badge>
+ <app-tag-badge a11y-click="13,32" class="col-auto" (click)="goTo('genres', item.id)" [selectionMode]="TagBadgeCursor.Clickable">{{item.title}}</app-tag-badge>
</ng-template>
</app-badge-expander>
</div>
</div>
-<div class="row no-gutters mt-1" *ngIf="seriesMetadata.collectionTags && seriesMetadata.collectionTags.length > 0">
+<div class="row g-0 mt-1" *ngIf="seriesMetadata.collectionTags && seriesMetadata.collectionTags.length > 0">
<div class="col-md-4">
<h5>Collections</h5>
</div>
<div class="col-md-8">
<app-badge-expander [items]="seriesMetadata.collectionTags">
<ng-template #badgeExpanderItem let-item let-position="idx">
- <app-tag-badge a11y-click="13,32" class="clickable" routerLink="/collections/{{item.id}}" [selectionMode]="TagBadgeCursor.Clickable">
+ <app-tag-badge a11y-click="13,32" class="col-auto" routerLink="/collections/{{item.id}}" [selectionMode]="TagBadgeCursor.Clickable">
{{item.title}}
</app-tag-badge>
</ng-template>
</app-badge-expander>
</div>
</div>
-<div class="row no-gutters mt-1" *ngIf="seriesMetadata.writers && seriesMetadata.writers.length > 0">
+<div class="row g-0 mt-1" *ngIf="seriesMetadata.writers && seriesMetadata.writers.length > 0">
<div class="col-md-4">
<h5>Writers/Authors</h5>
</div>
<div class="col-md-8">
<app-badge-expander [items]="seriesMetadata.writers">
<ng-template #badgeExpanderItem let-item let-position="idx">
- <app-person-badge a11y-click="13,32" class="clickable" (click)="goTo('writers', item.id)" [person]="item"></app-person-badge>
+ <app-person-badge a11y-click="13,32" class="col-auto" (click)="goTo('writers', item.id)" [person]="item"></app-person-badge>
</ng-template>
</app-badge-expander>
</div>
</div>
-<div class="row no-gutters">
+<div class="row g-0">
<hr class="col-md-11" *ngIf="hasExtendedProperites" >
<a [class.hidden]="hasExtendedProperites" *ngIf="hasExtendedProperites" class="col-md-1 read-more-link" (click)="toggleView()">&nbsp;<i aria-hidden="true" class="fa fa-caret-{{isCollapsed ? 'down' : 'up'}}" aria-controls="extended-series-metadata"></i>&nbsp;See {{isCollapsed ? 'More' : 'Less'}}</a>
</div>
<div #collapse="ngbCollapse" [(ngbCollapse)]="isCollapsed" id="extended-series-metadata">
- <div class="row no-gutters mt-1" *ngIf="seriesMetadata.coverArtists && seriesMetadata.coverArtists.length > 0">
+ <div class="row g-0 mt-1" *ngIf="seriesMetadata.coverArtists && seriesMetadata.coverArtists.length > 0">
<div class="col-md-4">
<h5>Cover Artists</h5>
</div>
<div class="col-md-8">
<app-badge-expander [items]="seriesMetadata.coverArtists">
<ng-template #badgeExpanderItem let-item let-position="idx">
- <app-person-badge a11y-click="13,32" class="clickable" (click)="goTo('coverArtists', item.id)" [person]="item"></app-person-badge>
+ <app-person-badge a11y-click="13,32" class="col-auto" (click)="goTo('coverArtists', item.id)" [person]="item"></app-person-badge>
</ng-template>
</app-badge-expander>
</div>
</div>
- <div class="row no-gutters mt-1" *ngIf="seriesMetadata.characters && seriesMetadata.characters.length > 0">
+ <div class="row g-0 mt-1" *ngIf="seriesMetadata.characters && seriesMetadata.characters.length > 0">
<div class="col-md-4">
<h5>Characters</h5>
</div>
<div class="col-md-8">
<app-badge-expander [items]="seriesMetadata.characters">
<ng-template #badgeExpanderItem let-item let-position="idx">
- <app-person-badge a11y-click="13,32" class="clickable" (click)="goTo('character', item.id)" [person]="item"></app-person-badge>
+ <app-person-badge a11y-click="13,32" class="col-auto" (click)="goTo('character', item.id)" [person]="item"></app-person-badge>
</ng-template>
</app-badge-expander>
</div>
</div>
- <div class="row no-gutters mt-1" *ngIf="seriesMetadata.colorists && seriesMetadata.colorists.length > 0">
+ <div class="row g-0 mt-1" *ngIf="seriesMetadata.colorists && seriesMetadata.colorists.length > 0">
<div class="col-md-4">
<h5>Colorists</h5>
</div>
<div class="col-md-8">
<app-badge-expander [items]="seriesMetadata.colorists">
<ng-template #badgeExpanderItem let-item let-position="idx">
- <app-person-badge a11y-click="13,32" class="clickable" (click)="goTo('colorist', item.id)" [person]="item"></app-person-badge>
+ <app-person-badge a11y-click="13,32" class="col-auto" (click)="goTo('colorist', item.id)" [person]="item"></app-person-badge>
</ng-template>
</app-badge-expander>
</div>
</div>
- <div class="row no-gutters mt-1" *ngIf="seriesMetadata.editors && seriesMetadata.editors.length > 0">
+ <div class="row g-0 mt-1" *ngIf="seriesMetadata.editors && seriesMetadata.editors.length > 0">
<div class="col-md-4">
<h5>Editors</h5>
</div>
<div class="col-md-8">
<app-badge-expander [items]="seriesMetadata.editors">
<ng-template #badgeExpanderItem let-item let-position="idx">
- <app-person-badge a11y-click="13,32" class="clickable" (click)="goTo('editor', item.id)" [person]="item"></app-person-badge>
+ <app-person-badge a11y-click="13,32" class="col-auto" (click)="goTo('editor', item.id)" [person]="item"></app-person-badge>
</ng-template>
</app-badge-expander>
</div>
</div>
- <div class="row no-gutters mt-1" *ngIf="seriesMetadata.inkers && seriesMetadata.inkers.length > 0">
+ <div class="row g-0 mt-1" *ngIf="seriesMetadata.inkers && seriesMetadata.inkers.length > 0">
<div class="col-md-4">
<h5>Inkers</h5>
</div>
<div class="col-md-8">
<app-badge-expander [items]="seriesMetadata.inkers">
<ng-template #badgeExpanderItem let-item let-position="idx">
- <app-person-badge a11y-click="13,32" class="clickable" (click)="goTo('inker', item.id)" [person]="item"></app-person-badge>
+ <app-person-badge a11y-click="13,32" class="col-auto" (click)="goTo('inker', item.id)" [person]="item"></app-person-badge>
</ng-template>
</app-badge-expander>
</div>
</div>
- <div class="row no-gutters mt-1" *ngIf="seriesMetadata.letterers && seriesMetadata.letterers.length > 0">
+ <div class="row g-0 mt-1" *ngIf="seriesMetadata.letterers && seriesMetadata.letterers.length > 0">
<div class="col-md-4">
<h5>Letterers</h5>
</div>
<div class="col-md-8">
<app-badge-expander [items]="seriesMetadata.letterers">
<ng-template #badgeExpanderItem let-item let-position="idx">
- <app-person-badge a11y-click="13,32" class="clickable" (click)="goTo('letterer', item.id)" [person]="item"></app-person-badge>
+ <app-person-badge a11y-click="13,32" class="col-auto" (click)="goTo('letterer', item.id)" [person]="item"></app-person-badge>
</ng-template>
</app-badge-expander>
</div>
</div>
- <div class="row no-gutters" *ngIf="seriesMetadata.tags && seriesMetadata.tags.length > 0">
+ <div class="row g-0" *ngIf="seriesMetadata.tags && seriesMetadata.tags.length > 0">
<div class="col-md-4">
<h5>Tags</h5>
</div>
<div class="col-md-8">
<app-badge-expander [items]="seriesMetadata.tags">
<ng-template #badgeExpanderItem let-item let-position="idx">
- <app-tag-badge a11y-click="13,32" class="clickable" (click)="goTo('tags', item.id)" [selectionMode]="TagBadgeCursor.Clickable">{{item.title}}</app-tag-badge>
+ <app-tag-badge a11y-click="13,32" class="col-auto" (click)="goTo('tags', item.id)" [selectionMode]="TagBadgeCursor.Clickable">{{item.title}}</app-tag-badge>
</ng-template>
</app-badge-expander>
</div>
</div>
- <div class="row no-gutters mt-1" *ngIf="seriesMetadata.translators && seriesMetadata.translators.length > 0">
+ <div class="row g-0 mt-1" *ngIf="seriesMetadata.translators && seriesMetadata.translators.length > 0">
<div class="col-md-4">
<h5>Translators</h5>
</div>
<div class="col-md-8">
<app-badge-expander [items]="seriesMetadata.translators">
<ng-template #badgeExpanderItem let-item let-position="idx">
- <app-person-badge a11y-click="13,32" class="clickable" (click)="goTo('translators', item.id)" [person]="item"></app-person-badge>
+ <app-person-badge a11y-click="13,32" class="col-auto" (click)="goTo('translators', item.id)" [person]="item"></app-person-badge>
</ng-template>
</app-badge-expander>
</div>
</div>
- <div class="row no-gutters mt-1" *ngIf="seriesMetadata.pencillers && seriesMetadata.pencillers.length > 0">
+ <div class="row g-0 mt-1" *ngIf="seriesMetadata.pencillers && seriesMetadata.pencillers.length > 0">
<div class="col-md-4">
<h5>Pencillers</h5>
</div>
<div class="col-md-8">
<app-badge-expander [items]="seriesMetadata.pencillers">
<ng-template #badgeExpanderItem let-item let-position="idx">
- <app-person-badge a11y-click="13,32" class="clickable" (click)="goTo('penciller', item.id)" [person]="item"></app-person-badge>
+ <app-person-badge a11y-click="13,32" class="col-auto" (click)="goTo('penciller', item.id)" [person]="item"></app-person-badge>
</ng-template>
</app-badge-expander>
</div>
</div>
- <div class="row no-gutters mt-1" *ngIf="seriesMetadata.publishers && seriesMetadata.publishers.length > 0">
+ <div class="row g-0 mt-1" *ngIf="seriesMetadata.publishers && seriesMetadata.publishers.length > 0">
<div class="col-md-4">
<h5>Publishers</h5>
</div>
<div class="col-md-8">
<app-badge-expander [items]="seriesMetadata.publishers">
<ng-template #badgeExpanderItem let-item let-position="idx">
- <app-person-badge a11y-click="13,32" class="clickable" (click)="goTo('publisher', item.id)" [person]="item"></app-person-badge>
+ <app-person-badge a11y-click="13,32" class="col-auto" (click)="goTo('publisher', item.id)" [person]="item"></app-person-badge>
</ng-template>
</app-badge-expander>
</div>
diff --git a/UI/Web/src/app/series-metadata-detail/series-metadata-detail.component.scss b/UI/Web/src/app/series-metadata-detail/series-metadata-detail.component.scss
index ec1ed15b0..e69de29bb 100644
--- a/UI/Web/src/app/series-metadata-detail/series-metadata-detail.component.scss
+++ b/UI/Web/src/app/series-metadata-detail/series-metadata-detail.component.scss
@@ -1,6 +0,0 @@
-.read-more-link {
- font-weight: bold;
- text-decoration: none;
- color: black;
- cursor: pointer;
-}
\ No newline at end of file
diff --git a/UI/Web/src/app/shared/_services/utility.service.ts b/UI/Web/src/app/shared/_services/utility.service.ts
index 9f8f97167..06241a544 100644
--- a/UI/Web/src/app/shared/_services/utility.service.ts
+++ b/UI/Web/src/app/shared/_services/utility.service.ts
@@ -1,10 +1,8 @@
import { Injectable } from '@angular/core';
import { ActivatedRouteSnapshot } from '@angular/router';
-import { FilterSettings } from 'src/app/cards/card-detail-layout/card-detail-layout.component';
import { Chapter } from 'src/app/_models/chapter';
import { LibraryType } from 'src/app/_models/library';
import { MangaFormat } from 'src/app/_models/manga-format';
-import { AgeRating } from 'src/app/_models/metadata/age-rating';
import { Series } from 'src/app/_models/series';
import { SeriesFilter } from 'src/app/_models/series-filter';
import { Volume } from 'src/app/_models/volume';
diff --git a/UI/Web/src/app/shared/circular-loader/circular-loader.component.html b/UI/Web/src/app/shared/circular-loader/circular-loader.component.html
index a8a8b8e50..893034383 100644
--- a/UI/Web/src/app/shared/circular-loader/circular-loader.component.html
+++ b/UI/Web/src/app/shared/circular-loader/circular-loader.component.html
@@ -1,7 +1,7 @@
<!-- <div class="circular">
<div class="inner"></div>
<div class="number">
- <span class="sr-only">{{currentValue}}%</span>
+ <span class="visually-hidden">{{currentValue}}%</span>
<i class="fa fa-angle-double-down" style="font-size: 36px;" aria-hidden="true"></i>
</div>
<div class="circle">
diff --git a/UI/Web/src/app/shared/circular-loader/circular-loader.component.scss b/UI/Web/src/app/shared/circular-loader/circular-loader.component.scss
index d921509d7..8510a6d0e 100644
--- a/UI/Web/src/app/shared/circular-loader/circular-loader.component.scss
+++ b/UI/Web/src/app/shared/circular-loader/circular-loader.component.scss
@@ -1,7 +1,3 @@
-$background: rgba(0, 0, 0, .4);
-$primary-color: #4ac694;
-
-
.number {
position: absolute;
top:50%;
@@ -9,15 +5,6 @@ $primary-color: #4ac694;
z-index:10;
font-size:18px;
font-weight:500;
- color:$primary-color;
+ color: var(--primary-color);
animation: MoveUpDown 1s linear infinite;
-}
-
-@keyframes MoveUpDown {
- 0%, 100% {
- transform: translateY(0);
- }
- 50% {
- transform: translateY(-10px);
- }
}
\ No newline at end of file
diff --git a/UI/Web/src/app/shared/confirm-dialog/confirm-dialog.component.html b/UI/Web/src/app/shared/confirm-dialog/confirm-dialog.component.html
index f18a390c3..30d38d2f9 100644
--- a/UI/Web/src/app/shared/confirm-dialog/confirm-dialog.component.html
+++ b/UI/Web/src/app/shared/confirm-dialog/confirm-dialog.component.html
@@ -2,8 +2,8 @@
<div class="modal-header">
<h4 class="modal-title" id="modal-basic-title">{{config.header}}</h4>
- <button type="button" class="close" aria-label="Close" (click)="close()">
- <span aria-hidden="true">&times;</span>
+ <button type="button" class="btn-close" aria-label="Close" (click)="close()">
+
</button>
</div>
<div class="modal-body" style="overflow-x: auto" [innerHtml]="config.content | safeHtml">
diff --git a/UI/Web/src/app/shared/person-badge/person-badge.component.html b/UI/Web/src/app/shared/person-badge/person-badge.component.html
index 6506ef49a..4b49e949a 100644
--- a/UI/Web/src/app/shared/person-badge/person-badge.component.html
+++ b/UI/Web/src/app/shared/person-badge/person-badge.component.html
@@ -1,8 +1,8 @@
-<div class="tagbadge cursor clickable" style="cursor: pointer;">
- <div class="media">
- <!-- <img src="..." class="align-self-center mr-3" alt="..."> -->
- <i class="fa fa-user-circle align-self-center mr-2" aria-hidden="true"></i>
- <div class="media-body">
+<div class="tagbadge cursor clickable">
+ <div class="d-flex">
+ <!-- <img src="..." class="align-self-center me-3" alt="..."> -->
+ <i class="fa fa-user-circle align-self-center me-2" aria-hidden="true"></i>
+ <div class="flex-grow-1">
<span class="mt-0 mb-0">{{person.name}}</span>
</div>
</div>
diff --git a/UI/Web/src/app/shared/person-badge/person-badge.component.scss b/UI/Web/src/app/shared/person-badge/person-badge.component.scss
index a78488384..c7e57889d 100644
--- a/UI/Web/src/app/shared/person-badge/person-badge.component.scss
+++ b/UI/Web/src/app/shared/person-badge/person-badge.component.scss
@@ -1,23 +1,18 @@
-@use '../../../theme/colors';
-
-$bg-color: #c9c9c9;
-$bdr-color: #f2f2f2;
-
-.badge {
- //background-color: $bg-color;
+.tagbadge {
+ background-color: var(--tagbadge-bg-color);
transition: all .3s ease-out;
margin: 3px 5px 3px 0px;
- padding: 2px 15px;
+ padding: 2px 10px;
border-radius: 6px;
font-size: 14px;
- border: 1px solid $bdr-color;
+ border: 1px solid var(--tagbadge-border-color);
display: inline-block;
+ cursor: pointer;
+ width: auto;
i {
- color: colors.$primary-color;
font-size: 14px;
font-weight: bold;
- margin-left: 10px;
margin-right: 0px;
cursor: pointer;
}
diff --git a/UI/Web/src/app/shared/read-more/read-more.component.scss b/UI/Web/src/app/shared/read-more/read-more.component.scss
index ec1ed15b0..af394d0f7 100644
--- a/UI/Web/src/app/shared/read-more/read-more.component.scss
+++ b/UI/Web/src/app/shared/read-more/read-more.component.scss
@@ -1,6 +1,6 @@
-.read-more-link {
- font-weight: bold;
- text-decoration: none;
- color: black;
- cursor: pointer;
-}
\ No newline at end of file
+// .read-more-link {
+// font-weight: bold;
+// text-decoration: none;
+// cursor: pointer;
+// color: var(--body-text-color) !important;
+// }
\ No newline at end of file
diff --git a/UI/Web/src/app/shared/tag-badge/tag-badge.component.scss b/UI/Web/src/app/shared/tag-badge/tag-badge.component.scss
index bd990b13e..27cde4d82 100644
--- a/UI/Web/src/app/shared/tag-badge/tag-badge.component.scss
+++ b/UI/Web/src/app/shared/tag-badge/tag-badge.component.scss
@@ -1,16 +1,14 @@
-$bg-color: #c9c9c9;
-$bdr-color: #f2f2f2;
-
-::ng-deep .tagbadge {
- background-color: $bg-color;
+.tagbadge {
+ background-color: var(--tagbadge-bg-color);
transition: all .3s ease-out;
margin: 3px 5px 3px 0px;
padding: 2px 10px;
border-radius: 6px;
font-size: 14px;
- border: 1px solid $bdr-color;
+ border: 1px solid var(--tagbadge-border-color);
display: inline-block;
cursor: default;
+ width: auto;
i {
font-size: 14px;
@@ -20,15 +18,15 @@ $bdr-color: #f2f2f2;
}
}
-::ng-deep .selectable-cursor {
- cursor: default !important;
+.selectable-cursor {
+ cursor: text !important;
i {
- cursor: default !important;
+ cursor: text !important;
}
}
-::ng-deep .not-allowed-cursor {
+.not-allowed-cursor {
cursor: not-allowed !important;
i {
@@ -36,7 +34,7 @@ $bdr-color: #f2f2f2;
}
}
-::ng-deep .clickable-cursor {
+.clickable-cursor {
cursor: pointer !important;
i {
diff --git a/UI/Web/src/app/shared/update-notification/update-notification-modal.component.html b/UI/Web/src/app/shared/update-notification/update-notification-modal.component.html
index 172aefaf2..290643b13 100644
--- a/UI/Web/src/app/shared/update-notification/update-notification-modal.component.html
+++ b/UI/Web/src/app/shared/update-notification/update-notification-modal.component.html
@@ -1,7 +1,7 @@
<div class="modal-header">
<h4 class="modal-title">New Update Available!</h4>
- <button type="button" class="close" aria-label="Close" (click)="close()">
- <span aria-hidden="true">&times;</span>
+ <button type="button" class="btn-close" aria-label="Close" (click)="close()">
+
</button>
</div>
<div class="modal-body">
diff --git a/UI/Web/src/app/theme-test/theme-test.component.html b/UI/Web/src/app/theme-test/theme-test.component.html
new file mode 100644
index 000000000..a6f168f20
--- /dev/null
+++ b/UI/Web/src/app/theme-test/theme-test.component.html
@@ -0,0 +1,134 @@
+<h1>Themes</h1>
+<button class="btn btn-primary" (click)="themeService?.setTheme('dark')">Dark</button>
+<button class="btn btn-primary" (click)="themeService?.setTheme('light')">Light</button>
+<button class="btn btn-primary" (click)="themeService?.setTheme('E-Ink')">E-ink</button>
+<button class="btn btn-primary" (click)="themeService?.setTheme('custom')">Custom</button>
+
+
+
+<h2>Buttons</h2>
+<button class="btn btn-primary">Primary</button>
+<button class="btn btn-secondary">secondary</button>
+<button class="btn btn-secondary alt">secondary alt</button>
+<button class="btn btn-outline-primary">outline primary</button>
+<button class="btn btn-outline-secondary">outline secondary</button>
+<button class="btn btn-link">btn link</button>
+<button class="btn btn-icon">
+ <i class="fa fa-angle-left"></i>&nbsp;Icon
+</button>
+
+<h2>Toastr</h2>
+
+<button class="btn btn-primary" (click)="toastr.success('Test')">Success</button>
+<button class="btn btn-danger" (click)="toastr.error('Test')">Error</button>
+<button class="btn btn-secondary" (click)="toastr.warning('Test')">Warning</button>
+<button class="btn btn-link" (click)="toastr.info('Test')">Info</button>
+
+<h2>Inputs</h2>
+<p>Inputs should always have class="form-control" on them</p>
+<label>Normal</label>
+<input type="text" class="form-control">
+<label>Readonly</label>
+<input type="text" readonly class="form-control">
+<label>Placeholder</label>
+<input type="text" placeholder="Hello, I'm a placeholder" class="form-control">
+<label>Disabled</label>
+<input type="text" placeholder="Hello, I'm a placeholder" [disabled]="true" class="form-control">
+
+<h2>Checkbox</h2>
+<div class="mb-3">
+ <label for="stat-collection" class="form-label" aria-describedby="collection-info">Allow Anonymous Usage Collection</label>
+ <div class="form-check">
+ <input id="stat-collection" type="checkbox" aria-label="Stat Collection" class="form-check-input" formControlName="allowStatCollection">
+ <label for="stat-collection" class="form-check-label">Normal Checkbox</label>
+ </div>
+</div>
+
+<div class="mb-3">
+ <label for="stat-collection" class="form-label" aria-describedby="collection-info">Allow Anonymous Usage Collection</label>
+ <div class="form-check">
+ <input id="stat-collection" type="checkbox" aria-label="Stat Collection" class="form-check-input" formControlName="allowStatCollection" [disabled]="true">
+ <label for="stat-collection" class="form-check-label">Disabled Checkbox</label>
+ </div>
+</div>
+
+<h2>Radio</h2>
+<p>Labels should have form-check-label on them and inputs form-check-input</p>
+<div class="mb-3">
+ <div class="form-check">
+ <input class="form-check-input" type="radio" id="site-dark-mode" formControlName="siteDarkMode" [value]="true" aria-labelledby="site-dark-mode-label">
+ <label class="form-check-label" for="site-dark-mode">True</label>
+ </div>
+ <div class="form-check">
+ <input class="form-check-input" type="radio" id="site-not-dark-mode" formControlName="siteDarkMode" [value]="false" aria-labelledby="site-dark-mode-label">
+ <label class="form-check-label" for="site-not-dark-mode">False</label>
+ </div>
+ <div class="form-check">
+ <input class="form-check-input" type="radio" id="site-not-dark-mode" formControlName="siteDarkMode" [disabled]="true" [value]="false" aria-labelledby="site-dark-mode-label">
+ <label class="form-check-label" for="site-not-dark-mode">Disabled</label>
+ </div>
+ <div class="form-check">
+ <input class="form-check-input" type="radio" id="site-not-dark-mode" formControlName="siteDarkMode" readonly [value]="false" aria-labelledby="site-dark-mode-label">
+ <label class="form-check-label" for="site-not-dark-mode">Readonly</label>
+ </div>
+</div>
+
+
+<h2>Nav tabs</h2>
+<h3>Tabs</h3>
+<ul ngbNav #nav="ngbNav" [(activeId)]="active" class="nav-tabs nav-pills">
+ <li *ngFor="let tab of tabs" [ngbNavItem]="tab">
+ <a ngbNavLink routerLink=".">{{ tab.title | sentenceCase }}</a>
+ <ng-template ngbNavContent>
+ <ng-container>
+ Tab 1
+ </ng-container>
+ <ng-container>
+ Tab 2
+ </ng-container>
+ </ng-template>
+ </li>
+</ul>
+<div [ngbNavOutlet]="nav" class="mt-3"></div>
+
+<h3>Tabs</h3>
+<nav role="navigation">
+ <ul ngbNav #nav="ngbNav" [(activeId)]="active" class="nav nav-pills justify-content-center mt-3" role="tab">
+ <li *ngFor="let tab of tabs" [ngbNavItem]="tab" class="nav-item">
+ <a ngbNavLink routerLink="." [fragment]="tab.fragment">{{ tab.title | titlecase }}</a>
+ <ng-template ngbNavContent>
+ <ng-container>
+ Tab 1
+ </ng-container>
+ <ng-container>
+ Tab 2
+ </ng-container>
+ </ng-template>
+ </li>
+ </ul>
+</nav>
+<div [ngbNavOutlet]="nav" class="mt-3"></div>
+
+<h2>Tag Badge</h2>
+<div class="g-2">
+ <app-tag-badge [selectionMode]="TagBadgeCursor.Selectable">Selectable</app-tag-badge>
+ <app-tag-badge [selectionMode]="TagBadgeCursor.Clickable">Clickable</app-tag-badge>
+ <app-tag-badge [selectionMode]="TagBadgeCursor.NotAllowed">Non Allowed</app-tag-badge>
+</div>
+
+<h2>Badge</h2>
+TODO
+
+<h2>Switch</h2>
+TODO: New component, will be used in place of 2 way radios
+
+<h2>Dropdown/List Group</h2>
+<div class="dropdown" >
+ <ul class="list-group" role="listbox" id="dropdown">
+ <li class="list-group-item">Item 1</li>
+ <li class="list-group-item">Item 2</li>
+ </ul>
+</div>
+
+<h2></h2>
+
diff --git a/UI/Web/src/app/theme-test/theme-test.component.scss b/UI/Web/src/app/theme-test/theme-test.component.scss
new file mode 100644
index 000000000..e69de29bb
diff --git a/UI/Web/src/app/theme-test/theme-test.component.ts b/UI/Web/src/app/theme-test/theme-test.component.ts
new file mode 100644
index 000000000..a8a7c8ae8
--- /dev/null
+++ b/UI/Web/src/app/theme-test/theme-test.component.ts
@@ -0,0 +1,32 @@
+import { Component, OnInit } from '@angular/core';
+import { ToastrService } from 'ngx-toastr';
+import { TagBadgeCursor } from '../shared/tag-badge/tag-badge.component';
+import { ThemeService } from '../theme.service';
+import { NavService } from '../_services/nav.service';
+
+@Component({
+ selector: 'app-theme-test',
+ templateUrl: './theme-test.component.html',
+ styleUrls: ['./theme-test.component.scss']
+})
+export class ThemeTestComponent implements OnInit {
+
+ tabs: Array<{title: string, fragment: string}> = [
+ {title: 'General', fragment: ''},
+ {title: 'Users', fragment: 'users'},
+ {title: 'Libraries', fragment: 'libraries'},
+ {title: 'System', fragment: 'system'},
+ {title: 'Changelog', fragment: 'changelog'},
+ ];
+ active = this.tabs[0];
+
+ get TagBadgeCursor(): typeof TagBadgeCursor {
+ return TagBadgeCursor;
+ }
+
+ constructor(public toastr: ToastrService, public navService: NavService, public themeService: ThemeService) { }
+
+ ngOnInit(): void {
+ }
+
+}
diff --git a/UI/Web/src/app/theme.service.ts b/UI/Web/src/app/theme.service.ts
new file mode 100644
index 000000000..782bd30d3
--- /dev/null
+++ b/UI/Web/src/app/theme.service.ts
@@ -0,0 +1,133 @@
+import { DOCUMENT } from '@angular/common';
+import { HttpClient } from '@angular/common/http';
+import { Inject, Injectable, OnDestroy, Renderer2, RendererFactory2, SecurityContext } from '@angular/core';
+import { DomSanitizer } from '@angular/platform-browser';
+import { map, ReplaySubject, Subject, takeUntil } from 'rxjs';
+import { environment } from 'src/environments/environment';
+import { ConfirmService } from './shared/confirm.service';
+import { SiteThemeProgressEvent } from './_models/events/site-theme-progress-event';
+import { SiteTheme, ThemeProvider } from './_models/preferences/site-theme';
+import { EVENTS, MessageHubService } from './_services/message-hub.service';
+
+
+
+@Injectable({
+ providedIn: 'root'
+})
+export class ThemeService implements OnDestroy {
+
+ public defaultTheme: string = 'dark';
+
+ private currentThemeSource = new ReplaySubject<SiteTheme>(1);
+ public currentTheme$ = this.currentThemeSource.asObservable();
+
+ private themesSource = new ReplaySubject<SiteTheme[]>(1);
+ public themes$ = this.themesSource.asObservable();
+
+ /**
+ * Maintain a cache of themes. SignalR will inform us if we need to refresh cache
+ */
+ private themeCache: Array<SiteTheme> = [];
+
+ private readonly onDestroy = new Subject<void>();
+ private renderer: Renderer2;
+ private baseUrl = environment.apiUrl;
+
+
+ constructor(rendererFactory: RendererFactory2, @Inject(DOCUMENT) private document: Document, private httpClient: HttpClient,
+ messageHub: MessageHubService, private domSantizer: DomSanitizer, private confirmService: ConfirmService) {
+ this.renderer = rendererFactory.createRenderer(null, null);
+
+ this.getThemes();
+
+ messageHub.messages$.pipe(takeUntil(this.onDestroy)).subscribe(message => {
+ if (message.event === EVENTS.SiteThemeProgress) {
+ if ((message.payload as SiteThemeProgressEvent).progress === 1) {
+ this.getThemes().subscribe(() => {});
+ }
+ }
+ });
+ }
+
+ ngOnDestroy(): void {
+ this.onDestroy.next();
+ this.onDestroy.complete();
+ }
+
+ getColorScheme() {
+ return getComputedStyle(this.document.body).getPropertyValue('--color-scheme').trim();
+ }
+
+ isDarkTheme() {
+ console.log('color scheme: ', getComputedStyle(this.document.body).getPropertyValue('--color-scheme').trim().toLowerCase());
+ return this.getColorScheme().toLowerCase() === 'dark';
+ }
+
+ getThemes() {
+ return this.httpClient.get<SiteTheme[]>(this.baseUrl + 'theme').pipe(map(themes => {
+ this.themeCache = themes;
+ this.themesSource.next(themes);
+ return themes;
+ }));
+ }
+
+ setDefault(themeId: number) {
+ return this.httpClient.post(this.baseUrl + 'theme/update-default', {themeId: themeId}).pipe(map(() => {
+ // Refresh the cache when a default state is changed
+ this.getThemes().subscribe(() => {});
+ }));
+ }
+
+ scan() {
+ return this.httpClient.post(this.baseUrl + 'theme/scan', {});
+ }
+
+
+ setTheme(themeName: string) {
+ const theme = this.themeCache.find(t => t.name.toLowerCase() === themeName.toLowerCase());
+ if (theme) {
+ this.unsetThemes();
+ this.renderer.addClass(this.document.querySelector('body'), theme.selector);
+
+ if (theme.provider === ThemeProvider.User && !this.hasThemeInHead(theme.name)) {
+ // We need to load the styles into the browser
+ this.fetchThemeContent(theme.id).subscribe(async (content) => {
+ if (content === null) {
+ await this.confirmService.alert('There is invalid or unsafe css in the theme. Please reach out to your admin to have this corrected. Defaulting to dark theme.');
+ this.setTheme('dark');
+ return;
+ }
+ const styleElem = document.createElement('style');
+ styleElem.id = 'theme-' + theme.name;
+ styleElem.appendChild(this.document.createTextNode(content));
+
+ this.renderer.appendChild(this.document.head, styleElem);
+ this.currentThemeSource.next(theme);
+ });
+ } else {
+ this.currentThemeSource.next(theme);
+ }
+ } else {
+ // Only time themes isn't already loaded is on first load
+ this.getThemes().subscribe(themes => {
+ this.setTheme(themeName);
+ });
+ }
+ }
+
+ private hasThemeInHead(themeName: string) {
+ const id = 'theme-' + themeName.toLowerCase();
+ return Array.from(this.document.head.children).filter(el => el.tagName === 'STYLE' && el.id.toLowerCase() === id).length > 0;
+ }
+
+ private fetchThemeContent(themeId: number) {
+ // TODO: Refactor {responseType: 'text' as 'json'} into a type so i don't have to retype it
+ return this.httpClient.get<string>(this.baseUrl + 'theme/download-content?themeId=' + themeId, {responseType: 'text' as 'json'}).pipe(map(encodedCss => {
+ return this.domSantizer.sanitize(SecurityContext.STYLE, encodedCss);
+ }));
+ }
+
+ private unsetThemes() {
+ this.themeCache.forEach(theme => this.document.body.classList.remove(theme.selector));
+ }
+}
diff --git a/UI/Web/src/app/typeahead/typeahead.component.html b/UI/Web/src/app/typeahead/typeahead.component.html
index e14019981..38f3e5826 100644
--- a/UI/Web/src/app/typeahead/typeahead.component.html
+++ b/UI/Web/src/app/typeahead/typeahead.component.html
@@ -9,7 +9,7 @@
<input #input [id]="settings.id" type="text" autocomplete="off" formControlName="typeahead">
<div class="spinner-border spinner-border-sm" role="status" *ngIf="isLoadingOptions">
- <span class="sr-only">Loading...</span>
+ <span class="visually-hidden">Loading...</span>
</div>
<!-- TODO: Add a clear all button -->
</div>
diff --git a/UI/Web/src/app/typeahead/typeahead.component.scss b/UI/Web/src/app/typeahead/typeahead.component.scss
index 40b9b8132..58dbebc3a 100644
--- a/UI/Web/src/app/typeahead/typeahead.component.scss
+++ b/UI/Web/src/app/typeahead/typeahead.component.scss
@@ -1,5 +1,3 @@
-@use "../../theme/colors";
-
input {
width: 15px;
opacity: 1px;
@@ -9,7 +7,6 @@ input {
}
.typeahead-input {
- border: 1px solid #ccc;
padding: 0px 6px;
display: inline-block;
width: 100%;
@@ -20,9 +17,12 @@ input {
box-shadow: none;
border-radius: 4px;
cursor: text;
- background-color: #fff;
min-height: 38px;
+ background-color: var(--input-bg-color);
+ border: 1px solid var(--input-border-color);
+ color: var(--body-text-color);
+
input {
outline: 0 !important;
border-radius: .28571429rem;
@@ -40,19 +40,9 @@ input {
}
}
-::ng-deep .bg-dark .typeahead-input {
- color: #efefef;
- background-color: colors.$dark-bg-color;
-}
-
-// Causes bleedover
-::ng-deep .bg-dark .dropdown .list-group-item.active {
- background-color: colors.$dark-hover-color;
-}
-
.dropdown {
width: 100%;
- background: white;
+ background: var(--input-bg-color);
z-index:1000;
margin: 2px 0 0;
border-radius: 4px;
diff --git a/UI/Web/src/app/user-login/user-login.component.html b/UI/Web/src/app/user-login/user-login.component.html
index badfde742..966ecf7c1 100644
--- a/UI/Web/src/app/user-login/user-login.component.html
+++ b/UI/Web/src/app/user-login/user-login.component.html
@@ -4,22 +4,22 @@
<ng-container *ngIf="isLoaded">
<form [formGroup]="loginForm" (ngSubmit)="login()" novalidate class="needs-validation" *ngIf="!firstTimeFlow">
<div class="card-text">
- <div class="form-group" style="width:100%">
- <label for="username">Username</label>
- <input class="form-control" formControlName="username" id="username" type="text">
+ <div class="mb-3">
+ <label for="username" class="form-label visually-hidden">Username</label>
+ <input class="form-control custom-input" formControlName="username" id="username" type="text" autofocus placeholder="Username">
</div>
- <div class="form-group" style="width:100%">
- <label for="password">Password</label>
- <input class="form-control" formControlName="password" id="password" type="password" autofocus>
+ <div class="mb-3">
+ <label for="password" class="form-label visually-hidden">Password</label>
+ <input class="form-control custom-input" formControlName="password" id="password" type="password" placeholder="Password">
</div>
- <div>
- <a href="/registration/reset-password">Forgot Password?</a>
+ <div class="mb-3">
+ <a href="/registration/reset-password" style="color: white">Forgot Password?</a>
</div>
- <div class="float-right">
- <button class="btn btn-secondary alt" type="submit">Login</button>
+ <div>
+ <button class="btn btn-secondary alt" type="submit">Submit</button>
</div>
</div>
</form>
diff --git a/UI/Web/src/app/user-login/user-login.component.scss b/UI/Web/src/app/user-login/user-login.component.scss
index 10bf53267..fb13d8579 100644
--- a/UI/Web/src/app/user-login/user-login.component.scss
+++ b/UI/Web/src/app/user-login/user-login.component.scss
@@ -1,91 +1,21 @@
-// @use "../../theme/colors";
+.btn {
+ width: 100%
+}
-// .login {
-// display: flex;
-// align-items: center;
-// justify-content: center;
-// margin-top: -61px; // To offset the navbar
-// height: calc(100vh);
-// min-height: 289px;
-// position: relative;
-// width: 100vw;
-// max-width: 100vw;
+div {
+ text-align: center;
+}
+a {
+ font-size: 0.8rem;
+}
-// &::before {
-// content: "";
-// background-image: url('../../assets/images/login-bg.jpg');
-// background-size: cover;
-// position: absolute;
-// top: 0;
-// right: 0;
-// bottom: 0;
-// opacity: 0.1;
-// width: 100%;
-// }
-
-// .logo-container {
-// .logo {
-// display:inline-block;
-// height: 50px;
-// }
-// }
-
-// .row {
-// margin-top: 10vh;
-// }
-
-// .card {
-// background-color: colors.$primary-color;
-// color: #fff;
-// cursor: pointer;
-// min-width: 300px;
-
-// &:focus {
-// border: 2px solid white;
-
-// }
-
-
-// .card-title {
-// font-family: 'Spartan', sans-serif;
-// font-weight: bold;
-// display: inline-block;
-// vertical-align: middle;
-// width: 280px;
-// }
-
-// .card-text {
-// font-family: "EBGaramond", "Helvetica Neue", sans-serif;
-// }
-
-// .alt {
-// background-color: #424c72;
-// border-color: #444f75;
-// }
-
-// .alt:hover {
-// background-color: #3b4466;
-// }
-
-// .alt:focus {
-// background-color: #343c59;
-// box-shadow: 0 0 0 0.2rem rgb(68 79 117 / 50%);
-// }
-// }
-// }
-
-// .invalid-feedback {
-// display: inline-block;
-// color: #343c59;
-// }
-
-// input {
-// background-color: #fff !important;
-// color: black;
-// }
-
-input {
+.custom-input {
background-color: #fff !important;
color: black;
+}
+
+.invalid-feedback {
+ display: inline-block;
+ color: #343c59;
}
\ No newline at end of file
diff --git a/UI/Web/src/app/user-settings/api-key/api-key.component.html b/UI/Web/src/app/user-settings/api-key/api-key.component.html
index d8db7943f..65fce608a 100644
--- a/UI/Web/src/app/user-settings/api-key/api-key.component.html
+++ b/UI/Web/src/app/user-settings/api-key/api-key.component.html
@@ -1,11 +1,11 @@
-<div class="form-group">
- <label for="api-key--{{title}}">{{title}}</label><span *ngIf="tooltipText.length > 0">&nbsp;<i class="fa fa-info-circle" aria-hidden="true" placement="right" [ngbTooltip]="tooltip" role="button" tabindex="0"></i></span>
+<div class="mb-3">
+ <label for="api-key--{{title}}" class="form-label">{{title}}</label><span *ngIf="tooltipText.length > 0">&nbsp;<i class="fa fa-info-circle" aria-hidden="true" placement="right" [ngbTooltip]="tooltip" role="button" tabindex="0"></i></span>
<ng-template #tooltip>{{tooltipText}}</ng-template>
<div class="input-group">
<input #apiKey type="text" readonly class="form-control" id="api-key--{{title}}" aria-describedby="button-addon4" [value]="key" (click)="selectAll()">
- <div class="input-group-append" id="button-addon4">
- <button class="btn btn-outline-secondary" type="button" (click)="copy()"><span class="sr-only">Copy</span><i class="fa fa-copy" aria-hidden="true"></i></button>
- <button class="btn btn-danger" type="button" (click)="refresh()" *ngIf="showRefresh"><span class="sr-only">Regenerate</span><i class="fa fa-sync-alt" aria-hidden="true"></i></button>
+ <div id="button-addon4">
+ <button class="btn btn-outline-secondary" type="button" (click)="copy()"><span class="visually-hidden">Copy</span><i class="fa fa-copy" aria-hidden="true"></i></button>
+ <button class="btn btn-danger" type="button" (click)="refresh()" *ngIf="showRefresh"><span class="visually-hidden">Regenerate</span><i class="fa fa-sync-alt" aria-hidden="true"></i></button>
</div>
</div>
</div>
\ No newline at end of file
diff --git a/UI/Web/src/app/user-settings/series-bookmarks/series-bookmarks.component.html b/UI/Web/src/app/user-settings/series-bookmarks/series-bookmarks.component.html
index 047b14381..6bca242f9 100644
--- a/UI/Web/src/app/user-settings/series-bookmarks/series-bookmarks.component.html
+++ b/UI/Web/src/app/user-settings/series-bookmarks/series-bookmarks.component.html
@@ -6,27 +6,27 @@
<div>
<h4>
<a id="series--{{series.name}}" href="javascript:void(0);" (click)="viewBookmarks(series)">{{series.name | titlecase}}</a>
- &nbsp;<span class="badge badge-secondary badge-pill">{{getBookmarkPages(series.id)}}</span>
- <div class="float-right">
- <button attr.aria-labelledby="series--{{series.name}}" class="btn btn-danger mr-2 btn-sm" (click)="clearBookmarks(series)" [disabled]="clearingSeries[series.id]" placement="top" ngbTooltip="Clear Bookmarks" attr.aria-label="Clear Bookmarks">
+ &nbsp;<span class="badge bg-secondary rounded-pill">{{getBookmarkPages(series.id)}}</span>
+ <div class="float-end">
+ <button attr.aria-labelledby="series--{{series.name}}" class="btn btn-danger me-2 btn-sm" (click)="clearBookmarks(series)" [disabled]="clearingSeries[series.id]" placement="top" ngbTooltip="Clear Bookmarks" attr.aria-label="Clear Bookmarks">
<ng-container *ngIf="clearingSeries[series.id]; else notClearing">
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
- <span class="sr-only">Loading...</span>
+ <span class="visually-hidden">Loading...</span>
</ng-container>
<ng-template #notClearing>
<i class="fa fa-trash-alt" aria-hidden="true"></i>
</ng-template>
</button>
- <button attr.aria-labelledby="series--{{series.name}}" class="btn btn-secondary mr-2 btn-sm" (click)="downloadBookmarks(series)" [disabled]="downloadingSeries[series.id]" placement="top" ngbTooltip="Download Bookmarks" attr.aria-label="Download Bookmarks">
+ <button attr.aria-labelledby="series--{{series.name}}" class="btn btn-secondary me-2 btn-sm" (click)="downloadBookmarks(series)" [disabled]="downloadingSeries[series.id]" placement="top" ngbTooltip="Download Bookmarks" attr.aria-label="Download Bookmarks">
<ng-container *ngIf="downloadingSeries[series.id]; else notDownloading">
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
- <span class="sr-only">Downloading...</span>
+ <span class="visually-hidden">Downloading...</span>
</ng-container>
<ng-template #notDownloading>
<i class="fa fa-arrow-alt-circle-down" aria-hidden="true"></i>
</ng-template>
</button>
- <button attr.aria-labelledby="series--{{series.name}}" class="btn btn-primary mr-2 btn-sm" routerLink="/library/{{series.libraryId}}/series/{{series.id}}" placement="top" ngbTooltip="Open Series" attr.aria-label="Open Series">
+ <button attr.aria-labelledby="series--{{series.name}}" class="btn btn-primary me-2 btn-sm" routerLink="/library/{{series.libraryId}}/series/{{series.id}}" placement="top" ngbTooltip="Open Series" attr.aria-label="Open Series">
<i class="fa fa-eye" title="Open Series"></i>
</button>
</div>
diff --git a/UI/Web/src/app/user-settings/theme-manager/theme-manager.component.html b/UI/Web/src/app/user-settings/theme-manager/theme-manager.component.html
new file mode 100644
index 000000000..c84faa80e
--- /dev/null
+++ b/UI/Web/src/app/user-settings/theme-manager/theme-manager.component.html
@@ -0,0 +1,28 @@
+<div class="container-fluid">
+ <div class="row mb-2">
+ <div class="col-8"><h3>Theme Manager</h3></div>
+ <div class="col-4" *ngIf="isAdmin">
+ <button class="btn btn-primary float-end" (click)="scan()">
+ <i class="fa fa-refresh" aria-hidden="true"></i>&ngsp; Scan
+ </button>
+ </div>
+ </div>
+
+ <div class="row g-0">
+ <ng-container *ngFor="let theme of (themeService.themes$ | async)">
+ <div class="card col-auto me-3" style="width: 18rem;">
+ <div class="card-body">
+ <h5 class="card-title">{{theme.name | sentenceCase}}</h5>
+ <h6 class="card-subtitle mb-2 text-muted">{{theme.provider === ThemeProvider.System ? 'System' : 'User'}}</h6>
+ <!-- <p class="card-text">
+ <i class="far fa-file-code" style="font-size: 24px" aria-hidden="true"></i>
+ </p> -->
+ <button class="btn btn-secondary me-2" [disabled]="theme.isDefault" *ngIf="isAdmin" (click)="updateDefault(theme)">Set Default</button>
+ <button class="btn btn-primary" (click)="applyTheme(theme)" [disabled]="currentTheme?.id === theme.id">{{currentTheme?.id === theme.id ? 'Applied' : 'Apply'}}</button>
+ </div>
+ </div>
+ </ng-container>
+ </div>
+
+</div>
+
diff --git a/UI/Web/src/app/user-settings/theme-manager/theme-manager.component.scss b/UI/Web/src/app/user-settings/theme-manager/theme-manager.component.scss
new file mode 100644
index 000000000..e69de29bb
diff --git a/UI/Web/src/app/user-settings/theme-manager/theme-manager.component.ts b/UI/Web/src/app/user-settings/theme-manager/theme-manager.component.ts
new file mode 100644
index 000000000..a6d5b2f2c
--- /dev/null
+++ b/UI/Web/src/app/user-settings/theme-manager/theme-manager.component.ts
@@ -0,0 +1,74 @@
+import { Component, OnDestroy, OnInit } from '@angular/core';
+import { ToastrService } from 'ngx-toastr';
+import { distinctUntilChanged, Subject, take, takeUntil } from 'rxjs';
+import { ThemeService } from 'src/app/theme.service';
+import { SiteTheme, ThemeProvider } from 'src/app/_models/preferences/site-theme';
+import { User } from 'src/app/_models/user';
+import { AccountService } from 'src/app/_services/account.service';
+
+@Component({
+ selector: 'app-theme-manager',
+ templateUrl: './theme-manager.component.html',
+ styleUrls: ['./theme-manager.component.scss']
+})
+export class ThemeManagerComponent implements OnInit, OnDestroy {
+
+ currentTheme!: SiteTheme;
+ isAdmin: boolean = false;
+ user: User | undefined;
+
+ private readonly onDestroy = new Subject<void>();
+
+ get ThemeProvider() {
+ return ThemeProvider;
+ }
+
+ constructor(public themeService: ThemeService, private accountService: AccountService, private toastr: ToastrService) {
+ themeService.currentTheme$.pipe(takeUntil(this.onDestroy), distinctUntilChanged()).subscribe(theme => {
+ this.currentTheme = theme;
+ });
+
+ accountService.currentUser$.pipe(take(1)).subscribe(user => {
+ if (user) {
+ this.user = user;
+ this.isAdmin = accountService.hasAdminRole(user);
+ }
+ });
+ }
+
+ ngOnInit(): void {
+ }
+
+ ngOnDestroy(): void {
+ this.onDestroy.next();
+ this.onDestroy.complete();
+ }
+
+ applyTheme(theme: SiteTheme) {
+
+ if (this.user) {
+ const pref = Object.assign({}, this.user.preferences);
+ pref.theme = theme;
+ this.accountService.updatePreferences(pref).subscribe(updatedPref => {
+ if (this.user) {
+ this.user.preferences = updatedPref;
+ }
+ this.themeService.setTheme(theme.name);
+ });
+ }
+
+ }
+
+ updateDefault(theme: SiteTheme) {
+ this.themeService.setDefault(theme.id).subscribe(() => {
+ this.toastr.success('Site default has been updated to ' + theme.name);
+ });
+ }
+
+ scan() {
+ this.themeService.scan().subscribe(() => {
+ this.toastr.info('A site theme scan has been queued');
+ });
+ }
+
+}
diff --git a/UI/Web/src/app/user-settings/user-preferences/user-preferences.component.html b/UI/Web/src/app/user-settings/user-preferences/user-preferences.component.html
index e40eae35c..492a615b0 100644
--- a/UI/Web/src/app/user-settings/user-preferences/user-preferences.component.html
+++ b/UI/Web/src/app/user-settings/user-preferences/user-preferences.component.html
@@ -1,6 +1,6 @@
<div class="container">
<h2>User Dashboard</h2>
- <ul ngbNav #nav="ngbNav" [(activeId)]="active" class="nav-tabs nav-pills">
+ <ul ngbNav #nav="ngbNav" [(activeId)]="active" class="nav nav-tabs">
<li *ngFor="let tab of tabs" [ngbNavItem]="tab">
<a ngbNavLink routerLink="." [fragment]="tab.fragment">{{ tab.title | sentenceCase }}</a>
<ng-template ngbNavContent>
@@ -10,148 +10,144 @@
</p>
<ngb-accordion [closeOthers]="true" activeIds="site-panel" #acc="ngbAccordion">
- <ngb-panel id="site-panel" title="Site">
+ <!-- <ngb-panel id="site-panel" title="Site">
<ng-template ngbPanelHeader>
- <div class="d-flex align-items-center justify-content-between">
- <button ngbPanelToggle class="btn container-fluid text-left pl-0 accordion-header">Site</button>
- <span class="pull-right"><i class="fa fa-angle-{{acc.isExpanded('site-panel') ? 'down' : 'up'}}" aria-hidden="true"></i></span>
- </div>
+ <h2 class="accordion-header">
+ <button class="accordion-button" ngbPanelToggle type="button" [attr.aria-expanded]="acc.isExpanded('site-panel')" aria-controls="collapseOne">
+ Site
+ </button>
+ </h2>
</ng-template>
<ng-template ngbPanelContent>
<form [formGroup]="settingsForm" *ngIf="user !== undefined">
- <div class="form-group">
- <label id="site-dark-mode-label" aria-describedby="site-heading">Dark Mode</label>
- <div class="form-group">
+ <div class="mb-3">
+ <label id="site-dark-mode-label" aria-describedby="site-heading" class="form-label">Dark Mode</label>
+ <div class="mb-3">
<div class="custom-control custom-radio custom-control-inline">
- <input type="radio" id="site-dark-mode" formControlName="siteDarkMode" class="custom-control-input" [value]="true" aria-labelledby="site-dark-mode-label">
- <label class="custom-control-label" for="site-dark-mode">True</label>
+ <input type="radio" id="site-dark-mode" formControlName="siteDarkMode" class=" form-check-input" [value]="true" aria-labelledby="site-dark-mode-label">
+ <label class="form-check-label" for="site-dark-mode">True</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
- <input type="radio" id="site-not-dark-mode" formControlName="siteDarkMode" class="custom-control-input" [value]="false" aria-labelledby="site-dark-mode-label">
- <label class="custom-control-label" for="site-not-dark-mode">False</label>
+ <input type="radio" id="site-not-dark-mode" formControlName="siteDarkMode" class="form-check-input" [value]="false" aria-labelledby="site-dark-mode-label">
+ <label class="form-check-label" for="site-not-dark-mode">False</label>
</div>
</div>
</div>
- <div class="float-right mb-3">
- <button type="button" class="btn btn-secondary mr-2" (click)="resetForm()" aria-describedby="site-dark-mode-label">Reset</button>
- <button type="submit" class="btn btn-primary" (click)="save()" aria-describedby="site-dark-mode-label" [disabled]="!settingsForm.touched && !settingsForm.dirty">Save</button>
+ <div class="">
+ <div class="col-auto d-flex d-md-block justify-content-sm-center text-md-end mb-3">
+ <button type="button" class="flex-fill btn btn-secondary me-2" (click)="resetForm()" aria-describedby="site-dark-mode-label">Reset</button>
+ <button type="submit" class="flex-fill btn btn-primary" (click)="save()" aria-describedby="site-dark-mode-label" [disabled]="!settingsForm.touched && !settingsForm.dirty">Save</button>
+ </div>
</div>
</form>
</ng-template>
- </ngb-panel>
+ </ngb-panel> -->
<ngb-panel id="reading-panel" title="Reading">
<ng-template ngbPanelHeader>
- <div class="d-flex align-items-center justify-content-between">
- <button ngbPanelToggle class="btn container-fluid text-left pl-0 accordion-header">Reading</button>
+ <!-- <div class="d-flex align-items-center justify-content-between">
+ <button ngbPanelToggle class="btn container-fluid text-start ps-0 accordion-header">Reading</button>
<span class="pull-right"><i class="fa fa-angle-{{acc.isExpanded('reading-panel') ? 'down' : 'up'}}" aria-hidden="true"></i></span>
- </div>
+ </div> -->
+ <h2 class="accordion-header">
+ <button class="accordion-button" ngbPanelToggle type="button" [attr.aria-expanded]="acc.isExpanded('reading-panel')" aria-controls="collapseOne">
+ Reading
+ </button>
+ </h2>
</ng-template>
<ng-template ngbPanelContent>
<form [formGroup]="settingsForm" *ngIf="user !== undefined">
<h3 id="manga-header">Image Reader</h3>
- <div class="row no-gutters">
- <div class="form-group col-md-6 col-sm-12 pr-2">
- <label for="settings-reading-direction">Reading Direction</label>&nbsp;<i class="fa fa-info-circle" aria-hidden="true" placement="right" [ngbTooltip]="readingDirectionTooltip" role="button" tabindex="0"></i>
+ <div class="row g-0">
+ <div class="form-group col-md-6 col-sm-12 pe-2 mb-2">
+ <label for="settings-reading-direction" class="form-label">Reading Direction</label>&nbsp;<i class="fa fa-info-circle" aria-hidden="true" placement="right" [ngbTooltip]="readingDirectionTooltip" role="button" tabindex="0"></i>
<ng-template #readingDirectionTooltip>Direction to click to move to next page. Right to Left means you click on left side of screen to move to next page.</ng-template>
- <span class="sr-only" id="settings-reading-direction-help">Direction to click to move to next page. Right to Left means you click on left side of screen to move to next page.</span>
- <select class="form-control" aria-describedby="manga-header" formControlName="readingDirection" id="settings-reading-direction">
+ <span class="visually-hidden" id="settings-reading-direction-help">Direction to click to move to next page. Right to Left means you click on left side of screen to move to next page.</span>
+ <select class="form-select" aria-describedby="manga-header" formControlName="readingDirection" id="settings-reading-direction">
<option *ngFor="let opt of readingDirections" [value]="opt.value">{{opt.text | titlecase}}</option>
</select>
</div>
- <div class="form-group col-md-6 col-sm-12">
- <label for="settings-scaling-option">Scaling Options</label>&nbsp;<i class="fa fa-info-circle" aria-hidden="true" placement="right" [ngbTooltip]="taskBackupTooltip" role="button" tabindex="0"></i>
+ <div class="form-group col-md-6 col-sm-12 pe-2 mb-2">
+ <label for="settings-scaling-option" class="form-label">Scaling Options</label>&nbsp;<i class="fa fa-info-circle" aria-hidden="true" placement="right" [ngbTooltip]="taskBackupTooltip" role="button" tabindex="0"></i>
<ng-template #taskBackupTooltip>How to scale the image to your screen.</ng-template>
- <span class="sr-only" id="settings-scaling-option-help">How to scale the image to your screen.</span>
- <select class="form-control" aria-describedby="manga-header" formControlName="scalingOption" id="settings-scaling-option">
+ <span class="visually-hidden" id="settings-scaling-option-help">How to scale the image to your screen.</span>
+ <select class="form-select" aria-describedby="manga-header" formControlName="scalingOption" id="settings-scaling-option">
<option *ngFor="let opt of scalingOptions" [value]="opt.value">{{opt.text | titlecase}}</option>
</select>
</div>
</div>
- <div class="row no-gutters">
- <div class="form-group col-md-6 col-sm-12 pr-2">
- <label for="settings-pagesplit-option">Page Splitting</label>&nbsp;<i class="fa fa-info-circle" aria-hidden="true" placement="right" [ngbTooltip]="pageSplitOptionTooltip" role="button" tabindex="0"></i>
+ <div class="row g-0">
+ <div class="form-group col-md-6 col-sm-12 pe-2 mb-2">
+ <label for="settings-pagesplit-option" class="form-label">Page Splitting</label>&nbsp;<i class="fa fa-info-circle" aria-hidden="true" placement="right" [ngbTooltip]="pageSplitOptionTooltip" role="button" tabindex="0"></i>
<ng-template #pageSplitOptionTooltip>How to split a full width image (ie both left and right images are combined)</ng-template>
- <span class="sr-only" id="settings-pagesplit-option-help">How to split a full width image (ie both left and right images are combined)</span>
- <select class="form-control" aria-describedby="manga-header" formControlName="pageSplitOption" id="settings-pagesplit-option">
+ <span class="visually-hidden" id="settings-pagesplit-option-help">How to split a full width image (ie both left and right images are combined)</span>
+ <select class="form-select" aria-describedby="manga-header" formControlName="pageSplitOption" id="settings-pagesplit-option">
<option *ngFor="let opt of pageSplitOptions" [value]="opt.value">{{opt.text | titlecase}}</option>
</select>
</div>
- <div class="form-group col-md-6 col-sm-12">
- <label for="settings-readingmode-option">Reading Mode</label>
- <select class="form-control" aria-describedby="manga-header" formControlName="readerMode" id="settings-readingmode-option">
+ <div class="form-group col-md-6 col-sm-12 pe-2 mb-2">
+ <label for="settings-readingmode-option" class="form-label">Reading Mode</label>
+ <select class="form-select" aria-describedby="manga-header" formControlName="readerMode" id="settings-readingmode-option">
<option *ngFor="let opt of readingModes" [value]="opt.value">{{opt.text | titlecase}}</option>
</select>
</div>
</div>
- <div class="form-group">
+ <div class="mb-3">
<!-- TODO: Turn this into a checkbox -->
- <label id="auto-close-label">Auto Close Menu</label>
- <div class="form-group">
- <div class="custom-control custom-radio custom-control-inline">
- <input type="radio" id="auto-close" formControlName="autoCloseMenu" class="custom-control-input" [value]="true" aria-labelledby="auto-close-label">
- <label class="custom-control-label" for="auto-close">True</label>
- </div>
- <div class="custom-control custom-radio custom-control-inline">
- <input type="radio" id="not-auto-close" formControlName="autoCloseMenu" class="custom-control-input" [value]="false" aria-labelledby="auto-close-label">
- <label class="custom-control-label" for="not-auto-close">False</label>
+ <label id="auto-close-label" class="form-label"></label>
+ <div class="mb-3">
+ <div class="form-check form-switch">
+ <input type="checkbox" id="auto-close" formControlName="autoCloseMenu" class="form-check-input" [value]="true" aria-labelledby="auto-close-label">
+ <label class="form-check-label" for="auto-close">Auto Close Menu</label>
</div>
</div>
</div>
<hr>
<h3>Book Reader</h3>
- <div class="row no-gutters">
- <div class="form-group col-md-6 col-sm-12 pr-2">
- <label id="dark-mode-label">Dark Mode</label>
- <div class="form-group">
- <div class="custom-control custom-radio custom-control-inline">
- <input type="radio" id="dark-mode" formControlName="bookReaderDarkMode" class="custom-control-input" [value]="true" aria-labelledby="dark-mode-label">
- <label class="custom-control-label" for="dark-mode">True</label>
- </div>
- <div class="custom-control custom-radio custom-control-inline">
- <input type="radio" id="not-dark-mode" formControlName="bookReaderDarkMode" class="custom-control-input" [value]="false" aria-labelledby="dark-mode-label">
- <label class="custom-control-label" for="not-dark-mode">False</label>
+ <div class="row g-0">
+ <div class="form-group col-md-6 col-sm-12 pe-2 mb-3">
+ <label id="dark-mode-label" class="form-label"></label>
+ <div class="mb-3">
+ <div class="form-check form-switch">
+ <input type="checkbox" id="dark-mode" formControlName="bookReaderDarkMode" class="form-check-input" [value]="true" aria-labelledby="dark-mode-label">
+ <label class="form-check-label" for="dark-mode">Dark Mode</label>
</div>
</div>
</div>
- <div class="form-group col-md-6 col-sm-12">
- <label id="taptopaginate-label">Tap to Paginate</label>&nbsp;<i class="fa fa-info-circle" aria-hidden="true" placement="right" [ngbTooltip]="tapToPaginateOptionTooltip" role="button" tabindex="0"></i>
+ <div class="form-group col-md-6 col-sm-12 pe-2 mb-3">
+ <label id="taptopaginate-label" class="form-label"></label>
+ <div class="mb-3">
+ <div class="form-check form-switch">
+ <input type="checkbox" id="taptopaginate" formControlName="bookReaderTapToPaginate" class="form-check-input" [value]="true" aria-labelledby="taptopaginate-label">
+ <label id="taptopaginate" class="form-check-label">Tap to Paginate</label>&nbsp;<i class="fa fa-info-circle" aria-hidden="true" placement="right" [ngbTooltip]="tapToPaginateOptionTooltip" role="button" tabindex="0"></i>
<ng-template #tapToPaginateOptionTooltip>Should the sides of the book reader screen allow tapping on it to move to prev/next page</ng-template>
- <span class="sr-only" id="settings-taptopaginate-option-help">Should the sides of the book reader screen allow tapping on it to move to prev/next page</span>
- <div class="form-group">
- <div class="custom-control custom-radio custom-control-inline">
- <input type="radio" id="taptopaginate" formControlName="bookReaderTapToPaginate" class="custom-control-input" [value]="true" aria-labelledby="taptopaginate-label">
- <label class="custom-control-label" for="taptopaginate">True</label>
- </div>
- <div class="custom-control custom-radio custom-control-inline">
- <input type="radio" id="not-taptopaginate" formControlName="bookReaderTapToPaginate" class="custom-control-input" [value]="false" aria-labelledby="taptopaginate-label">
- <label class="custom-control-label" for="not-taptopaginate">False</label>
+ <span class="visually-hidden" id="settings-taptopaginate-option-help">Should the sides of the book reader screen allow tapping on it to move to prev/next page</span>
</div>
</div>
</div>
</div>
- <div class="row no-gutters">
- <div class="form-group col-md-6 col-sm-12 pr-2">
- <label for="settings-book-reading-direction">Book Reading Direction</label>&nbsp;<i class="fa fa-info-circle" aria-hidden="true" placement="right" [ngbTooltip]="bookReadingDirectionTooltip" role="button" tabindex="0"></i>
+ <div class="row g-0">
+ <div class="form-group col-md-6 col-sm-12 pe-2 mb-3">
+ <label for="settings-book-reading-direction" class="form-label">Book Reading Direction</label>&nbsp;<i class="fa fa-info-circle" aria-hidden="true" placement="right" [ngbTooltip]="bookReadingDirectionTooltip" role="button" tabindex="0"></i>
<ng-template #bookReadingDirectionTooltip>Direction to click to move to next page. Right to Left means you click on left side of screen to move to next page.</ng-template>
- <span class="sr-only" id="settings-reading-direction-help">Direction to click to move to next page. Right to Left means you click on left side of screen to move to next page.</span>
- <select class="form-control" aria-describedby="settings-reading-direction-help" formControlName="bookReaderReadingDirection">
+ <span class="visually-hidden" id="settings-reading-direction-help">Direction to click to move to next page. Right to Left means you click on left side of screen to move to next page.</span>
+ <select class="form-select" aria-describedby="settings-reading-direction-help" formControlName="bookReaderReadingDirection">
<option *ngFor="let opt of readingDirections" [value]="opt.value">{{opt.text | titlecase}}</option>
</select>
</div>
- <div class="form-group col-md-6 col-sm-12">
- <label for="settings-fontfamily-option">Font Family</label>&nbsp;<i class="fa fa-info-circle" aria-hidden="true" placement="right" [ngbTooltip]="fontFamilyOptionTooltip" role="button" tabindex="0"></i>
+ <div class="form-group col-md-6 col-sm-12 pe-2 mb-3">
+ <label for="settings-fontfamily-option" class="form-label">Font Family</label>&nbsp;<i class="fa fa-info-circle" aria-hidden="true" placement="right" [ngbTooltip]="fontFamilyOptionTooltip" role="button" tabindex="0"></i>
<ng-template #fontFamilyOptionTooltip>Font familty to load up. Default will load the book's default font</ng-template>
- <span class="sr-only" id="settings-fontfamily-option-help">Font familty to load up. Default will load the book's default font</span>
- <select class="form-control" aria-describedby="settings-fontfamily-option-help" formControlName="bookReaderFontFamily">
+ <span class="visually-hidden" id="settings-fontfamily-option-help">Font familty to load up. Default will load the book's default font</span>
+ <select class="form-select" aria-describedby="settings-fontfamily-option-help" formControlName="bookReaderFontFamily">
<option *ngFor="let opt of fontFamilies" [value]="opt">{{opt | titlecase}}</option>
</select>
</div>
@@ -159,31 +155,31 @@
- <div class="row no-gutters">
- <div class="form-group col-md-4 col-sm-12 pr-2">
- <label id="font-size">Font Size</label>
+ <div class="row g-0">
+ <div class="form-group col-md-4 col-sm-12 pe-2 mb-3">
+ <label id="font-size" class="form-label">Font Size</label>
<div class="custom-slider"><ngx-slider [options]="bookReaderFontSizeOptions" formControlName="bookReaderFontSize" aria-labelledby="font-size"></ngx-slider></div>
</div>
- <div class="form-group col-md-4 col-sm-12 pr-2">
- <label>Line Height</label>&nbsp;<i class="fa fa-info-circle" aria-hidden="true" placement="right" [ngbTooltip]="bookLineHeightOptionTooltip" role="button" tabindex="0"></i>
+ <div class="form-group col-md-4 col-sm-12 pe-2 mb-3">
+ <label class="form-label">Line Height</label>&nbsp;<i class="fa fa-info-circle" aria-hidden="true" placement="right" [ngbTooltip]="bookLineHeightOptionTooltip" role="button" tabindex="0"></i>
<ng-template #bookLineHeightOptionTooltip>How much spacing between the lines of the book</ng-template>
- <span class="sr-only" id="settings-booklineheight-option-help">How much spacing between the lines of the book</span>
+ <span class="visually-hidden" id="settings-booklineheight-option-help">How much spacing between the lines of the book</span>
<div class="custom-slider"><ngx-slider [options]="bookReaderLineSpacingOptions" formControlName="bookReaderLineSpacing" aria-describedby="settings-booklineheight-option-help"></ngx-slider></div>
</div>
- <div class="form-group col-md-4 col-sm-12">
- <label>Margin</label>&nbsp;<i class="fa fa-info-circle" aria-hidden="true" placement="right" [ngbTooltip]="bookReaderMarginOptionTooltip" role="button" tabindex="0"></i>
+ <div class="form-group col-md-4 col-sm-12 pe-2 mb-3">
+ <label class="form-label">Margin</label>&nbsp;<i class="fa fa-info-circle" aria-hidden="true" placement="right" [ngbTooltip]="bookReaderMarginOptionTooltip" role="button" tabindex="0"></i>
<ng-template #bookReaderMarginOptionTooltip>How much spacing on each side of the screen. This will override to 0 on mobile devices regardless of this setting.</ng-template>
- <span class="sr-only" id="settings-bookmargin-option-help">How much spacing on each side of the screen. This will override to 0 on mobile devices regardless of this setting.</span>
+ <span class="visually-hidden" id="settings-bookmargin-option-help">How much spacing on each side of the screen. This will override to 0 on mobile devices regardless of this setting.</span>
<div class="custom-slider"><ngx-slider [options]="bookReaderMarginOptions" formControlName="bookReaderMargin" aria-describedby="bookmargin"></ngx-slider></div>
</div>
</div>
- <div class="float-right mb-3">
- <button type="button" class="btn btn-secondary mr-2" (click)="resetForm()" aria-describedby="reading-panel">Reset</button>
- <button type="submit" class="btn btn-primary" (click)="save()" aria-describedby="reading-panel" [disabled]="!settingsForm.touched && !settingsForm.dirty">Save</button>
+ <div class="col-auto d-flex d-md-block justify-content-sm-center text-md-end mb-3">
+ <button type="button" class="flex-fill btn btn-secondary me-2" (click)="resetForm()" aria-describedby="reading-panel">Reset</button>
+ <button type="submit" class="flex-fill btn btn-primary" (click)="save()" aria-describedby="reading-panel" [disabled]="!settingsForm.touched && !settingsForm.dirty">Save</button>
</div>
</form>
</ng-template>
@@ -200,7 +196,7 @@
<div *ngFor="let error of resetPasswordErrors">{{error}}</div>
</div>
<form [formGroup]="passwordChangeForm">
- <div class="form-group">
+ <div class="mb-3">
<label for="new-password">New Password</label>
<input class="form-control" type="password" id="new-password" formControlName="password" required>
<div id="password-validations" class="invalid-feedback" *ngIf="passwordChangeForm.dirty || passwordChangeForm.touched">
@@ -209,7 +205,7 @@
</div>
</div>
</div>
- <div class="form-group">
+ <div class="mb-3">
<label for="confirm-password">Confirm Password</label>
<input class="form-control" type="password" id="confirm-password" formControlName="confirmPassword" aria-describedby="password-validations" required>
<div id="password-validations" class="invalid-feedback" *ngIf="passwordChangeForm.dirty || passwordChangeForm.touched">
@@ -221,9 +217,9 @@
</div>
</div>
</div>
- <div class="float-right mb-3">
- <button type="button" class="btn btn-secondary mr-2" aria-describedby="password-panel" (click)="resetPasswordForm()">Reset</button>
- <button type="submit" class="btn btn-primary" aria-describedby="password-panel" (click)="savePasswordForm()" [disabled]="!passwordChangeForm.valid || !(passwordChangeForm.dirty || passwordChangeForm.touched)">Save</button>
+ <div class="col-auto d-flex d-md-block justify-content-sm-center text-md-end mb-3">
+ <button type="button" class="flex-fill btn btn-secondary me-2" aria-describedby="password-panel" (click)="resetPasswordForm()">Reset</button>
+ <button type="submit" class="flex-fill btn btn-primary" aria-describedby="password-panel" (click)="savePasswordForm()" [disabled]="!passwordChangeForm.valid || !(passwordChangeForm.dirty || passwordChangeForm.touched)">Save</button>
</div>
</form>
</ng-container>
@@ -237,6 +233,9 @@
<app-api-key tooltipText="The API key is like a password. Keep it secret, Keep it safe."></app-api-key>
<app-api-key title="OPDS URL" [showRefresh]="false" [transform]="makeUrl"></app-api-key>
</ng-container>
+ <ng-container *ngIf="tab.fragment === 'theme'">
+ <app-theme-manager></app-theme-manager>
+ </ng-container>
</ng-template>
</li>
</ul>
diff --git a/UI/Web/src/app/user-settings/user-preferences/user-preferences.component.scss b/UI/Web/src/app/user-settings/user-preferences/user-preferences.component.scss
index 1bce1dcb8..e86d1bd19 100644
--- a/UI/Web/src/app/user-settings/user-preferences/user-preferences.component.scss
+++ b/UI/Web/src/app/user-settings/user-preferences/user-preferences.component.scss
@@ -1,55 +1,7 @@
-@import '../../../theme/colors';
-
.invalid-feedback {
display: inline-block !important;
}
-// Slider handle override
-::ng-deep {
- .custom-slider .ngx-slider .ngx-slider-bar {
- background: #545a52;
- height: 2px;
- }
- .custom-slider .ngx-slider .ngx-slider-selection {
- background: $primary-color;
- }
-
- .custom-slider .ngx-slider .ngx-slider-pointer {
- width: 8px;
- height: 16px;
- top: auto; /* to remove the default positioning */
- bottom: 0;
- background-color: $primary-color;
- border-top-left-radius: 3px;
- border-top-right-radius: 3px;
- }
-
- .custom-slider .ngx-slider .ngx-slider-pointer:after {
- display: none;
- }
-
- .custom-slider .ngx-slider .ngx-slider-bubble {
- bottom: 14px;
- font-weight: bold;
- }
-
- .custom-slider .ngx-slider .ngx-slider-limit {
- font-weight: bold;
- color: white !important;
-
- }
-
-
- .custom-slider .ngx-slider .ngx-slider-tick {
- width: 1px;
- height: 10px;
- margin-left: 4px;
- border-radius: 0;
- background: #ffe4d1;
- top: -1px;
- }
-
- .custom-slider .ngx-slider .ngx-slider-tick.ngx-slider-selected {
- background: $primary-color;
- }
- }
\ No newline at end of file
+.container {
+ padding-top: 10px;
+}
\ No newline at end of file
diff --git a/UI/Web/src/app/user-settings/user-preferences/user-preferences.component.ts b/UI/Web/src/app/user-settings/user-preferences/user-preferences.component.ts
index bfaa17ae8..a794452d2 100644
--- a/UI/Web/src/app/user-settings/user-preferences/user-preferences.component.ts
+++ b/UI/Web/src/app/user-settings/user-preferences/user-preferences.component.ts
@@ -11,7 +11,6 @@ import { AccountService } from 'src/app/_services/account.service';
import { NavService } from 'src/app/_services/nav.service';
import { ActivatedRoute } from '@angular/router';
import { SettingsService } from 'src/app/admin/settings.service';
-import { Member } from 'src/app/_models/member';
@Component({
selector: 'app-user-preferences',
@@ -58,6 +57,7 @@ export class UserPreferencesComponent implements OnInit, OnDestroy {
{title: 'Bookmarks', fragment: 'bookmarks'},
{title: 'Password', fragment: 'password'},
{title: '3rd Party Clients', fragment: 'clients'},
+ {title: 'Theme', fragment: 'theme'},
];
active = this.tabs[0];
opdsEnabled: boolean = false;
@@ -104,9 +104,9 @@ export class UserPreferencesComponent implements OnInit, OnDestroy {
this.settingsForm.addControl('bookReaderLineSpacing', new FormControl(user.preferences.bookReaderLineSpacing, []));
this.settingsForm.addControl('bookReaderMargin', new FormControl(user.preferences.bookReaderMargin, []));
this.settingsForm.addControl('bookReaderReadingDirection', new FormControl(user.preferences.bookReaderReadingDirection, []));
- this.settingsForm.addControl('bookReaderTapToPaginate', new FormControl(!!user.preferences.siteDarkMode, []));
+ this.settingsForm.addControl('bookReaderTapToPaginate', new FormControl(!!user.preferences.bookReaderTapToPaginate, []));
- this.settingsForm.addControl('siteDarkMode', new FormControl(!!user.preferences.siteDarkMode, []));
+ this.settingsForm.addControl('theme', new FormControl(user.preferences.theme, []));
}
});
@@ -140,7 +140,7 @@ export class UserPreferencesComponent implements OnInit, OnDestroy {
this.settingsForm.get('bookReaderMargin')?.setValue(this.user.preferences.bookReaderMargin);
this.settingsForm.get('bookReaderTapToPaginate')?.setValue(this.user.preferences.bookReaderTapToPaginate);
this.settingsForm.get('bookReaderReadingDirection')?.setValue(this.user.preferences.bookReaderReadingDirection);
- this.settingsForm.get('siteDarkMode')?.setValue(this.user.preferences.siteDarkMode);
+ this.settingsForm.get('theme')?.setValue(this.user.preferences.theme);
}
resetPasswordForm() {
@@ -165,14 +165,12 @@ export class UserPreferencesComponent implements OnInit, OnDestroy {
bookReaderMargin: modelSettings.bookReaderMargin,
bookReaderTapToPaginate: modelSettings.bookReaderTapToPaginate,
bookReaderReadingDirection: parseInt(modelSettings.bookReaderReadingDirection, 10),
- siteDarkMode: modelSettings.siteDarkMode
+ theme: modelSettings.theme
};
this.obserableHandles.push(this.accountService.updatePreferences(data).subscribe((updatedPrefs) => {
this.toastr.success('Server settings updated');
if (this.user) {
this.user.preferences = updatedPrefs;
-
- this.navService.setDarkMode(this.user.preferences.siteDarkMode);
}
this.resetForm();
}));
diff --git a/UI/Web/src/app/user-settings/user-settings.module.ts b/UI/Web/src/app/user-settings/user-settings.module.ts
index 5b837aba0..47680a55c 100644
--- a/UI/Web/src/app/user-settings/user-settings.module.ts
+++ b/UI/Web/src/app/user-settings/user-settings.module.ts
@@ -8,6 +8,7 @@ import { NgxSliderModule } from '@angular-slider/ngx-slider';
import { UserSettingsRoutingModule } from './user-settings-routing.module';
import { ApiKeyComponent } from './api-key/api-key.component';
import { SharedModule } from '../shared/shared.module';
+import { ThemeManagerComponent } from './theme-manager/theme-manager.component';
@@ -15,7 +16,8 @@ import { SharedModule } from '../shared/shared.module';
declarations: [
SeriesBookmarksComponent,
UserPreferencesComponent,
- ApiKeyComponent
+ ApiKeyComponent,
+ ThemeManagerComponent
],
imports: [
CommonModule,
diff --git a/UI/Web/src/styles.scss b/UI/Web/src/styles.scss
index bbb413401..ecfad294a 100644
--- a/UI/Web/src/styles.scss
+++ b/UI/Web/src/styles.scss
@@ -1,42 +1,47 @@
@use '../node_modules/swiper/swiper.scss' as swiper;
-@use '~bootstrap/scss/mixins/_breakpoints.scss' as breakpoints;
+
+// Import themes which define the css variables we use to customize the app
+@import './theme/themes/light';
+@import './theme/themes/dark';
+@import './theme/themes/eink';
// Import colors for overrides of bootstrap theme
-@import './theme/colors';
@import './theme/toastr';
+@import './theme/variables';
// Bootstrap must be after _colors since we define the colors there
@import '~bootstrap/scss/bootstrap';
-
-@import './theme/dark.scss';
-
-
-
+// Import all the customized theme overrides
+@import './theme/components/input';
+@import './theme/components/anchors';
+@import './theme/components/nav';
+@import './theme/components/buttons';
+@import './theme/components/toast';
+@import './theme/components/checkbox';
+@import './theme/components/tagbadge';
+@import './theme/components/list';
+@import './theme/components/navbar';
+@import './theme/components/popover';
+@import './theme/components/pagination';
+@import './theme/components/dropdown';
+@import './theme/components/accordion';
+@import './theme/components/breadcrumb';
+@import './theme/components/ratingstar';
+@import './theme/components/modal';
+@import './theme/components/card';
+@import './theme/components/slider';
+@import './theme/components/radios';
+@import './theme/components/selects';
+
+
+@import './theme/utilities/utilities';
+@import './theme/utilities/animations';
+@import './theme/utilities/global';
// Global Styles
-button:disabled, .form-control:disabled, .form-control[readonly], .disabled, :disabled {
- cursor: not-allowed;
-}
-
-label, select, .clickable {
- cursor: pointer;
-}
-
-.btn-primary {
- color: white;
-}
-
-:root {
- color-scheme: light;
-}
-
-// :root .bg-dark {
-// color-scheme: dark;
-// }
-
@font-face {
font-family: "EBGarmond";
src: url("assets/fonts/EBGarmond/EBGaramond-VariableFont_wght.ttf") format("truetype");
@@ -47,59 +52,18 @@ label, select, .clickable {
src: url("assets/fonts/Spartan/Spartan-VariableFont_wght.ttf");
}
-html, body { height: 100%; }
-body {
- margin: 0;
- font-family: "EBGaramond", "Helvetica Neue", sans-serif;
-}
-
-
-.btn-icon {
+label, select, .clickable {
cursor: pointer;
}
-.btn.btn-secondary.alt {
- background-color: #424c72;
- border-color: #444f75;
-
- &:hover {
- background-color: #3b4466;
- }
-
- &:focus {
- background-color: #343c59;
- box-shadow: 0 0 0 0.2rem rgb(68 79 117 / 50%);
- }
+html, body { height: 100%; color-scheme: var(--color-scheme); }
+body {
+ margin: 0;
+ font-family: var(--body-font-family);
+ color: var(--body-text-color);
}
-
+// Needed for fullscreen
app-root {
background-color: inherit;
}
-
-
-
-
-// Utiliities
-@include breakpoints.media-breakpoint-down(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)) {
- .phone-hidden {
- display: none;
- }
-}
-
-@include breakpoints.media-breakpoint-up(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)) {
- .not-phone-hidden {
- display: none;
- }
-}
-
-@keyframes fadein {
- from { opacity: 0; }
- to { opacity: 1; }
-}
-
-// Debug styles
-.redlines * {
- outline: 1px solid red;
- outline-offset: -1px;
-}
\ No newline at end of file
diff --git a/UI/Web/src/theme/_colors.scss b/UI/Web/src/theme/_colors.scss
deleted file mode 100644
index 72fe99248..000000000
--- a/UI/Web/src/theme/_colors.scss
+++ /dev/null
@@ -1,59 +0,0 @@
-$primary-color: #4ac694; //(74,198,148)
-$error-color: #ff4136; // #bb2929 good color for contrast rating
-
-$dark-bg-color: #343a40;
-$dark-card-color: rgba(22,27,34,0.5);
-$dark-primary-color: rgba(74, 198, 148, 0.9);
-$dark-text-color: #efefef;
-$dark-hover-color: #4ac694;
-$dark-form-background: rgba(1, 4, 9, 0.5);
-$dark-form-background-no-opacity: rgb(1, 4, 9);
-$dark-form-placeholder: #efefef;
-$dark-link-color: rgb(88, 166, 255);
-$dark-icon-color: white;
-$dark-form-border: rgba(239, 239, 239, 0.125);
-$dark-form-readonly: #434648;
-$dark-item-accent-bg: #292d32;
-
-
-$white-item-accent-bg: rgba(247, 247, 247, 1);
-
-// Default variables for light mode
-:root {
- --primary-color: #4ac694;
- --error-color: #ff4136;
- --bs-body-bg: #fff;
-}
-
-// Dark mode theme
-:root .bg-dark {
- --primary-color: #4ac694;
- --error-color: #ff4136;
- --bs-body-bg: red; // This is bootstrap v5 only
-}
-
-// E-ink theme
-:root .bg-eink {
- --primary-color: black;
- --bs-body-bg: white;
-}
-
-
-//=========================
-// Ratings
-//=========================
-$rating-filled: $primary-color;
-$rating-empty: #b0c4de;
-
-//=========================
-// Drawers
-//=========================
-// :root {
-// --drawer-background-color: #FFF;
-// }
-
-
-$theme-colors: (
- "primary": $primary-color,
- "danger": $error-color
-);
diff --git a/UI/Web/src/theme/_toastr.scss b/UI/Web/src/theme/_toastr.scss
index d268614da..d29590aa5 100644
--- a/UI/Web/src/theme/_toastr.scss
+++ b/UI/Web/src/theme/_toastr.scss
@@ -114,22 +114,22 @@
/* https://github.com/FortAwesome/Font-Awesome-Pro/blob/master/advanced-options/raw-svg/regular/info-circle.svg */
.toast-info {
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' width='512' height='512'%3E%3Cpath fill='rgb(255,255,255)' d='M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z'/%3E%3C/svg%3E");
- background-color: #2F96B4;
+ background-color: var(--toast-info-bg-color);
}
/* https://github.com/FortAwesome/Font-Awesome-Pro/blob/master/advanced-options/raw-svg/regular/times-circle.svg */
.toast-error {
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' width='512' height='512'%3E%3Cpath fill='rgb(255,255,255)' d='M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z'/%3E%3C/svg%3E");
- background-color: #BD362F;
+ background-color: var(--toast-error-bg-color);
}
/* https://github.com/FortAwesome/Font-Awesome-Pro/blob/master/advanced-options/raw-svg/regular/check.svg */
.toast-success {
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' width='512' height='512'%3E%3Cpath fill='rgb(255,255,255)' d='M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z'/%3E%3C/svg%3E");
- background-color: $primary-color; //#51A351;
+ background-color: var(--toast-success-bg-color); //#51A351;
}
/* https://github.com/FortAwesome/Font-Awesome-Pro/blob/master/advanced-options/raw-svg/regular/exclamation-triangle.svg */
.toast-warning {
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512' width='576' height='512'%3E%3Cpath fill='rgb(255,255,255)' d='M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z'/%3E%3C/svg%3E");
- background-color: #F89406;
+ background-color: var(--toast-warning-bg-color);
}
.toast-container.toast-top-center .ngx-toastr,
.toast-container.toast-bottom-center .ngx-toastr {
diff --git a/UI/Web/src/theme/_variables.scss b/UI/Web/src/theme/_variables.scss
new file mode 100644
index 000000000..f75f0574e
--- /dev/null
+++ b/UI/Web/src/theme/_variables.scss
@@ -0,0 +1,20 @@
+//Bootstrap Variables
+// NOTE: It currently isn't possible to swap out all bootstrap styles because of the scss generators. So we have some hardcoded stuff. (v5 has more css variables on the way to address this)
+
+$theme-colors: (
+ "primary": #4ac694,
+ "danger": #BD362F,
+ "secondary": #6c757d,
+ "light": #f8f9fa
+);
+
+$form-select-indicator-color:#cecece;
+
+$grid-breakpoints-xs: 0;
+$grid-breakpoints-sm: 576px;
+$grid-breakpoints-md: 768px;
+$grid-breakpoints-lg: 992px;
+$grid-breakpoints-xl: 1200px;
+
+$grid-breakpoints: (xs: $grid-breakpoints-xs, sm: $grid-breakpoints-sm, md: $grid-breakpoints-md, lg: $grid-breakpoints-lg, xl: $grid-breakpoints-xl);
+
diff --git a/UI/Web/src/theme/components/_accordion.scss b/UI/Web/src/theme/components/_accordion.scss
new file mode 100644
index 000000000..53038fcab
--- /dev/null
+++ b/UI/Web/src/theme/components/_accordion.scss
@@ -0,0 +1,24 @@
+.accordion-header {
+ font-weight: bold;
+ color: var(--accordion-header-text-color);
+}
+
+.accordion-item {
+ background-color: var(--accordion-body-bg-color); //$dark-card-color;
+ color: var(--accordion-body-text-color);
+ border-color: var(--accordion-body-border-color);
+
+ div[role="tabpanel"] {
+ background-color: var(--accordion-header-bg-color);
+ }
+}
+
+.accordion-button:not(.collapsed) {
+ color: var(--accordion-header-text-color);
+ background-color: var(--accordion-body-bg-color);
+}
+
+.accordion-button.collapsed {
+ color: var(--accordion-header-collapsed-text-color);
+ background-color: var(--accordion-header-collapsed-bg-color);
+}
diff --git a/UI/Web/src/theme/components/_anchors.scss b/UI/Web/src/theme/components/_anchors.scss
new file mode 100644
index 000000000..cc353614f
--- /dev/null
+++ b/UI/Web/src/theme/components/_anchors.scss
@@ -0,0 +1,15 @@
+// TODO: Figure this out, it causes a lot of style conflicts
+a:not(.dark-exempt) {
+ color: var(--primary-color);
+ > i {
+ color: var(--primary-color) !important;
+ }
+ }
+
+a.read-more-link {
+ font-weight: bold;
+ text-decoration: none;
+ color: var(--body-text-color);
+ cursor: pointer;
+ color: var(--body-text-color) !important;
+}
\ No newline at end of file
diff --git a/UI/Web/src/theme/components/_breadcrumb.scss b/UI/Web/src/theme/components/_breadcrumb.scss
new file mode 100644
index 000000000..14a0d6530
--- /dev/null
+++ b/UI/Web/src/theme/components/_breadcrumb.scss
@@ -0,0 +1,9 @@
+.breadcrumb {
+ background-color: var(--breadcrumb-bg-color);
+ padding: 5px 10px;
+ border-radius: 5px;
+
+ .breadcrumb-item {
+ color: var(--breadcrumb-item-text-color);
+ }
+ }
\ No newline at end of file
diff --git a/UI/Web/src/theme/components/_buttons.scss b/UI/Web/src/theme/components/_buttons.scss
new file mode 100644
index 000000000..fb0798c83
--- /dev/null
+++ b/UI/Web/src/theme/components/_buttons.scss
@@ -0,0 +1,71 @@
+// TODO: Clean this code up
+
+.btn-primary {
+ color: var(--btn-primary-text-color);
+ background-color: var(--btn-primary-bg-color);
+ border-color: var(--btn-primary-border-color);
+
+ &:hover {
+ color: var(--btn-primary-hover-text-color);
+ background-color: var(--btn-primary-hover-bg-color);
+ border-color: var(--btn-primary-hover-border-color);
+ }
+}
+
+.btn-close {
+ filter: var(--btn-icon-filter) !important;
+}
+
+.btn-primary:disabled, .btn-primary.disabled {
+ background-color: var(--btn-disabled-bg-color);
+ color: var(--btn-disabled-text-color);
+ border-color: var(--btn-disabled-border-color);
+}
+
+button:disabled, .form-control:disabled, .form-control[readonly], .disabled, :disabled {
+ cursor: not-allowed;
+
+}
+
+.btn-link {
+ color: var(--body-text-color);
+ > i {
+ color: var(--body-text-color) !important;
+ }
+
+ &:hover, &:focus {
+ color: var(--primary-color);
+ }
+}
+
+
+.btn-icon {
+ cursor: pointer;
+ color: var(--body-text-color);
+
+ &:hover, &:focus {
+ color: var(--body-text-color);
+ }
+}
+
+.btn-outline-secondary {
+ color: var(--body-text-color);
+}
+
+.btn.btn-secondary.alt {
+ background-color: var(--btn-alt-bg-color);
+ border-color: var(--btn-alt-border-color);
+
+ &:hover {
+ background-color: var(--btn-alt-hover-bg-color);
+ }
+
+ &:focus {
+ background-color: var(--btn-alt-focus-bg-color);
+ box-shadow: 0 0 0 0.2rem var(--btn-alt-focus-boxshadow-color);
+ }
+}
+
+button i.fa {
+ color: var(--btn-fa-icon-color);
+}
diff --git a/UI/Web/src/theme/components/_card.scss b/UI/Web/src/theme/components/_card.scss
new file mode 100644
index 000000000..16b246b3e
--- /dev/null
+++ b/UI/Web/src/theme/components/_card.scss
@@ -0,0 +1,14 @@
+.card {
+ background-color: var(--card-bg-color);
+ color: var(--card-text-color);
+ border-color: var(--card-border-color);
+ position: relative;
+
+ .overlay:hover {
+ background-color: var(--card-overlay-hover-bg-color);
+ }
+
+ .card-overlay {
+ background-color: var(--card-overlay-hover-bg-color);
+ }
+}
diff --git a/UI/Web/src/theme/components/_checkbox.scss b/UI/Web/src/theme/components/_checkbox.scss
new file mode 100644
index 000000000..cb4300763
--- /dev/null
+++ b/UI/Web/src/theme/components/_checkbox.scss
@@ -0,0 +1,15 @@
+.form-check-input {
+ background-color: var(--checkbox-bg-color);
+ border-color: var(--checkbox-border-color);
+ cursor: pointer;
+
+ &:checked {
+ background-color: var(--checkbox-checked-bg-color);
+ border-color: var(--checkbox-checked-bg-color);
+ }
+
+ &:focus, &:hover {
+ border-color: var(--checkbox-focus-border-color);
+ }
+}
+
diff --git a/UI/Web/src/theme/components/_dropdown.scss b/UI/Web/src/theme/components/_dropdown.scss
new file mode 100644
index 000000000..0cebe377b
--- /dev/null
+++ b/UI/Web/src/theme/components/_dropdown.scss
@@ -0,0 +1,15 @@
+// Dropdown is the nav bar user profile component
+.dropdown-menu {
+ background-color: var(--dropdown-item-bg-color);
+
+ .dropdown-item {
+ color: var(--dropdown-item-text-color);
+ background-color: var(--dropdown-item-bg-color);
+ cursor: pointer;
+
+ &:hover, &:focus {
+ color: var(--dropdown-item-hover-text-color);
+ background-color: var(--dropdown-item-hover-bg-color);
+ }
+ }
+}
\ No newline at end of file
diff --git a/UI/Web/src/theme/components/_input.scss b/UI/Web/src/theme/components/_input.scss
new file mode 100644
index 000000000..72a27c8c0
--- /dev/null
+++ b/UI/Web/src/theme/components/_input.scss
@@ -0,0 +1,24 @@
+input, .form-control {
+ background-color: var(--input-bg-color);
+ color: var(--input-text-color);
+ border-color: var(--input-border-color);
+
+ &:focus {
+ border-color: var(--input-focused-border-color);
+ background-color: var(--input-bg-color);
+ color: var(--input-text-color);
+ }
+
+ &:read-only {
+ background-color: var(--input-bg-readonly-color);
+ cursor: initial;
+ }
+
+ &:disabled {
+ cursor: not-allowed;
+ pointer-events: none;
+ }
+ &::placeholder {
+ color: var(--input-placeholder-color);
+ }
+}
diff --git a/UI/Web/src/theme/components/_list.scss b/UI/Web/src/theme/components/_list.scss
new file mode 100644
index 000000000..81875258c
--- /dev/null
+++ b/UI/Web/src/theme/components/_list.scss
@@ -0,0 +1,20 @@
+.list-group-item {
+ color: var(--list-group-item-text-color);
+ background-color: var(--list-group-item-bg-color);
+ border-color: var(--list-group-item-border-color);
+
+ // TODO: We need a css class where we can exclude hover effects, like when list is just used for layout purposes
+ &:hover {
+ color: var(--list-group-hover-text-color);
+ background-color: var(--list-group-hover-bg-color);
+ }
+
+ &.active {
+ color: var(--list-group-hover-text-color);
+ background-color: var(--list-group-hover-bg-color);
+ }
+
+ &.no-hover:hover {
+ background-color: var(--list-group-item-bg-color);
+ }
+}
diff --git a/UI/Web/src/theme/components/_modal.scss b/UI/Web/src/theme/components/_modal.scss
new file mode 100644
index 000000000..196704d65
--- /dev/null
+++ b/UI/Web/src/theme/components/_modal.scss
@@ -0,0 +1,4 @@
+.modal-content {
+ color: var(--body-text-color);
+ background-color: var(--bs-body-bg);
+}
\ No newline at end of file
diff --git a/UI/Web/src/theme/components/_nav.scss b/UI/Web/src/theme/components/_nav.scss
new file mode 100644
index 000000000..40e5f72c4
--- /dev/null
+++ b/UI/Web/src/theme/components/_nav.scss
@@ -0,0 +1,45 @@
+.nav-link {
+ color: var(--nav-link-text-color);
+
+ &:hover, &:focus {
+ color: var(--nav-link-hover-text-color);
+ }
+
+ &.active {
+ color: var(--nav-link-active-text-color);
+ background-color: var(--nav-link-bg-color);
+ }
+}
+
+.nav-pills .nav-link.active {
+ color: var(--nav-link-active-text-color);
+ background-color: var(--nav-link-bg-color);
+}
+
+.nav-tabs {
+ border-color: var(--nav-tab-border-color);
+
+ .nav-link {
+ color: var(--nav-link-text-color);
+
+ &.active, &:focus {
+ color: var(--nav-tab-active-text-color);
+ background-color: var(--nav-tab-bg-color);
+ border-top-color: var(--nav-tab-border-top);
+ border-left-color: var(--nav-tab-border-left);
+ border-bottom-color: var(--nav-tab-border-bottom);
+ border-right-color: var(--nav-tab-border-right);
+ }
+
+ &:hover {
+ color: var(--nav-tab-hover-text-color);
+ background-color: var(--nav-tab-hover-bg-color);
+ border-top-color: var(--nav-tab-hover-border-top);
+ border-left-color: var(--nav-tab-hover-border-left);
+ border-bottom-color: var(--nav-tab-border-hover-bottom);
+ border-right-color: var(--nav-tab-border-hover-right);
+ border-color: var(--nav-tab-border-hover-color);
+ }
+ }
+
+}
diff --git a/UI/Web/src/theme/components/_navbar.scss b/UI/Web/src/theme/components/_navbar.scss
new file mode 100644
index 000000000..a292d10a6
--- /dev/null
+++ b/UI/Web/src/theme/components/_navbar.scss
@@ -0,0 +1,9 @@
+.navbar {
+ background-color: var(--navbar-bg-color);
+ color: var(--navbar-text-color);
+}
+
+
+i.fa.nav {
+ color: var(--navbar-fa-icon-color);
+}
\ No newline at end of file
diff --git a/UI/Web/src/theme/components/_pagination.scss b/UI/Web/src/theme/components/_pagination.scss
new file mode 100644
index 000000000..f3285d340
--- /dev/null
+++ b/UI/Web/src/theme/components/_pagination.scss
@@ -0,0 +1,21 @@
+.page-item {
+ &.active .page-link {
+ background-color: var(--pagination-active-link-bg-color);
+ color: var(--pagination-active-link-text-color);
+ border-color: var(--pagination-active-link-border-color);
+ }
+
+ > .page-link {
+ background-color: var(--pagination-link-bg-color);
+ border-color: var(--pagination-link-border-color);
+ }
+
+ &:focus {
+ border-color: var(--pagination-focus-border-color);
+ }
+
+ &.disabled .page-link {
+ background-color: var(--pagination-link-disabled-bg-color);
+ border-color: var(--pagination-link-border-color);
+ }
+}
diff --git a/UI/Web/src/theme/components/_popover.scss b/UI/Web/src/theme/components/_popover.scss
new file mode 100644
index 000000000..0eee91ec6
--- /dev/null
+++ b/UI/Web/src/theme/components/_popover.scss
@@ -0,0 +1,5 @@
+
+.popover-body {
+ background-color: var(--popover-body-bg-color);
+ color: var(--popover-body-text-color)
+}
\ No newline at end of file
diff --git a/UI/Web/src/theme/components/_radios.scss b/UI/Web/src/theme/components/_radios.scss
new file mode 100644
index 000000000..70ce5681a
--- /dev/null
+++ b/UI/Web/src/theme/components/_radios.scss
@@ -0,0 +1,7 @@
+input[type='radio'] {
+ accent-color: var(--radio-accent-color);
+
+ &:hover {
+ accent-color: var(--radio-hover-accent-color);
+ }
+}
diff --git a/UI/Web/src/theme/components/_ratingstar.scss b/UI/Web/src/theme/components/_ratingstar.scss
new file mode 100644
index 000000000..928eb848e
--- /dev/null
+++ b/UI/Web/src/theme/components/_ratingstar.scss
@@ -0,0 +1,11 @@
+.rating-star {
+ color: var(--ratingstar-color);
+}
+
+.star {
+ font-size: 1.5rem;
+ color: var(--ratingstar-star-empty);
+}
+.filled {
+ color: var(--ratingstar-star-filled);
+}
\ No newline at end of file
diff --git a/UI/Web/src/theme/components/_selects.scss b/UI/Web/src/theme/components/_selects.scss
new file mode 100644
index 000000000..74ad02e33
--- /dev/null
+++ b/UI/Web/src/theme/components/_selects.scss
@@ -0,0 +1,24 @@
+.form-select {
+ background-color: var(--input-bg-color);
+ color: var(--input-text-color);
+ border-color: var(--input-border-color);
+
+ &:focus {
+ border-color: var(--input-focused-border-color);
+ background-color: var(--input-bg-color);
+ color: var(--input-text-color);
+ }
+
+ &:read-only {
+ background-color: var(--input-bg-readonly-color);
+ cursor: initial;
+ }
+
+ &:disabled {
+ cursor: not-allowed;
+ pointer-events: none;
+ }
+ &::placeholder {
+ color: var(--input-placeholder-color);
+ }
+}
diff --git a/UI/Web/src/theme/components/_slider.scss b/UI/Web/src/theme/components/_slider.scss
new file mode 100644
index 000000000..2ddd73035
--- /dev/null
+++ b/UI/Web/src/theme/components/_slider.scss
@@ -0,0 +1,51 @@
+.ngx-slider .ngx-slider-bubble {
+ color: var(--slider-text-color) !important;
+}
+
+// This is going to be removed soon
+.custom-slider .ngx-slider .ngx-slider-bar {
+ background: #545a52;
+ height: 2px;
+ }
+ .custom-slider .ngx-slider .ngx-slider-selection {
+ background: var(--primary-color);
+ }
+
+ .custom-slider .ngx-slider .ngx-slider-pointer {
+ width: 8px;
+ height: 16px;
+ top: auto; /* to remove the default positioning */
+ bottom: 0;
+ background-color: var(--primary-color);
+ border-top-left-radius: 3px;
+ border-top-right-radius: 3px;
+ }
+
+ .custom-slider .ngx-slider .ngx-slider-pointer:after {
+ display: none;
+ }
+
+ .custom-slider .ngx-slider .ngx-slider-bubble {
+ bottom: 14px;
+ font-weight: bold;
+ }
+
+ .custom-slider .ngx-slider .ngx-slider-limit {
+ font-weight: bold;
+ color: white !important;
+
+ }
+
+
+ .custom-slider .ngx-slider .ngx-slider-tick {
+ width: 1px;
+ height: 10px;
+ margin-left: 4px;
+ border-radius: 0;
+ background: #ffe4d1;
+ top: -1px;
+ }
+
+ .custom-slider .ngx-slider .ngx-slider-tick.ngx-slider-selected {
+ background: var(--primary-color);
+ }
diff --git a/UI/Web/src/theme/components/_tagbadge.scss b/UI/Web/src/theme/components/_tagbadge.scss
new file mode 100644
index 000000000..a4fd296fe
--- /dev/null
+++ b/UI/Web/src/theme/components/_tagbadge.scss
@@ -0,0 +1,5 @@
+.tagbadge {
+ border-color: var(--tagbadge-border-color);
+ color: var(--tagbadge-text-color);
+ background-color: var(--tagbadge-bg-color);
+}
\ No newline at end of file
diff --git a/UI/Web/src/theme/components/_toast.scss b/UI/Web/src/theme/components/_toast.scss
new file mode 100644
index 000000000..0ba7dc4d2
--- /dev/null
+++ b/UI/Web/src/theme/components/_toast.scss
@@ -0,0 +1,15 @@
+.bg-dark .toast-success {
+ background-color: var(--toast-success-bg-color);
+}
+
+.bg-dark .toast-error {
+ background-color: var(--toast-error-bg-color);
+}
+
+.bg-dark .toast-info {
+ background-color: var(--toast-info-bg-color);
+}
+
+.bg-dark .toast-warning {
+ background-color: var(--toast-warning-bg-color);
+}
\ No newline at end of file
diff --git a/UI/Web/src/theme/dark.scss b/UI/Web/src/theme/dark.scss
deleted file mode 100644
index aadca48e3..000000000
--- a/UI/Web/src/theme/dark.scss
+++ /dev/null
@@ -1,226 +0,0 @@
-// All dark style overrides should live here
-
-@use "./colors";
-
-// :root {
-// --bs-body-color: #212529;
-// }
-
-.bg-dark {
- color: $dark-text-color;
-
- h2, h4 {
- color: $dark-text-color;
- }
-
- a:not(.dark-exempt), .btn-link {
- color: $dark-hover-color;
- > i {
- color: $dark-hover-color !important;
- }
- }
-
- hr {
- background-color: colors.$dark-form-border;
- }
-
- a.btn {
- color: white;
- }
-
- .accordion-header {
- font-weight: bold;
- color: $dark-primary-color;
- }
-
-
-
-
- .accent {
- background-color: $dark-form-background !important;
- color: lightgray !important;
- box-shadow: inset 0px 0px 8px 1px $dark-form-background !important;
- }
-
- .text-muted {
- color: #d7d7d7 !important;
- }
-
- .breadcrumb {
- background-color: $dark-item-accent-bg;
-
- .breadcrumb-item {
- color: $dark-text-color;
- }
- }
-
- .btn-information, .btn-outline-secondary, pre {
- color: $dark-text-color;
- }
-
- .rating-star, .close, i.fa {
- color: $dark-icon-color;
- }
-
- .modal-content {
- color: $dark-text-color;
- background-color: $dark-bg-color;
- }
-
- input:not(read-only), textarea, .autocomplete-container .input-container input, .form-control, .typeahead-input {
- color: $dark-text-color;
- background-color: $dark-bg-color;
- }
-
- input:read-only, input:disabled {
- background-color: $dark-form-readonly;
- }
-
- input::placeholder {
- color: $dark-form-placeholder;
- }
-
- .autocomplete-container .input-container .x {
- color: $dark-text-color;
- }
- .autocomplete-container .not-found {
- color: $dark-text-color;
- background-color: $dark-bg-color;
- }
-
- .autocomplete-container .input-container .x i {
- color: $dark-icon-color;
- }
- .autocomplete-container .suggestions-container, .dropdown-menu, .list-group-item {
- color: $dark-text-color;
- background-color: $dark-bg-color;
- border-color: $dark-form-border;
- }
-
- .dark-menu {
- background-color: $dark-form-background-no-opacity;
- border-color: $dark-form-background;
- }
-
- .dark-menu-item {
- color: $dark-text-color;
- background-color: $dark-form-background-no-opacity;
- border-color: $dark-form-background;
- }
-
- .dropdown .list-group-item:hover {
- background-color: $dark-hover-color;
- }
-
- .ngx-slider .ngx-slider-bubble {
- color: $dark-text-color !important;
- }
-
- .page-link {
- background-color: $dark-form-background;
- border-color: $dark-form-border;
- }
-
- .page-item.disabled .page-link {
- background-color: $dark-form-background;
- border-color: $dark-form-border;
- }
-
- .nav-tabs, .tagbadge {
- border-color: $dark-form-border;
- }
-
- .nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link, .tagbadge {
- border-color: $dark-form-border;
- color: $dark-text-color;
- background-color: $dark-primary-color;
- }
- .nav-tabs .nav-link:hover, .nav-tabs .nav-link:focus {
- border-color: $dark-hover-color;
- }
-
-
- .dropdown-menu {
- background-color: #171719;
- .dropdown-item:hover, .dropdown-item:focus {
- color: $dark-text-color;
- background-color: $dark-hover-color;
- }
- .dropdown-item {
- color: $dark-text-color;
- }
- }
-
- .read-more-link {
- color: $dark-text-color !important;
- }
-
- .login {
-
- &::before {
- content: "";
- background-image: url('../assets/images/login-bg.jpg');
- background-size: cover;
- position: absolute;
- top: 0;
- right: 0;
- bottom: 0;
- opacity: 0.05;
- width: 100%;
- }
-
- .card {
- background-color: $dark-primary-color !important;
- }
-
- input {
- color: #000;
- }
- }
- .card {
- background-color: $dark-card-color;
- color: $dark-text-color;
- border-color: $dark-form-border;
-
- div[role="tabpanel"] {
- background-color: rgba(52, 60, 70, 0.5); // This is a good accent color
- }
- }
-
- .section-title {
- color: $dark-text-color;
- }
-
- .error-banner, .dropdown-toggle {
- color: #efefef;
- }
-
- .nav-events, .nav-events .popover-body {
- background-color: $dark-form-background-no-opacity;
- }
-
- .bs-popover-bottom > .arrow::after, .bs-popover-bottom > .arrow::before {
- border-bottom-color: transparent;
- }
-
-}
-
-
-/*
-// Dark mode Toastr Styles
-*/
-.bg-dark .toast-success {
- background-color: $dark-primary-color
-}
-
-.bg-dark .toast-error {
- background-color: #BD362F;
-}
-
-.bg-dark .toast-info {
- background-color: #2F96B4;
-}
-
-.bg-dark .toast-warning {
- background-color: #F89406;
-}
\ No newline at end of file
diff --git a/UI/Web/src/theme/themes/dark.scss b/UI/Web/src/theme/themes/dark.scss
new file mode 100644
index 000000000..0ac0bb5c5
--- /dev/null
+++ b/UI/Web/src/theme/themes/dark.scss
@@ -0,0 +1,169 @@
+:root .bg-dark {
+ --color-scheme: dark;
+ --primary-color: #4ac694;
+ --primary-color-dark-shade: #3B9E76;
+ --primary-color-darker-shade: #338A67;
+ --primary-color-darkest-shade: #25624A;
+ --error-color: #BD362F;
+ --bs-body-bg: #343a40;
+ --body-text-color: #efefef;
+ --btn-icon-filter: invert(1) grayscale(100%) brightness(200%);
+
+ /* Navbar */
+ --navbar-bg-color: black;
+ --navbar-text-color: white;
+ --navbar-fa-icon-color: white;
+ --navbar-btn-hover-outline-color: rgba(255, 255, 255, 1);
+
+ /* Inputs */
+ --input-bg-color: #343a40;
+ --input-bg-readonly-color: #434648;
+ --input-focused-border-color: #ccc;
+ --input-text-color: #fff;
+ --input-placeholder-color: #aeaeae;
+ --input-border-color: #ccc;
+
+ /* Buttons */
+ --btn-primary-text-color: white;
+ --btn-primary-bg-color: var(--primary-color-darker-shade);
+ --btn-primary-border-color: var(--primary-color-darker-shade);
+ --btn-primary-hover-text-color: white;
+ --btn-primary-hover-bg-color: var(--primary-color-darkest-shade);
+ --btn-primary-hover-border-color: var(--primary-color-darkest-shade);
+ --btn-alt-bg-color: #424c72;
+ --btn-alt-border-color: #444f75;
+ --btn-alt-hover-bg-color: #3b4466;
+ --btn-alt-focus-bg-color: #343c59;
+ --btn-alt-focus-boxshadow-color: rgb(68 79 117 / 50%);
+ --btn-fa-icon-color: white;
+ --btn-disabled-bg-color: #343a40;
+ --btn-disabled-text-color: white;
+ --btn-disabled-border-color: #6c757d;
+
+ /* Nav (Tabs) */
+ --nav-tab-border-color: rgba(44, 118, 88, 0.7);
+ --nav-tab-text-color: var(--body-text-color);
+ --nav-tab-bg-color: var(--bs-body-bg);
+ --nav-tab-hover-border-color: var(--primary-color-dark-shade);
+ --nav-tab-active-text-color: white;
+ --nav-tab-border-hover-color: transparent;
+ --nav-tab-hover-text-color: var(--body-text-color);
+ --nav-tab-hover-bg-color: var(--primary-color-dark-shade);
+ --nav-tab-border-top: rgba(44, 118, 88, 0.7);
+ --nav-tab-border-left: rgba(44, 118, 88, 0.7);
+ --nav-tab-border-bottom: var(--bs-body-bg);
+ --nav-tab-border-right: rgba(44, 118, 88, 0.7);
+ --nav-tab-border-hover-top: var(--primary-color-dark-shade);
+ --nav-tab-border-hover-left: var(--primary-color-dark-shade);
+ --nav-tab-border-hover-bottom: rgba(44, 118, 88, 0.7);
+ --nav-tab-border-hover-right: var(--primary-color-dark-shade);
+
+ --nav-link-bg-color: var(--primary-color-dark-shade);
+ --nav-link-active-text-color: white;
+ --nav-link-text-color: white;
+
+
+ /* Header */
+ --nav-header-text-color: white;
+ --nav-header-bg-color: rgb(22, 27, 34);
+
+ /* Toasts */
+ --toast-success-bg-color: rgba(59, 158, 118, 0.9);
+ --toast-error-bg-color: #BD362F;
+ --toast-info-bg-color: #2F96B4;
+ --toast-warning-bg-color: #F89406;
+
+ /* Checkboxes */
+ --checkbox-checked-bg-color: var(--primary-color);
+ --checkbox-border-color: var(--input-focused-border-color);
+ --checkbox-focus-border-color: var(--primary-color);
+
+ /* Tag Badge */
+ --tagbadge-border-color: rgba(239, 239, 239, 0.125);
+ --tagbadge-text-color: var(--body-text-color);
+ --tagbadge-bg-color: var(--nav-tab-hover-bg-color);
+
+ /* List items */
+ --list-group-item-text-color: var(--body-text-color); /*rgba(74, 198, 148, 0.9)*/
+ --list-group-item-bg-color: #343a40;
+ --list-group-item-border-color: rgba(239, 239, 239, 0.125);
+ --list-group-hover-text-color: white;
+ --list-group-hover-bg-color: var(--accordion-body-bg-color);
+
+ /* Popover */
+ --popover-body-bg-color: var(--navbar-bg-color);
+ --popover-body-text-color: var(--navbar-text-color);
+
+ /* Pagination */
+ --pagination-active-link-border-color: var(--primary-color);
+ --pagination-active-link-bg-color: var(--primary-color);
+ --pagination-active-link-text-color: white;
+ --pagination-link-border-color: rgba(239, 239, 239, 0.125);
+ --pagination-link-text-color: var(--primary-color);
+ --pagination-link-bg-color: rgba(1, 4, 9, 0.5);
+ --pagination-focus-border-color: var(--primary-color);
+
+ /* Dropdown */
+ --dropdown-item-hover-text-color: white;
+ --dropdown-item-hover-bg-color: var(--primary-color-dark-shade);
+ --dropdown-item-text-color: var(--navbar-text-color);
+ --dropdown-item-bg-color: var(--navbar-bg-color);
+ --dropdown-overlay-color: rgba(0,0,0,0.5);
+
+ /* Accordion */
+ --accordion-header-text-color: rgba(74, 198, 148, 0.9);
+ --accordion-header-bg-color: rgba(52, 60, 70, 0.5); /* This is a good accent color */
+ --accordion-body-bg-color: rgba(22,27,34,0.5);
+ --accordion-body-border-color: rgba(239, 239, 239, 0.125);
+ --accordion-body-text-color: var(--body-text-color);
+ --accordion-header-collapsed-text-color: rgba(74, 198, 148, 0.9);
+ --accordion-header-collapsed-bg-color: rgba(22,27,34,0.5);
+
+ /* Breadcrumb */
+ --breadcrumb-bg-color: #292d32;
+ --breadcrumb-item-text-color: var(--body-text-color);
+
+ /* Rating star */
+ --ratingstar-color: white;
+ --ratingstar-star-empty: #b0c4de;
+ --ratingstar-star-filled: var(--primary-color);
+
+ /* Global */
+ --hr-color: rgba(239, 239, 239, 0.125);
+ --accent-bg-color: rgba(1, 4, 9, 0.5);
+ --accent-text-color: lightgrey;
+ --grid-breakpoints-xs: $grid-breakpoint-xs;
+ --grid-breakpoints-sm: $grid-breakpoint-sm;
+ --grid-breakpoints-md: $grid-breakpoint-md;
+ --grid-breakpoints-lg: $grid-breakpoint-lg;
+ --grid-breakpoints-xl: $grid-breakpoint-xl;
+ --body-font-family: "EBGaramond", "Helvetica Neue", sans-serif;
+ --brand-font-family: "Spartan", sans-serif;
+
+ /* Card */
+ --card-bg-color: rgba(22,27,34,0.5);
+ --card-text-color: var(--body-text-color);
+ --card-border-color: rgba(239, 239, 239, 0.125);
+ --card-progress-bar-color: var(--primary-color);
+ --card-overlay-hover-bg-color: rgba(0, 0, 0, 0.2);
+
+ /* Slider */
+ --slider-text-color: white;
+
+ /* Manga Reader */
+ --manga-reader-overlay-filter: blur(10px);
+ --manga-reader-overlay-bg-color: rgba(0,0,0,0.5);
+ --manga-reader-overlay-text-color: white;
+ --manga-reader-bg-color: black;
+ --manga-reader-next-highlight-bg-color: rgba(65, 225, 100, 0.5);
+ --manga-reader-prev-highlight-bg-color: rgba(65, 105, 225, 0.5);
+
+ /* Radios */
+ --radio-accent-color: var(--primary-color);
+ --radio-hover-accent-color: var(--primary-color-dark-shade);
+
+ /* Carousel */
+ --carousel-header-text-color: var(--body-text-color);
+ --carousel-header-text-decoration: none;
+ --carousel-hover-header-text-decoration: underline;
+ }
diff --git a/UI/Web/src/theme/themes/eink.scss b/UI/Web/src/theme/themes/eink.scss
new file mode 100644
index 000000000..63ab2ddf7
--- /dev/null
+++ b/UI/Web/src/theme/themes/eink.scss
@@ -0,0 +1,114 @@
+:root .bg-eink {
+ --color-scheme: light;
+ --primary-color: black;
+ --primary-color-dark-shade: #3B9E76;
+ --error-color: #ff4136;
+ --bs-body-bg: #fff;
+ --body-text-color: black;
+ --btn-icon-filter: invert(1) grayscale(100%) brightness(200%);
+
+
+ /* Navbar */
+ --navbar-bg-color: black;
+ --navbar-text-color: white;
+ --navbar-fa-icon-color: white;
+ --navbar-btn-hover-outline-color: rgba(255, 255, 255, 1);
+
+ /* Inputs */
+ --input-bg-color: #fff;
+ --input-focused-border-color: #ccc;
+ --input-bg-readonly-color: unset;
+ --input-placeholder-color: #aeaeae;
+ --input-border-color: #ccc;
+
+ /* Buttons */
+ --btn-primary-text-color: white;
+ --btn-alt-bg-color: #424c72;
+ --btn-alt-border-color: #444f75;
+ --btn-alt-hover-bg-color: #3b4466;
+ --btn-alt-focus-bg-color: #343c59;
+ --btn-alt-focus-boxshadow-color: rgb(68 79 117 / 50%);
+
+ /* Nav */
+ --nav-link-active-text-color: white;
+ --nav-link-bg-color: black;
+ --nav-link-text-color: black;
+ --nav-link-hover-text-color: var(--primary-color);
+ --nav-tab-border-hover-color: transparent;
+ --nav-tab-active-text-color: white;
+ --nav-tab-text-color: var(--body-text-color);
+ --nav-tab-bg-color: black;
+ --nav-tab-hover-border-color: black;
+
+ /* Checkboxes */
+ --checkbox-checked-bg-color: var(--primary-color);
+ --checkbox-bg-color: white;
+ --checkbox-border-color: var(--primary-color);
+ --checkbox-focus-border-color: var(--input-border-color);
+
+ /* Tagbadge */
+ --tagbadge-bg-color: #c9c9c9;
+
+ /* Toasts */
+ --toast-success-bg-color: rgba(74, 198, 148, 0.9);
+ --toast-error-bg-color: #BD362F;
+ --toast-info-bg-color: #2F96B4;
+ --toast-warning-bg-color: #F89406;
+
+ /* Rating star */
+ --ratingstar-star-empty: #b0c4de;
+ --ratingstar-star-filled: var(--primary-color);
+
+ /* Global */
+ --accent-bg-color: rgba(206, 206, 206, 0.5);
+ --accent-text-color: black;
+ --hr-color: rgba(239, 239, 239, 0.125);
+ --grid-breakpoints-xs: $grid-breakpoint-xs;
+ --grid-breakpoints-sm: $grid-breakpoint-sm;
+ --grid-breakpoints-md: $grid-breakpoint-md;
+ --grid-breakpoints-lg: $grid-breakpoint-lg;
+ --grid-breakpoints-xl: $grid-breakpoint-xl;
+ --body-font-family: "EBGaramond", "Helvetica Neue", sans-serif;
+ --brand-font-family: "Spartan", sans-serif;
+
+ /* Breadcrumb */
+ --breadcrumb-bg-color: #eaeaea;
+ --breadcrumb-item-text-color: var(--body-text-color);
+
+ /* Card */
+ --card-text-color: #000;
+ --card-border-color: #ccc;
+ --card-progress-bar-color: var(--primary-color);
+ --card-overlay-hover-bg-color: rgba(0, 0, 0, 0.2);
+
+ /* List items */
+ --list-group-item-text-color: var(--body-text-color);
+ --list-group-item-bg-color: white;
+ --list-group-hover-text-color: black;
+ --list-group-hover-bg-color: #eaeaea;
+ --list-group-item-border-color: rgba(239, 239, 239, 0.125);
+
+ /* Dropdown */
+ --dropdown-item-hover-text-color: white;
+ --dropdown-item-hover-bg-color: var(--primary-color);
+ --dropdown-overlay-color: rgba(0,0,0,0.5);
+
+ /* Manga Reader */
+ --manga-reader-overlay-filter: none;
+ --manga-reader-overlay-bg-color: rgba(0,0,0,0.5);
+ --manga-reader-overlay-text-color: white;
+ --manga-reader-bg-color: black;
+ --manga-reader-next-highlight-bg-color: transparent;
+ --manga-reader-prev-highlight-bg-color: transparent;
+
+ /* Radios */
+ --radio-accent-color: var(--primary-color);
+ --radio-hover-accent-color: var(--primary-color-dark-shade);
+
+ /* Carousel */
+ --carousel-header-text-color: black;
+ --carousel-header-text-decoration: none;
+ --carousel-hover-header-text-decoration: underline;
+
+
+}
\ No newline at end of file
diff --git a/UI/Web/src/theme/themes/light.scss b/UI/Web/src/theme/themes/light.scss
new file mode 100644
index 000000000..3177a57f9
--- /dev/null
+++ b/UI/Web/src/theme/themes/light.scss
@@ -0,0 +1,112 @@
+/* Theme for the light mode of Kavita */
+:root {
+ --color-scheme: light;
+ --primary-color: #4ac694;
+ --primary-color-dark-shade: #3B9E76;
+ --error-color: #ff4136;
+ --bs-body-bg: #fff;
+ --body-text-color: #333;
+ --btn-icon-filter: invert(1) grayscale(100%) brightness(200%);
+
+ /* Navbar */
+ --navbar-bg-color: black;
+ --navbar-text-color: white;
+ --navbar-fa-icon-color: white;
+ --navbar-btn-hover-outline-color: rgba(255, 255, 255, 1);
+
+ /* Inputs */
+ --input-bg-color: #fff;
+ --input-focused-border-color: #ccc;
+ --input-bg-readonly-color: unset;
+ --input-placeholder-color: #aeaeae;
+ --input-border-color: #ccc;
+
+ /* Buttons */
+ --btn-primary-text-color: white;
+ --btn-alt-bg-color: #424c72;
+ --btn-alt-border-color: #444f75;
+ --btn-alt-hover-bg-color: #3b4466;
+ --btn-alt-focus-bg-color: #343c59;
+ --btn-alt-focus-boxshadow-color: rgb(68 79 117 / 50%);
+
+ /* Nav */
+ --nav-link-active-text-color: white;
+ --nav-link-bg-color: rgba(74, 198, 148, 0.9);
+ --nav-tab-active-text-color: white;
+ --nav-tab-text-color: var(--body-text-color);
+ --nav-tab-bg-color: rgba(74, 198, 148, 0.9);
+ --nav-tab-hover-border-color: #4ac694;
+ --nav-link-text-color: black;
+ --nav-link-hover-text-color: var(--primary-color);
+ --nav-tab-border-hover-color: transparent;
+
+ /* Checkboxes */
+ --checkbox-checked-bg-color: var(--primary-color);
+ --checkbox-bg-color: white;
+ --checkbox-border-color: var(--primary-color);
+ --checkbox-focus-border-color: var(--input-border-color);
+
+ /* Tagbadge */
+ --tagbadge-bg-color: #c9c9c9;
+
+ /* Toasts */
+ --toast-success-bg-color: rgba(74, 198, 148, 0.9);
+ --toast-error-bg-color: #BD362F;
+ --toast-info-bg-color: #2F96B4;
+ --toast-warning-bg-color: #F89406;
+
+ /* Rating star */
+ --ratingstar-star-empty: #b0c4de;
+ --ratingstar-star-filled: var(--primary-color);
+
+ /* Global */
+ --accent-bg-color: rgba(206, 206, 206, 0.5);
+ --accent-text-color: black;
+ --hr-color: rgba(239, 239, 239, 0.125);
+ --grid-breakpoints-xs: $grid-breakpoint-xs;
+ --grid-breakpoints-sm: $grid-breakpoint-sm;
+ --grid-breakpoints-md: $grid-breakpoint-md;
+ --grid-breakpoints-lg: $grid-breakpoint-lg;
+ --grid-breakpoints-xl: $grid-breakpoint-xl;
+ --body-font-family: "EBGaramond", "Helvetica Neue", sans-serif;
+ --brand-font-family: "Spartan", sans-serif;
+
+ /* Breadcrumb */
+ --breadcrumb-bg-color: #eaeaea;
+ --breadcrumb-item-text-color: var(--body-text-color);
+
+ /* Card */
+ --card-text-color: #000;
+ --card-border-color: #ccc;
+ --card-progress-bar-color: var(--primary-color);
+ --card-overlay-hover-bg-color: rgba(0, 0, 0, 0.2);
+
+ /* List items */
+ --list-group-item-text-color: var(--body-text-color);
+ --list-group-item-bg-color: white;
+ --list-group-hover-text-color: inherit;
+ --list-group-hover-bg-color: #eaeaea;
+ --list-group-item-border-color: rgba(239, 239, 239, 0.125);
+
+ /* Dropdown */
+ --dropdown-item-hover-text-color: white;
+ --dropdown-item-hover-bg-color: var(--primary-color);
+ --dropdown-overlay-color: rgba(0,0,0,0.5);
+
+ /* Manga Reader */
+ --manga-reader-overlay-filter: blur(10px);
+ --manga-reader-overlay-bg-color: rgba(0,0,0,0.5);
+ --manga-reader-overlay-text-color: white;
+ --manga-reader-bg-color: black;
+ --manga-reader-next-highlight-bg-color: rgba(65, 225, 100, 0.5);
+ --manga-reader-prev-highlight-bg-color: rgba(65, 105, 225, 0.5);
+
+ /* Radios */
+ --radio-accent-color: var(--primary-color);
+ --radio-hover-accent-color: var(--primary-color-dark-shade);
+
+ /* Carousel */
+ --carousel-header-text-color: black;
+ --carousel-header-text-decoration: none;
+ --carousel-hover-header-text-decoration: underline;
+ }
\ No newline at end of file
diff --git a/UI/Web/src/theme/utilities/_animations.scss b/UI/Web/src/theme/utilities/_animations.scss
new file mode 100644
index 000000000..cd4041f84
--- /dev/null
+++ b/UI/Web/src/theme/utilities/_animations.scss
@@ -0,0 +1,13 @@
+@keyframes fadein {
+ from { opacity: 0; }
+ to { opacity: 1; }
+}
+
+@keyframes MoveUpDown {
+ 0%, 100% {
+ transform: translateY(0);
+ }
+ 50% {
+ transform: translateY(-10px);
+ }
+}
\ No newline at end of file
diff --git a/UI/Web/src/theme/utilities/_global.scss b/UI/Web/src/theme/utilities/_global.scss
new file mode 100644
index 000000000..f26908e05
--- /dev/null
+++ b/UI/Web/src/theme/utilities/_global.scss
@@ -0,0 +1,15 @@
+// Global styles for the site. Keep this as small as possible
+
+hr {
+ background-color: var(--hr-color);
+}
+
+.accent {
+ background-color: var(--accent-bg-color) !important;
+ color: var(--accent-text-color) !important;
+ box-shadow: inset 0px 0px 8px 1px var(--accent-bg-color) !important;
+}
+
+.text-muted {
+ color: #d7d7d7 !important;
+}
diff --git a/UI/Web/src/theme/utilities/_utilities.scss b/UI/Web/src/theme/utilities/_utilities.scss
new file mode 100644
index 000000000..32bc0b195
--- /dev/null
+++ b/UI/Web/src/theme/utilities/_utilities.scss
@@ -0,0 +1,16 @@
+@media(max-width: $grid-breakpoints-xs) {
+ .phone-hidden {
+ display: none;
+ }
+}
+
+@media(min-width: $grid-breakpoints-sm) {
+ .not-phone-hidden {
+ display: none;
+ }
+}
+
+.redlines * {
+ outline: 1px solid red;
+ outline-offset: -1px;
+}
\ No newline at end of file