diff --git a/package-lock.json b/package-lock.json index 70f1111b6..0c35ce2b3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "1.19.0", + "version": "1.19.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "1.19.0", + "version": "1.19.1", "hasInstallScript": true, "license": "ISC", "dependencies": { diff --git a/package.json b/package.json index 3740eefd6..dfd5c4c4b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "1.19.0", + "version": "1.19.1", "description": "Supporting common component library", "type": "module", "main": "dist/index.js", diff --git a/src/Assets/IconV2/ic-upgrade-enterprise.svg b/src/Assets/IconV2/ic-upgrade-enterprise.svg new file mode 100644 index 000000000..eb7ca93cf --- /dev/null +++ b/src/Assets/IconV2/ic-upgrade-enterprise.svg @@ -0,0 +1,320 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Shared/Components/GenericModal/constants.ts b/src/Shared/Components/GenericModal/constants.ts index 6f821f0cc..bef8d8813 100644 --- a/src/Shared/Components/GenericModal/constants.ts +++ b/src/Shared/Components/GenericModal/constants.ts @@ -17,6 +17,7 @@ import { GenericModalProps } from './types' export const MODAL_WIDTH_TO_CLASS_NAME_MAP: Record = { + 450: 'w-450', 500: 'w-500', 600: 'w-600', 800: 'w-800', diff --git a/src/Shared/Components/GenericModal/types.ts b/src/Shared/Components/GenericModal/types.ts index 9a0e46c3d..9f3417cda 100644 --- a/src/Shared/Components/GenericModal/types.ts +++ b/src/Shared/Components/GenericModal/types.ts @@ -28,7 +28,7 @@ export interface GenericModalProps extends Partial { export const getHelpActionMenuOptions = ({ isEnterprise, - isTrial, + isTrialOrFreemium, }: { isEnterprise: boolean - isTrial: boolean + isTrialOrFreemium: boolean }): HelpButtonActionMenuProps['options'] => [ { items: COMMON_HELP_ACTION_MENU_ITEMS, @@ -56,7 +56,9 @@ export const getHelpActionMenuOptions = ({ ? [ { groupLabel: 'Enterprise Support', - items: isTrial ? ENTERPRISE_TRIAL_HELP_ACTION_MENU_ITEMS : ENTERPRISE_HELP_ACTION_MENU_ITEMS, + items: isTrialOrFreemium + ? ENTERPRISE_TRIAL_HELP_ACTION_MENU_ITEMS + : ENTERPRISE_HELP_ACTION_MENU_ITEMS, }, ] : [ diff --git a/src/Shared/Components/Icon/Icon.tsx b/src/Shared/Components/Icon/Icon.tsx index 410648573..50d4f62b7 100644 --- a/src/Shared/Components/Icon/Icon.tsx +++ b/src/Shared/Components/Icon/Icon.tsx @@ -212,6 +212,7 @@ import { ReactComponent as ICTravclan } from '@IconsV2/ic-travclan.svg' import { ReactComponent as ICTwoCubes } from '@IconsV2/ic-two-cubes.svg' import { ReactComponent as ICUbuntu } from '@IconsV2/ic-ubuntu.svg' import { ReactComponent as ICUnknown } from '@IconsV2/ic-unknown.svg' +import { ReactComponent as ICUpgradeEnterprise } from '@IconsV2/ic-upgrade-enterprise.svg' import { ReactComponent as ICUserCircle } from '@IconsV2/ic-user-circle.svg' import { ReactComponent as ICUserKey } from '@IconsV2/ic-user-key.svg' import { ReactComponent as ICUsers } from '@IconsV2/ic-users.svg' @@ -438,6 +439,7 @@ export const iconMap = { 'ic-two-cubes': ICTwoCubes, 'ic-ubuntu': ICUbuntu, 'ic-unknown': ICUnknown, + 'ic-upgrade-enterprise': ICUpgradeEnterprise, 'ic-user-circle': ICUserCircle, 'ic-user-key': ICUserKey, 'ic-users': ICUsers, diff --git a/src/Shared/Components/License/DevtronLicenseCard.tsx b/src/Shared/Components/License/DevtronLicenseCard.tsx index d463f0a8c..346f2cdda 100644 --- a/src/Shared/Components/License/DevtronLicenseCard.tsx +++ b/src/Shared/Components/License/DevtronLicenseCard.tsx @@ -23,6 +23,7 @@ import { ClipboardButton, getTTLInHumanReadableFormat } from '@Common/index' import { CONTACT_SUPPORT_LINK, ENTERPRISE_SUPPORT_LINK } from '@Shared/constants' import { AppThemeType } from '@Shared/Providers' import { getThemeOppositeThemeClass } from '@Shared/Providers/ThemeProvider/utils' +import { LicensingErrorCodes } from '@Shared/types' import { Button, ButtonComponentType, ButtonVariantType } from '../Button' import { Icon } from '../Icon' @@ -33,6 +34,85 @@ import './licenseCard.scss' const DAMPEN_FACTOR = 50 +const ContactSupportButton = () => ( +