@canmingir/link 1.2.15 → 1.2.17

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@canmingir/link",
3
- "version": "1.2.15",
3
+ "version": "1.2.17",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./index.js",
@@ -9,10 +9,6 @@ export const ConfigSchema = Joi.object({
9
9
  socket: Joi.object({
10
10
  host: Joi.string().uri().required(),
11
11
  path: Joi.string().required(),
12
- transport: Joi.string()
13
- .valid("polling", "websocket")
14
- .optional()
15
- .default("websocket"),
16
12
  }).optional(),
17
13
  credentials: Joi.object({
18
14
  provider: Joi.string().valid("DEMO", "COGNITO").required(),
@@ -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) {
@@ -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 + 2)}
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 + 2}>
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;