aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitExample <git@example.com>2022-02-03 01:43:09 +0100
committerGitExample <git@example.com>2022-02-03 01:43:09 +0100
commit4c9d8e1b3fc80fa0c23ed78015ab6238bf88dd06 (patch)
tree73fa3c6f35998263d3ce1eeb392982a704d87f04
parenta4b11903979fdb4c8b0f6dda8f7343e14c1ebe17 (diff)
downloadViper-4c9d8e1b3fc80fa0c23ed78015ab6238bf88dd06.tar.gz
Viper-4c9d8e1b3fc80fa0c23ed78015ab6238bf88dd06.zip
version numbers
These should've been here from the start, and I don't know why I didn't add them in the start, I'm very dumb.
-rw-r--r--src/app/browser.js7
-rw-r--r--src/app/main.css6
2 files changed, 13 insertions, 0 deletions
diff --git a/src/app/browser.js b/src/app/browser.js
index f152a6a..357a076 100644
--- a/src/app/browser.js
+++ b/src/app/browser.js
@@ -26,6 +26,7 @@ var Browser = {
image: pkg.icon,
author: pkg.owner,
download: pkg.download_url,
+ version: pkg.version_number,
description: pkg.description
})
}
@@ -45,12 +46,17 @@ document.body.addEventListener("keyup", (e) => {
function BrowserEl(properties) {
properties = {
title: "No name",
+ version: "1.0.0",
image: "icons/no-image.png",
author: "Unnamed Pilot",
description: "No description",
...properties
}
+ if (properties.version[0] != "v") {
+ properties.version = "v" + properties.version;
+ }
+
if (browserEntries.querySelector(".loading")) {
browserEntries.innerHTML = "";
}
@@ -69,6 +75,7 @@ function BrowserEl(properties) {
<div class="title">${properties.title}</div>
<div class="description">${properties.description} - ${lang("gui.browser.madeby")} ${properties.author}</div>
<button onclick="installFromURL('${properties.download}')">${installstring}</button>
+ <button class="visual">${properties.version}</button>
</div>
</div>
`
diff --git a/src/app/main.css b/src/app/main.css
index 67174b8..8bac0ea 100644
--- a/src/app/main.css
+++ b/src/app/main.css
@@ -485,6 +485,12 @@ button:disabled {
pointer-events: none;
}
+button.visual {
+ opacity: 1.0;
+ pointer-events: none;
+ background: transparent !important;
+}
+
code {
font-size: 16px;
padding: 2px 5px;