@crowdin/app-project-module 3.2.2 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22513,7 +22513,7 @@
22513
22513
  };
22514
22514
  function AppAlert({ title, variant = 'info', hideIcon = false, className, children, dangerouslySetInnerHTML, ...props }) {
22515
22515
  const Icon = variantIcons[variant];
22516
- return (jsxRuntimeExports.jsxs(Alert, { variant: variant === 'destructive' ? 'destructive' : 'default', className: cn(variantStyles[variant], className), ...props, children: [!hideIcon && jsxRuntimeExports.jsx(Icon, {}), title && jsxRuntimeExports.jsx(AlertTitle, { children: title }), dangerouslySetInnerHTML ? (jsxRuntimeExports.jsx(AlertDescription, { dangerouslySetInnerHTML: dangerouslySetInnerHTML })) : (jsxRuntimeExports.jsx(AlertDescription, { children: children }))] }));
22516
+ return (jsxRuntimeExports.jsxs(Alert, { variant: variant === 'destructive' ? 'destructive' : 'default', className: cn(variantStyles[variant], className), ...props, children: [!hideIcon && jsxRuntimeExports.jsx(Icon, {}), title && jsxRuntimeExports.jsx(AlertTitle, { children: title }), dangerouslySetInnerHTML ? (jsxRuntimeExports.jsx(AlertDescription, { className: "html-content block", dangerouslySetInnerHTML: dangerouslySetInnerHTML })) : (jsxRuntimeExports.jsx(AlertDescription, { children: children }))] }));
22517
22517
  }
22518
22518
 
22519
22519
  var __defProp$1 = Object.defineProperty;
@@ -22752,14 +22752,14 @@
22752
22752
  .then(checkResponse)
22753
22753
  .then(reloadLocation)
22754
22754
  .then(() => localStorage.removeItem(`revised_${name}`))
22755
- .catch((e) => catchRejection(e, 'Looks like you are not logged in'));
22755
+ .catch((e) => catchRejection(e, "Can't disconnect the integration"));
22756
22756
  }
22757
22757
  function contactUser(userId) {
22758
22758
  AP.getContext(function (context) {
22759
22759
  AP.redirect(`${context.organization_id ? '/u' : ''}/messages/create/${userId}`);
22760
22760
  });
22761
22761
  }
22762
- return (jsxRuntimeExports.jsxs("div", { className: "mx-auto max-w-[1420px] px-6 py-4", children: [jsxRuntimeExports.jsx("div", { className: "flex min-h-[500px] items-center justify-center", children: jsxRuntimeExports.jsxs("div", { children: [jsxRuntimeExports.jsxs("div", { className: "mb-6", children: [jsxRuntimeExports.jsx("h3", { className: "m-0 text-2xl font-semibold text-foreground", children: message }), owners && (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("p", { className: "text-sm leading-relaxed text-foreground", children: "This integration allows only one connection per project to ensure consistent configuration and prevent file import or synchronization issues." }), owners.length > 1 ? (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("p", { className: "mt-4 text-sm", children: "Managed by:" }), jsxRuntimeExports.jsx("ul", { children: owners.map((owner) => (jsxRuntimeExports.jsx("li", { children: jsxRuntimeExports.jsx("a", { href: "#", className: "text-primary underline-offset-4 hover:underline", onClick: () => contactUser(owner.id), children: owner.name }) }, owner.id))) }), jsxRuntimeExports.jsx("p", { className: "mt-4 text-sm", children: "To request access, please contact one of the project members listed above." })] })) : (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsxs("p", { className: "mt-4 text-sm", children: ["Managed by:", ' ', jsxRuntimeExports.jsx("a", { href: "#", className: "text-primary underline-offset-4 hover:underline", onClick: () => contactUser(owners[0].id), children: owners[0].name })] }), jsxRuntimeExports.jsx("p", { className: "mt-4 text-sm", children: "To request access, please contact the project member listed above." })] }))] }))] }), allowLogout && hideActions ? (jsxRuntimeExports.jsx(Card, { children: jsxRuntimeExports.jsxs(CardContent, { className: "grid gap-4", children: [jsxRuntimeExports.jsx(AppAlert, { variant: "warning", children: "Deleting the integration will disconnect it and reset its settings for this project." }), jsxRuntimeExports.jsx(Button, { variant: "outline", onClick: () => integrationLogout(), children: "Delete Integration" })] }) })) : (!hideActions && (jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntimeExports.jsx(Button, { variant: "outline", onClick: () => integrationLogout(), children: "Log out" }), jsxRuntimeExports.jsxs("span", { children: [' ', "or", ' ', jsxRuntimeExports.jsx("a", { className: "text-primary underline-offset-4 hover:underline", href: "https://crowdin.com/contacts", target: "_blank", rel: "noreferrer", children: "contact us" }), ' ', "for help"] })] })))] }) }), jsxRuntimeExports.jsx(Toaster, {})] }));
22762
+ return (jsxRuntimeExports.jsxs("div", { className: "mx-auto max-w-[1420px] px-6 py-4", children: [jsxRuntimeExports.jsx("div", { className: "flex min-h-[500px] items-center justify-center", children: jsxRuntimeExports.jsxs("div", { children: [jsxRuntimeExports.jsxs("div", { className: "mb-6", children: [jsxRuntimeExports.jsx("h3", { className: "m-0 text-2xl font-semibold text-foreground", children: message }), owners && (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("p", { className: "text-sm leading-relaxed text-foreground", children: "This integration allows only one connection per project to ensure consistent configuration and prevent file import or synchronization issues." }), owners.length > 1 ? (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("p", { className: "mt-4 text-sm", children: "Managed by:" }), jsxRuntimeExports.jsx("ul", { children: owners.map((owner) => (jsxRuntimeExports.jsx("li", { children: jsxRuntimeExports.jsx("a", { href: "#", className: "text-primary underline-offset-4 hover:underline", onClick: () => contactUser(owner.id), children: owner.name }) }, owner.id))) }), jsxRuntimeExports.jsx("p", { className: "mt-4 text-sm", children: "To request access, please contact one of the project members listed above." })] })) : (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsxs("p", { className: "mt-4 text-sm", children: ["Managed by:", ' ', jsxRuntimeExports.jsx("a", { href: "#", className: "text-primary underline-offset-4 hover:underline", onClick: () => contactUser(owners[0].id), children: owners[0].name })] }), jsxRuntimeExports.jsx("p", { className: "mt-4 text-sm", children: "To request access, please contact the project member listed above." })] }))] }))] }), allowLogout && hideActions ? (jsxRuntimeExports.jsx(Card, { children: jsxRuntimeExports.jsxs(CardContent, { className: "grid gap-4", children: [jsxRuntimeExports.jsx(AppAlert, { variant: "warning", children: "Deleting the integration will disconnect it and reset its settings for this project." }), jsxRuntimeExports.jsx(Button, { variant: "outline", onClick: () => integrationLogout(), children: "Delete Integration" })] }) })) : (!hideActions && (jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntimeExports.jsx(Button, { variant: "outline", onClick: () => integrationLogout(), children: "Disconnect" }), jsxRuntimeExports.jsxs("span", { children: [' ', "or", ' ', jsxRuntimeExports.jsx("a", { className: "text-primary underline-offset-4 hover:underline", href: "https://crowdin.com/contacts", target: "_blank", rel: "noreferrer", children: "contact us" }), ' ', "for help"] })] })))] }) }), jsxRuntimeExports.jsx(Toaster, {})] }));
22763
22763
  };
22764
22764
 
22765
22765
  initializeCrowdinIframeContext();