core&ui: add progress callback (beta)

This commit is contained in:
undefined committed 2023-04-09 23:55:29 +08:00
1 parent 275e82f0e5
commit 16db95ee87
7 files changed
+40 -5

No files matched your search

@@ -3,6 +3,7 @@
/// <reference lib="ES2015" />
/// <reference types="@types/sharedworker" />
import ReconnectingWebsocket from 'reconnecting-websocket';
import { FLAG_INFO } from 'vj/constant/message';
console.log('SharedWorker init');
@@ -55,6 +56,7 @@ function initConn(path: string, port: MessagePort, cookie: any) {
setTimeout(() => {
delete ack[payload.mdoc.id];
if (acked) return;
if (payload.mdoc.flag & FLAG_INFO) return;
if (Notification?.permission !== 'granted') {
console.log('Notification permission denied');
return;