Update extatic events
This commit is contained in:
@@ -207,8 +207,10 @@
|
|||||||
fireExstaticEvent('mokuro-reader:page.change', {
|
fireExstaticEvent('mokuro-reader:page.change', {
|
||||||
title: volume.mokuroData.title,
|
title: volume.mokuroData.title,
|
||||||
volumeName: volume.mokuroData.volume,
|
volumeName: volume.mokuroData.volume,
|
||||||
currentCharCount: charCount || 0,
|
currentCharCount: getCharCount(pages, page) || 0,
|
||||||
currentPageNum: page
|
currentPage: page,
|
||||||
|
totalPages: pages.length,
|
||||||
|
totalCharCount: maxCharCount || 0
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -218,8 +220,10 @@
|
|||||||
fireExstaticEvent('mokuro-reader:reader.closed', {
|
fireExstaticEvent('mokuro-reader:reader.closed', {
|
||||||
title: volume.mokuroData.title,
|
title: volume.mokuroData.title,
|
||||||
volumeName: volume.mokuroData.volume,
|
volumeName: volume.mokuroData.volume,
|
||||||
currentCharCount: charCount || 0,
|
currentCharCount: getCharCount(pages, page) || 0,
|
||||||
currentPageNum: page
|
currentPage: page,
|
||||||
|
totalPages: pages.length,
|
||||||
|
totalCharCount: maxCharCount || 0
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -37,7 +37,9 @@ type ExtaticPayload = {
|
|||||||
title: string;
|
title: string;
|
||||||
volumeName: string;
|
volumeName: string;
|
||||||
currentCharCount: number;
|
currentCharCount: number;
|
||||||
currentPageNum: number;
|
totalCharCount: number;
|
||||||
|
currentPage: number;
|
||||||
|
totalPages: number
|
||||||
}
|
}
|
||||||
|
|
||||||
type ExtaticEvent = 'mokuro-reader:page.change' | 'mokuro-reader:reader.closed'
|
type ExtaticEvent = 'mokuro-reader:page.change' | 'mokuro-reader:reader.closed'
|
||||||
|
|||||||
Reference in New Issue
Block a user