mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-04-11 14:19:38 +00:00
20 lines
378 B
TypeScript
20 lines
378 B
TypeScript
import { shell } from 'electron'
|
|
|
|
import { IPCEmitHandler } from '../shared/IPCHandler'
|
|
|
|
/**
|
|
* Handles the 'open-url' event.
|
|
*/
|
|
class OpenURLHandler implements IPCEmitHandler<'open-url'> {
|
|
event = 'open-url' as const
|
|
|
|
/**
|
|
* Opens `url` in the default browser.
|
|
*/
|
|
handler(url: string) {
|
|
shell.openExternal(url)
|
|
}
|
|
}
|
|
|
|
export const openURLHandler = new OpenURLHandler()
|