@crowdin/app-project-module 3.3.0 → 3.4.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.
@@ -18711,6 +18711,11 @@
18711
18711
  toast(message);
18712
18712
  }
18713
18713
  }
18714
+ function contactUser(userId) {
18715
+ AP.getContext(function (context) {
18716
+ AP.redirect(`${context.organization_id ? '/u' : ''}/messages/create/${userId}`);
18717
+ });
18718
+ }
18714
18719
  function reloadLocation() {
18715
18720
  ensureInitialized();
18716
18721
  window.location.href =
@@ -22754,11 +22759,6 @@
22754
22759
  .then(() => localStorage.removeItem(`revised_${name}`))
22755
22760
  .catch((e) => catchRejection(e, "Can't disconnect the integration"));
22756
22761
  }
22757
- function contactUser(userId) {
22758
- AP.getContext(function (context) {
22759
- AP.redirect(`${context.organization_id ? '/u' : ''}/messages/create/${userId}`);
22760
- });
22761
- }
22762
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