@canmingir/link 1.2.16 → 1.2.18
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/package.json
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import CustomPopover, { usePopover } from "../../components/custom-popover";
|
|
2
|
+
|
|
1
3
|
import Avatar from "@mui/material/Avatar";
|
|
2
4
|
import Box from "@mui/material/Box";
|
|
3
5
|
import Divider from "@mui/material/Divider";
|
|
@@ -14,8 +16,6 @@ import { useRouter } from "../../routes/hooks";
|
|
|
14
16
|
import { useUser } from "../../hooks/use-user";
|
|
15
17
|
import { varHover } from "../../components/animate";
|
|
16
18
|
|
|
17
|
-
import CustomPopover, { usePopover } from "../../components/custom-popover";
|
|
18
|
-
|
|
19
19
|
// ----------------------------------------------------------------------
|
|
20
20
|
|
|
21
21
|
export default function AccountPopover() {
|
|
@@ -29,6 +29,9 @@ export default function AccountPopover() {
|
|
|
29
29
|
try {
|
|
30
30
|
storage.remove("link", "accessToken");
|
|
31
31
|
storage.remove("link", "refreshToken");
|
|
32
|
+
storage.remove("link", "identityProvider");
|
|
33
|
+
storage.remove("projectId");
|
|
34
|
+
storage.remove("landingLevel");
|
|
32
35
|
popover.onClose();
|
|
33
36
|
router.replace("/login");
|
|
34
37
|
} catch (error) {
|
|
@@ -18,6 +18,7 @@ const DynamicConnector = ({
|
|
|
18
18
|
animationSpeed = 1,
|
|
19
19
|
gradient = null,
|
|
20
20
|
curvature = 0.5,
|
|
21
|
+
connectorType = "curved",
|
|
21
22
|
}) => {
|
|
22
23
|
const uniqueId = useId();
|
|
23
24
|
const [dims, setDims] = useState(null);
|
|
@@ -91,6 +92,19 @@ const DynamicConnector = ({
|
|
|
91
92
|
);
|
|
92
93
|
|
|
93
94
|
const getPath = (from, to) => {
|
|
95
|
+
const isCornered =
|
|
96
|
+
connectorType === "cornered" || connectorType === "normal";
|
|
97
|
+
|
|
98
|
+
if (isCornered) {
|
|
99
|
+
if (isHorizontal) {
|
|
100
|
+
const midX = from.x + (to.x - from.x) / 2;
|
|
101
|
+
return `M ${from.x} ${from.y} L ${midX} ${from.y} L ${midX} ${to.y} L ${to.x} ${to.y}`;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const midY = from.y + (to.y - from.y) / 2;
|
|
105
|
+
return `M ${from.x} ${from.y} L ${from.x} ${midY} L ${to.x} ${midY} L ${to.x} ${to.y}`;
|
|
106
|
+
}
|
|
107
|
+
|
|
94
108
|
const dx = Math.abs(to.x - from.x);
|
|
95
109
|
const dy = Math.abs(to.y - from.y);
|
|
96
110
|
const distance = Math.sqrt(dx * dx + dy * dy);
|
|
@@ -56,6 +56,7 @@ const FlowNodeView = ({
|
|
|
56
56
|
animationSpeed = baseStyle.animationSpeed ?? 1,
|
|
57
57
|
gradient = baseStyle.gradient ?? null,
|
|
58
58
|
curvature = baseStyle.curvature ?? 0.5,
|
|
59
|
+
connectorType = baseStyle.connectorType ?? "curved",
|
|
59
60
|
selectionColor = baseStyle.selectionColor ?? "#64748b",
|
|
60
61
|
} = nodeStyle;
|
|
61
62
|
|
|
@@ -170,6 +171,7 @@ const FlowNodeView = ({
|
|
|
170
171
|
animationSpeed={animationSpeed}
|
|
171
172
|
gradient={gradient}
|
|
172
173
|
curvature={curvature}
|
|
174
|
+
connectorType={connectorType}
|
|
173
175
|
/>
|
|
174
176
|
|
|
175
177
|
<Box
|
package/src/lib/Flow/styles.js
CHANGED
|
@@ -25,6 +25,7 @@ export const getBaseStyleForVariant = (v) => {
|
|
|
25
25
|
animationSpeed: 1,
|
|
26
26
|
gradient: null,
|
|
27
27
|
curvature: 0.5,
|
|
28
|
+
connectorType: "curved",
|
|
28
29
|
};
|
|
29
30
|
case "pill":
|
|
30
31
|
return {
|
|
@@ -44,6 +45,7 @@ export const getBaseStyleForVariant = (v) => {
|
|
|
44
45
|
animationSpeed: 1,
|
|
45
46
|
gradient: null,
|
|
46
47
|
curvature: 0.4,
|
|
48
|
+
connectorType: "curved",
|
|
47
49
|
};
|
|
48
50
|
case "n8n":
|
|
49
51
|
return {
|
|
@@ -63,6 +65,7 @@ export const getBaseStyleForVariant = (v) => {
|
|
|
63
65
|
animationSpeed: 1,
|
|
64
66
|
gradient: null,
|
|
65
67
|
curvature: 0.5,
|
|
68
|
+
connectorType: "curved",
|
|
66
69
|
};
|
|
67
70
|
case "simple":
|
|
68
71
|
default:
|
|
@@ -83,6 +86,7 @@ export const getBaseStyleForVariant = (v) => {
|
|
|
83
86
|
animationSpeed: 1,
|
|
84
87
|
gradient: null,
|
|
85
88
|
curvature: 0.5,
|
|
89
|
+
connectorType: "curved",
|
|
86
90
|
};
|
|
87
91
|
}
|
|
88
92
|
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Avatar,
|
|
3
3
|
Box,
|
|
4
|
+
Chip,
|
|
4
5
|
FormControl,
|
|
5
6
|
Grow,
|
|
6
7
|
IconButton,
|
|
7
8
|
InputLabel,
|
|
9
|
+
Link,
|
|
8
10
|
List,
|
|
9
11
|
ListItem,
|
|
10
12
|
ListItemAvatar,
|
|
@@ -22,6 +24,7 @@ import React, { useEffect, useState } from "react";
|
|
|
22
24
|
|
|
23
25
|
import Iconify from "../components/Iconify";
|
|
24
26
|
import config from "../config/config";
|
|
27
|
+
import pkg from "../../../../../../package.json";
|
|
25
28
|
import { useEvent } from "@nucleoidai/react-event";
|
|
26
29
|
import useSettings from "../hooks/useSettings";
|
|
27
30
|
import { useUser } from "../hooks/use-user";
|
|
@@ -95,13 +98,18 @@ const SettingsDialogTabs = ({ tabs }) => {
|
|
|
95
98
|
sx={{ "& label": { color: "custom.grey" } }}
|
|
96
99
|
{...a11yProps(1)}
|
|
97
100
|
/>
|
|
101
|
+
<Tab
|
|
102
|
+
label={"About"}
|
|
103
|
+
sx={{ "& label": { color: "custom.grey" } }}
|
|
104
|
+
{...a11yProps(2)}
|
|
105
|
+
/>
|
|
98
106
|
{tabs?.map((tab, index) => (
|
|
99
107
|
<Tab
|
|
100
108
|
key={tab.label}
|
|
101
109
|
iconPosition="start"
|
|
102
110
|
label={tab.label}
|
|
103
111
|
sx={{ "& label": { color: "custom.grey" } }}
|
|
104
|
-
{...a11yProps(index +
|
|
112
|
+
{...a11yProps(index + 3)}
|
|
105
113
|
/>
|
|
106
114
|
))}
|
|
107
115
|
</Tabs>
|
|
@@ -112,8 +120,11 @@ const SettingsDialogTabs = ({ tabs }) => {
|
|
|
112
120
|
<TabPanel value={value} index={1}>
|
|
113
121
|
<Settings />
|
|
114
122
|
</TabPanel>
|
|
123
|
+
<TabPanel value={value} index={2}>
|
|
124
|
+
<About />
|
|
125
|
+
</TabPanel>
|
|
115
126
|
{tabs?.map((tab, index) => (
|
|
116
|
-
<TabPanel key={tab.label} value={value} index={index +
|
|
127
|
+
<TabPanel key={tab.label} value={value} index={index + 3}>
|
|
117
128
|
<tab.panel />
|
|
118
129
|
</TabPanel>
|
|
119
130
|
))}
|
|
@@ -305,4 +316,118 @@ const Settings = () => {
|
|
|
305
316
|
);
|
|
306
317
|
};
|
|
307
318
|
|
|
319
|
+
const About = () => {
|
|
320
|
+
const iconSrc = config().template?.login?.icon || "";
|
|
321
|
+
|
|
322
|
+
const appName = pkg.name;
|
|
323
|
+
const version = pkg.version;
|
|
324
|
+
const description = pkg.description;
|
|
325
|
+
|
|
326
|
+
return (
|
|
327
|
+
<Stack direction="column" spacing={2} p={2}>
|
|
328
|
+
<Box
|
|
329
|
+
sx={{
|
|
330
|
+
p: 3,
|
|
331
|
+
borderRadius: 3,
|
|
332
|
+
border: "1px solid",
|
|
333
|
+
borderColor: "divider",
|
|
334
|
+
background:
|
|
335
|
+
"linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.01))",
|
|
336
|
+
}}
|
|
337
|
+
>
|
|
338
|
+
<Stack direction="row" spacing={2.5} alignItems="center">
|
|
339
|
+
<Avatar
|
|
340
|
+
src={iconSrc}
|
|
341
|
+
variant="rounded"
|
|
342
|
+
sx={{
|
|
343
|
+
width: 56,
|
|
344
|
+
height: 56,
|
|
345
|
+
borderRadius: 2,
|
|
346
|
+
bgcolor: "background.paper",
|
|
347
|
+
boxShadow: 1,
|
|
348
|
+
}}
|
|
349
|
+
>
|
|
350
|
+
<Iconify icon="solar:widget-bold-duotone" width={28} />
|
|
351
|
+
</Avatar>
|
|
352
|
+
|
|
353
|
+
<Box sx={{ flex: 1, minWidth: 0 }}>
|
|
354
|
+
<Typography variant="h5" fontWeight={600}>
|
|
355
|
+
{appName.toUpperCase()}
|
|
356
|
+
</Typography>
|
|
357
|
+
|
|
358
|
+
{description && (
|
|
359
|
+
<Typography
|
|
360
|
+
variant="body2"
|
|
361
|
+
color="text.secondary"
|
|
362
|
+
sx={{ mt: 0.5, maxWidth: 520 }}
|
|
363
|
+
>
|
|
364
|
+
{description}
|
|
365
|
+
</Typography>
|
|
366
|
+
)}
|
|
367
|
+
|
|
368
|
+
<Stack direction="row" spacing={1} sx={{ mt: 1 }}>
|
|
369
|
+
<Chip size="small" label={`v${version}`} />
|
|
370
|
+
</Stack>
|
|
371
|
+
</Box>
|
|
372
|
+
</Stack>
|
|
373
|
+
|
|
374
|
+
<Box
|
|
375
|
+
sx={{
|
|
376
|
+
my: 2,
|
|
377
|
+
borderBottom: "1px dashed",
|
|
378
|
+
borderColor: "divider",
|
|
379
|
+
}}
|
|
380
|
+
/>
|
|
381
|
+
|
|
382
|
+
<Stack spacing={1.2}>
|
|
383
|
+
<InfoRow label="Version" value={version} />
|
|
384
|
+
<InfoRow label="Deployment" value="On-Premise" />
|
|
385
|
+
<InfoRow
|
|
386
|
+
label="Support"
|
|
387
|
+
value="support@greycollar.ai"
|
|
388
|
+
link="mailto:support@greycollar.ai"
|
|
389
|
+
/>
|
|
390
|
+
<InfoRow
|
|
391
|
+
label="Documentation"
|
|
392
|
+
value="greycollar.ai/docs"
|
|
393
|
+
link="https://greycollar.ai/docs"
|
|
394
|
+
/>
|
|
395
|
+
</Stack>
|
|
396
|
+
|
|
397
|
+
<Box
|
|
398
|
+
sx={{
|
|
399
|
+
mt: 3,
|
|
400
|
+
pt: 2,
|
|
401
|
+
borderTop: "1px dashed",
|
|
402
|
+
borderColor: "divider",
|
|
403
|
+
textAlign: "center",
|
|
404
|
+
}}
|
|
405
|
+
>
|
|
406
|
+
<Typography variant="caption" color="text.secondary">
|
|
407
|
+
© 2026 greycollar.ai. All rights reserved.
|
|
408
|
+
</Typography>
|
|
409
|
+
</Box>
|
|
410
|
+
</Box>
|
|
411
|
+
</Stack>
|
|
412
|
+
);
|
|
413
|
+
};
|
|
414
|
+
|
|
415
|
+
const InfoRow = ({ label, value, link }) => {
|
|
416
|
+
return (
|
|
417
|
+
<Stack direction="row" spacing={1.5} alignItems="center">
|
|
418
|
+
<Typography variant="body2" color="text.secondary" sx={{ minWidth: 110 }}>
|
|
419
|
+
{label}
|
|
420
|
+
</Typography>
|
|
421
|
+
|
|
422
|
+
{link ? (
|
|
423
|
+
<Link href={link} target="_blank" rel="noreferrer" underline="hover">
|
|
424
|
+
{value}
|
|
425
|
+
</Link>
|
|
426
|
+
) : (
|
|
427
|
+
<Typography variant="body2">{value}</Typography>
|
|
428
|
+
)}
|
|
429
|
+
</Stack>
|
|
430
|
+
);
|
|
431
|
+
};
|
|
432
|
+
|
|
308
433
|
export default SettingsDialog;
|