fix: seen-by layout, group-name notif, teams-style badge, excel paste, spellcheck (0.1.11/batch64)
1. Message-info popup: ONE scroll region for the whole list with sticky Seen / Not-seen headers (was a separate scrollbar per section), realigned. 2. Group message notifications now title = GROUP name, body = "Sender: text". 3. Unread taskbar badge: solid red rounded-square (Teams-style) + white outline instead of the gradient disc. 4. Pasting Excel/Sheets cells no longer uploads a screenshot — when the clipboard carries real text, the text is pasted; image-only clipboards still upload. 5. Spell check in the message box (red squiggles) with a right-click menu of corrections + add-to-dictionary; spellcheck enabled on the textarea. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+33
-1
@@ -8,7 +8,7 @@
|
||||
// - external links open in the user's browser, not inside the app
|
||||
//
|
||||
// Server origin is configurable so the same build works against prod or a dev server.
|
||||
const { app, BrowserWindow, session, desktopCapturer, shell, Menu, ipcMain, nativeImage, Notification } = require('electron');
|
||||
const { app, BrowserWindow, session, desktopCapturer, shell, Menu, MenuItem, ipcMain, nativeImage, Notification } = require('electron');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const os = require('os');
|
||||
@@ -221,6 +221,28 @@ function createWindow() {
|
||||
if (!url.startsWith(SERVER_URL)) { shell.openExternal(url); return { action: 'deny' }; }
|
||||
return { action: 'allow' };
|
||||
});
|
||||
|
||||
// Right-click menu: spelling corrections for the misspelled word under the cursor (+ add to
|
||||
// dictionary), plus standard cut/copy/paste in editable fields. This is what makes the spell
|
||||
// checker actionable — click a suggestion to fix the word in place.
|
||||
win.webContents.on('context-menu', (_e, params) => {
|
||||
const menu = new Menu();
|
||||
for (const s of (params.dictionarySuggestions || [])) {
|
||||
menu.append(new MenuItem({ label: s, click: () => win.webContents.replaceMisspelling(s) }));
|
||||
}
|
||||
if (params.misspelledWord) {
|
||||
if (params.dictionarySuggestions && params.dictionarySuggestions.length) menu.append(new MenuItem({ type: 'separator' }));
|
||||
menu.append(new MenuItem({ label: 'Add to dictionary', click: () => win.webContents.session.addWordToSpellCheckerDictionary(params.misspelledWord) }));
|
||||
}
|
||||
if (params.isEditable || params.editFlags.canCopy) {
|
||||
if (menu.items.length) menu.append(new MenuItem({ type: 'separator' }));
|
||||
if (params.editFlags.canCut) menu.append(new MenuItem({ role: 'cut' }));
|
||||
if (params.editFlags.canCopy) menu.append(new MenuItem({ role: 'copy' }));
|
||||
if (params.isEditable) menu.append(new MenuItem({ role: 'paste' }));
|
||||
if (params.isEditable && params.editFlags.canSelectAll) menu.append(new MenuItem({ role: 'selectAll' }));
|
||||
}
|
||||
if (menu.items.length) menu.popup();
|
||||
});
|
||||
}
|
||||
|
||||
// The full Connect experience needs several web capabilities that Electron denies by
|
||||
@@ -294,6 +316,16 @@ function configureSession() {
|
||||
ses.setPermissionRequestHandler((_wc, permission, callback) => callback(GRANTED.has(permission)));
|
||||
// Sync check (some getUserMedia paths query this before requesting)
|
||||
ses.setPermissionCheckHandler((_wc, permission) => GRANTED.has(permission));
|
||||
// Spell check for the message box (red squiggles) with right-click corrections. Uses the OS
|
||||
// dictionaries; en-US by default plus whatever the OS UI language is, so mixed typing still checks.
|
||||
try {
|
||||
ses.setSpellCheckerEnabled(true);
|
||||
const langs = ['en-US'];
|
||||
const sys = (app.getLocale && app.getLocale()) || '';
|
||||
const avail = (ses.availableSpellCheckerLanguages || []);
|
||||
if (sys && sys !== 'en-US' && (!avail.length || avail.includes(sys))) langs.push(sys);
|
||||
ses.setSpellCheckerLanguages(langs);
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
app.whenReady().then(() => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "biz-connect-desktop",
|
||||
"version": "0.1.10",
|
||||
"version": "0.1.11",
|
||||
"description": "Biz Connect technician desktop client — loads the Connect web UI with native screen capture",
|
||||
"author": {
|
||||
"name": "BizGaze",
|
||||
|
||||
Reference in New Issue
Block a user