Fixes 79 typescript errors. Discovered at least two bugs in
`notifications.ts`, and I'm pretty sure this feature was at least
partially broken and may still be, I don't really know how to test it.
After this, only like ~10 typescript errors remain in the codebase but
those are harder to solve.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
letdisableRemovedfileEvent=false;// when resetting the dropzone (removeAllFiles), disable the "removedfile" event
letfileUuidDict={};// to record: if a comment has been saved, then the uploaded files won't be deleted from server when clicking the Remove in the dropzone
// the reason is that the preview "callback(dataURL)" is assign to "img.onerror" then "thumbnail" uses the error object as the dataURL and generates '<img src="[object Event]">'