UI centered font management

This commit is contained in:
Fesaa 2024-07-09 15:57:47 +02:00
parent 1f2ea8f59d
commit a956bb18ec
No known key found for this signature in database
GPG key ID: 9EA789150BEE0E27
18 changed files with 774 additions and 146 deletions

View file

@ -76,6 +76,7 @@ public interface IUserRepository
Task<IList<AppUserBookmark>> GetAllBookmarksByIds(IList<int> bookmarkIds);
Task<AppUser?> GetUserByEmailAsync(string email, AppUserIncludes includes = AppUserIncludes.None);
Task<IEnumerable<AppUserPreferences>> GetAllPreferencesByThemeAsync(int themeId);
Task<IEnumerable<AppUserPreferences>> GetAllPreferencesByFontAsync(string fontName);
Task<bool> HasAccessToLibrary(int libraryId, int userId);
Task<bool> HasAccessToSeries(int userId, int seriesId);
Task<IEnumerable<AppUser>> GetAllUsersAsync(AppUserIncludes includeFlags = AppUserIncludes.None);
@ -260,6 +261,14 @@ public class UserRepository : IUserRepository
.ToListAsync();
}
public async Task<IEnumerable<AppUserPreferences>> GetAllPreferencesByFontAsync(string fontName)
{
return await _context.AppUserPreferences
.Where(p => p.BookReaderFontFamily == fontName)
.AsSplitQuery()
.ToListAsync();
}
public async Task<bool> HasAccessToLibrary(int libraryId, int userId)
{
return await _context.Library