Interface: AppApi ​
Defined in: src/preload.ts:55
The app itself (versions, OS languages, project links), as window.tankobon.app.
Methods ​
checkUpdate() ​
checkUpdate():
Promise<UpdateCheckResult>
Defined in: src/preload.ts:63
Asks GitHub whether a release newer than the running version is published; a network failure comes back as an error result, not a rejection.
Returns ​
Promise<UpdateCheckResult>
getInfo() ​
getInfo():
Promise<AppInfo>
Defined in: src/preload.ts:57
Versions of the app, Electron, Chromium, Node.js and V8, and the OS and CPU architecture.
Returns ​
Promise<AppInfo>
getSystemLanguages() ​
getSystemLanguages():
Promise<string[]>
Defined in: src/preload.ts:59
The OS's preferred languages (BCP 47 tags, most preferred first), to resolve the system language setting as the main process does.
Returns ​
Promise<string[]>
onLaunchFile() ​
onLaunchFile(
listener): () =>void
Defined in: src/preload.ts:67
Subscribes to the main process's app:launch-file push, sent when such a comic is waiting (call takeLaunchFile then); returns the unsubscribe function.
Parameters ​
listener ​
() => void
Returns ​
() => void
openLink() ​
openLink(
link):Promise<void>
Defined in: src/preload.ts:61
Opens one of the project's pages (repository, documentation…) in the default browser.
Parameters ​
link ​
"documentation" | "repository" | "releases" | "issues" | "discord" | "license"
Returns ​
Promise<void>
takeLaunchFile() ​
takeLaunchFile():
Promise<string|null>
Defined in: src/preload.ts:65
The token of the comic the operating system asked to open (double click in the file explorer, "Open with…", a second launch with a file), or null; it is handed out once and opens like a comic.pickFile token.
Returns ​
Promise<string | null>