Custom keybinds, Default language per Library, and bugfixes (#4162)

Co-authored-by: Joseph Milazzo <josephmajora@gmail.com>
This commit is contained in:
Fesaa
2025-11-01 15:56:00 +01:00
committed by GitHub
parent f9280f6861
commit 2c6eddfebb
72 changed files with 6038 additions and 441 deletions
+9
View File
@@ -155,6 +155,9 @@ public sealed class DataContext : IdentityDbContext<AppUser, AppRole, int,
builder.Entity<Library>()
.Property(b => b.EnableMetadata)
.HasDefaultValue(true);
builder.Entity<Library>()
.Property(l => l.DefaultLanguage)
.HasDefaultValue(string.Empty);
builder.Entity<Chapter>()
.Property(b => b.WebLinks)
@@ -293,6 +296,12 @@ public sealed class DataContext : IdentityDbContext<AppUser, AppRole, int,
.HasColumnType("TEXT")
.HasDefaultValue(new List<HighlightSlot>());
builder.Entity<AppUserPreferences>()
.Property(p => p.CustomKeyBinds)
.HasJsonConversion([])
.HasColumnType("TEXT")
.HasDefaultValue(new Dictionary<KeyBindTarget, IList<KeyBind>>());
builder.Entity<AppUser>()
.Property(user => user.IdentityProvider)
.HasDefaultValue(IdentityProvider.Kavita);