[MM-55152] Add new Desktop API endpoints, improve preload script, some clean-up (#2900)
* Add constants for app info, add to API * Migrate history button * Converted calls API over to context bridge, removed some unnecessary logging * Convert to TS, add types for web app to consume * Fix tests, prune * Fix lint * More changes to support the legacy API * Force legacy code off, add support for unreads/mentions/expired through the API * Fix issues with cross-tab login, removed need for log in/log out signalling * Fixed test, typos * Change package name for types * Add some other stuff to the types * PR feedback * More feedback * Use npm package * Change types and API to provide off listeners * Version number * Lock * Fix typo * Add sessionID for calls
This commit is contained in:
@@ -65,7 +65,7 @@ export class DownloadsDropdownMenuView {
|
||||
}
|
||||
this.bounds = this.getBounds(this.windowBounds.width, DOWNLOADS_DROPDOWN_MENU_FULL_WIDTH, DOWNLOADS_DROPDOWN_MENU_FULL_HEIGHT);
|
||||
|
||||
const preload = getLocalPreload('desktopAPI.js');
|
||||
const preload = getLocalPreload('internalAPI.js');
|
||||
this.view = new BrowserView({webPreferences: {
|
||||
preload,
|
||||
|
||||
@@ -83,7 +83,7 @@ export class DownloadsDropdownMenuView {
|
||||
* the downloads dropdown at the correct position
|
||||
*/
|
||||
private updateWindowBounds = (newBounds: Electron.Rectangle) => {
|
||||
log.debug('updateWindowBounds');
|
||||
log.silly('updateWindowBounds');
|
||||
|
||||
this.windowBounds = newBounds;
|
||||
this.updateDownloadsDropdownMenu();
|
||||
@@ -98,7 +98,7 @@ export class DownloadsDropdownMenuView {
|
||||
}
|
||||
|
||||
private updateDownloadsDropdownMenu = () => {
|
||||
log.debug('updateDownloadsDropdownMenu');
|
||||
log.silly('updateDownloadsDropdownMenu');
|
||||
|
||||
this.view?.webContents.send(
|
||||
UPDATE_DOWNLOADS_DROPDOWN_MENU,
|
||||
@@ -131,7 +131,7 @@ export class DownloadsDropdownMenuView {
|
||||
}
|
||||
|
||||
private handleClose = () => {
|
||||
log.debug('handleClose');
|
||||
log.silly('handleClose');
|
||||
|
||||
this.open = false;
|
||||
this.item = undefined;
|
||||
|
Reference in New Issue
Block a user