aboutsummaryrefslogtreecommitdiff
path: root/crash/crash.html
blob: ec4e5ca52209148cb158ec22005eac7a6e4b2a64 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE html>
<html lang="en">
<head>
    <script src="../lang/loader.js"></script>
    <meta charset="UTF-8">
    <script>document.title = lang.crash.title;</script>
    <link rel="stylesheet" href="../views/common/fonts.css">
    <style>

        * {
            font-family: -apple-system, sans-serif;
            cursor: default !important;
            font-family: "Comfortaa", -apple-system, sans-serif !important;
        }

        button {
            border: 1px solid #00b763;
            padding: 10px 20px;
            border-radius: 999px;
            background: #fff;
            color: black;
            outline: none;
        }

        button:hover {
            color: white;
            border: 1px solid #007b42;
            background: #00b763;
        }

        button:active {
            color: white;
            border: 1px solid #00502b;
            background: #007b42;
        }

    </style>
</head>
<body style="display:grid;grid-template-columns: 1fr 1fr;height:100%;width:100%;margin:0;overflow:hidden;">
    <div>
        <img src="./artwork.jpg" style="height: 100vh;">
    </div>
    <div style="padding:8px;">
        <h2><script>document.write(lang.crash.head);</script></h2>
        <p><script>document.write(lang.crash.intro);</script></p>
        <p><script>
            document.write(lang.crash.report[0]);
            if (require('os').platform() === "win32") {
                document.write(require('os').userInfo().homedir + "\\.kartik\\crashes");
            } else {
                document.write(require('os').userInfo().homedir + "/.kartik/crashes");
            }
            document.write(lang.crash.report[1]);
        </script></p>
        <p><button onclick="restart();"><script>document.write(lang.crash.close);</script></button> <button onclick="resetrestart();"><script>document.write(lang.crash.reset);</script></button></p>
    </div>

    <script>
        function restart() {
            window.close();
            require('@electron/remote').getCurrentWindow().hide();
            require('@electron/remote').getCurrentWindow().destroy();
            require('@electron/remote').getCurrentWindow().close();
        }
        function resetrestart() {
            require('fs').rmdirSync(require('os').userInfo().homedir + "/.kartik/config", {recursive:true});
            window.close();
            require('@electron/remote').getCurrentWindow().close();
        }
    </script>
</body>
</html>