From 304695431d7eeb1444539978b3a660ff1ec8c627 Mon Sep 17 00:00:00 2001 From: ubench-org Date: Sun, 13 Aug 2023 20:32:18 +0200 Subject: [PATCH] updated button style, splash screen; versioned 0.3.5 --- package.json | 2 +- public/css/style.css | 50 ++++++++-------- public/icons/reset.svg | 14 +++++ public/js/app.js | 27 +-------- public/navbar.ejs | 1 - public/splash.ejs | 89 +++++++++++++++++++++++++++++ public/splash.html | 24 -------- public/views/settings.ejs | 11 +++- public/views/system.ejs | 31 +++++++++- public/views/toolbars/account.ejs | 4 +- public/views/toolbars/downloads.ejs | 8 +-- public/views/toolbars/scores.ejs | 2 +- public/views/toolbars/settings.ejs | 2 +- src/ubenchlauncher.js | 11 ++-- 14 files changed, 182 insertions(+), 94 deletions(-) create mode 100644 public/icons/reset.svg create mode 100644 public/splash.ejs delete mode 100644 public/splash.html diff --git a/package.json b/package.json index bd334f8..3662fd6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ubenchlauncher", - "version": "0.2.0", + "version": "0.3.5", "description": "UBench Benchmark Launcher", "author": "UBench Organization", "main": "./src/ubenchlauncher.js", diff --git a/public/css/style.css b/public/css/style.css index 505b165..5abb6a7 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -318,6 +318,12 @@ body { .btn-sm { font-size: 0.75rem; padding: 4px 8px; + height: 32px; + margin: 12px; +} + +.toolbar > .btn-sm { + margin: 0; } .btn:hover { @@ -327,6 +333,10 @@ body { color: white; } +.m0 { + margin: 0; +} + .right { float: right; } @@ -487,30 +497,6 @@ select { .hidden { visibility: collapse; } -.spinner-xl { - border: 8px solid white; - border-radius: 50%; - width: 128px; - height: 128px; - animation: pulse 1s linear infinite; - margin: auto; - position: absolute; - top: 46px; - left: calc(50% - 68px); -} - - -@keyframes pulse { - 0% { - opacity: 1; - scale: 0.9; - } - - 100% { - opacity: 0; - scale: 1.1; - } -} .spinner { border: 2px solid var(--dark); @@ -537,4 +523,20 @@ select { .btn-light { background-color: var(--light); color: var(--dark); +} + + +.btn_icon { + min-width: 28px !important; + padding: 2px; +} + +.btn-icon { + width: 14px; + height: 14px; + filter: invert(); +} + +a { + text-decoration: none; } \ No newline at end of file diff --git a/public/icons/reset.svg b/public/icons/reset.svg new file mode 100644 index 0000000..b389935 --- /dev/null +++ b/public/icons/reset.svg @@ -0,0 +1,14 @@ + + + + + + + + diff --git a/public/js/app.js b/public/js/app.js index 14e88e3..112cdd7 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -1,29 +1,4 @@ -let sysinfo = JSON.parse(document.getElementById("sysinfo").innerHTML); -console.log(sysinfo) -let disks = ``; -let gpus = ``; -for (var i = 0; i < sysinfo.disks.length; i++) { - disks += `${sysinfo.disks[i].name} ${sysinfo.disks[i].size} GB
`; -} -for (var i = 0; i < sysinfo.gpu.length; i++) { - gpus += `${sysinfo.gpu[i].model} ${sysinfo.gpu[i].vram} MB
`; -} -document.getElementById("system_content").innerHTML = ` -

${sysinfo.system.model}

- -

System ${sysinfo.os.distro} ${sysinfo.os.arch}

- -

Board ${sysinfo.board.model}
Version ${sysinfo.board.version}
Made by ${sysinfo.board.manufacturer}

- -

Processor ${sysinfo.cpu.brand}
${sysinfo.cpu.processors} x ${sysinfo.cpu.speed} GHz
${sysinfo.cpu.cores} Core / ${sysinfo.cpu.threads} Thread

- -

Graphics ${gpus}

- -

Memory ${sysinfo.ram} GB

- -

Storage ${disks}

- - `; + let v = window.localStorage.getItem("view_id") || "system"; change_selected_menu_item(v); diff --git a/public/navbar.ejs b/public/navbar.ejs index 89d316e..2ba587e 100644 --- a/public/navbar.ejs +++ b/public/navbar.ejs @@ -7,7 +7,6 @@ - diff --git a/public/splash.ejs b/public/splash.ejs new file mode 100644 index 0000000..8c8fe46 --- /dev/null +++ b/public/splash.ejs @@ -0,0 +1,89 @@ + + + + + + + UBench Launcher + + + + + +

© UBench Organization

+ +
+

<%=version%>

+ + + \ No newline at end of file diff --git a/public/splash.html b/public/splash.html deleted file mode 100644 index 3ec2ae4..0000000 --- a/public/splash.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - UBench Launcher - - - - - - -
- - - \ No newline at end of file diff --git a/public/views/settings.ejs b/public/views/settings.ejs index 62c9cea..64a9f15 100644 --- a/public/views/settings.ejs +++ b/public/views/settings.ejs @@ -1,10 +1,15 @@ \ No newline at end of file diff --git a/public/views/toolbars/account.ejs b/public/views/toolbars/account.ejs index e6305d1..2b82c75 100644 --- a/public/views/toolbars/account.ejs +++ b/public/views/toolbars/account.ejs @@ -1,4 +1,4 @@ \ No newline at end of file diff --git a/public/views/toolbars/downloads.ejs b/public/views/toolbars/downloads.ejs index 527a6c4..ecf7d84 100644 --- a/public/views/toolbars/downloads.ejs +++ b/public/views/toolbars/downloads.ejs @@ -1,25 +1,25 @@ \ No newline at end of file diff --git a/public/views/toolbars/scores.ejs b/public/views/toolbars/scores.ejs index 3eaafb5..74a765f 100644 --- a/public/views/toolbars/scores.ejs +++ b/public/views/toolbars/scores.ejs @@ -1,3 +1,3 @@ \ No newline at end of file diff --git a/public/views/toolbars/settings.ejs b/public/views/toolbars/settings.ejs index fe79cbc..4495efc 100644 --- a/public/views/toolbars/settings.ejs +++ b/public/views/toolbars/settings.ejs @@ -1,3 +1,3 @@ \ No newline at end of file diff --git a/src/ubenchlauncher.js b/src/ubenchlauncher.js index 659f330..125507a 100644 --- a/src/ubenchlauncher.js +++ b/src/ubenchlauncher.js @@ -162,9 +162,7 @@ function analyze_system() { checks = 0; has_sysinfo = true; - ejse.data("version", fs.readJSONSync(path.join(rootDir, "package.json")).version); ejse.data('sysinfo', JSON.stringify(fs.readJsonSync(path.join(rootDir, "data", "sysinfo.json")))); - ejse.data("menu", "System"); fs.writeJsonSync(path.join(rootDir, "data", "sysinfo.json"), { "uuid": uuid, "system": system, @@ -184,19 +182,20 @@ function analyze_system() { let mainWindow; let splashWindow; +ejse.data("version", fs.readJSONSync(path.join(rootDir, "package.json")).version); const splash = () => { splashWindow = new BrowserWindow({ width: 400, height: 250, - transparent: false, + transparent: true, frame: false, alwaysOnTop: true }); - splashWindow.loadFile(path.join(rootDir, "public", "splash.html")) - + splashWindow.loadURL(path.join(rootDir, "public", "splash.ejs")) + splashWindow.once('ready-to-show', () => { - splashWindow.center(); + splashWindow.center(); }) }