[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:
@@ -12,7 +12,17 @@ import {ipcRenderer, webFrame} from 'electron';
|
||||
// we'll be able to use it again if there is a workaround for the 'os' import
|
||||
//import log from 'electron-log';
|
||||
|
||||
import {NOTIFY_MENTION, IS_UNREAD, UNREAD_RESULT, SESSION_EXPIRED, SET_VIEW_NAME, REACT_APP_INITIALIZED, USER_ACTIVITY_UPDATE, CLOSE_TEAMS_DROPDOWN} from 'common/communication';
|
||||
import {
|
||||
NOTIFY_MENTION,
|
||||
IS_UNREAD,
|
||||
UNREAD_RESULT,
|
||||
SESSION_EXPIRED,
|
||||
SET_VIEW_NAME,
|
||||
REACT_APP_INITIALIZED,
|
||||
USER_ACTIVITY_UPDATE,
|
||||
CLOSE_TEAMS_DROPDOWN,
|
||||
BROWSER_HISTORY_PUSH,
|
||||
} from 'common/communication';
|
||||
|
||||
const UNREAD_COUNT_INTERVAL = 1000;
|
||||
const CLEAR_CACHE_INTERVAL = 6 * 60 * 60 * 1000; // 6 hours
|
||||
@@ -114,6 +124,11 @@ window.addEventListener('message', ({origin, data = {}} = {}) => {
|
||||
ipcRenderer.send(NOTIFY_MENTION, title, body, channel, teamId, url, silent, messageData);
|
||||
break;
|
||||
}
|
||||
case 'browser-history-push': {
|
||||
const {path} = message;
|
||||
ipcRenderer.send(BROWSER_HISTORY_PUSH, viewName, path);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
if (typeof type === 'undefined') {
|
||||
console.log('ignoring message of undefined type:');
|
||||
@@ -211,4 +226,16 @@ window.addEventListener('click', () => {
|
||||
ipcRenderer.send(CLOSE_TEAMS_DROPDOWN);
|
||||
});
|
||||
|
||||
ipcRenderer.on(BROWSER_HISTORY_PUSH, (event, pathName) => {
|
||||
window.postMessage(
|
||||
{
|
||||
type: 'browser-history-push-return',
|
||||
message: {
|
||||
pathName,
|
||||
},
|
||||
},
|
||||
window.location.origin,
|
||||
);
|
||||
});
|
||||
|
||||
/* eslint-enable no-magic-numbers */
|
||||
|
Reference in New Issue
Block a user