mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-13 04:28:41 -09:00
10 lines
356 B
TypeScript
10 lines
356 B
TypeScript
import {Notification} from 'electron';
|
|
import {icon} from './config/paths';
|
|
|
|
export default function notify(title: string, body = '', details: any = {}) {
|
|
console.log(`[Notification] ${title}: ${body}`);
|
|
if (details.error) {
|
|
console.error(details.error);
|
|
}
|
|
new Notification({title, body, ...(process.platform === 'linux' && {icon})}).show();
|
|
}
|