mirror of
https://github.com/mmvanheusden/SteamDepotDownloaderGUI.git
synced 2026-02-04 05:31:19 +01:00
Add a README
This commit is contained in:
12
README.md
12
README.md
@@ -1 +1,11 @@
|
||||
# SteamDepotDownloaderGUI Electron rewrite (experimental)
|
||||
# SteamDepotDownloaderGUI Electron rewrite (experimental)
|
||||
|
||||
|
||||
## How to setup dev environment
|
||||
* First, install `npm` and `nodejs` on your system.
|
||||
|
||||
> For Arch Linux users, run `sudo pacman -S npm nodejs`
|
||||
|
||||
* Then, git clone this repo, change direcory into the repo and run `git checkout rewrite`.
|
||||
* Now run `npm install`
|
||||
* You now can start the GUI with `npm start`
|
||||
20
index.html
20
index.html
@@ -8,16 +8,16 @@
|
||||
</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>
|
||||
<label>Username:
|
||||
<input type="text"><br><br>
|
||||
<label>Password:</label>
|
||||
<input type="password"><br><br>
|
||||
<label>App ID:</label>
|
||||
<input type="text"><br><br>
|
||||
<label>Depot ID:</label>
|
||||
<input type="text"><br><br>
|
||||
<label>Manifest ID:</label>
|
||||
<input type="text" ><br><br>
|
||||
<input type="submit" value="Download">
|
||||
</body>
|
||||
</html>
|
||||
46
index.js
46
index.js
@@ -1,21 +1,35 @@
|
||||
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()
|
||||
const path = require('path')
|
||||
|
||||
app.on('activate', () => {
|
||||
if (BrowserWindow.getAllWindows().length === 0) createWindow()
|
||||
})
|
||||
const createWindow = () => {
|
||||
// Create the browser window.
|
||||
const mainWindow = new BrowserWindow({
|
||||
autoHideMenuBar: true,
|
||||
})
|
||||
|
||||
// and load the index.html of the app.
|
||||
mainWindow.loadFile('index.html')
|
||||
}
|
||||
|
||||
// This method will be called when Electron has finished
|
||||
// initialization and is ready to create browser windows.
|
||||
// Some APIs can only be used after this event occurs.
|
||||
app.whenReady().then(() => {
|
||||
createWindow()
|
||||
|
||||
app.on('activate', () => {
|
||||
// On macOS it's common to re-create a window in the app when the
|
||||
// dock icon is clicked and there are no other windows open.
|
||||
if (BrowserWindow.getAllWindows().length === 0) createWindow()
|
||||
})
|
||||
})
|
||||
|
||||
// Quit when all windows are closed, except on macOS. There, it's common
|
||||
// for applications and their menu bar to stay active until the user quits
|
||||
// explicitly with Cmd + Q.
|
||||
app.on('window-all-closed', () => {
|
||||
if (process.platform !== 'darwin') app.quit()
|
||||
})
|
||||
})
|
||||
|
||||
// In this file you can include the rest of your app's specific main process
|
||||
// code. You can also put them in separate files and require them here.
|
||||
Reference in New Issue
Block a user