@local-civics/mgmt-ui 0.1.161 → 0.1.162
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.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +38 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +39 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1647,6 +1647,10 @@ const useStyles$f = core.createStyles((theme) => ({
|
|
|
1647
1647
|
description: {
|
|
1648
1648
|
color: theme.white,
|
|
1649
1649
|
maxWidth: 220
|
|
1650
|
+
},
|
|
1651
|
+
code: {
|
|
1652
|
+
color: theme.white,
|
|
1653
|
+
maxWidth: 220
|
|
1650
1654
|
}
|
|
1651
1655
|
}));
|
|
1652
1656
|
const TenantBanner = (_a) => {
|
|
@@ -1655,15 +1659,31 @@ const TenantBanner = (_a) => {
|
|
|
1655
1659
|
description,
|
|
1656
1660
|
image,
|
|
1657
1661
|
style,
|
|
1658
|
-
className
|
|
1662
|
+
className,
|
|
1663
|
+
code
|
|
1659
1664
|
} = _b, others = __objRest$1(_b, [
|
|
1660
1665
|
"title",
|
|
1661
1666
|
"description",
|
|
1662
1667
|
"image",
|
|
1663
1668
|
"style",
|
|
1664
|
-
"className"
|
|
1669
|
+
"className",
|
|
1670
|
+
"code"
|
|
1665
1671
|
]);
|
|
1666
1672
|
const { classes, cx, theme } = useStyles$f();
|
|
1673
|
+
const handleCopy = async () => {
|
|
1674
|
+
if (!code)
|
|
1675
|
+
return;
|
|
1676
|
+
try {
|
|
1677
|
+
await navigator.clipboard.writeText(code);
|
|
1678
|
+
notifications.showNotification({
|
|
1679
|
+
title: "Copied!",
|
|
1680
|
+
message: "Community code copied to clipboard.",
|
|
1681
|
+
autoClose: 3e3
|
|
1682
|
+
});
|
|
1683
|
+
} catch (err) {
|
|
1684
|
+
console.error("Failed to copy code", err);
|
|
1685
|
+
}
|
|
1686
|
+
};
|
|
1667
1687
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
1668
1688
|
core.Card,
|
|
1669
1689
|
__spreadValues$5({
|
|
@@ -1679,7 +1699,20 @@ const TenantBanner = (_a) => {
|
|
|
1679
1699
|
zIndex: 0
|
|
1680
1700
|
}
|
|
1681
1701
|
),
|
|
1682
|
-
/* @__PURE__ */ React__namespace.createElement("div", { className: classes.content }, /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "lg", weight: 700, className: classes.title }, title), /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "sm", className: classes.description }, description))
|
|
1702
|
+
/* @__PURE__ */ React__namespace.createElement("div", { className: classes.content }, /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "lg", weight: 700, className: classes.title }, title), /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "sm", className: classes.description }, description), /* @__PURE__ */ React__namespace.createElement(core.Group, { mt: "sm", spacing: "xs" }, /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "sm", className: classes.code }, "Community Code: ", code || "\u2014"), code && /* @__PURE__ */ React__namespace.createElement(
|
|
1703
|
+
core.Button,
|
|
1704
|
+
{
|
|
1705
|
+
size: "xs",
|
|
1706
|
+
variant: "white",
|
|
1707
|
+
onClick: handleCopy,
|
|
1708
|
+
styles: {
|
|
1709
|
+
root: {
|
|
1710
|
+
backgroundColor: "rgba(255,255,255,0.9)"
|
|
1711
|
+
}
|
|
1712
|
+
}
|
|
1713
|
+
},
|
|
1714
|
+
"Copy"
|
|
1715
|
+
)))
|
|
1683
1716
|
);
|
|
1684
1717
|
};
|
|
1685
1718
|
|
|
@@ -1696,7 +1729,8 @@ const Home = (props) => {
|
|
|
1696
1729
|
{
|
|
1697
1730
|
title: props.organization.name,
|
|
1698
1731
|
description: props.organization.description,
|
|
1699
|
-
image: props.organization.image
|
|
1732
|
+
image: props.organization.image,
|
|
1733
|
+
code: props.organization.accessCode
|
|
1700
1734
|
}
|
|
1701
1735
|
))), /* @__PURE__ */ React__namespace.createElement(core.Grid, { gutter: "md" }, /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, null, /* @__PURE__ */ React__namespace.createElement(
|
|
1702
1736
|
CardGradient,
|