diff --git a/src/main.ts b/src/main.ts index a443f35..eac44d1 100644 --- a/src/main.ts +++ b/src/main.ts @@ -5,7 +5,7 @@ import { BookTrackerSettingTab, } from "@ui/settings"; import { getBookByLegacyId, type SearchResult } from "@data-sources/goodreads"; -import { Templater } from "@utils/templater"; +import { Templater } from "@utils/Templater"; import { GoodreadsSearchModal, GoodreadsSearchSuggestModal, @@ -18,7 +18,8 @@ import { READ_STATE, TO_BE_READ_STATE, } from "./const"; -import { ReadingLog, Storage } from "@utils/storage"; +import { Storage } from "@utils/Storage"; +import { ReadingLog } from "@utils/ReadingLog"; import { registerReadingLogCodeBlockProcessor } from "@ui/code-blocks"; export default class BookTrackerPlugin extends Plugin { @@ -32,7 +33,7 @@ export default class BookTrackerPlugin extends Plugin { this.templater = new Templater(this.app); this.storage = new Storage(this.app, this); - this.readingLog = new ReadingLog(this); + this.readingLog = new ReadingLog(this.storage); this.addCommand({ id: "search-goodreads", diff --git a/src/types.ts b/src/types.ts index d05c42e..193297f 100644 --- a/src/types.ts +++ b/src/types.ts @@ -21,11 +21,3 @@ export interface Book { isbn: string; isbn13: string; } - -export interface ReadingLogEntry { - book: string; - pagesRead: number; - pagesReadTotal: number; - pagesRemaining: number; - createdAt: Date; -} diff --git a/src/ui/code-blocks/ReadingLogCodeBlockView.svelte b/src/ui/code-blocks/ReadingLogCodeBlockView.svelte index 09a6765..ae50d10 100644 --- a/src/ui/code-blocks/ReadingLogCodeBlockView.svelte +++ b/src/ui/code-blocks/ReadingLogCodeBlockView.svelte @@ -1,5 +1,5 @@