Explorar el Código

keysnail.js: Show popup on finish of update-init-file

pull/1/head
10sr hace 10 años
padre
commit
ed7becbd24
Se han modificado 1 ficheros con 19 adiciones y 5 borrados
  1. +19
    -5
      _keysnail.js

+ 19
- 5
_keysnail.js Ver fichero

@@ -415,7 +415,6 @@ var updateInitFile = (function(){
throw util.getLocaleString("failedToInstallFile", [aFile.leafName]) + " :: " + x;
}

// TODO: fail when dstdir is empty
try
{
// calc dir from path
@@ -433,8 +432,11 @@ var updateInitFile = (function(){
}

let confirmed = force ||
util.confirm(util.getLocaleString("overWriteConfirmationTitle"),
util.getLocaleString("overWriteConfirmation", [destinationFile.path]));
util.confirm(
util.getLocaleString("overWriteConfirmationTitle"),
util.getLocaleString("overWriteConfirmation",
[destinationFile.path])
);

if (!confirmed) {
throw util.getLocaleString("canceledByUser");
@@ -447,7 +449,9 @@ var updateInitFile = (function(){
}
catch (x)
{
throw util.getLocaleString("failedToInstallFile", [aFile.leafName]) + " :: " + x;
throw util.getLocaleString("failedToInstallFile",
[aFile.leafName]) +
" :: " + x;
}
}

@@ -462,8 +466,18 @@ var updateInitFile = (function(){
let file = userscript.writeTextTmp(name, req.responseText);
let installed = placeFile(file);
util.message(installed.path + " installed");
display.showPopup("update-init-file",
installed.path + " installed")
} catch (x) {
util.message("An error occured while installing required scripts :: " + x.message);
util.message(
"An error occured while installing required scripts :: " +
x.message
);
display.showPopup(
"update-init-file",
"An error occured while installing required scripts :: " +
x.message
);
}
});
}


Cargando…
Cancelar
Guardar