Skip to content

#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere

feat(settings): link ENTERPRISE badges to plan page (#6560)

Anthony Stirling2f6b113a1330
diff --git a/frontend/editor/src/proprietary/components/shared/config/configSections/AdminDatabaseSection.tsx b/frontend/editor/src/proprietary/components/shared/config/configSections/AdminDatabaseSection.tsx
index b8959c8ca9..7fd272fb5e 100644
--- a/frontend/editor/src/proprietary/components/shared/config/configSections/AdminDatabaseSection.tsx
+++ b/frontend/editor/src/proprietary/components/shared/config/configSections/AdminDatabaseSection.tsx
@@ -1,5 +1,6 @@
import { useCallback, useEffect, useMemo, useState } from "react";
import { isAxiosError } from "axios";
+import { useNavigate } from "react-router-dom";
import { useTranslation } from "react-i18next";
import {
NumberInput,
@@ -52,6 +53,7 @@ interface DatabaseSettingsData {
export default function AdminDatabaseSection() {
const { t } = useTranslation();
+ const navigate = useNavigate();
const { loginEnabled, validateLoginEnabled, getDisabledStyles } =
useLoginRequired();
const {
@@ -462,7 +464,16 @@ export default function AdminDatabaseSection() {
)}
</Text>
</div>
- <Badge color="grape" size="lg">
+ <Badge
+ color="grape"
+ size="lg"
+ style={{ cursor: "pointer" }}
+ onClick={() => navigate("/settings/adminPlan")}
+ title={t(
+ "admin.settings.badge.clickToUpgrade",
+ "Click to view plan details",
+ )}
+ >
ENTERPRISE
</Badge>
</Group>
diff --git a/frontend/editor/src/proprietary/components/shared/config/configSections/AdminSecuritySection.tsx b/frontend/editor/src/proprietary/components/shared/config/configSections/AdminSecuritySection.tsx
index 6c701833fe..20e559d9e2 100644
--- a/frontend/editor/src/proprietary/components/shared/config/configSections/AdminSecuritySection.tsx
+++ b/frontend/editor/src/proprietary/components/shared/config/configSections/AdminSecuritySection.tsx
@@ -1,4 +1,5 @@
import { useCallback, useEffect } from "react";
+import { useNavigate } from "react-router-dom";
import { useTranslation } from "react-i18next";
import {
NumberInput,
@@ -67,6 +68,7 @@ interface SecuritySettingsData {
export default function AdminSecuritySection() {
const { t } = useTranslation();
+ const navigate = useNavigate();
const { loginEnabled, validateLoginEnabled } = useLoginRequired();
const {
restartModalOpened,
@@ -817,7 +819,16 @@ export default function AdminSecuritySection() {
<Text fw={600} size="sm">
{t("admin.settings.security.audit.label", "Audit Logging")}
</Text>
- <Badge color="grape" size="sm">
+ <Badge
+ color="grape"
+ size="sm"
+ style={{ cursor: "pointer" }}
+ onClick={() => navigate("/settings/adminPlan")}
+ title={t(
+ "admin.settings.badge.clickToUpgrade",
+ "Click to view plan details",
+ )}
+ >
ENTERPRISE
</Badge>
</Group>