browser extension: asking for user attention

pull/1856/head
antelle 2021-04-08 17:28:41 +02:00
parent ee03435ca7
commit f9cd0d4e29
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
1 changed files with 9 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import { RuntimeInfo } from 'const/runtime-info';
import { Launcher } from 'comp/launcher';
import { AppSettingsModel } from 'models/app-settings-model';
import { AppModel } from 'models/app-model';
import { Alerts } from 'comp/ui/alerts';
const connectedClients = {};
@ -119,6 +120,10 @@ const ProtocolHandlers = {
Events.emit('lock-workspace');
if (Alerts.alertDisplayed) {
BrowserExtensionConnector.focusKeeWeb();
}
return encryptResponse(request, {
action: 'lock-database',
error: 'No open files',
@ -219,6 +224,10 @@ const BrowserExtensionConnector = {
allFilesClosed() {
this.sendResponse({ action: 'database-locked' });
},
focusKeeWeb() {
this.sendResponse({ action: 'attention-required' });
}
};