mirror of
https://github.com/JustusPlays78/SectorFileUpdater.git
synced 2025-04-29 10:10:57 +00:00
Herr Doctor, hat mal n bissel von a nach B und so
This commit is contained in:
parent
0a4d47f222
commit
f43e22c811
@ -4,5 +4,4 @@ cid:
|
||||
password:
|
||||
save: true
|
||||
pass: NaN
|
||||
customUrl: ''
|
||||
currentInstalledAirac: 0
|
||||
|
1218
updater/package-lock.json
generated
1218
updater/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -4,5 +4,4 @@ cid:
|
||||
password:
|
||||
save: false
|
||||
pass: "Testen123"
|
||||
customUrl: ""
|
||||
currentInstalledAirac: 2205
|
@ -7,7 +7,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<button id="download" class"button is-primary">Download</button>
|
||||
<button id="dirs">Open</button>
|
||||
<button id="dirs">Select Directory</button>
|
||||
<button id="extract">Extract ZIP</button>
|
||||
<p id="ouput">Output Test here</p>
|
||||
|
||||
|
@ -22,7 +22,6 @@ let data = {
|
||||
save: true,
|
||||
pass: "NaN"
|
||||
},
|
||||
customUrl: "",
|
||||
currentInstalledAirac: 0
|
||||
};
|
||||
|
||||
@ -42,7 +41,7 @@ const createWindow = () => {
|
||||
});
|
||||
mainWindow.loadFile(path.join(__dirname, 'index.html'));
|
||||
mainWindow.webContents.openDevTools();
|
||||
|
||||
/*
|
||||
// Read system yaml
|
||||
try {
|
||||
let fileContents = fs.readFileSync('sectorfileUpdater.yaml', 'utf8');
|
||||
@ -60,7 +59,7 @@ const createWindow = () => {
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
ipcRenderer.send("savefile", {});
|
||||
}
|
||||
}*/
|
||||
|
||||
// Select Directory
|
||||
ipcMain.on('select-dirs', async(event, arg) => {
|
||||
@ -68,6 +67,7 @@ const createWindow = () => {
|
||||
properties: ['openDirectory']
|
||||
})
|
||||
console.log('directories selected', filepath.filePaths)
|
||||
mainWindow.webContents.send("filepath", filepath.filePaths);
|
||||
// Save directory to file
|
||||
});
|
||||
|
||||
@ -87,14 +87,12 @@ const createWindow = () => {
|
||||
});
|
||||
|
||||
// Unzip content
|
||||
ipcMain.on("extract", (event, directory) => {
|
||||
console.log(directory.directoryPath);
|
||||
ipcMain.on("extract", () => {
|
||||
//console.log(directory.directoryPath);
|
||||
var unzipper = new DecompressZip("F:\\Desktop.zip");
|
||||
console.log("Töfte querdrad");
|
||||
unzipper.extract({
|
||||
path: "F:\\test\\" // directory.directoryPath
|
||||
});
|
||||
console.log("Töfte cubique");
|
||||
// Notify "progress" of the decompressed files
|
||||
unzipper.on('progress', function(fileIndex, fileCount) {
|
||||
console.log('Extracted file ' + (fileIndex + 1) + ' of ' + fileCount);
|
||||
@ -103,7 +101,6 @@ const createWindow = () => {
|
||||
unzipper.on('extract', function(log) {
|
||||
console.log('Finished extracting', log);
|
||||
});
|
||||
console.log("Töfte donna");
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -28,13 +28,16 @@ directoryBtn.addEventListener('click', (e) => {
|
||||
})
|
||||
});
|
||||
|
||||
ipcRenderer.on("filepath", (event, file) => {
|
||||
document.getElementById('dirBox').innerText = file;
|
||||
});
|
||||
|
||||
let extractBtn = document.getElementById('extract');
|
||||
extractBtn.addEventListener('click', (e) => {
|
||||
extractBtn.addEventListener('click', () => {
|
||||
let directoryPath = document.getElementById('dirBox');
|
||||
let urlPath = document.getElementById('urlBox');
|
||||
ipcRenderer.send("extract", {
|
||||
url: urlPath.value,
|
||||
properties: { directory: directoryPath.value }
|
||||
});
|
||||
console.log("Töfte");
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user