[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:
Devin Binnie
2021-09-01 12:45:37 -04:00
committed by GitHub
parent 58bb16fbb6
commit 37c637efe9
27 changed files with 570 additions and 232 deletions

View File

@@ -29,14 +29,17 @@ export function getDefaultTeamWithTabsFromTeam(team: Team) {
{
name: TAB_MESSAGING,
order: 0,
isClosed: false,
},
{
name: TAB_FOCALBOARD,
order: 1,
isClosed: false,
},
{
name: TAB_PLAYBOOKS,
order: 2,
isClosed: false,
},
],
};
@@ -59,3 +62,21 @@ export function getServerView(srv: MattermostServer, tab: Tab) {
export function getTabViewName(serverName: string, tabType: string) {
return `${serverName}___${tabType}`;
}
export function getTabDisplayName(tabType: TabType) {
switch (tabType) {
case TAB_MESSAGING:
return 'Channels';
case TAB_FOCALBOARD:
return 'Boards';
case TAB_PLAYBOOKS:
return 'Playbooks';
default:
throw new Error('Not implemeneted');
}
}
export function canCloseTab(tabType: TabType) {
// TODO: maybe rework to make the property belong to the class somehow
return tabType !== TAB_MESSAGING;
}