diff --git a/desktop/static/index.dev.html b/desktop/static/index.dev.html index 49c4a6d43..a7624e2d7 100644 --- a/desktop/static/index.dev.html +++ b/desktop/static/index.dev.html @@ -68,6 +68,13 @@ suppressErrors = true; }); + socket.on('plugins-source-updated', (pluginsChanged) => { + window.postMessage({ + type: 'plugins-source-updated', + data: pluginsChanged + }) + }) + function openError(text) { if (suppressErrors) { return; @@ -105,4 +112,4 @@ - \ No newline at end of file + diff --git a/desktop/static/index.web.dev.html b/desktop/static/index.web.dev.html index 63f3f4878..45db413aa 100644 --- a/desktop/static/index.web.dev.html +++ b/desktop/static/index.web.dev.html @@ -65,13 +65,26 @@ let suppressErrors = false; const socket = new WebSocket(`ws://${location.host}`); + window.devSocket = socket; socket.addEventListener('message', ({ data: dataRaw }) => { const message = JSON.parse(dataRaw.toString()) - if (message.event === 'hasErrors') { - openError(message.payload); - suppressErrors = true; + if (typeof message.event === 'string') { + switch (message.event) { + case 'hasErrors': { + openError(message.payload); + suppressErrors = true; + break; + } + case 'plugins-source-updated': { + window.postMessage({ + type: 'plugins-source-updated', + data: message.payload + }) + break; + } + } } }) @@ -128,4 +141,4 @@ - \ No newline at end of file +