mirror of
https://github.com/JustusPlays78/SectorFileUpdater.git
synced 2025-04-29 19:24:24 +00:00
fixed version for release
This commit is contained in:
parent
031ff79306
commit
e52b71f2bf
@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"name": "sectorfile_updater",
|
"name": "sectorfile_updater",
|
||||||
"productName": "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.",
|
"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",
|
"main": "src/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "electron-forge start",
|
"start": "electron-forge start",
|
||||||
"package": "electron-forge package",
|
"package": "electron-forge package",
|
||||||
"make": "electron-forge make",
|
"make": "electron-forge make --platform=win32",
|
||||||
"publish": "electron-forge publish",
|
"publish": "electron-forge publish",
|
||||||
"lint": "echo \"No linting configured\""
|
"lint": "echo \"No linting configured\""
|
||||||
},
|
},
|
||||||
@ -20,8 +20,7 @@
|
|||||||
"config": {
|
"config": {
|
||||||
"forge": {
|
"forge": {
|
||||||
"packagerConfig": {},
|
"packagerConfig": {},
|
||||||
"makers": [
|
"makers": [{
|
||||||
{
|
|
||||||
"name": "@electron-forge/maker-squirrel",
|
"name": "@electron-forge/maker-squirrel",
|
||||||
"config": {
|
"config": {
|
||||||
"name": "updater"
|
"name": "updater"
|
||||||
|
@ -11,11 +11,11 @@
|
|||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700">
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700">
|
||||||
<link rel="stylesheet" href="./index.css">
|
<link rel="stylesheet" href="./index.css">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<h1 class="text-white text-center">
|
<h1 class="text-white text-center">
|
||||||
AIRAC Updater
|
AIRAC Updater
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
||||||
<body class="ecsu-bg-dark-out text-white">
|
<body class="ecsu-bg-dark-out text-white">
|
||||||
@ -33,18 +33,19 @@
|
|||||||
<!--Insert Credentials to Profilefiles <input type="checkbox" id="applyToPrf" />-->
|
<!--Insert Credentials to Profilefiles <input type="checkbox" id="applyToPrf" />-->
|
||||||
<div class="form-check form-switch ps-0">
|
<div class="form-check form-switch ps-0">
|
||||||
<input class="form-check-input ms-auto" type="checkbox" id="applyToPrf">
|
<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"
|
<label class="form-check-label text-white ms-3 text-truncate w-80 mb-0" for="flexSwitchCheckDefault">Insert
|
||||||
for="flexSwitchCheckDefault">Insert Credentials to Profilefiles</label>
|
Credentials to Profilefiles</label>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!--Insert Hoppie Code: <input type="checkbox" id="applyHoppie" />-->
|
<!--Insert Hoppie Code: <input type="checkbox" id="applyHoppie" />-->
|
||||||
<div class="form-check form-switch ps-0">
|
<div class="form-check form-switch ps-0">
|
||||||
<input class="form-check-input ms-auto" type="checkbox" id="applyHoppie">
|
<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"
|
<label class="form-check-label text-white ms-3 text-truncate w-80 mb-0" for="flexSwitchCheckDefault">Insert
|
||||||
for="flexSwitchCheckDefault">Insert Hoppie Code</label>
|
Hoppie Code</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="login">
|
<div id="login">
|
||||||
|
|
||||||
<body class="text-white">Select Rating</body>
|
<body class="text-white">Select Rating</body>
|
||||||
<select id="rating">
|
<select id="rating">
|
||||||
<option id="0">OBS</option>
|
<option id="0">OBS</option>
|
||||||
@ -64,15 +65,15 @@
|
|||||||
<select id="gng"></select>
|
<select id="gng"></select>
|
||||||
<select id="files"></select>
|
<select id="files"></select>
|
||||||
<button id="download" style="display:block">Download Update</button>
|
<button id="download" style="display:block">Download Update</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h3 class="text-white">Credentials save</h3>
|
<h3 class="text-white">Credentials save</h3>
|
||||||
<form>
|
<form>
|
||||||
<!--Realname: <input type="text" id="realname" />
|
<!--Realname: <input type="text" id="realname" />
|
||||||
<input type="checkbox" id="saverealname" />
|
<input type="checkbox" id="saverealname" />
|
||||||
<br> Username: <input type="text" id="username" />
|
<br> Username: <input type="text" id="username" />
|
||||||
<input type="checkbox" id="saveuser" />
|
<input type="checkbox" id="saveuser" />
|
||||||
@ -80,48 +81,49 @@
|
|||||||
<input type="checkbox" id="savepw" />
|
<input type="checkbox" id="savepw" />
|
||||||
<br> Hoppie Code: <input type="password" id="passwordhoppie" />
|
<br> Hoppie Code: <input type="password" id="passwordhoppie" />
|
||||||
<input type="checkbox" id="savepwhoppie" />-->
|
<input type="checkbox" id="savepwhoppie" />-->
|
||||||
<br>
|
<br>
|
||||||
<div>
|
<div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-3">
|
<div class="col-lg-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-check form-switch ps-0">
|
<div class="form-check form-switch ps-0">
|
||||||
<label class="form-control-label text-white" for="input-username">Realname</label>
|
<label class="form-control-label text-white" for="input-username">Realname</label>
|
||||||
<input class="form-check-input ms-auto" type="checkbox" id="saverealname">
|
<input class="form-check-input ms-auto" type="checkbox" id="saverealname">
|
||||||
<input type="text" id="realname" class="form-control" placeholder="Realname">
|
<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>
|
||||||
</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" />
|
<br> Password: <input type="password" id="password" />
|
||||||
<input type="checkbox" id="savepw" />
|
<input type="checkbox" id="savepw" />
|
||||||
<span class="tooltiptext">Please be aware that the password you enter will be stored in plain
|
<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
|
using a unique and strong password specifically for this
|
||||||
account.</span>
|
account.</span>
|
||||||
</div>-->
|
</div>-->
|
||||||
<!--<div class="tooltip">
|
<!--<div class="tooltip">
|
||||||
<br>Password Hoppie: <input type="password" id="passwordhoppie" />
|
<br>Password Hoppie: <input type="password" id="passwordhoppie" />
|
||||||
<input type="checkbox" id="savepwhoppie" />
|
<input type="checkbox" id="savepwhoppie" />
|
||||||
<span class="tooltiptext">Please be aware that the password you enter will be stored in plain
|
<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
|
using a unique and strong password specifically for this
|
||||||
account.</span>
|
account.</span>
|
||||||
</div>-->
|
</div>-->
|
||||||
<br>
|
<br>
|
||||||
<button id="savecred">Save your Credentials</button>
|
<button id="savecred">Save your Credentials</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form>
|
<form>
|
||||||
If you want Eurosounds, please check the box below and click the download button. <br>
|
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.
|
<input type="checkbox" id="download-checkbox" onclick="toggleDownloadButton()"> I confirm that I would like to download the file.
|
||||||
<br>
|
<br>
|
||||||
<button id="download-link" style="display:none" ><a href="https://cdn.ganderoceanic.ca/resources/files/eurosounds/eurosounds-8apr20.zip">Download</a></button>
|
<button id="download-link" style="display:none"><a
|
||||||
<!--<a href="https://cdn.ganderoceanic.ca/resources/files/eurosounds/eurosounds-8apr20.zip" id="download-link" style="display:none" class="text-white">Download</a>-->
|
href="https://cdn.ganderoceanic.ca/resources/files/eurosounds/eurosounds-8apr20.zip">Download</a></button>
|
||||||
</form>
|
<!--<a href="https://cdn.ganderoceanic.ca/resources/files/eurosounds/eurosounds-8apr20.zip" id="download-link" style="display:none" class="text-white">Download</a>-->
|
||||||
<script>
|
</form>
|
||||||
function toggleDownloadButton() {
|
<script>
|
||||||
const downloadLink = document.getElementById("download-link");
|
function toggleDownloadButton() {
|
||||||
if (document.getElementById("download-checkbox").checked) {
|
const downloadLink = document.getElementById("download-link");
|
||||||
downloadLink.style.display = "block";
|
if (document.getElementById("download-checkbox").checked) {
|
||||||
} else {
|
downloadLink.style.display = "block";
|
||||||
downloadLink.style.display = "none";
|
} else {
|
||||||
}
|
downloadLink.style.display = "none";
|
||||||
}
|
}
|
||||||
</script>
|
}
|
||||||
</div>
|
</script>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<script src="./html_elements.js"></script>
|
<script src="./data_structure.js"></script>
|
||||||
<script src="./renderer.js"></script>
|
<script src="./html_elements.js"></script>
|
||||||
<script src="./startup.js"></script>
|
<script src="./renderer.js"></script>
|
||||||
<script src="./save.js"></script>
|
<script src="./startup.js"></script>
|
||||||
<script src="./getFiles.js"></script>
|
<script src="./save.js"></script>
|
||||||
<script src="./data_structure.js"></script>
|
<script src="./getFiles.js"></script>
|
||||||
<script src="./download.js"></script>
|
<script src="./download.js"></script>
|
||||||
<script src="./git_ops.js"></script>
|
<script src="./git_ops.js"></script>
|
||||||
<script src="./append_to_file.js"></script>
|
<script src="./append_to_file.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
@ -1,6 +1,6 @@
|
|||||||
const { app, BrowserWindow, dialog, ipcMain, Menu } = require('electron');
|
const { app, BrowserWindow, dialog, ipcMain, Menu } = require('electron');
|
||||||
const path = require('path');
|
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.
|
// Handle creating/removing shortcuts on Windows when installing/uninstalling.
|
||||||
// eslint-disable-next-line global-require
|
// eslint-disable-next-line global-require
|
||||||
@ -21,7 +21,7 @@ const createWindow = () => {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
mainWindow.loadFile(path.join(__dirname, 'index.html'));
|
mainWindow.loadFile(path.join(__dirname, 'index.html'));
|
||||||
mainWindow.webContents.openDevTools();
|
//mainWindow.webContents.openDevTools();
|
||||||
// Select Directory
|
// Select Directory
|
||||||
ipcMain.on('app-path', async(event, arg) => {
|
ipcMain.on('app-path', async(event, arg) => {
|
||||||
filepath = await dialog.showOpenDialog(mainWindow, {
|
filepath = await dialog.showOpenDialog(mainWindow, {
|
||||||
@ -33,6 +33,9 @@ const createWindow = () => {
|
|||||||
ipcMain.on('download-progress', (event, args) => {
|
ipcMain.on('download-progress', (event, args) => {
|
||||||
mainWindow.webContents.send("progressbar", 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 systemsettings = "systemfile.json";
|
||||||
let settings = "settings.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() {
|
async function firstStart() {
|
||||||
// Get the file path
|
await ipcRenderer.send('app-path-get');
|
||||||
// filePath = await app.getPath('home');
|
await ipcRenderer.on("app-path-get", (event, path) => {
|
||||||
|
filePath = path; // 'undefined\settings.json'
|
||||||
|
});
|
||||||
|
|
||||||
|
await delay(250);
|
||||||
// Check if the system settings file exists
|
// Check if the system settings file exists
|
||||||
if (fs.existsSync(`${filePath}/${systemsettings}`)) {
|
if (fs.existsSync(`${filePath}/${systemsettings}`)) {
|
||||||
// If the file exists, read the structure
|
// If the file exists, read the structure
|
||||||
systemstructure = JSON.parse(fs.readFileSync(filePath + "\\" + systemsettings, 'utf8'));
|
systemstructure = JSON.parse(fs.readFileSync(`${filePath}/${systemsettings}`, 'utf8'));
|
||||||
} else {
|
} else {
|
||||||
// If the file doesn't exist, get the user path and create the file
|
// If the file doesn't exist, get the user path and create the file
|
||||||
await changeUserpath();
|
await changeUserpath();
|
||||||
@ -22,7 +27,7 @@ async function firstStart() {
|
|||||||
structure = JSON.parse(fs.readFileSync(systemstructure.path + "\\" + settings, 'utf8'));
|
structure = JSON.parse(fs.readFileSync(systemstructure.path + "\\" + settings, 'utf8'));
|
||||||
} else {
|
} else {
|
||||||
// If the file doesn't exist, create the file with the default structure
|
// 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() {
|
function updateUI() {
|
||||||
|
|
||||||
|
console.log(structure);
|
||||||
|
|
||||||
if (structure.realname.save) {
|
if (structure.realname.save) {
|
||||||
realnameInput.value = structure.realname.name;
|
realnameInput.value = structure.realname.name;
|
||||||
checkBoxRealname.checked = true;
|
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