Add useful buttons

This commit is contained in:
mmvanheusden
2022-08-07 15:58:28 +02:00
parent f3b33eb5af
commit 4fb43dac1a
4 changed files with 26 additions and 6 deletions

View File

@@ -55,9 +55,21 @@ function submitDotnet() {
}
}
function openGitHubIssues() {
const electron = require("electron")
console.debug("Opened GitHub issues page")
void electron.shell.openExternal("https://github.com/mmvanheusden/SteamDepotDownloaderGUI/issues/new")
}
function openSteamDB() {
const electron = require("electron")
console.debug("Opened SteamDB instant search page")
void electron.shell.openExternal("https://steamdb.info/instantsearch/")
}
window.addEventListener("DOMContentLoaded", () => {
document.getElementById("alertbtn").addEventListener("click", submitDotnet)
document.getElementById("downloadbtn").addEventListener("click", submitForm)
})
document.getElementById("smbtn1").addEventListener("click", openGitHubIssues)
document.getElementById("smbtn2").addEventListener("click", openSteamDB)
})

View File

@@ -94,9 +94,17 @@
</div>
</div>
</form>
<div class="form-group mx-3">
<button class="btn btn-block btn-primary" id="downloadbtn">Download</button>
<div class="form-group mt-3 ml-3 mr-3">
<button class="btn btn-block btn-primary" id="downloadbtn">
<svg class="octicon" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg">
<path d="M7.47 10.78a.75.75 0 001.06 0l3.75-3.75a.75.75 0 00-1.06-1.06L8.75 8.44V1.75a.75.75 0 00-1.5 0v6.69L4.78 5.97a.75.75 0 00-1.06 1.06l3.75 3.75zM3.75 13a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5z"
fill-rule="evenodd"></path>
</svg>
Download
</button>
</div>
<div class="btn btn-sm ml-3" id="smbtn1">Support</div>
<div class="btn btn-sm ml-1" id="smbtn2">SteamDB</div>
</div>
</body>
</html>

View File

@@ -5,8 +5,8 @@ const createWindow = () => {
const mainWindow = new BrowserWindow({
autoHideMenuBar: true,
resizable: false,
width: 425,
height: 575,
width: 430,
height: 590,
maximizable: false,
webPreferences: {
nodeIntegration: true,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 44 KiB