feat(report): stream available years loading

This commit is contained in:
tisonhuang committed 2026-03-04 21:19:11 +08:00
1 parent d476fbbdae
commit 28d68d8a8e
5 files changed
+242 -40

No files matched your search

+16
View File
@@ -483,6 +483,15 @@ export interface ElectronAPI {
data?: number[]
error?: string
}>
startAvailableYearsLoad: () => Promise<{
success: boolean
taskId?: string
error?: string
}>
cancelAvailableYearsLoad: (taskId: string) => Promise<{
success: boolean
error?: string
}>
generateReport: (year: number) => Promise<{
success: boolean
data?: {
@@ -567,6 +576,13 @@ export interface ElectronAPI {
dir?: string
error?: string
}>
onAvailableYearsProgress: (callback: (payload: {
taskId: string
years?: number[]
done: boolean
error?: string
canceled?: boolean
}) => void) => () => void
onProgress: (callback: (payload: { status: string; progress: number }) => void) => () => void
}
dualReport: {