feat: add second .net info banner

This commit is contained in:
Maarten van Heusden
2023-12-26 12:39:21 +01:00
parent 6a747f8ac1
commit a55f16e50d
2 changed files with 14 additions and 0 deletions

View File

@@ -30,6 +30,7 @@ function submitForm() {
preDownloadCheck().then(async function () {
//console.log(terminal[1][0])
document.getElementById("dotnetwarning").hidden = true
document.getElementById("dotnetwarning2").hidden = true
document.getElementById("emptywarning").hidden = true
console.info("dotnet found in PATH")
// create variables for the form values
@@ -87,10 +88,12 @@ function submitForm() {
}).catch(function (error) {
if (error === "noDotnet") {
// if dotnet is not found, show the dotnet warning
document.getElementById("dotnetwarning2").hidden = true
document.getElementById("emptywarning").hidden = true
document.getElementById("dotnetwarning").hidden = false
} else if (error === "emptyField") {
// if a required field is empty, show the empty field warning
document.getElementById("dotnetwarning2").hidden = true
document.getElementById("dotnetwarning").hidden = true
document.getElementById("emptywarning").hidden = false
}
@@ -106,6 +109,7 @@ function openRelevantPage(target) {
switch (target) {
case "dotnet":
document.getElementById("dotnetwarning").hidden = true
document.getElementById("dotnetwarning2").hidden = false
if (os.includes("win")) {
console.debug("Opened .NET download page for " + os.charAt(0).toUpperCase() + os.slice(1))
void electron.shell.openExternal("https://aka.ms/dotnet/6.0/dotnet-sdk-win-x64.exe")

View File

@@ -39,6 +39,16 @@
Please fill in all required fields.
</div>
</div>
<div hidden id="dotnetwarning2">
<div class="flash mx-2 mt-2 color-shadow-medium">
<svg class="octicon" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg">
<path d="M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm6.5-.25A.75.75 0 017.25 7h1a.75.75 0 01.75.75v2.75h.25a.75.75 0 010 1.5h-2a.75.75 0 010-1.5h.25v-2h-.25a.75.75 0 01-.75-.75zM8 6a1 1 0 100-2 1 1 0 000 2z"
fill-rule="evenodd"></path>
</svg>
Please re-open after installing .NET.
</div>
</div>
<div class="f1-light text-center">Steam Depot Downloader</div>
<form id="theform">