mirror of
https://github.com/JustusPlays78/SectorFileUpdater.git
synced 2025-04-29 10:10:57 +00:00
fixed version for release
This commit is contained in:
parent
031ff79306
commit
e52b71f2bf
@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "sectorfile_updater",
|
||||
"productName": "Sectorfile Updater",
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.2",
|
||||
"description": "This application allows users to easily update and maintain their sector files. It offers a simple, intuitive interface for downloading and installing the latest version of sector files, ensuring that users have access to the most accurate and up-to-date data. With automatic update checks and notifications, users can rest assured that their sector files are always up-to-date and ready for use.",
|
||||
"main": "src/index.js",
|
||||
"scripts": {
|
||||
"start": "electron-forge start",
|
||||
"package": "electron-forge package",
|
||||
"make": "electron-forge make",
|
||||
"make": "electron-forge make --platform=win32",
|
||||
"publish": "electron-forge publish",
|
||||
"lint": "echo \"No linting configured\""
|
||||
},
|
||||
@ -20,8 +20,7 @@
|
||||
"config": {
|
||||
"forge": {
|
||||
"packagerConfig": {},
|
||||
"makers": [
|
||||
{
|
||||
"makers": [{
|
||||
"name": "@electron-forge/maker-squirrel",
|
||||
"config": {
|
||||
"name": "updater"
|
||||
@ -64,4 +63,4 @@
|
||||
"@electron-forge/maker-zip": "^6.0.0-beta.66",
|
||||
"electron": "^21.0.1"
|
||||
}
|
||||
}
|
||||
}
|
@ -11,17 +11,17 @@
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700">
|
||||
<link rel="stylesheet" href="./index.css">
|
||||
<div class="container-fluid">
|
||||
<h1 class="text-white text-center">
|
||||
AIRAC Updater
|
||||
</h1>
|
||||
<h1 class="text-white text-center">
|
||||
AIRAC Updater
|
||||
</h1>
|
||||
</div>
|
||||
</head>
|
||||
</head>
|
||||
|
||||
|
||||
<body class="ecsu-bg-dark-out text-white">
|
||||
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<h3 class="text-white">Settings</h3>
|
||||
<button id="select-dir">Select Directory</button>
|
||||
<input type="text" id="dirBox" name="name" size="50" readonly />
|
||||
@ -33,18 +33,19 @@
|
||||
<!--Insert Credentials to Profilefiles <input type="checkbox" id="applyToPrf" />-->
|
||||
<div class="form-check form-switch ps-0">
|
||||
<input class="form-check-input ms-auto" type="checkbox" id="applyToPrf">
|
||||
<label class="form-check-label text-white ms-3 text-truncate w-80 mb-0"
|
||||
for="flexSwitchCheckDefault">Insert Credentials to Profilefiles</label>
|
||||
</div>
|
||||
<label class="form-check-label text-white ms-3 text-truncate w-80 mb-0" for="flexSwitchCheckDefault">Insert
|
||||
Credentials to Profilefiles</label>
|
||||
</div>
|
||||
<br>
|
||||
<!--Insert Hoppie Code: <input type="checkbox" id="applyHoppie" />-->
|
||||
<div class="form-check form-switch ps-0">
|
||||
<input class="form-check-input ms-auto" type="checkbox" id="applyHoppie">
|
||||
<label class="form-check-label text-white ms-3 text-truncate w-80 mb-0"
|
||||
for="flexSwitchCheckDefault">Insert Hoppie Code</label>
|
||||
</div>
|
||||
|
||||
<label class="form-check-label text-white ms-3 text-truncate w-80 mb-0" for="flexSwitchCheckDefault">Insert
|
||||
Hoppie Code</label>
|
||||
</div>
|
||||
|
||||
<div id="login">
|
||||
|
||||
<body class="text-white">Select Rating</body>
|
||||
<select id="rating">
|
||||
<option id="0">OBS</option>
|
||||
@ -64,15 +65,15 @@
|
||||
<select id="gng"></select>
|
||||
<select id="files"></select>
|
||||
<button id="download" style="display:block">Download Update</button>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
<div>
|
||||
<h3 class="text-white">Credentials save</h3>
|
||||
<form>
|
||||
<!--Realname: <input type="text" id="realname" />
|
||||
<div>
|
||||
<h3 class="text-white">Credentials save</h3>
|
||||
<form>
|
||||
<!--Realname: <input type="text" id="realname" />
|
||||
<input type="checkbox" id="saverealname" />
|
||||
<br> Username: <input type="text" id="username" />
|
||||
<input type="checkbox" id="saveuser" />
|
||||
@ -80,48 +81,49 @@
|
||||
<input type="checkbox" id="savepw" />
|
||||
<br> Hoppie Code: <input type="password" id="passwordhoppie" />
|
||||
<input type="checkbox" id="savepwhoppie" />-->
|
||||
<br>
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-lg-3">
|
||||
<div class="form-group">
|
||||
<div class="form-check form-switch ps-0">
|
||||
<label class="form-control-label text-white" for="input-username">Realname</label>
|
||||
<input class="form-check-input ms-auto" type="checkbox" id="saverealname">
|
||||
<input type="text" id="realname" class="form-control" placeholder="Realname">
|
||||
</div>
|
||||
<br>
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-lg-3">
|
||||
<div class="form-group">
|
||||
<div class="form-check form-switch ps-0">
|
||||
<label class="form-control-label text-white" for="input-username">Realname</label>
|
||||
<input class="form-check-input ms-auto" type="checkbox" id="saverealname">
|
||||
<input type="text" id="realname" class="form-control" placeholder="Realname">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="form-group">
|
||||
<div class="form-check form-switch ps-0">
|
||||
<label class="form-control-label text-white" for="input-username">CID</label>
|
||||
<input class="form-check-input ms-auto" type="checkbox" id="saveuser">
|
||||
<input type="text" id="username" class="form-control" placeholder="CID">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="form-group">
|
||||
<div class="form-check form-switch ps-0">
|
||||
<label class="form-control-label text-white" for="input-username">Password</label>
|
||||
<input class="form-check-input ms-auto" type="checkbox" id="savepw">
|
||||
<input type="password" id="password" class="form-control" placeholder="Password">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="form-group">
|
||||
<div class="form-check form-switch ps-0">
|
||||
<label class="form-control-label text-white" for="input-username">Hoppie
|
||||
Code</label>
|
||||
<input class="form-check-input ms-auto" type="checkbox" id="savepwhoppie">
|
||||
<input type="text" id="passwordhoppie" class="form-control" placeholder="Hoppie Code">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="form-group">
|
||||
<div class="form-check form-switch ps-0">
|
||||
<label class="form-control-label text-white" for="input-username">CID</label>
|
||||
<input class="form-check-input ms-auto" type="checkbox" id="saveuser">
|
||||
<input type="text" id="username" class="form-control" placeholder="CID">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="form-group">
|
||||
<div class="form-check form-switch ps-0">
|
||||
<label class="form-control-label text-white" for="input-username">Password</label>
|
||||
<input class="form-check-input ms-auto" type="checkbox" id="savepw">
|
||||
<input type="password" id="password" class="form-control" placeholder="Password">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="form-group">
|
||||
<div class="form-check form-switch ps-0">
|
||||
<label class="form-control-label text-white" for="input-username">Hoppie Code</label>
|
||||
<input class="form-check-input ms-auto" type="checkbox" id="savepwhoppie">
|
||||
<input type="text" id="passwordhoppie" class="form-control" placeholder="Hoppie Code">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--<div class="tooltip">
|
||||
|
||||
<!--<div class="tooltip">
|
||||
<br> Password: <input type="password" id="password" />
|
||||
<input type="checkbox" id="savepw" />
|
||||
<span class="tooltiptext">Please be aware that the password you enter will be stored in plain
|
||||
@ -132,7 +134,7 @@
|
||||
using a unique and strong password specifically for this
|
||||
account.</span>
|
||||
</div>-->
|
||||
<!--<div class="tooltip">
|
||||
<!--<div class="tooltip">
|
||||
<br>Password Hoppie: <input type="password" id="passwordhoppie" />
|
||||
<input type="checkbox" id="savepwhoppie" />
|
||||
<span class="tooltiptext">Please be aware that the password you enter will be stored in plain
|
||||
@ -143,40 +145,41 @@
|
||||
using a unique and strong password specifically for this
|
||||
account.</span>
|
||||
</div>-->
|
||||
<br>
|
||||
<button id="savecred">Save your Credentials</button>
|
||||
</form>
|
||||
</div>
|
||||
<br>
|
||||
<button id="savecred">Save your Credentials</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<form>
|
||||
If you want Eurosounds, please check the box below and click the download button. <br>
|
||||
<input type="checkbox" id="download-checkbox" onclick="toggleDownloadButton()"> I confirm that I would like to download the file.
|
||||
<br>
|
||||
<button id="download-link" style="display:none" ><a href="https://cdn.ganderoceanic.ca/resources/files/eurosounds/eurosounds-8apr20.zip">Download</a></button>
|
||||
<!--<a href="https://cdn.ganderoceanic.ca/resources/files/eurosounds/eurosounds-8apr20.zip" id="download-link" style="display:none" class="text-white">Download</a>-->
|
||||
</form>
|
||||
<script>
|
||||
function toggleDownloadButton() {
|
||||
const downloadLink = document.getElementById("download-link");
|
||||
if (document.getElementById("download-checkbox").checked) {
|
||||
downloadLink.style.display = "block";
|
||||
} else {
|
||||
downloadLink.style.display = "none";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<form>
|
||||
If you want Eurosounds, please check the box below and click the download button. <br>
|
||||
<input type="checkbox" id="download-checkbox" onclick="toggleDownloadButton()"> I confirm that I would like to download the file.
|
||||
<br>
|
||||
<button id="download-link" style="display:none"><a
|
||||
href="https://cdn.ganderoceanic.ca/resources/files/eurosounds/eurosounds-8apr20.zip">Download</a></button>
|
||||
<!--<a href="https://cdn.ganderoceanic.ca/resources/files/eurosounds/eurosounds-8apr20.zip" id="download-link" style="display:none" class="text-white">Download</a>-->
|
||||
</form>
|
||||
<script>
|
||||
function toggleDownloadButton() {
|
||||
const downloadLink = document.getElementById("download-link");
|
||||
if (document.getElementById("download-checkbox").checked) {
|
||||
downloadLink.style.display = "block";
|
||||
} else {
|
||||
downloadLink.style.display = "none";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="./html_elements.js"></script>
|
||||
<script src="./renderer.js"></script>
|
||||
<script src="./startup.js"></script>
|
||||
<script src="./save.js"></script>
|
||||
<script src="./getFiles.js"></script>
|
||||
<script src="./data_structure.js"></script>
|
||||
<script src="./download.js"></script>
|
||||
<script src="./git_ops.js"></script>
|
||||
<script src="./append_to_file.js"></script>
|
||||
<script src="./data_structure.js"></script>
|
||||
<script src="./html_elements.js"></script>
|
||||
<script src="./renderer.js"></script>
|
||||
<script src="./startup.js"></script>
|
||||
<script src="./save.js"></script>
|
||||
<script src="./getFiles.js"></script>
|
||||
<script src="./download.js"></script>
|
||||
<script src="./git_ops.js"></script>
|
||||
<script src="./append_to_file.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,6 +1,6 @@
|
||||
const { app, BrowserWindow, dialog, ipcMain, Menu } = require('electron');
|
||||
const path = require('path');
|
||||
//Menu.setApplicationMenu(false); // Top Bar removal
|
||||
Menu.setApplicationMenu(false); // Top Bar removal
|
||||
|
||||
// Handle creating/removing shortcuts on Windows when installing/uninstalling.
|
||||
// eslint-disable-next-line global-require
|
||||
@ -21,7 +21,7 @@ const createWindow = () => {
|
||||
},
|
||||
});
|
||||
mainWindow.loadFile(path.join(__dirname, 'index.html'));
|
||||
mainWindow.webContents.openDevTools();
|
||||
//mainWindow.webContents.openDevTools();
|
||||
// Select Directory
|
||||
ipcMain.on('app-path', async(event, arg) => {
|
||||
filepath = await dialog.showOpenDialog(mainWindow, {
|
||||
@ -33,6 +33,9 @@ const createWindow = () => {
|
||||
ipcMain.on('download-progress', (event, args) => {
|
||||
mainWindow.webContents.send("progressbar", args);
|
||||
});
|
||||
ipcMain.on("app-path-get", (event) => {
|
||||
mainWindow.webContents.send("app-path-get", app.getAppPath());
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
@ -1,15 +1,20 @@
|
||||
let systemsettings = "systemfile.json";
|
||||
let settings = "settings.json";
|
||||
var filePath = "C:\\Users\\Julian\\Desktop\\SECTORFILES\\LEeeres"; // Set to exe path ex: app.getPath('exe') + '\\' + systemsettings;
|
||||
let filePath = "";
|
||||
|
||||
//var filePath = app.getPath('exe') + '\\' + systemsettings; // Set to exe path ex: app.getPath('exe') + '\\' + systemsettings;
|
||||
|
||||
async function firstStart() {
|
||||
// Get the file path
|
||||
// filePath = await app.getPath('home');
|
||||
await ipcRenderer.send('app-path-get');
|
||||
await ipcRenderer.on("app-path-get", (event, path) => {
|
||||
filePath = path; // 'undefined\settings.json'
|
||||
});
|
||||
|
||||
await delay(250);
|
||||
// Check if the system settings file exists
|
||||
if (fs.existsSync(`${filePath}/${systemsettings}`)) {
|
||||
// If the file exists, read the structure
|
||||
systemstructure = JSON.parse(fs.readFileSync(filePath + "\\" + systemsettings, 'utf8'));
|
||||
systemstructure = JSON.parse(fs.readFileSync(`${filePath}/${systemsettings}`, 'utf8'));
|
||||
} else {
|
||||
// If the file doesn't exist, get the user path and create the file
|
||||
await changeUserpath();
|
||||
@ -22,7 +27,7 @@ async function firstStart() {
|
||||
structure = JSON.parse(fs.readFileSync(systemstructure.path + "\\" + settings, 'utf8'));
|
||||
} else {
|
||||
// If the file doesn't exist, create the file with the default structure
|
||||
fs.writeFileSync(systemstructure.path + "\\" + settings, JSON.stringify(structure, null, 4), 'utf8');
|
||||
fs.writeFileSync(`${systemstructure.path}/${settings}`, JSON.stringify(structure, null, 4), 'utf8');
|
||||
}
|
||||
|
||||
|
||||
@ -34,6 +39,8 @@ async function firstStart() {
|
||||
|
||||
function updateUI() {
|
||||
|
||||
console.log(structure);
|
||||
|
||||
if (structure.realname.save) {
|
||||
realnameInput.value = structure.realname.name;
|
||||
checkBoxRealname.checked = true;
|
||||
|
@ -1,3 +1,3 @@
|
||||
{
|
||||
"path": "F:\\02 Benutzer\\Chef\\Downloads\\testing"
|
||||
"path": "F:\\02 Benutzer\\Chef\\Downloads\\Donwload tets"
|
||||
}
|
5695
updater/yarn.lock
5695
updater/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user