Commit 405d2837 authored by Oriol Gómez's avatar Oriol Gómez

latest

parent f2fdf5af
......@@ -487,11 +487,12 @@ callback(answer);
export async function checkPack(changeBoot = true, debug = false) {
editing = false;
const fs = require('fs');
if (window.localStorage.getItem("path")!=null && !fs.existsSync(window.localStorage.getItem("path"))) {
await changeLang();
window.localStorage.clear();
await new ScrollingText(strings.get("noFindFolder",[window.localStorage.getItem("path")]));
let dir=await changeDir();
if (typeof dir !== 'undefined' && dir != '') {
packDirectory=dir;
window.localStorage.setItem("path",packDirectory);
......
......@@ -180,9 +180,10 @@ counter++;
export async function changeDir() {
return new Promise((resolve,reject)=> {
const stuff = dialog.showOpenDialog({
title: strings.get('selectPath'),
title: strings.get('selectNewPath'),
properties: ['openDirectory']
}, path=> {
console.log("path"+path);
resolve(String(path));
});
});
......
......@@ -9,6 +9,7 @@ class Strings {
this.strings = {};
this.strings[1] = {
//New English
selectNewPath:"Select the new path for the packs",
noFindFolder:"I can't find your packs folder in %1, you will now be prompted to choose where it is.",
mDir:"Packs folder change (currently %1)",
selectPath:"Please select the path where your packs are saved:",
......@@ -305,6 +306,7 @@ You can upload your pack via the website by making a zip file of the pack's fold
};
this.strings[2] = {
//new Spanish
selectNewPath:"Selecciona una nueva ruta para los packs",
noFindFolder:"No puedo encontrar tu carpeta de packs en %1, por favor dime dónde está en el cuadro que se te mostrará ahora.",
mDir:"Cambiar carpeta de packs (ahora %1)",
selectPath:"Por favor dime la carpeta donde guardaremos los packs",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment