fixed version for release

This commit is contained in:
PaulaBras 2023-02-26 14:54:41 +01:00
parent 031ff79306
commit e52b71f2bf
6 changed files with 2937 additions and 2978 deletions

View File

@ -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"

View File

@ -15,7 +15,7 @@
AIRAC Updater
</h1>
</div>
</head>
</head>
<body class="ecsu-bg-dark-out text-white">
@ -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>
<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>
<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>
@ -65,11 +66,11 @@
<select id="files"></select>
<button id="download" style="display:block">Download Update</button>
</div>
<br>
<br>
<div>
<div>
<h3 class="text-white">Credentials save</h3>
<form>
<!--Realname: <input type="text" id="realname" />
@ -113,7 +114,8 @@
<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>
<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>
@ -152,7 +154,8 @@
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>
<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>
@ -165,15 +168,15 @@
}
}
</script>
</div>
</div>
<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="./data_structure.js"></script>
<script src="./download.js"></script>
<script src="./git_ops.js"></script>
<script src="./append_to_file.js"></script>

View File

@ -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());
});
};

View File

@ -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;

View File

@ -1,3 +1,3 @@
{
"path": "F:\\02 Benutzer\\Chef\\Downloads\\testing"
"path": "F:\\02 Benutzer\\Chef\\Downloads\\Donwload tets"
}

File diff suppressed because it is too large Load Diff