upload of modified open file WIP

This commit is contained in:
zadam
2021-04-24 11:39:44 +02:00
parent 6d2d72fa7f
commit 4ff7e0813d
11 changed files with 82 additions and 26 deletions

View File

@@ -89,18 +89,18 @@ function makeToast(message, protectingLabel, text) {
}
ws.subscribeToMessages(async message => {
if (message.taskType !== 'protect-notes') {
if (message.taskType !== 'protectNotes') {
return;
}
const protectingLabel = message.data.protect ? "Protecting" : "Unprotecting";
if (message.type === 'task-error') {
if (message.type === 'taskError') {
toastService.closePersistent(message.taskId);
toastService.showError(message.message);
} else if (message.type === 'task-progress-count') {
} else if (message.type === 'taskProgressCount') {
toastService.showPersistent(makeToast(message, protectingLabel,protectingLabel + " in progress: " + message.progressCount));
} else if (message.type === 'task-succeeded') {
} else if (message.type === 'taskSucceeded') {
const toast = makeToast(message, protectingLabel, protectingLabel + " finished successfully.");
toast.closeAfter = 3000;