mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-22 15:56:16 -04:00
Fix status messages for baking
This commit is contained in:
parent
02bda3250b
commit
1cedc94652
3 changed files with 10 additions and 5 deletions
|
@ -25,6 +25,7 @@ self.chef = new Chef();
|
|||
|
||||
self.OpModules = OpModules;
|
||||
self.OperationConfig = OperationConfig;
|
||||
self.inputNum = -1;
|
||||
|
||||
|
||||
// Tell the app that the worker has loaded and is ready to operate
|
||||
|
@ -94,6 +95,7 @@ async function bake(data) {
|
|||
self.loadRequiredModules(data.recipeConfig);
|
||||
|
||||
try {
|
||||
self.inputNum = data.inputNum;
|
||||
const response = await self.chef.bake(
|
||||
data.input, // The user's input
|
||||
data.recipeConfig, // The configuration of the recipe
|
||||
|
@ -127,6 +129,7 @@ async function bake(data) {
|
|||
})
|
||||
});
|
||||
}
|
||||
self.inputNum = -1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -206,7 +209,8 @@ self.sendStatusMessage = function(msg) {
|
|||
self.postMessage({
|
||||
action: "statusMessage",
|
||||
data: {
|
||||
message: msg
|
||||
message: msg,
|
||||
inputNum: self.inputNum || -1
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue