strapi-plugin-magic-mark 3.2.8 → 3.3.1
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/_chunks/{App-C6T1ltR3.mjs → App-CeYRinOC.mjs} +152 -75
- package/dist/_chunks/{App-C6Crb_w7.js → App-PJuAWFXQ.js} +152 -75
- package/dist/_chunks/{UpgradePage-BWjKwdCf.mjs → UpgradePage-BWZTKs8A.mjs} +5 -5
- package/dist/_chunks/{UpgradePage-CYrqGUnv.js → UpgradePage-hQjPuiMV.js} +5 -5
- package/dist/_chunks/index-Bh3DfbXD.mjs +2694 -0
- package/dist/_chunks/index-D1AjX5wc.js +2698 -0
- package/dist/_chunks/{index-B_EiWnCU.mjs → index-JirQF8zE.mjs} +2 -5
- package/dist/_chunks/{index-DA7Jswi4.js → index-uUErgmi9.js} +2 -5
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/server/index.js +27 -2
- package/dist/server/index.mjs +27 -2
- package/package.json +2 -1
- package/dist/_chunks/index-C7wF7iqT.mjs +0 -3361
- package/dist/_chunks/index-svfBWq9B.js +0 -3365
|
@@ -4,9 +4,70 @@ import { useIntl } from "react-intl";
|
|
|
4
4
|
import { useNavigate } from "react-router-dom";
|
|
5
5
|
import styled, { keyframes } from "styled-components";
|
|
6
6
|
import { Flex, Loader, Box, Typography, SingleSelect, SingleSelectOption, Thead, Tr, Th, VisuallyHidden, Tbody, Td, Button, Table, TextInput } from "@strapi/design-system";
|
|
7
|
-
import {
|
|
7
|
+
import { Pin, Eye, Pencil, Trash, Cross, Key, User, Mail, Check } from "@strapi/icons";
|
|
8
|
+
import { BookOpenIcon, UserIcon, SparklesIcon, LinkIcon, MagnifyingGlassIcon } from "@heroicons/react/24/outline";
|
|
8
9
|
import { useFetchClient, useNotification } from "@strapi/strapi/admin";
|
|
9
|
-
import {
|
|
10
|
+
import { p as pluginId, g as getIconById, C as CreateEditModal } from "./index-Bh3DfbXD.mjs";
|
|
11
|
+
const FEATURES = {
|
|
12
|
+
// Free tier features
|
|
13
|
+
basicBookmarks: { tier: "free", limit: 10 },
|
|
14
|
+
basicFilters: { tier: "free" },
|
|
15
|
+
// Premium tier features
|
|
16
|
+
extendedBookmarks: { tier: "premium", limit: 50 },
|
|
17
|
+
queryHistory: { tier: "premium" },
|
|
18
|
+
exportBookmarks: { tier: "premium" },
|
|
19
|
+
sharedBookmarks: { tier: "premium" },
|
|
20
|
+
// Advanced tier features
|
|
21
|
+
unlimitedBookmarks: { tier: "advanced", limit: -1 },
|
|
22
|
+
advancedFilters: { tier: "advanced" },
|
|
23
|
+
subGroups: { tier: "advanced" },
|
|
24
|
+
bulkOperations: { tier: "advanced" },
|
|
25
|
+
analytics: { tier: "advanced" },
|
|
26
|
+
customIntegrations: { tier: "advanced" }
|
|
27
|
+
};
|
|
28
|
+
const useLicenseInfo = () => {
|
|
29
|
+
const { get } = useFetchClient();
|
|
30
|
+
const [limits, setLimits] = useState(null);
|
|
31
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
const fetchLimits = async () => {
|
|
34
|
+
try {
|
|
35
|
+
console.log("[useLicenseInfo] Fetching license limits...");
|
|
36
|
+
const response = await get("/magic-mark/license/limits");
|
|
37
|
+
console.log("[useLicenseInfo] Raw API response:", response);
|
|
38
|
+
console.log("[useLicenseInfo] Response data:", response.data);
|
|
39
|
+
if (response.data?.success) {
|
|
40
|
+
console.log("[useLicenseInfo] Setting limits:", response.data.data);
|
|
41
|
+
setLimits(response.data.data);
|
|
42
|
+
} else {
|
|
43
|
+
console.warn("[useLicenseInfo] API returned success=false or missing data");
|
|
44
|
+
}
|
|
45
|
+
} catch (error) {
|
|
46
|
+
console.error("[useLicenseInfo] Error fetching license limits:", error);
|
|
47
|
+
} finally {
|
|
48
|
+
setIsLoading(false);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
fetchLimits();
|
|
52
|
+
}, []);
|
|
53
|
+
const tier = limits?.tier || "free";
|
|
54
|
+
const isPremium = tier === "premium" || tier === "advanced";
|
|
55
|
+
const isAdvanced = tier === "advanced";
|
|
56
|
+
console.log("[useLicenseInfo] Computed values:", { tier, isPremium, isAdvanced, limits });
|
|
57
|
+
return {
|
|
58
|
+
isLoading,
|
|
59
|
+
limits,
|
|
60
|
+
tier,
|
|
61
|
+
isFree: tier === "free",
|
|
62
|
+
isPremium,
|
|
63
|
+
isAdvanced,
|
|
64
|
+
canUseFeature: (feature) => {
|
|
65
|
+
const featureConfig = FEATURES[feature];
|
|
66
|
+
const tierOrder = { free: 0, premium: 1, advanced: 2 };
|
|
67
|
+
return tierOrder[tier] >= tierOrder[featureConfig.tier];
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
};
|
|
10
71
|
const theme = {
|
|
11
72
|
colors: {
|
|
12
73
|
primary: {
|
|
@@ -36,12 +97,8 @@ const theme = {
|
|
|
36
97
|
},
|
|
37
98
|
neutral: {
|
|
38
99
|
0: "#FFFFFF",
|
|
39
|
-
50: "#F9FAFB",
|
|
40
100
|
100: "#F3F4F6",
|
|
41
|
-
|
|
42
|
-
600: "#4B5563",
|
|
43
|
-
700: "#374151",
|
|
44
|
-
800: "#1F2937"
|
|
101
|
+
600: "#4B5563"
|
|
45
102
|
}
|
|
46
103
|
},
|
|
47
104
|
shadows: {
|
|
@@ -186,7 +243,7 @@ const StatsGrid = styled.div`
|
|
|
186
243
|
}
|
|
187
244
|
`;
|
|
188
245
|
const StatCard = styled(Box)`
|
|
189
|
-
background: ${theme.colors.
|
|
246
|
+
background: ${(p) => p.theme.colors.neutral0};
|
|
190
247
|
border-radius: ${theme.borderRadius.lg};
|
|
191
248
|
padding: ${theme.spacing.lg};
|
|
192
249
|
position: relative;
|
|
@@ -195,7 +252,7 @@ const StatCard = styled(Box)`
|
|
|
195
252
|
animation: ${fadeIn$1} ${theme.transitions.slow} backwards;
|
|
196
253
|
animation-delay: ${(props) => props.$delay || "0s"};
|
|
197
254
|
box-shadow: ${theme.shadows.sm};
|
|
198
|
-
border: 1px solid
|
|
255
|
+
border: 1px solid rgba(128, 128, 128, 0.2);
|
|
199
256
|
min-width: 200px;
|
|
200
257
|
flex: 1;
|
|
201
258
|
text-align: center;
|
|
@@ -247,34 +304,34 @@ const StatIcon = styled(Box)`
|
|
|
247
304
|
const StatValue = styled(Typography)`
|
|
248
305
|
font-size: 2.5rem;
|
|
249
306
|
font-weight: 700;
|
|
250
|
-
color: ${theme.colors.
|
|
307
|
+
color: ${(p) => p.theme.colors.neutral800};
|
|
251
308
|
line-height: 1;
|
|
252
309
|
margin-bottom: ${theme.spacing.xs};
|
|
253
310
|
transition: transform ${theme.transitions.normal};
|
|
254
311
|
`;
|
|
255
312
|
const StatLabel = styled(Typography)`
|
|
256
313
|
font-size: 0.875rem;
|
|
257
|
-
color: ${theme.colors.
|
|
314
|
+
color: ${(p) => p.theme.colors.neutral600};
|
|
258
315
|
font-weight: 500;
|
|
259
316
|
letter-spacing: 0.025em;
|
|
260
317
|
text-transform: capitalize;
|
|
261
318
|
`;
|
|
262
319
|
const DataTable = styled(Box)`
|
|
263
|
-
background: ${theme.colors.
|
|
320
|
+
background: ${(p) => p.theme.colors.neutral0};
|
|
264
321
|
border-radius: ${theme.borderRadius.lg};
|
|
265
322
|
overflow: hidden;
|
|
266
323
|
box-shadow: ${theme.shadows.sm};
|
|
267
|
-
border: 1px solid
|
|
324
|
+
border: 1px solid rgba(128, 128, 128, 0.2);
|
|
268
325
|
margin-bottom: ${theme.spacing.xl};
|
|
269
326
|
`;
|
|
270
327
|
const StyledTable = styled(Table)`
|
|
271
328
|
thead {
|
|
272
|
-
background: ${theme.colors.
|
|
273
|
-
border-bottom: 2px solid
|
|
329
|
+
background: ${(p) => p.theme.colors.neutral0};
|
|
330
|
+
border-bottom: 2px solid rgba(128, 128, 128, 0.15);
|
|
274
331
|
|
|
275
332
|
th {
|
|
276
333
|
font-weight: 600;
|
|
277
|
-
color: ${theme.colors.
|
|
334
|
+
color: ${(p) => p.theme.colors.neutral700};
|
|
278
335
|
font-size: 0.875rem;
|
|
279
336
|
text-transform: uppercase;
|
|
280
337
|
letter-spacing: 0.025em;
|
|
@@ -284,14 +341,14 @@ const StyledTable = styled(Table)`
|
|
|
284
341
|
|
|
285
342
|
tbody tr {
|
|
286
343
|
transition: all ${theme.transitions.fast};
|
|
287
|
-
border-bottom: 1px solid
|
|
344
|
+
border-bottom: 1px solid rgba(128, 128, 128, 0.1);
|
|
288
345
|
|
|
289
346
|
&:last-child {
|
|
290
347
|
border-bottom: none;
|
|
291
348
|
}
|
|
292
349
|
|
|
293
350
|
&:hover {
|
|
294
|
-
background: ${theme.colors.
|
|
351
|
+
background: ${(p) => p.theme.colors.neutral100};
|
|
295
352
|
|
|
296
353
|
.action-buttons {
|
|
297
354
|
opacity: 1;
|
|
@@ -300,7 +357,7 @@ const StyledTable = styled(Table)`
|
|
|
300
357
|
|
|
301
358
|
td {
|
|
302
359
|
padding: ${theme.spacing.lg} ${theme.spacing.lg};
|
|
303
|
-
color: ${theme.colors.
|
|
360
|
+
color: ${(p) => p.theme.colors.neutral700};
|
|
304
361
|
vertical-align: middle;
|
|
305
362
|
}
|
|
306
363
|
}
|
|
@@ -312,10 +369,21 @@ styled(Box)`
|
|
|
312
369
|
border-radius: 2px;
|
|
313
370
|
transition: all ${theme.transitions.normal};
|
|
314
371
|
`;
|
|
315
|
-
styled.div`
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
372
|
+
const BookmarkIconWrapper = styled.div`
|
|
373
|
+
display: flex;
|
|
374
|
+
align-items: center;
|
|
375
|
+
justify-content: center;
|
|
376
|
+
width: 40px;
|
|
377
|
+
height: 40px;
|
|
378
|
+
background: linear-gradient(135deg, ${theme.colors.primary[100]} 0%, #E0E7FF 100%);
|
|
379
|
+
border-radius: 8px;
|
|
380
|
+
flex-shrink: 0;
|
|
381
|
+
|
|
382
|
+
svg {
|
|
383
|
+
width: 20px;
|
|
384
|
+
height: 20px;
|
|
385
|
+
color: ${theme.colors.primary[600]};
|
|
386
|
+
}
|
|
319
387
|
`;
|
|
320
388
|
const ActionButtons = styled(Flex)`
|
|
321
389
|
opacity: 1;
|
|
@@ -323,21 +391,26 @@ const ActionButtons = styled(Flex)`
|
|
|
323
391
|
gap: ${theme.spacing.xs};
|
|
324
392
|
justify-content: flex-end;
|
|
325
393
|
`;
|
|
326
|
-
const
|
|
394
|
+
const FloatingIcon = styled.div`
|
|
327
395
|
position: absolute;
|
|
328
396
|
bottom: 40px;
|
|
329
397
|
right: 40px;
|
|
330
|
-
font-size: 72px;
|
|
331
398
|
opacity: 0.08;
|
|
332
399
|
animation: ${float} 4s ease-in-out infinite;
|
|
400
|
+
|
|
401
|
+
svg {
|
|
402
|
+
width: 72px;
|
|
403
|
+
height: 72px;
|
|
404
|
+
color: ${theme.colors.warning[500]};
|
|
405
|
+
}
|
|
333
406
|
`;
|
|
334
407
|
const FilterBar = styled(Flex)`
|
|
335
|
-
background: ${theme.colors.
|
|
408
|
+
background: ${(p) => p.theme.colors.neutral0};
|
|
336
409
|
padding: ${theme.spacing.md} ${theme.spacing.lg};
|
|
337
410
|
border-radius: ${theme.borderRadius.lg};
|
|
338
411
|
margin-bottom: ${theme.spacing.lg};
|
|
339
412
|
box-shadow: ${theme.shadows.sm};
|
|
340
|
-
border: 1px solid
|
|
413
|
+
border: 1px solid rgba(128, 128, 128, 0.2);
|
|
341
414
|
gap: ${theme.spacing.md};
|
|
342
415
|
align-items: center;
|
|
343
416
|
`;
|
|
@@ -350,23 +423,23 @@ const SearchInputWrapper = styled.div`
|
|
|
350
423
|
display: flex;
|
|
351
424
|
align-items: center;
|
|
352
425
|
`;
|
|
353
|
-
const
|
|
426
|
+
const SearchIconStyled = styled(MagnifyingGlassIcon)`
|
|
354
427
|
position: absolute;
|
|
355
428
|
left: 12px;
|
|
356
429
|
width: 16px;
|
|
357
430
|
height: 16px;
|
|
358
|
-
color: ${theme.colors.
|
|
431
|
+
color: ${(p) => p.theme.colors.neutral600};
|
|
359
432
|
pointer-events: none;
|
|
360
433
|
`;
|
|
361
434
|
const StyledSearchInput = styled.input`
|
|
362
435
|
width: 100%;
|
|
363
436
|
padding: ${theme.spacing.sm} ${theme.spacing.sm} ${theme.spacing.sm} 36px;
|
|
364
|
-
border: 1px solid
|
|
437
|
+
border: 1px solid rgba(128, 128, 128, 0.2);
|
|
365
438
|
border-radius: ${theme.borderRadius.md};
|
|
366
439
|
font-size: 0.875rem;
|
|
367
440
|
transition: all ${theme.transitions.fast};
|
|
368
|
-
background: ${theme.colors.
|
|
369
|
-
color: ${theme.colors.
|
|
441
|
+
background: ${(p) => p.theme.colors.neutral0};
|
|
442
|
+
color: ${(p) => p.theme.colors.neutral800};
|
|
370
443
|
|
|
371
444
|
&:focus {
|
|
372
445
|
outline: none;
|
|
@@ -375,7 +448,7 @@ const StyledSearchInput = styled.input`
|
|
|
375
448
|
}
|
|
376
449
|
|
|
377
450
|
&::placeholder {
|
|
378
|
-
color: ${theme.colors.
|
|
451
|
+
color: ${(p) => p.theme.colors.neutral600};
|
|
379
452
|
}
|
|
380
453
|
`;
|
|
381
454
|
const HomePageModern = () => {
|
|
@@ -449,6 +522,19 @@ const HomePageModern = () => {
|
|
|
449
522
|
console.error("[Magic-Mark] Error fetching current user:", error);
|
|
450
523
|
}
|
|
451
524
|
};
|
|
525
|
+
const isCurrentUserOwner = (bookmark) => {
|
|
526
|
+
if (!bookmark.createdBy || !currentUser) return false;
|
|
527
|
+
if (bookmark.createdBy.documentId && currentUser.documentId) {
|
|
528
|
+
return bookmark.createdBy.documentId === currentUser.documentId;
|
|
529
|
+
}
|
|
530
|
+
if (bookmark.createdBy.id && currentUser.id) {
|
|
531
|
+
return String(bookmark.createdBy.id) === String(currentUser.id);
|
|
532
|
+
}
|
|
533
|
+
if (bookmark.createdBy.id && currentUser.documentId) {
|
|
534
|
+
return String(bookmark.createdBy.id) === String(currentUser.documentId);
|
|
535
|
+
}
|
|
536
|
+
return false;
|
|
537
|
+
};
|
|
452
538
|
const fetchLicenseLimits = async () => {
|
|
453
539
|
try {
|
|
454
540
|
const response = await get(`/${pluginId}/license/limits`);
|
|
@@ -473,27 +559,29 @@ const HomePageModern = () => {
|
|
|
473
559
|
setLoading(false);
|
|
474
560
|
}
|
|
475
561
|
};
|
|
476
|
-
const handleDelete = async (
|
|
562
|
+
const handleDelete = async (bookmark) => {
|
|
477
563
|
if (!confirm(formatMessage({
|
|
478
564
|
id: `${pluginId}.confirm.delete`,
|
|
479
565
|
defaultMessage: "Are you sure you want to delete this bookmark?"
|
|
480
566
|
}))) {
|
|
481
567
|
return;
|
|
482
568
|
}
|
|
569
|
+
const deleteId = bookmark.documentId || bookmark.id;
|
|
483
570
|
try {
|
|
484
|
-
await del(`/${pluginId}/bookmarks/${
|
|
485
|
-
console.log("[Magic-Mark HomePage] Bookmark deleted:",
|
|
571
|
+
await del(`/${pluginId}/bookmarks/${deleteId}`);
|
|
572
|
+
console.log("[Magic-Mark HomePage] Bookmark deleted:", deleteId);
|
|
486
573
|
fetchBookmarks();
|
|
487
574
|
} catch (error) {
|
|
488
575
|
console.error("[Magic-Mark HomePage] Error deleting bookmark:", error);
|
|
489
576
|
}
|
|
490
577
|
};
|
|
491
578
|
const handlePin = async (bookmark) => {
|
|
579
|
+
const pinId = bookmark.documentId || bookmark.id;
|
|
492
580
|
try {
|
|
493
|
-
await post(`/${pluginId}/bookmarks/${
|
|
581
|
+
await post(`/${pluginId}/bookmarks/${pinId}/pin`, {
|
|
494
582
|
isPinned: !bookmark.isPinned
|
|
495
583
|
});
|
|
496
|
-
console.log("[Magic-Mark HomePage] Bookmark pinned:",
|
|
584
|
+
console.log("[Magic-Mark HomePage] Bookmark pinned:", pinId);
|
|
497
585
|
fetchBookmarks();
|
|
498
586
|
} catch (error) {
|
|
499
587
|
console.error("[Magic-Mark HomePage] Error pinning bookmark:", error);
|
|
@@ -532,24 +620,24 @@ const HomePageModern = () => {
|
|
|
532
620
|
return bookmark.name.toLowerCase().includes(query) || bookmark.description && bookmark.description.toLowerCase().includes(query) || bookmark.path.toLowerCase().includes(query);
|
|
533
621
|
}).slice(0, parseInt(entriesPerPage));
|
|
534
622
|
const pinnedBookmarks = bookmarks.filter((b) => b.isPinned);
|
|
535
|
-
const myBookmarks = bookmarks.filter((b) => b
|
|
536
|
-
const sharedWithMe = bookmarks.filter((b) => b
|
|
623
|
+
const myBookmarks = bookmarks.filter((b) => isCurrentUserOwner(b));
|
|
624
|
+
const sharedWithMe = bookmarks.filter((b) => !isCurrentUserOwner(b) && b.createdBy);
|
|
537
625
|
return /* @__PURE__ */ jsxs(Container, { padding: 8, children: [
|
|
538
626
|
/* @__PURE__ */ jsx(Header, { children: /* @__PURE__ */ jsxs(HeaderContent, { direction: "column", alignItems: "flex-start", gap: 2, children: [
|
|
539
627
|
/* @__PURE__ */ jsxs(Title, { children: [
|
|
540
|
-
/* @__PURE__ */ jsx(
|
|
628
|
+
/* @__PURE__ */ jsx(BookOpenIcon, {}),
|
|
541
629
|
" MagicMark"
|
|
542
630
|
] }),
|
|
543
631
|
/* @__PURE__ */ jsx(Subtitle, { children: "Save filtered views and navigate with one click" })
|
|
544
632
|
] }) }),
|
|
545
633
|
/* @__PURE__ */ jsxs(StatsGrid, { children: [
|
|
546
634
|
/* @__PURE__ */ jsxs(StatCard, { $delay: "0.1s", $color: theme.colors.primary[500], children: [
|
|
547
|
-
/* @__PURE__ */ jsx(StatIcon, { className: "stat-icon", $bg: theme.colors.primary[100], $color: theme.colors.primary[600], children: /* @__PURE__ */ jsx(
|
|
635
|
+
/* @__PURE__ */ jsx(StatIcon, { className: "stat-icon", $bg: theme.colors.primary[100], $color: theme.colors.primary[600], children: /* @__PURE__ */ jsx(UserIcon, {}) }),
|
|
548
636
|
/* @__PURE__ */ jsx(StatValue, { className: "stat-value", children: myBookmarks.length }),
|
|
549
637
|
/* @__PURE__ */ jsx(StatLabel, { children: "My Bookmarks" })
|
|
550
638
|
] }),
|
|
551
639
|
/* @__PURE__ */ jsxs(StatCard, { $delay: "0.2s", $color: theme.colors.success[500], children: [
|
|
552
|
-
/* @__PURE__ */ jsx(StatIcon, { className: "stat-icon", $bg: theme.colors.success[100], $color: theme.colors.success[600], children: /* @__PURE__ */ jsx(
|
|
640
|
+
/* @__PURE__ */ jsx(StatIcon, { className: "stat-icon", $bg: theme.colors.success[100], $color: theme.colors.success[600], children: /* @__PURE__ */ jsx(SparklesIcon, {}) }),
|
|
553
641
|
/* @__PURE__ */ jsx(StatValue, { className: "stat-value", children: sharedWithMe.length }),
|
|
554
642
|
/* @__PURE__ */ jsx(StatLabel, { children: formatMessage({ id: `${pluginId}.stats.shared`, defaultMessage: "Shared with Me" }) })
|
|
555
643
|
] }),
|
|
@@ -572,7 +660,7 @@ const HomePageModern = () => {
|
|
|
572
660
|
className: "stat-icon",
|
|
573
661
|
$bg: licenseLimits.canCreate ? theme.colors.neutral[100] : theme.colors.danger[100],
|
|
574
662
|
$color: licenseLimits.canCreate ? theme.colors.neutral[600] : theme.colors.danger[600],
|
|
575
|
-
children: /* @__PURE__ */ jsx(
|
|
663
|
+
children: /* @__PURE__ */ jsx(LinkIcon, {})
|
|
576
664
|
}
|
|
577
665
|
),
|
|
578
666
|
/* @__PURE__ */ jsxs(StatValue, { className: "stat-value", children: [
|
|
@@ -608,10 +696,10 @@ const HomePageModern = () => {
|
|
|
608
696
|
}) })
|
|
609
697
|
] }) }),
|
|
610
698
|
!loading && bookmarks.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
|
|
611
|
-
/* @__PURE__ */ jsx(Box, { style: { marginBottom: theme.spacing.md }, children: /* @__PURE__ */ jsx(Typography, { variant: "delta", style: { marginBottom: theme.spacing.md, color:
|
|
699
|
+
/* @__PURE__ */ jsx(Box, { style: { marginBottom: theme.spacing.md }, children: /* @__PURE__ */ jsx(Typography, { variant: "delta", style: { marginBottom: theme.spacing.md, color: "var(--colors-neutral700, #374151)" }, children: formatMessage({ id: `${pluginId}.allBookmarks.title`, defaultMessage: "🔖 All Available Bookmarks" }) }) }),
|
|
612
700
|
/* @__PURE__ */ jsxs(FilterBar, { children: [
|
|
613
701
|
/* @__PURE__ */ jsxs(SearchInputWrapper, { style: { flex: 1 }, children: [
|
|
614
|
-
/* @__PURE__ */ jsx(
|
|
702
|
+
/* @__PURE__ */ jsx(SearchIconStyled, {}),
|
|
615
703
|
/* @__PURE__ */ jsx(
|
|
616
704
|
StyledSearchInput,
|
|
617
705
|
{
|
|
@@ -668,28 +756,17 @@ const HomePageModern = () => {
|
|
|
668
756
|
background: bookmark.isPinned ? theme.colors.warning[50] : "transparent"
|
|
669
757
|
}, children: [
|
|
670
758
|
/* @__PURE__ */ jsx(Td, { onClick: () => handleBookmarkClick(bookmark), style: { cursor: "pointer" }, children: /* @__PURE__ */ jsxs(Flex, { alignItems: "center", gap: 3, children: [
|
|
671
|
-
/* @__PURE__ */ jsx(
|
|
672
|
-
|
|
673
|
-
{
|
|
674
|
-
|
|
675
|
-
width: "36px",
|
|
676
|
-
height: "36px",
|
|
677
|
-
display: "flex",
|
|
678
|
-
alignItems: "center",
|
|
679
|
-
justifyContent: "center",
|
|
680
|
-
flexShrink: 0,
|
|
681
|
-
fontSize: "24px"
|
|
682
|
-
},
|
|
683
|
-
children: bookmark.emoji
|
|
684
|
-
}
|
|
685
|
-
),
|
|
759
|
+
/* @__PURE__ */ jsx(BookmarkIconWrapper, { children: (() => {
|
|
760
|
+
const IconComponent = getIconById(bookmark.icon || bookmark.emoji || "bookmark");
|
|
761
|
+
return /* @__PURE__ */ jsx(IconComponent, {});
|
|
762
|
+
})() }),
|
|
686
763
|
/* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "flex-start", gap: 0, children: [
|
|
687
764
|
/* @__PURE__ */ jsx(Typography, { fontWeight: "semiBold", ellipsis: true, style: { fontSize: "1.125rem", lineHeight: "1.4" }, children: bookmark.name }),
|
|
688
765
|
/* @__PURE__ */ jsxs(Flex, { gap: 1, alignItems: "center", children: [
|
|
689
|
-
bookmark
|
|
766
|
+
isCurrentUserOwner(bookmark) ? /* @__PURE__ */ jsxs(Typography, { variant: "pi", style: { fontSize: "0.75rem", color: theme.colors.primary[600], fontWeight: 500 }, children: [
|
|
690
767
|
"• ",
|
|
691
768
|
formatMessage({ id: `${pluginId}.bookmark.myBookmark`, defaultMessage: "My Bookmark" })
|
|
692
|
-
] }) : /* @__PURE__ */ jsxs(Typography, { variant: "pi", style: { fontSize: "0.75rem", color:
|
|
769
|
+
] }) : /* @__PURE__ */ jsxs(Typography, { variant: "pi", style: { fontSize: "0.75rem", color: "var(--colors-neutral600, #4B5563)" }, children: [
|
|
693
770
|
"• ",
|
|
694
771
|
formatMessage({ id: `${pluginId}.bookmark.sharedBy`, defaultMessage: "Shared by {name}" }, { name: bookmark.createdBy?.firstname || formatMessage({ id: `${pluginId}.bookmark.unknown`, defaultMessage: "Unknown" }) })
|
|
695
772
|
] }),
|
|
@@ -748,7 +825,7 @@ const HomePageModern = () => {
|
|
|
748
825
|
children: /* @__PURE__ */ jsx(Eye, {})
|
|
749
826
|
}
|
|
750
827
|
),
|
|
751
|
-
|
|
828
|
+
/* @__PURE__ */ jsx(
|
|
752
829
|
Button,
|
|
753
830
|
{
|
|
754
831
|
variant: "ghost",
|
|
@@ -757,18 +834,18 @@ const HomePageModern = () => {
|
|
|
757
834
|
e.stopPropagation();
|
|
758
835
|
handleEdit(bookmark);
|
|
759
836
|
},
|
|
760
|
-
disabled: bookmark
|
|
837
|
+
disabled: !isCurrentUserOwner(bookmark),
|
|
761
838
|
children: /* @__PURE__ */ jsx(Pencil, {})
|
|
762
839
|
}
|
|
763
840
|
),
|
|
764
|
-
bookmark
|
|
841
|
+
isCurrentUserOwner(bookmark) && /* @__PURE__ */ jsx(
|
|
765
842
|
Button,
|
|
766
843
|
{
|
|
767
844
|
variant: "ghost",
|
|
768
845
|
size: "S",
|
|
769
846
|
onClick: (e) => {
|
|
770
847
|
e.stopPropagation();
|
|
771
|
-
handleDelete(bookmark
|
|
848
|
+
handleDelete(bookmark);
|
|
772
849
|
},
|
|
773
850
|
children: /* @__PURE__ */ jsx(Trash, {})
|
|
774
851
|
}
|
|
@@ -783,9 +860,9 @@ const HomePageModern = () => {
|
|
|
783
860
|
Box,
|
|
784
861
|
{
|
|
785
862
|
style: {
|
|
786
|
-
background:
|
|
863
|
+
background: "transparent",
|
|
787
864
|
borderRadius: theme.borderRadius.xl,
|
|
788
|
-
border:
|
|
865
|
+
border: "2px dashed rgba(128, 128, 128, 0.2)",
|
|
789
866
|
padding: theme.spacing["3xl"],
|
|
790
867
|
textAlign: "center",
|
|
791
868
|
position: "relative",
|
|
@@ -812,7 +889,7 @@ const HomePageModern = () => {
|
|
|
812
889
|
}
|
|
813
890
|
}
|
|
814
891
|
),
|
|
815
|
-
/* @__PURE__ */ jsx(
|
|
892
|
+
/* @__PURE__ */ jsx(FloatingIcon, { children: /* @__PURE__ */ jsx(SparklesIcon, {}) }),
|
|
816
893
|
/* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "center", gap: 6, style: { position: "relative", zIndex: 1 }, children: [
|
|
817
894
|
/* @__PURE__ */ jsx(
|
|
818
895
|
Box,
|
|
@@ -827,7 +904,7 @@ const HomePageModern = () => {
|
|
|
827
904
|
justifyContent: "center",
|
|
828
905
|
boxShadow: theme.shadows.xl
|
|
829
906
|
},
|
|
830
|
-
children: /* @__PURE__ */ jsx(
|
|
907
|
+
children: /* @__PURE__ */ jsx(SparklesIcon, { style: { width: "60px", height: "60px", color: theme.colors.primary[600] } })
|
|
831
908
|
}
|
|
832
909
|
),
|
|
833
910
|
/* @__PURE__ */ jsx(
|
|
@@ -837,7 +914,7 @@ const HomePageModern = () => {
|
|
|
837
914
|
style: {
|
|
838
915
|
fontSize: "1.75rem",
|
|
839
916
|
fontWeight: "700",
|
|
840
|
-
color:
|
|
917
|
+
color: "var(--colors-neutral800, #1F2937)",
|
|
841
918
|
marginBottom: "8px"
|
|
842
919
|
},
|
|
843
920
|
children: formatMessage({ id: `${pluginId}.empty.title`, defaultMessage: "No bookmarks yet" })
|
|
@@ -903,7 +980,7 @@ const ModalOverlay = styled.div`
|
|
|
903
980
|
padding: 20px;
|
|
904
981
|
`;
|
|
905
982
|
const ModalContent = styled(Box)`
|
|
906
|
-
background:
|
|
983
|
+
background: ${(p) => p.theme.colors.neutral0};
|
|
907
984
|
border-radius: 16px;
|
|
908
985
|
width: 100%;
|
|
909
986
|
max-width: 580px;
|
|
@@ -1229,7 +1306,7 @@ const LicenseGuard = ({ children }) => {
|
|
|
1229
1306
|
padding: 4,
|
|
1230
1307
|
style: {
|
|
1231
1308
|
borderRadius: "8px",
|
|
1232
|
-
border: "2px solid
|
|
1309
|
+
border: "2px solid rgba(14, 165, 233, 0.3)",
|
|
1233
1310
|
width: "100%"
|
|
1234
1311
|
},
|
|
1235
1312
|
children: /* @__PURE__ */ jsx(Typography, { variant: "omega", style: { fontSize: "13px", lineHeight: "1.6" }, children: useExistingKey ? "Enter your email and license key to activate." : useAutoCreate && adminUser && adminUser.email ? `Click "Activate" to auto-create a license with your account (${adminUser.email})` : useAutoCreate ? 'Click "Activate" to auto-create a license with your admin account' : "A license will be created with the details below." })
|
|
@@ -1293,7 +1370,7 @@ const LicenseGuard = ({ children }) => {
|
|
|
1293
1370
|
padding: 5,
|
|
1294
1371
|
style: {
|
|
1295
1372
|
borderRadius: "8px",
|
|
1296
|
-
border: "2px solid
|
|
1373
|
+
border: "2px solid rgba(34, 197, 94, 0.15)",
|
|
1297
1374
|
textAlign: "center"
|
|
1298
1375
|
},
|
|
1299
1376
|
children: [
|