Skip to content

Commit

Permalink
Add useful buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
mmvanheusden committed Aug 7, 2022
1 parent f3b33eb commit 4fb43da
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 6 deletions.
16 changes: 14 additions & 2 deletions downloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
12 changes: 10 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Binary file modified screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4fb43da

Please sign in to comment.