aboutsummaryrefslogtreecommitdiff
path: root/src/app/main.js
blob: 9ad6344dfe7a023fed2c8d8cb0730f2762bdbca3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
const fs = require("fs");
const path = require("path");
const Fuse = require("fuse.js");
const { app, ipcRenderer, shell } = require("electron");

const lang = require("../lang");

ipcRenderer.on("unknown-error", (event, err) => {
	toasts.show({
		timeout: 10000,
		scheme: "error",
		title: lang("gui.toast.title.unknown_error"),
		description: lang("gui.toast.desc.unknown_error"),
		callback: () => {
			toasts.show({
				timeout: 15000,
				scheme: "error",
				title: "",
				description: err.stack.replaceAll("\n", "<br>")
			})
		}
	})

	console.error(err.stack);
})

const json = require("../modules/json");

const kill = require("./js/kill");
const mods = require("./js/mods");
const toasts = require("./js/toasts");
const update = require("./js/update");
const events = require("./js/events");
const launch = require("./js/launch");
const version = require("./js/version");
const request = require("./js/request");
const process = require("./js/process");
const settings = require("./js/settings");
const gamepath = require("./js/gamepath");
const is_running = require("./js/is_running");
const set_buttons = require("./js/set_buttons");

require("./js/dom_events");
require("./js/set_dom_strings")();