Merge remote-tracking branch 'origin/master' into next

# Conflicts:
#	package-lock.json
#	src/public/app/services/note_content_renderer.js
#	src/public/stylesheets/style.css
#	src/routes/api/files.js
#	src/routes/routes.js
This commit is contained in:
zadam
2021-04-25 11:14:45 +02:00
55 changed files with 378 additions and 165 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;