diff options
author | Minteck <nekostarfan@gmail.com> | 2021-08-13 17:14:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-13 17:14:01 +0200 |
commit | a3104b69bc8153eed684f54e4249c84a6559182f (patch) | |
tree | e012e3c33ec9325e904fa2a1da1a018136bd1b0c /index.html | |
parent | 6ef10184a21592fe415a909e549f813ae53273f3 (diff) | |
parent | 2fcdada6864751ec708ace9ccd8c28d6d99aab06 (diff) | |
download | kartik-client-a3104b69bc8153eed684f54e4249c84a6559182f.tar.gz kartik-client-a3104b69bc8153eed684f54e4249c84a6559182f.tar.bz2 kartik-client-a3104b69bc8153eed684f54e4249c84a6559182f.zip |
Merge pull request #6 from Minteck/testing
New loading screen
Diffstat (limited to 'index.html')
-rw-r--r-- | index.html | 28 |
1 files changed, 27 insertions, 1 deletions
@@ -1,6 +1,20 @@ <!DOCTYPE html>
<html lang="en" style="background:#000000;margin:0;height:100%;width:100%;">
<head>
+ <script>
+ require('electron').ipcRenderer.on('ready', (e, a) => {
+ location.hash = "#ready";
+ location.reload();
+ })
+
+ require('electron').ipcRenderer.on('progress', (e, a) => {
+ document.getElementById("bar-inner").style.width = a + "%";
+
+ if (a >= 100) {
+ document.getElementById("bar-outer-outer").style.opacity = "0";
+ }
+ })
+ </script>
<script>if (typeof require !== "undefined") {native = true;try{global.native = true;}catch(e){}} else {native = false;try{global.native = false;}catch(e){}}if (!native){global = window;}if (native){kresources=require('@electron/remote').getCurrentWindow().resources;trackEvent=require('@electron/remote').getCurrentWindow().trackEvent;require('@electron/remote').getCurrentWindow().log(" * Parsing view");}info=(_a,b)=>{console.info(b);};warn=(_a,b)=>{console.warn(b);};error=(_a,b)=>{console.error(b);};</script>
<meta charset="UTF-8">
<title>Kartik</title>
@@ -92,8 +106,14 @@ -webkit-box-orient: vertical;
"></span></div>
<script>if (!native) { document.getElementById('titlebar').style.display = "none"; }</script>
+ <webview id="wb" src="views/loader.html" style="border: 0;z-index:2;top:0;left:0;right:0;bottom:0;position:fixed;opacity:0;transition:opacity 500ms;" nodeintegration disablewebsecurity allowpopups webpreferences="nodeIntegration,contextIsolation=no"></webview>
<script>
- document.write(`<webview id="wb" src="views/loader.html" style="border: 0;z-index:2;top:0;left:0;right:0;bottom:0;position:fixed;" nodeintegration disablewebsecurity allowpopups webpreferences="nodeIntegration,contextIsolation=no"></webview>`);
+ setTimeout(() => {
+ document.getElementById("wb").style.opacity = "1";
+ if (location.hash !== "#ready") {
+ document.getElementById("bar-outer-outer").style.opacity = "1";
+ }
+ }, 1500)
</script>
<script src="./views/script/core_chart.js"></script>
<script src="./views/script/core_music.js"></script>
@@ -119,6 +139,12 @@ </style>
</div>
+ <div id="bar-outer-outer" style="z-index:99;position:fixed;inset:0;display:flex;justify-content: center;align-items: center;margin-top:120px;opacity:0;transition:opacity 500ms;">
+ <div id="bar-outer" style="background:#c2c2c2;width:256px;height:5px;border-radius:999px;">
+ <div id="bar-inner" style="background:#a0a0a0;width:0;height:5px;border-radius:999px;"></div>
+ </div>
+ </div>
+
<script src="./views/script/core_crash.js"></script>
</body>
</html>
|