Skip to content

Commit 88bb630

Browse files
authored
Merge pull request #855 from devtron-labs/feat/freemium
feat: add support for freemium license
2 parents b4c9dad + 7efb428 commit 88bb630

File tree

14 files changed

+491
-52
lines changed

14 files changed

+491
-52
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "1.19.0",
3+
"version": "1.19.1",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",
Lines changed: 320 additions & 0 deletions
Loading

src/Shared/Components/GenericModal/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import { GenericModalProps } from './types'
1818

1919
export const MODAL_WIDTH_TO_CLASS_NAME_MAP: Record<GenericModalProps['width'], string> = {
20+
450: 'w-450',
2021
500: 'w-500',
2122
600: 'w-600',
2223
800: 'w-800',

src/Shared/Components/GenericModal/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export interface GenericModalProps extends Partial<Pick<BackdropProps, 'onEscape
2828
* Width of the modal (in pixels).
2929
* @default 600
3030
*/
31-
width?: 500 | 600 | 800
31+
width?: 450 | 500 | 600 | 800
3232
/**
3333
* Determines if the modal should close when the user clicks outside of it (on the backdrop).
3434
* @default false

src/Shared/Components/Header/HelpButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export const HelpButton = ({ serverInfo, fetchingServerInfo, onClick, hideGettin
148148
alignment="end"
149149
width={220}
150150
options={getHelpActionMenuOptions({
151-
isTrial: licenseData?.isTrial ?? false,
151+
isTrialOrFreemium: (licenseData?.isTrial || licenseData?.isFreemium) ?? false,
152152
isEnterprise,
153153
})}
154154
onClick={handleActionMenuClick}

src/Shared/Components/Header/utils.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ export const setActionWithExpiry = (key: string, days: number): void => {
4444

4545
export const getHelpActionMenuOptions = ({
4646
isEnterprise,
47-
isTrial,
47+
isTrialOrFreemium,
4848
}: {
4949
isEnterprise: boolean
50-
isTrial: boolean
50+
isTrialOrFreemium: boolean
5151
}): HelpButtonActionMenuProps['options'] => [
5252
{
5353
items: COMMON_HELP_ACTION_MENU_ITEMS,
@@ -56,7 +56,9 @@ export const getHelpActionMenuOptions = ({
5656
? [
5757
{
5858
groupLabel: 'Enterprise Support',
59-
items: isTrial ? ENTERPRISE_TRIAL_HELP_ACTION_MENU_ITEMS : ENTERPRISE_HELP_ACTION_MENU_ITEMS,
59+
items: isTrialOrFreemium
60+
? ENTERPRISE_TRIAL_HELP_ACTION_MENU_ITEMS
61+
: ENTERPRISE_HELP_ACTION_MENU_ITEMS,
6062
},
6163
]
6264
: [

0 commit comments

Comments
 (0)