Feat: Static & Flatpak Workflow + Recent Fix

This commit is contained in:
Youwes09
2026-06-12 17:52:09 -05:00
parent 9dad1fb329
commit a041b182e5
6 changed files with 142 additions and 5 deletions
+4 -4
View File
@@ -12,7 +12,7 @@
import RecentToolbar from './RecentToolbar.svelte'
import UpdatesTab from './UpdatesTab.svelte'
import HistoryTab from './HistoryTab.svelte'
import type { Manga } from '$lib/types'
import type { Manga, Chapter } from '$lib/types'
import type { RecentUpdate, UpdateGroup } from './lib/recentUpdates'
import type { HistoryGroup } from './lib/recentHistory'
@@ -122,9 +122,9 @@
if (force) cache.clear(key)
const [updatesRes, statusRes] = await Promise.all([
cache.get<RecentUpdate[]>(
cache.get<Chapter[]>(
key,
() => getAdapter().getRecentlyUpdated(nextCtrl.signal),
() => getAdapter().getRecentlyUpdated(),
RECENT_UPDATES_TTL_MS,
CACHE_GROUPS.LIBRARY,
),
@@ -210,7 +210,7 @@
async function deleteDownloaded(item: RecentUpdate) {
try {
await getAdapter().deleteDownloadedChapter(String(item.id))
await getAdapter().deleteDownloadedChapters([String(item.id)])
updates = updates.map(u => u.id === item.id ? { ...u, isDownloaded: false } : u)
} catch {
addToast({ kind: 'error', title: 'Delete failed', body: 'Could not delete download.' })
+2 -1
View File
@@ -129,9 +129,10 @@ export function buildIssueUrl(
): string {
const base = 'https://github.com/moku-project/Moku/issues/new'
const prefix = type === 'bug' ? '[Bug] ' : '[Feature Request] '
const common = {
template: type === 'bug' ? 'bug_report.yml' : 'feature_request.yml',
title,
title: title.startsWith(prefix) ? title : `${prefix}${title}`,
environment: buildEnvironmentBlock(serverVersion),
}
@@ -691,6 +691,10 @@ export class SuwayomiAdapter implements ServerAdapter {
return []
}
async startLibraryUpdate(): Promise<void> {
await this.gql(UPDATE_LIBRARY)
}
async stopLibraryUpdate(): Promise<void> {
await this.gql(UPDATE_STOP)
}
+1
View File
@@ -233,6 +233,7 @@ export interface ServerAdapter {
clearCachedImages(opts: { cachedPages: boolean; cachedThumbnails: boolean; downloadedThumbnails: boolean }): Promise<void>
checkForUpdates(mangaIds?: string[]): Promise<UpdateResult[]>
startLibraryUpdate(): Promise<void>
stopLibraryUpdate(): Promise<void>
getLibraryUpdateStatus(): Promise<LibraryUpdateProgress>
clearPageCache(chapterId?: number): void