[MM-36432][MM-37072][MM-37073] Logic to support Focalboard and Playbooks tabs (#1680)
* Tab stuff * Inter-tab navigation * Close tab functionality * [MM-36342][MM-37072] Logic to support Focalboard and Playbooks tabs * Update to version 5.0 * Update config.yml * Updated routes * Update names for products * [MM-37073] Close unneeded tabs when not using v6.0 * Merge'd * Update config.yml * Update config.yml * Fix menu names * PR feedback * blank * blank * blank * PR feedback * Update config.yml * PR feedback Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
This commit is contained in:
@@ -57,7 +57,6 @@ export class MattermostView extends EventEmitter {
|
||||
usesAsteriskForUnreads?: boolean;
|
||||
|
||||
currentFavicon?: string;
|
||||
isInitialized: boolean;
|
||||
hasBeenShown: boolean;
|
||||
altLastPressed?: boolean;
|
||||
contextMenu: ContextMenu;
|
||||
@@ -90,7 +89,6 @@ export class MattermostView extends EventEmitter {
|
||||
|
||||
log.info(`BrowserView created for server ${this.tab.name}`);
|
||||
|
||||
this.isInitialized = false;
|
||||
this.hasBeenShown = false;
|
||||
|
||||
if (process.platform !== 'darwin') {
|
||||
@@ -98,6 +96,10 @@ export class MattermostView extends EventEmitter {
|
||||
this.view.webContents.on('before-input-event', this.handleInputEvents);
|
||||
}
|
||||
|
||||
this.view.webContents.on('did-finish-load', () => {
|
||||
this.view.webContents.send(SET_VIEW_NAME, this.tab.name);
|
||||
});
|
||||
|
||||
this.contextMenu = new ContextMenu({}, this.view);
|
||||
this.maxRetries = MAX_SERVER_RETRIES;
|
||||
}
|
||||
@@ -179,7 +181,6 @@ export class MattermostView extends EventEmitter {
|
||||
this.status = Status.WAITING_MM;
|
||||
this.removeLoading = setTimeout(this.setInitialized, MAX_LOADING_SCREEN_SECONDS, true);
|
||||
this.emit(LOAD_SUCCESS, this.tab.name, loadURL);
|
||||
this.view.webContents.send(SET_VIEW_NAME, this.tab.name);
|
||||
this.setBounds(getWindowBoundaries(this.window, !(urlUtils.isTeamUrl(this.tab.url || '', this.view.webContents.getURL()) || urlUtils.isAdminUrl(this.tab.url || '', this.view.webContents.getURL()))));
|
||||
};
|
||||
}
|
||||
@@ -259,6 +260,10 @@ export class MattermostView extends EventEmitter {
|
||||
delete this.removeLoading;
|
||||
}
|
||||
|
||||
isInitialized = () => {
|
||||
return this.status === Status.READY;
|
||||
}
|
||||
|
||||
openDevTools = () => {
|
||||
this.view.webContents.openDevTools({mode: 'detach'});
|
||||
}
|
||||
|
Reference in New Issue
Block a user