Ver código fonte

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

pull/1/head
10sr 9 anos atrás
pai
commit
ed7becbd24
1 arquivos alterados com 19 adições e 5 exclusões
  1. +19
    -5
      _keysnail.js

+ 19
- 5
_keysnail.js Ver arquivo

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


Carregando…
Cancelar
Salvar