#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere
TypeScript dockerhacktoberfestjavapdfpdf-converterpdf-editorpdf-manipulationpdf-mergerpdf-ocrpdf-toolspdf-web-appspdfmergerself-hosted
Fix Teams and MCP settings pages (#6605)
James Brunton606964ee52a6
diff --git a/frontend/editor/public/locales/en-GB/translation.toml b/frontend/editor/public/locales/en-GB/translation.tomlindex e0745cad5e..86cbf5873b 100644--- a/frontend/editor/public/locales/en-GB/translation.toml+++ b/frontend/editor/public/locales/en-GB/translation.toml@@ -2761,7 +2761,6 @@ copy = "Copy"done = "Done"error = "Error"expand = "Expand"-learnMore = "Learn more"loading = "Loading..."next = "Next"operation = "this operation"@@ -7503,28 +7502,6 @@ removeError = "Failed to remove member"renameError = "Failed to rename team"renameSuccess = "Team renamed successfully"-[team.features]-badge = "Team Features"-subtitle = "Collaborate with your team"-title = "Team Collaboration"-viewPlans = "View Plans"--[team.features.billing]-description = "Manage billing and subscriptions"-title = "Billing Management"--[team.features.credits]-description = "Shared credit pool for all members"-title = "Shared Credits"--[team.features.dashboard]-description = "View team activity and usage"-title = "Team Dashboard"--[team.features.invite]-description = "Add members to your team"-title = "Invite Members"-[team.invitationBanner]acceptButton = "Accept"message = "has invited you to join"@@ -7546,11 +7523,6 @@ remove = "Remove"roleColumn = "Role"title = "Team Members"-[team.upgrade]-button = "Upgrade to Team"-description = "Unlock team collaboration features"-title = "Upgrade to Team Plan"-[textAlign]center = "Center"left = "Left"diff --git a/frontend/editor/src/core/theme/mantineTheme.ts b/frontend/editor/src/core/theme/mantineTheme.tsindex 9bc66d9426..061ac0e819 100644--- a/frontend/editor/src/core/theme/mantineTheme.ts+++ b/frontend/editor/src/core/theme/mantineTheme.ts@@ -150,6 +150,16 @@ export const mantineTheme = createTheme({},},},++ Code: {+ styles: {+ root: {+ backgroundColor: "var(--color-gray-100)",+ color: "var(--text-primary)",+ },+ },+ },+Textarea: {styles: (_theme: MantineTheme) => ({input: {diff --git a/frontend/editor/src/desktop/components/shared/config/configSections/SaaSTeamsSection.tsx b/frontend/editor/src/desktop/components/shared/config/configSections/SaaSTeamsSection.tsxindex b172f71284..74f03b51ab 100644--- a/frontend/editor/src/desktop/components/shared/config/configSections/SaaSTeamsSection.tsx+++ b/frontend/editor/src/desktop/components/shared/config/configSections/SaaSTeamsSection.tsx@@ -10,15 +10,9 @@ import {Badge,ActionIcon,Menu,- List,- ThemeIcon,- Modal,- CloseButton,- Anchor,} from "@mantine/core";import { useTranslation } from "react-i18next";import { useSaaSTeam } from "@app/contexts/SaaSTeamContext";-import { useSaaSBilling } from "@app/contexts/SaasBillingContext";import LocalIcon from "@app/components/shared/LocalIcon";import { Z_INDEX_OVER_CONFIG_MODAL } from "@app/styles/zIndex";import apiClient from "@app/services/apiClient";@@ -43,15 +37,10 @@ export function SaaSTeamsSection() {refreshTeams,} = useSaaSTeam();- // Check Pro status via billing context- const { tier } = useSaaSBilling();- const isPro = tier !== "free";-const [inviteEmail, setInviteEmail] = useState("");const [inviting, setInviting] = useState(false);const [error, setError] = useState<string | null>(null);const [success, setSuccess] = useState<string | null>(null);- const [featuresModalOpened, setFeaturesModalOpened] = useState(false);// Team rename stateconst [isEditingName, setIsEditingName] = useState(false);@@ -71,12 +60,6 @@ export function SaaSTeamsSection() {return () => clearInterval(interval);}, []); // Only run on mount/unmount- const navigateToPlan = () => {- window.dispatchEvent(- new CustomEvent("appConfig:navigate", { detail: { key: "planBilling" } }),- );- };-const handleInvite = async (e: React.FormEvent) => {e.preventDefault();if (!inviteEmail.trim()) return;@@ -321,156 +304,6 @@ export function SaaSTeamsSection() {</Group></div>- {/* Upgrade Banner for Free Users */}- {isPersonalTeam && !isPro && (- <Alert- color="blue"- icon={<LocalIcon icon="info" width={16} height={16} />}- >- <Group justify="space-between" align="center">- <div>- <Text fw={500} size="sm">- {t(- "team.upgrade.title",- "Upgrade to Pro to unlock team features",- )}- </Text>- <Text size="xs" c="dimmed" mt={2}>- {t(- "team.upgrade.description",- "Invite members, share credits, and more.",- )}{" "}- <Anchor- size="xs"- onClick={() => setFeaturesModalOpened(true)}- style={{ cursor: "pointer" }}- >- {t("common.learnMore", "Learn more")}- </Anchor>- </Text>- </div>- <Button size="sm" variant="light" onClick={navigateToPlan}>- {t("team.upgrade.button", "Upgrade to Pro")}- </Button>- </Group>- </Alert>- )}-- {/* Team Features Modal */}- <Modal- opened={featuresModalOpened}- onClose={() => setFeaturesModalOpened(false)}- size="md"- centered- padding="xl"- withCloseButton={false}- zIndex={Z_INDEX_OVER_CONFIG_MODAL}- >- <div style={{ position: "relative" }}>- <CloseButton- onClick={() => setFeaturesModalOpened(false)}- size="lg"- style={{- position: "absolute",- top: -8,- right: -8,- zIndex: 1,- }}- />- <Stack gap="lg" pt="md">- {/* Header */}- <Stack gap="md" align="center">- <Badge size="lg" color="violet" variant="filled">- {t("team.features.badge", "PRO FEATURE")}- </Badge>- <Text size="xl" fw={700} ta="center">- {t("team.features.title", "Team Collaboration")}- </Text>- <Text size="sm" c="dimmed" ta="center">- {t(- "team.features.subtitle",- "Upgrade to Pro and unlock powerful team features",- )}- </Text>- </Stack>-- {/* Features List */}- <List- spacing="md"- size="sm"- icon={- <ThemeIcon color="violet" size={24} radius="xl" variant="light">- <LocalIcon icon="check" width={14} height={14} />- </ThemeIcon>- }- >- <List.Item>- <Text fw={500}>- {t("team.features.invite.title", "Invite team members")}- </Text>- <Text size="xs" c="dimmed">- {t(- "team.features.invite.description",- "Add unlimited users with additional seat purchases",- )}- </Text>- </List.Item>- <List.Item>- <Text fw={500}>- {t(- "team.features.credits.title",- "Share credits across your team",- )}- </Text>- <Text size="xs" c="dimmed">- {t(- "team.features.credits.description",- "Pool resources for collaborative work",- )}- </Text>- </List.Item>- <List.Item>- <Text fw={500}>- {t(- "team.features.dashboard.title",- "Team management dashboard",- )}- </Text>- <Text size="xs" c="dimmed">- {t(- "team.features.dashboard.description",- "Control permissions, monitor usage, and manage members",- )}- </Text>- </List.Item>- <List.Item>- <Text fw={500}>- {t("team.features.billing.title", "Centralized billing")}- </Text>- <Text size="xs" c="dimmed">- {t(- "team.features.billing.description",- "One invoice for all team seats and usage",- )}- </Text>- </List.Item>- </List>-- {/* CTA Button */}- <Button- size="md"- fullWidth- onClick={() => {- setFeaturesModalOpened(false);- navigateToPlan();- }}- >- {t("team.features.viewPlans", "View Pro Plans")}- </Button>- </Stack>- </div>- </Modal>-{/* Error/Success Messages */}{error && (<Alert color="red" onClose={() => setError(null)} withCloseButton>@@ -484,8 +317,8 @@ export function SaaSTeamsSection() {</Alert>)}- {/* Invite Members (Pro Users) */}- {isTeamLeader && isPro && (+ {/* Invite Members */}+ {isTeamLeader && (<div><Text fw={600} size="md" mb="sm">{t("team.invite.title", "Invite Team Member")}diff --git a/frontend/editor/src/saas/components/shared/config/configSections/TeamSection.tsx b/frontend/editor/src/saas/components/shared/config/configSections/TeamSection.tsxindex 22e20ff774..6755a4d746 100644--- a/frontend/editor/src/saas/components/shared/config/configSections/TeamSection.tsx+++ b/frontend/editor/src/saas/components/shared/config/configSections/TeamSection.tsx@@ -10,15 +10,9 @@ import {Badge,ActionIcon,Menu,- List,- ThemeIcon,- Modal,- CloseButton,- Anchor,} from "@mantine/core";import { useTranslation } from "react-i18next";import { useSaaSTeam } from "@app/contexts/SaaSTeamContext";-import { useAuth } from "@app/auth/UseSession";import LocalIcon from "@app/components/shared/LocalIcon";import { Z_INDEX_OVER_CONFIG_MODAL } from "@app/styles/zIndex";import apiClient from "@app/services/apiClient";@@ -38,13 +32,10 @@ const TeamSection: React.FC = () => {refreshTeams,} = useSaaSTeam();- const { isPro } = useAuth();-const [inviteEmail, setInviteEmail] = useState("");const [inviting, setInviting] = useState(false);const [error, setError] = useState<string | null>(null);const [success, setSuccess] = useState<string | null>(null);- const [featuresModalOpened, setFeaturesModalOpened] = useState(false);// Team rename stateconst [isEditingName, setIsEditingName] = useState(false);@@ -64,12 +55,6 @@ const TeamSection: React.FC = () => {return () => clearInterval(interval);}, []); // Only run on mount/unmount- const navigateToPlan = () => {- window.dispatchEvent(- new CustomEvent("appConfig:navigate", { detail: { key: "plan" } }),- );- };-const handleInvite = async (e: React.FormEvent) => {e.preventDefault();if (!inviteEmail.trim()) return;@@ -314,156 +299,6 @@ const TeamSection: React.FC = () => {</Group></div>- {/* Upgrade Banner for Free Users */}- {isPersonalTeam && !isPro && (- <Alert- color="blue"- icon={<LocalIcon icon="info" width={16} height={16} />}- >- <Group justify="space-between" align="center">- <div>- <Text fw={500} size="sm">- {t(- "team.upgrade.title",- "Upgrade to Pro to unlock team features",- )}- </Text>- <Text size="xs" c="dimmed" mt={2}>- {t(- "team.upgrade.description",- "Invite members, share credits, and more.",- )}{" "}- <Anchor- size="xs"- onClick={() => setFeaturesModalOpened(true)}- style={{ cursor: "pointer" }}- >- {t("common.learnMore", "Learn more")}- </Anchor>- </Text>- </div>- <Button size="sm" variant="light" onClick={navigateToPlan}>- {t("team.upgrade.button", "Upgrade to Pro")}- </Button>- </Group>- </Alert>- )}-- {/* Team Features Modal */}- <Modal- opened={featuresModalOpened}- onClose={() => setFeaturesModalOpened(false)}- size="md"- centered- padding="xl"- withCloseButton={false}- zIndex={Z_INDEX_OVER_CONFIG_MODAL}- >- <div style={{ position: "relative" }}>- <CloseButton- onClick={() => setFeaturesModalOpened(false)}- size="lg"- style={{- position: "absolute",- top: -8,- right: -8,- zIndex: 1,- }}- />- <Stack gap="lg" pt="md">- {/* Header */}- <Stack gap="md" align="center">- <Badge size="lg" color="violet" variant="filled">- {t("team.features.badge", "PRO FEATURE")}- </Badge>- <Text size="xl" fw={700} ta="center">- {t("team.features.title", "Team Collaboration")}- </Text>- <Text size="sm" c="dimmed" ta="center">- {t(- "team.features.subtitle",- "Upgrade to Pro and unlock powerful team features",- )}- </Text>- </Stack>-- {/* Features List */}- <List- spacing="md"- size="sm"- icon={- <ThemeIcon color="violet" size={24} radius="xl" variant="light">- <LocalIcon icon="check" width={14} height={14} />- </ThemeIcon>- }- >- <List.Item>- <Text fw={500}>- {t("team.features.invite.title", "Invite team members")}- </Text>- <Text size="xs" c="dimmed">- {t(- "team.features.invite.description",- "Add unlimited users with additional seat purchases",- )}- </Text>- </List.Item>- <List.Item>- <Text fw={500}>- {t(- "team.features.credits.title",- "Share credits across your team",- )}- </Text>- <Text size="xs" c="dimmed">- {t(- "team.features.credits.description",- "Pool resources for collaborative work",- )}- </Text>- </List.Item>- <List.Item>- <Text fw={500}>- {t(- "team.features.dashboard.title",- "Team management dashboard",- )}- </Text>- <Text size="xs" c="dimmed">- {t(- "team.features.dashboard.description",- "Control permissions, monitor usage, and manage members",- )}- </Text>- </List.Item>- <List.Item>- <Text fw={500}>- {t("team.features.billing.title", "Centralized billing")}- </Text>- <Text size="xs" c="dimmed">- {t(- "team.features.billing.description",- "One invoice for all team seats and usage",- )}- </Text>- </List.Item>- </List>-- {/* CTA Button */}- <Button- size="md"- fullWidth- onClick={() => {- setFeaturesModalOpened(false);- navigateToPlan();- }}- >- {t("team.features.viewPlans", "View Pro Plans")}- </Button>- </Stack>- </div>- </Modal>-{/* Error/Success Messages */}{error && (<Alert color="red" onClose={() => setError(null)} withCloseButton>@@ -477,8 +312,8 @@ const TeamSection: React.FC = () => {</Alert>)}- {/* Invite Members (Pro Users) */}- {isTeamLeader && isPro && (+ {/* Invite Members */}+ {isTeamLeader && (<div><Text fw={600} size="md" mb="sm">{t("team.invite.title", "Invite Team Member")}