Interface: AppApi
Defined in: preload.ts:41
The app itself (versions, OS languages, project links), as window.tankobon.app.
Methods
checkUpdate()
checkUpdate():
Promise<UpdateCheckResult>
Defined in: preload.ts:49
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: preload.ts:43
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: preload.ts:45
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: preload.ts:53
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: preload.ts:47
Opens one of the project's pages (repository, documentation…) in the default browser.
Parameters
link
"documentation" | "repository" | "releases" | "issues" | "license"
Returns
Promise<void>
takeLaunchFile()
takeLaunchFile():
Promise<string|null>
Defined in: preload.ts:51
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>