mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 00:11:37 -06:00
feat(settings): add option to turn book spine off for comics
Adds a display preference to conditionally render book spines on comic formats. The new setting is defaulted to false. Various book cover surfaces across the application now respect this preference by checking if the format is a comic before rendering the spine. Closes #295
This commit is contained in:
@@ -12,6 +12,11 @@ export function isAudioFormat(format: string): boolean {
|
||||
return AUDIO_FORMATS.has(format.toLowerCase());
|
||||
}
|
||||
|
||||
const COMIC_FORMATS = new Set<string>(["cbz", "cbr", "cb7", "cbx"]);
|
||||
export function isComicFormat(format: string): boolean {
|
||||
return COMIC_FORMATS.has(format.toLowerCase());
|
||||
}
|
||||
|
||||
export const READ_STATUSES = ["unread", "want_to_read", "reading", "on_hold", "rereading", "read", "skimmed", "abandoned"] as const;
|
||||
export type ReadStatus = (typeof READ_STATUSES)[number];
|
||||
export type ReadStatusSource = "auto" | "manual";
|
||||
@@ -217,6 +222,7 @@ export type BookRecommendation = {
|
||||
hasCover: boolean;
|
||||
authors: string[];
|
||||
isAudiobook?: boolean;
|
||||
isComic?: boolean;
|
||||
};
|
||||
|
||||
export type SeriesBookRecommendation = {
|
||||
@@ -226,6 +232,7 @@ export type SeriesBookRecommendation = {
|
||||
hasCover: boolean;
|
||||
authors: string[];
|
||||
isAudiobook?: boolean;
|
||||
isComic?: boolean;
|
||||
};
|
||||
|
||||
export type CoverSearchResult = {
|
||||
|
||||
@@ -49,6 +49,7 @@ export interface DisplayPreferences {
|
||||
tableZebraStriping: boolean;
|
||||
tableDensity: TableDensity;
|
||||
bookSpineOverlay: BookSpineOverlay;
|
||||
showSpineOnComics: boolean;
|
||||
bookShadowStrength: BookShadowStrength;
|
||||
bookCoverDisplayMode: BookCoverDisplayMode;
|
||||
seriesCardCoverMode: SeriesCardCoverMode;
|
||||
|
||||
Reference in New Issue
Block a user