Basic form WIP

This commit is contained in:
mmvanheusden
2022-06-24 22:17:26 +02:00
parent c6eba0b51b
commit fab7360488
4 changed files with 1776 additions and 3 deletions

23
index.html Normal file
View File

@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<title>SteamDepotDownloaderGUI</title>
</head>
<body>
<h1>Steam Depot Downloader</h1>
<label for="fname">Username:</label>
<input type="text" id="fname" name="fname"><br><br>
<label for="lname">Password:</label>
<label for="fname">App ID:</label>
<input type="text" id="fname" name="fname"><br><br>
<label for="fname">Depot ID:</label>
<input type="text" id="fname" name="fname" pattern="[0-9]+"><br><br>
<label for="fname">Manifest ID:</label>
<input type="text" id="fname" name="fname"><br><br>
<input type="password" id="lname" name="lname"><br><br>
<input type="submit" value="Download">
</body>
</html>

21
index.js Normal file
View File

@@ -0,0 +1,21 @@
const { app, BrowserWindow } = require('electron')
// TODO: this: https://manu.ninja/simple-electron-gui-wrapper-for-a-command-line-utility/
const createWindow = () => {
const win = new BrowserWindow({
autoHideMenuBar: true,
width: 800,
height: 600
})
win.loadFile('index.html')
}
app.whenReady().then(() => {
createWindow()
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) createWindow()
})
})
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') app.quit()
})

1725
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -2,9 +2,10 @@
"name": "steamdepotdownloadergui",
"version": "2.0.0",
"description": "DepotDownloader Electron frontend",
"main": "index.js",
"main": "main.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"start": "electron ."
},
"repository": {
"type": "git",
@@ -24,5 +25,8 @@
"bugs": {
"url": "https://github.com/mmvanheusden/SteamDepotDownloaderGUI/issues"
},
"homepage": "https://github.com/mmvanheusden/SteamDepotDownloaderGUI#readme"
"homepage": "https://github.com/mmvanheusden/SteamDepotDownloaderGUI#readme",
"devDependencies": {
"electron": "^19.0.6"
}
}