[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

@@ -37,8 +37,34 @@ function shorten(string: string, max?: number) {
return string;
}
export function isServerVersionGreaterThanOrEqualTo(currentVersion: string, compareVersion: string): boolean {
if (currentVersion === compareVersion) {
return true;
}
// We only care about the numbers
const currentVersionNumber = (currentVersion || '').split('.').filter((x) => (/^[0-9]+$/).exec(x) !== null);
const compareVersionNumber = (compareVersion || '').split('.').filter((x) => (/^[0-9]+$/).exec(x) !== null);
for (let i = 0; i < Math.max(currentVersionNumber.length, compareVersionNumber.length); i++) {
const currentVersion = parseInt(currentVersionNumber[i], 10) || 0;
const compareVersion = parseInt(compareVersionNumber[i], 10) || 0;
if (currentVersion > compareVersion) {
return true;
}
if (currentVersion < compareVersion) {
return false;
}
}
// If all components are equal, then return true
return true;
}
export default {
getDisplayBoundaries,
runMode,
shorten,
isServerVersionGreaterThanOrEqualTo,
};