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
|
@@ -7,10 +7,71 @@ const reactRouterDom = require("react-router-dom");
|
|
|
7
7
|
const styled = require("styled-components");
|
|
8
8
|
const designSystem = require("@strapi/design-system");
|
|
9
9
|
const icons = require("@strapi/icons");
|
|
10
|
+
const outline = require("@heroicons/react/24/outline");
|
|
10
11
|
const admin = require("@strapi/strapi/admin");
|
|
11
|
-
const index = require("./index-
|
|
12
|
+
const index = require("./index-D1AjX5wc.js");
|
|
12
13
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
13
14
|
const styled__default = /* @__PURE__ */ _interopDefault(styled);
|
|
15
|
+
const FEATURES = {
|
|
16
|
+
// Free tier features
|
|
17
|
+
basicBookmarks: { tier: "free", limit: 10 },
|
|
18
|
+
basicFilters: { tier: "free" },
|
|
19
|
+
// Premium tier features
|
|
20
|
+
extendedBookmarks: { tier: "premium", limit: 50 },
|
|
21
|
+
queryHistory: { tier: "premium" },
|
|
22
|
+
exportBookmarks: { tier: "premium" },
|
|
23
|
+
sharedBookmarks: { tier: "premium" },
|
|
24
|
+
// Advanced tier features
|
|
25
|
+
unlimitedBookmarks: { tier: "advanced", limit: -1 },
|
|
26
|
+
advancedFilters: { tier: "advanced" },
|
|
27
|
+
subGroups: { tier: "advanced" },
|
|
28
|
+
bulkOperations: { tier: "advanced" },
|
|
29
|
+
analytics: { tier: "advanced" },
|
|
30
|
+
customIntegrations: { tier: "advanced" }
|
|
31
|
+
};
|
|
32
|
+
const useLicenseInfo = () => {
|
|
33
|
+
const { get } = admin.useFetchClient();
|
|
34
|
+
const [limits, setLimits] = React.useState(null);
|
|
35
|
+
const [isLoading, setIsLoading] = React.useState(true);
|
|
36
|
+
React.useEffect(() => {
|
|
37
|
+
const fetchLimits = async () => {
|
|
38
|
+
try {
|
|
39
|
+
console.log("[useLicenseInfo] Fetching license limits...");
|
|
40
|
+
const response = await get("/magic-mark/license/limits");
|
|
41
|
+
console.log("[useLicenseInfo] Raw API response:", response);
|
|
42
|
+
console.log("[useLicenseInfo] Response data:", response.data);
|
|
43
|
+
if (response.data?.success) {
|
|
44
|
+
console.log("[useLicenseInfo] Setting limits:", response.data.data);
|
|
45
|
+
setLimits(response.data.data);
|
|
46
|
+
} else {
|
|
47
|
+
console.warn("[useLicenseInfo] API returned success=false or missing data");
|
|
48
|
+
}
|
|
49
|
+
} catch (error) {
|
|
50
|
+
console.error("[useLicenseInfo] Error fetching license limits:", error);
|
|
51
|
+
} finally {
|
|
52
|
+
setIsLoading(false);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
fetchLimits();
|
|
56
|
+
}, []);
|
|
57
|
+
const tier = limits?.tier || "free";
|
|
58
|
+
const isPremium = tier === "premium" || tier === "advanced";
|
|
59
|
+
const isAdvanced = tier === "advanced";
|
|
60
|
+
console.log("[useLicenseInfo] Computed values:", { tier, isPremium, isAdvanced, limits });
|
|
61
|
+
return {
|
|
62
|
+
isLoading,
|
|
63
|
+
limits,
|
|
64
|
+
tier,
|
|
65
|
+
isFree: tier === "free",
|
|
66
|
+
isPremium,
|
|
67
|
+
isAdvanced,
|
|
68
|
+
canUseFeature: (feature) => {
|
|
69
|
+
const featureConfig = FEATURES[feature];
|
|
70
|
+
const tierOrder = { free: 0, premium: 1, advanced: 2 };
|
|
71
|
+
return tierOrder[tier] >= tierOrder[featureConfig.tier];
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
};
|
|
14
75
|
const theme = {
|
|
15
76
|
colors: {
|
|
16
77
|
primary: {
|
|
@@ -40,12 +101,8 @@ const theme = {
|
|
|
40
101
|
},
|
|
41
102
|
neutral: {
|
|
42
103
|
0: "#FFFFFF",
|
|
43
|
-
50: "#F9FAFB",
|
|
44
104
|
100: "#F3F4F6",
|
|
45
|
-
|
|
46
|
-
600: "#4B5563",
|
|
47
|
-
700: "#374151",
|
|
48
|
-
800: "#1F2937"
|
|
105
|
+
600: "#4B5563"
|
|
49
106
|
}
|
|
50
107
|
},
|
|
51
108
|
shadows: {
|
|
@@ -190,7 +247,7 @@ const StatsGrid = styled__default.default.div`
|
|
|
190
247
|
}
|
|
191
248
|
`;
|
|
192
249
|
const StatCard = styled__default.default(designSystem.Box)`
|
|
193
|
-
background: ${theme.colors.
|
|
250
|
+
background: ${(p) => p.theme.colors.neutral0};
|
|
194
251
|
border-radius: ${theme.borderRadius.lg};
|
|
195
252
|
padding: ${theme.spacing.lg};
|
|
196
253
|
position: relative;
|
|
@@ -199,7 +256,7 @@ const StatCard = styled__default.default(designSystem.Box)`
|
|
|
199
256
|
animation: ${fadeIn$1} ${theme.transitions.slow} backwards;
|
|
200
257
|
animation-delay: ${(props) => props.$delay || "0s"};
|
|
201
258
|
box-shadow: ${theme.shadows.sm};
|
|
202
|
-
border: 1px solid
|
|
259
|
+
border: 1px solid rgba(128, 128, 128, 0.2);
|
|
203
260
|
min-width: 200px;
|
|
204
261
|
flex: 1;
|
|
205
262
|
text-align: center;
|
|
@@ -251,34 +308,34 @@ const StatIcon = styled__default.default(designSystem.Box)`
|
|
|
251
308
|
const StatValue = styled__default.default(designSystem.Typography)`
|
|
252
309
|
font-size: 2.5rem;
|
|
253
310
|
font-weight: 700;
|
|
254
|
-
color: ${theme.colors.
|
|
311
|
+
color: ${(p) => p.theme.colors.neutral800};
|
|
255
312
|
line-height: 1;
|
|
256
313
|
margin-bottom: ${theme.spacing.xs};
|
|
257
314
|
transition: transform ${theme.transitions.normal};
|
|
258
315
|
`;
|
|
259
316
|
const StatLabel = styled__default.default(designSystem.Typography)`
|
|
260
317
|
font-size: 0.875rem;
|
|
261
|
-
color: ${theme.colors.
|
|
318
|
+
color: ${(p) => p.theme.colors.neutral600};
|
|
262
319
|
font-weight: 500;
|
|
263
320
|
letter-spacing: 0.025em;
|
|
264
321
|
text-transform: capitalize;
|
|
265
322
|
`;
|
|
266
323
|
const DataTable = styled__default.default(designSystem.Box)`
|
|
267
|
-
background: ${theme.colors.
|
|
324
|
+
background: ${(p) => p.theme.colors.neutral0};
|
|
268
325
|
border-radius: ${theme.borderRadius.lg};
|
|
269
326
|
overflow: hidden;
|
|
270
327
|
box-shadow: ${theme.shadows.sm};
|
|
271
|
-
border: 1px solid
|
|
328
|
+
border: 1px solid rgba(128, 128, 128, 0.2);
|
|
272
329
|
margin-bottom: ${theme.spacing.xl};
|
|
273
330
|
`;
|
|
274
331
|
const StyledTable = styled__default.default(designSystem.Table)`
|
|
275
332
|
thead {
|
|
276
|
-
background: ${theme.colors.
|
|
277
|
-
border-bottom: 2px solid
|
|
333
|
+
background: ${(p) => p.theme.colors.neutral0};
|
|
334
|
+
border-bottom: 2px solid rgba(128, 128, 128, 0.15);
|
|
278
335
|
|
|
279
336
|
th {
|
|
280
337
|
font-weight: 600;
|
|
281
|
-
color: ${theme.colors.
|
|
338
|
+
color: ${(p) => p.theme.colors.neutral700};
|
|
282
339
|
font-size: 0.875rem;
|
|
283
340
|
text-transform: uppercase;
|
|
284
341
|
letter-spacing: 0.025em;
|
|
@@ -288,14 +345,14 @@ const StyledTable = styled__default.default(designSystem.Table)`
|
|
|
288
345
|
|
|
289
346
|
tbody tr {
|
|
290
347
|
transition: all ${theme.transitions.fast};
|
|
291
|
-
border-bottom: 1px solid
|
|
348
|
+
border-bottom: 1px solid rgba(128, 128, 128, 0.1);
|
|
292
349
|
|
|
293
350
|
&:last-child {
|
|
294
351
|
border-bottom: none;
|
|
295
352
|
}
|
|
296
353
|
|
|
297
354
|
&:hover {
|
|
298
|
-
background: ${theme.colors.
|
|
355
|
+
background: ${(p) => p.theme.colors.neutral100};
|
|
299
356
|
|
|
300
357
|
.action-buttons {
|
|
301
358
|
opacity: 1;
|
|
@@ -304,7 +361,7 @@ const StyledTable = styled__default.default(designSystem.Table)`
|
|
|
304
361
|
|
|
305
362
|
td {
|
|
306
363
|
padding: ${theme.spacing.lg} ${theme.spacing.lg};
|
|
307
|
-
color: ${theme.colors.
|
|
364
|
+
color: ${(p) => p.theme.colors.neutral700};
|
|
308
365
|
vertical-align: middle;
|
|
309
366
|
}
|
|
310
367
|
}
|
|
@@ -316,10 +373,21 @@ styled__default.default(designSystem.Box)`
|
|
|
316
373
|
border-radius: 2px;
|
|
317
374
|
transition: all ${theme.transitions.normal};
|
|
318
375
|
`;
|
|
319
|
-
styled__default.default.div`
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
376
|
+
const BookmarkIconWrapper = styled__default.default.div`
|
|
377
|
+
display: flex;
|
|
378
|
+
align-items: center;
|
|
379
|
+
justify-content: center;
|
|
380
|
+
width: 40px;
|
|
381
|
+
height: 40px;
|
|
382
|
+
background: linear-gradient(135deg, ${theme.colors.primary[100]} 0%, #E0E7FF 100%);
|
|
383
|
+
border-radius: 8px;
|
|
384
|
+
flex-shrink: 0;
|
|
385
|
+
|
|
386
|
+
svg {
|
|
387
|
+
width: 20px;
|
|
388
|
+
height: 20px;
|
|
389
|
+
color: ${theme.colors.primary[600]};
|
|
390
|
+
}
|
|
323
391
|
`;
|
|
324
392
|
const ActionButtons = styled__default.default(designSystem.Flex)`
|
|
325
393
|
opacity: 1;
|
|
@@ -327,21 +395,26 @@ const ActionButtons = styled__default.default(designSystem.Flex)`
|
|
|
327
395
|
gap: ${theme.spacing.xs};
|
|
328
396
|
justify-content: flex-end;
|
|
329
397
|
`;
|
|
330
|
-
const
|
|
398
|
+
const FloatingIcon = styled__default.default.div`
|
|
331
399
|
position: absolute;
|
|
332
400
|
bottom: 40px;
|
|
333
401
|
right: 40px;
|
|
334
|
-
font-size: 72px;
|
|
335
402
|
opacity: 0.08;
|
|
336
403
|
animation: ${float} 4s ease-in-out infinite;
|
|
404
|
+
|
|
405
|
+
svg {
|
|
406
|
+
width: 72px;
|
|
407
|
+
height: 72px;
|
|
408
|
+
color: ${theme.colors.warning[500]};
|
|
409
|
+
}
|
|
337
410
|
`;
|
|
338
411
|
const FilterBar = styled__default.default(designSystem.Flex)`
|
|
339
|
-
background: ${theme.colors.
|
|
412
|
+
background: ${(p) => p.theme.colors.neutral0};
|
|
340
413
|
padding: ${theme.spacing.md} ${theme.spacing.lg};
|
|
341
414
|
border-radius: ${theme.borderRadius.lg};
|
|
342
415
|
margin-bottom: ${theme.spacing.lg};
|
|
343
416
|
box-shadow: ${theme.shadows.sm};
|
|
344
|
-
border: 1px solid
|
|
417
|
+
border: 1px solid rgba(128, 128, 128, 0.2);
|
|
345
418
|
gap: ${theme.spacing.md};
|
|
346
419
|
align-items: center;
|
|
347
420
|
`;
|
|
@@ -354,23 +427,23 @@ const SearchInputWrapper = styled__default.default.div`
|
|
|
354
427
|
display: flex;
|
|
355
428
|
align-items: center;
|
|
356
429
|
`;
|
|
357
|
-
const
|
|
430
|
+
const SearchIconStyled = styled__default.default(outline.MagnifyingGlassIcon)`
|
|
358
431
|
position: absolute;
|
|
359
432
|
left: 12px;
|
|
360
433
|
width: 16px;
|
|
361
434
|
height: 16px;
|
|
362
|
-
color: ${theme.colors.
|
|
435
|
+
color: ${(p) => p.theme.colors.neutral600};
|
|
363
436
|
pointer-events: none;
|
|
364
437
|
`;
|
|
365
438
|
const StyledSearchInput = styled__default.default.input`
|
|
366
439
|
width: 100%;
|
|
367
440
|
padding: ${theme.spacing.sm} ${theme.spacing.sm} ${theme.spacing.sm} 36px;
|
|
368
|
-
border: 1px solid
|
|
441
|
+
border: 1px solid rgba(128, 128, 128, 0.2);
|
|
369
442
|
border-radius: ${theme.borderRadius.md};
|
|
370
443
|
font-size: 0.875rem;
|
|
371
444
|
transition: all ${theme.transitions.fast};
|
|
372
|
-
background: ${theme.colors.
|
|
373
|
-
color: ${theme.colors.
|
|
445
|
+
background: ${(p) => p.theme.colors.neutral0};
|
|
446
|
+
color: ${(p) => p.theme.colors.neutral800};
|
|
374
447
|
|
|
375
448
|
&:focus {
|
|
376
449
|
outline: none;
|
|
@@ -379,14 +452,14 @@ const StyledSearchInput = styled__default.default.input`
|
|
|
379
452
|
}
|
|
380
453
|
|
|
381
454
|
&::placeholder {
|
|
382
|
-
color: ${theme.colors.
|
|
455
|
+
color: ${(p) => p.theme.colors.neutral600};
|
|
383
456
|
}
|
|
384
457
|
`;
|
|
385
458
|
const HomePageModern = () => {
|
|
386
459
|
const { formatMessage } = reactIntl.useIntl();
|
|
387
460
|
const navigate = reactRouterDom.useNavigate();
|
|
388
461
|
const { get, post, del } = admin.useFetchClient();
|
|
389
|
-
|
|
462
|
+
useLicenseInfo();
|
|
390
463
|
const [currentUser, setCurrentUser] = React.useState(null);
|
|
391
464
|
const [bookmarks, setBookmarks] = React.useState([]);
|
|
392
465
|
const [loading, setLoading] = React.useState(false);
|
|
@@ -453,6 +526,19 @@ const HomePageModern = () => {
|
|
|
453
526
|
console.error("[Magic-Mark] Error fetching current user:", error);
|
|
454
527
|
}
|
|
455
528
|
};
|
|
529
|
+
const isCurrentUserOwner = (bookmark) => {
|
|
530
|
+
if (!bookmark.createdBy || !currentUser) return false;
|
|
531
|
+
if (bookmark.createdBy.documentId && currentUser.documentId) {
|
|
532
|
+
return bookmark.createdBy.documentId === currentUser.documentId;
|
|
533
|
+
}
|
|
534
|
+
if (bookmark.createdBy.id && currentUser.id) {
|
|
535
|
+
return String(bookmark.createdBy.id) === String(currentUser.id);
|
|
536
|
+
}
|
|
537
|
+
if (bookmark.createdBy.id && currentUser.documentId) {
|
|
538
|
+
return String(bookmark.createdBy.id) === String(currentUser.documentId);
|
|
539
|
+
}
|
|
540
|
+
return false;
|
|
541
|
+
};
|
|
456
542
|
const fetchLicenseLimits = async () => {
|
|
457
543
|
try {
|
|
458
544
|
const response = await get(`/${index.pluginId}/license/limits`);
|
|
@@ -477,27 +563,29 @@ const HomePageModern = () => {
|
|
|
477
563
|
setLoading(false);
|
|
478
564
|
}
|
|
479
565
|
};
|
|
480
|
-
const handleDelete = async (
|
|
566
|
+
const handleDelete = async (bookmark) => {
|
|
481
567
|
if (!confirm(formatMessage({
|
|
482
568
|
id: `${index.pluginId}.confirm.delete`,
|
|
483
569
|
defaultMessage: "Are you sure you want to delete this bookmark?"
|
|
484
570
|
}))) {
|
|
485
571
|
return;
|
|
486
572
|
}
|
|
573
|
+
const deleteId = bookmark.documentId || bookmark.id;
|
|
487
574
|
try {
|
|
488
|
-
await del(`/${index.pluginId}/bookmarks/${
|
|
489
|
-
console.log("[Magic-Mark HomePage] Bookmark deleted:",
|
|
575
|
+
await del(`/${index.pluginId}/bookmarks/${deleteId}`);
|
|
576
|
+
console.log("[Magic-Mark HomePage] Bookmark deleted:", deleteId);
|
|
490
577
|
fetchBookmarks();
|
|
491
578
|
} catch (error) {
|
|
492
579
|
console.error("[Magic-Mark HomePage] Error deleting bookmark:", error);
|
|
493
580
|
}
|
|
494
581
|
};
|
|
495
582
|
const handlePin = async (bookmark) => {
|
|
583
|
+
const pinId = bookmark.documentId || bookmark.id;
|
|
496
584
|
try {
|
|
497
|
-
await post(`/${index.pluginId}/bookmarks/${
|
|
585
|
+
await post(`/${index.pluginId}/bookmarks/${pinId}/pin`, {
|
|
498
586
|
isPinned: !bookmark.isPinned
|
|
499
587
|
});
|
|
500
|
-
console.log("[Magic-Mark HomePage] Bookmark pinned:",
|
|
588
|
+
console.log("[Magic-Mark HomePage] Bookmark pinned:", pinId);
|
|
501
589
|
fetchBookmarks();
|
|
502
590
|
} catch (error) {
|
|
503
591
|
console.error("[Magic-Mark HomePage] Error pinning bookmark:", error);
|
|
@@ -536,24 +624,24 @@ const HomePageModern = () => {
|
|
|
536
624
|
return bookmark.name.toLowerCase().includes(query) || bookmark.description && bookmark.description.toLowerCase().includes(query) || bookmark.path.toLowerCase().includes(query);
|
|
537
625
|
}).slice(0, parseInt(entriesPerPage));
|
|
538
626
|
const pinnedBookmarks = bookmarks.filter((b) => b.isPinned);
|
|
539
|
-
const myBookmarks = bookmarks.filter((b) => b
|
|
540
|
-
const sharedWithMe = bookmarks.filter((b) => b
|
|
627
|
+
const myBookmarks = bookmarks.filter((b) => isCurrentUserOwner(b));
|
|
628
|
+
const sharedWithMe = bookmarks.filter((b) => !isCurrentUserOwner(b) && b.createdBy);
|
|
541
629
|
return /* @__PURE__ */ jsxRuntime.jsxs(Container, { padding: 8, children: [
|
|
542
630
|
/* @__PURE__ */ jsxRuntime.jsx(Header, { children: /* @__PURE__ */ jsxRuntime.jsxs(HeaderContent, { direction: "column", alignItems: "flex-start", gap: 2, children: [
|
|
543
631
|
/* @__PURE__ */ jsxRuntime.jsxs(Title, { children: [
|
|
544
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
632
|
+
/* @__PURE__ */ jsxRuntime.jsx(outline.BookOpenIcon, {}),
|
|
545
633
|
" MagicMark"
|
|
546
634
|
] }),
|
|
547
635
|
/* @__PURE__ */ jsxRuntime.jsx(Subtitle, { children: "Save filtered views and navigate with one click" })
|
|
548
636
|
] }) }),
|
|
549
637
|
/* @__PURE__ */ jsxRuntime.jsxs(StatsGrid, { children: [
|
|
550
638
|
/* @__PURE__ */ jsxRuntime.jsxs(StatCard, { $delay: "0.1s", $color: theme.colors.primary[500], children: [
|
|
551
|
-
/* @__PURE__ */ jsxRuntime.jsx(StatIcon, { className: "stat-icon", $bg: theme.colors.primary[100], $color: theme.colors.primary[600], children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
639
|
+
/* @__PURE__ */ jsxRuntime.jsx(StatIcon, { className: "stat-icon", $bg: theme.colors.primary[100], $color: theme.colors.primary[600], children: /* @__PURE__ */ jsxRuntime.jsx(outline.UserIcon, {}) }),
|
|
552
640
|
/* @__PURE__ */ jsxRuntime.jsx(StatValue, { className: "stat-value", children: myBookmarks.length }),
|
|
553
641
|
/* @__PURE__ */ jsxRuntime.jsx(StatLabel, { children: "My Bookmarks" })
|
|
554
642
|
] }),
|
|
555
643
|
/* @__PURE__ */ jsxRuntime.jsxs(StatCard, { $delay: "0.2s", $color: theme.colors.success[500], children: [
|
|
556
|
-
/* @__PURE__ */ jsxRuntime.jsx(StatIcon, { className: "stat-icon", $bg: theme.colors.success[100], $color: theme.colors.success[600], children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
644
|
+
/* @__PURE__ */ jsxRuntime.jsx(StatIcon, { className: "stat-icon", $bg: theme.colors.success[100], $color: theme.colors.success[600], children: /* @__PURE__ */ jsxRuntime.jsx(outline.SparklesIcon, {}) }),
|
|
557
645
|
/* @__PURE__ */ jsxRuntime.jsx(StatValue, { className: "stat-value", children: sharedWithMe.length }),
|
|
558
646
|
/* @__PURE__ */ jsxRuntime.jsx(StatLabel, { children: formatMessage({ id: `${index.pluginId}.stats.shared`, defaultMessage: "Shared with Me" }) })
|
|
559
647
|
] }),
|
|
@@ -576,7 +664,7 @@ const HomePageModern = () => {
|
|
|
576
664
|
className: "stat-icon",
|
|
577
665
|
$bg: licenseLimits.canCreate ? theme.colors.neutral[100] : theme.colors.danger[100],
|
|
578
666
|
$color: licenseLimits.canCreate ? theme.colors.neutral[600] : theme.colors.danger[600],
|
|
579
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
667
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(outline.LinkIcon, {})
|
|
580
668
|
}
|
|
581
669
|
),
|
|
582
670
|
/* @__PURE__ */ jsxRuntime.jsxs(StatValue, { className: "stat-value", children: [
|
|
@@ -612,10 +700,10 @@ const HomePageModern = () => {
|
|
|
612
700
|
}) })
|
|
613
701
|
] }) }),
|
|
614
702
|
!loading && bookmarks.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { children: [
|
|
615
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { style: { marginBottom: theme.spacing.md }, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "delta", style: { marginBottom: theme.spacing.md, color:
|
|
703
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { style: { marginBottom: theme.spacing.md }, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "delta", style: { marginBottom: theme.spacing.md, color: "var(--colors-neutral700, #374151)" }, children: formatMessage({ id: `${index.pluginId}.allBookmarks.title`, defaultMessage: "🔖 All Available Bookmarks" }) }) }),
|
|
616
704
|
/* @__PURE__ */ jsxRuntime.jsxs(FilterBar, { children: [
|
|
617
705
|
/* @__PURE__ */ jsxRuntime.jsxs(SearchInputWrapper, { style: { flex: 1 }, children: [
|
|
618
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
706
|
+
/* @__PURE__ */ jsxRuntime.jsx(SearchIconStyled, {}),
|
|
619
707
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
620
708
|
StyledSearchInput,
|
|
621
709
|
{
|
|
@@ -672,28 +760,17 @@ const HomePageModern = () => {
|
|
|
672
760
|
background: bookmark.isPinned ? theme.colors.warning[50] : "transparent"
|
|
673
761
|
}, children: [
|
|
674
762
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { onClick: () => handleBookmarkClick(bookmark), style: { cursor: "pointer" }, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { alignItems: "center", gap: 3, children: [
|
|
675
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
676
|
-
|
|
677
|
-
{
|
|
678
|
-
|
|
679
|
-
width: "36px",
|
|
680
|
-
height: "36px",
|
|
681
|
-
display: "flex",
|
|
682
|
-
alignItems: "center",
|
|
683
|
-
justifyContent: "center",
|
|
684
|
-
flexShrink: 0,
|
|
685
|
-
fontSize: "24px"
|
|
686
|
-
},
|
|
687
|
-
children: bookmark.emoji
|
|
688
|
-
}
|
|
689
|
-
),
|
|
763
|
+
/* @__PURE__ */ jsxRuntime.jsx(BookmarkIconWrapper, { children: (() => {
|
|
764
|
+
const IconComponent = index.getIconById(bookmark.icon || bookmark.emoji || "bookmark");
|
|
765
|
+
return /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {});
|
|
766
|
+
})() }),
|
|
690
767
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "flex-start", gap: 0, children: [
|
|
691
768
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "semiBold", ellipsis: true, style: { fontSize: "1.125rem", lineHeight: "1.4" }, children: bookmark.name }),
|
|
692
769
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 1, alignItems: "center", children: [
|
|
693
|
-
bookmark
|
|
770
|
+
isCurrentUserOwner(bookmark) ? /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Typography, { variant: "pi", style: { fontSize: "0.75rem", color: theme.colors.primary[600], fontWeight: 500 }, children: [
|
|
694
771
|
"• ",
|
|
695
772
|
formatMessage({ id: `${index.pluginId}.bookmark.myBookmark`, defaultMessage: "My Bookmark" })
|
|
696
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Typography, { variant: "pi", style: { fontSize: "0.75rem", color:
|
|
773
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Typography, { variant: "pi", style: { fontSize: "0.75rem", color: "var(--colors-neutral600, #4B5563)" }, children: [
|
|
697
774
|
"• ",
|
|
698
775
|
formatMessage({ id: `${index.pluginId}.bookmark.sharedBy`, defaultMessage: "Shared by {name}" }, { name: bookmark.createdBy?.firstname || formatMessage({ id: `${index.pluginId}.bookmark.unknown`, defaultMessage: "Unknown" }) })
|
|
699
776
|
] }),
|
|
@@ -752,7 +829,7 @@ const HomePageModern = () => {
|
|
|
752
829
|
children: /* @__PURE__ */ jsxRuntime.jsx(icons.Eye, {})
|
|
753
830
|
}
|
|
754
831
|
),
|
|
755
|
-
|
|
832
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
756
833
|
designSystem.Button,
|
|
757
834
|
{
|
|
758
835
|
variant: "ghost",
|
|
@@ -761,18 +838,18 @@ const HomePageModern = () => {
|
|
|
761
838
|
e.stopPropagation();
|
|
762
839
|
handleEdit(bookmark);
|
|
763
840
|
},
|
|
764
|
-
disabled: bookmark
|
|
841
|
+
disabled: !isCurrentUserOwner(bookmark),
|
|
765
842
|
children: /* @__PURE__ */ jsxRuntime.jsx(icons.Pencil, {})
|
|
766
843
|
}
|
|
767
844
|
),
|
|
768
|
-
bookmark
|
|
845
|
+
isCurrentUserOwner(bookmark) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
769
846
|
designSystem.Button,
|
|
770
847
|
{
|
|
771
848
|
variant: "ghost",
|
|
772
849
|
size: "S",
|
|
773
850
|
onClick: (e) => {
|
|
774
851
|
e.stopPropagation();
|
|
775
|
-
handleDelete(bookmark
|
|
852
|
+
handleDelete(bookmark);
|
|
776
853
|
},
|
|
777
854
|
children: /* @__PURE__ */ jsxRuntime.jsx(icons.Trash, {})
|
|
778
855
|
}
|
|
@@ -787,9 +864,9 @@ const HomePageModern = () => {
|
|
|
787
864
|
designSystem.Box,
|
|
788
865
|
{
|
|
789
866
|
style: {
|
|
790
|
-
background:
|
|
867
|
+
background: "transparent",
|
|
791
868
|
borderRadius: theme.borderRadius.xl,
|
|
792
|
-
border:
|
|
869
|
+
border: "2px dashed rgba(128, 128, 128, 0.2)",
|
|
793
870
|
padding: theme.spacing["3xl"],
|
|
794
871
|
textAlign: "center",
|
|
795
872
|
position: "relative",
|
|
@@ -816,7 +893,7 @@ const HomePageModern = () => {
|
|
|
816
893
|
}
|
|
817
894
|
}
|
|
818
895
|
),
|
|
819
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
896
|
+
/* @__PURE__ */ jsxRuntime.jsx(FloatingIcon, { children: /* @__PURE__ */ jsxRuntime.jsx(outline.SparklesIcon, {}) }),
|
|
820
897
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "center", gap: 6, style: { position: "relative", zIndex: 1 }, children: [
|
|
821
898
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
822
899
|
designSystem.Box,
|
|
@@ -831,7 +908,7 @@ const HomePageModern = () => {
|
|
|
831
908
|
justifyContent: "center",
|
|
832
909
|
boxShadow: theme.shadows.xl
|
|
833
910
|
},
|
|
834
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
911
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(outline.SparklesIcon, { style: { width: "60px", height: "60px", color: theme.colors.primary[600] } })
|
|
835
912
|
}
|
|
836
913
|
),
|
|
837
914
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -841,7 +918,7 @@ const HomePageModern = () => {
|
|
|
841
918
|
style: {
|
|
842
919
|
fontSize: "1.75rem",
|
|
843
920
|
fontWeight: "700",
|
|
844
|
-
color:
|
|
921
|
+
color: "var(--colors-neutral800, #1F2937)",
|
|
845
922
|
marginBottom: "8px"
|
|
846
923
|
},
|
|
847
924
|
children: formatMessage({ id: `${index.pluginId}.empty.title`, defaultMessage: "No bookmarks yet" })
|
|
@@ -907,7 +984,7 @@ const ModalOverlay = styled__default.default.div`
|
|
|
907
984
|
padding: 20px;
|
|
908
985
|
`;
|
|
909
986
|
const ModalContent = styled__default.default(designSystem.Box)`
|
|
910
|
-
background:
|
|
987
|
+
background: ${(p) => p.theme.colors.neutral0};
|
|
911
988
|
border-radius: 16px;
|
|
912
989
|
width: 100%;
|
|
913
990
|
max-width: 580px;
|
|
@@ -1233,7 +1310,7 @@ const LicenseGuard = ({ children }) => {
|
|
|
1233
1310
|
padding: 4,
|
|
1234
1311
|
style: {
|
|
1235
1312
|
borderRadius: "8px",
|
|
1236
|
-
border: "2px solid
|
|
1313
|
+
border: "2px solid rgba(14, 165, 233, 0.3)",
|
|
1237
1314
|
width: "100%"
|
|
1238
1315
|
},
|
|
1239
1316
|
children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.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." })
|
|
@@ -1297,7 +1374,7 @@ const LicenseGuard = ({ children }) => {
|
|
|
1297
1374
|
padding: 5,
|
|
1298
1375
|
style: {
|
|
1299
1376
|
borderRadius: "8px",
|
|
1300
|
-
border: "2px solid
|
|
1377
|
+
border: "2px solid rgba(34, 197, 94, 0.15)",
|
|
1301
1378
|
textAlign: "center"
|
|
1302
1379
|
},
|
|
1303
1380
|
children: [
|
|
@@ -5,7 +5,7 @@ import { useFetchClient, useNotification } from "@strapi/strapi/admin";
|
|
|
5
5
|
import styled from "styled-components";
|
|
6
6
|
import { Flex, Typography, Box, Badge, Button } from "@strapi/design-system";
|
|
7
7
|
import { Check, Cross, Sparkle, Lightning, Rocket } from "@strapi/icons";
|
|
8
|
-
import { p as pluginId } from "./index-
|
|
8
|
+
import { p as pluginId } from "./index-Bh3DfbXD.mjs";
|
|
9
9
|
const Container = styled(Box)`
|
|
10
10
|
padding: 32px;
|
|
11
11
|
max-width: 1400px;
|
|
@@ -52,7 +52,7 @@ const TierCard = styled(Box)`
|
|
|
52
52
|
background: ${(props) => props.theme.colors.neutral0};
|
|
53
53
|
border-radius: 16px;
|
|
54
54
|
padding: 32px;
|
|
55
|
-
border: 2px solid ${(props) => props.$featured ? "
|
|
55
|
+
border: 2px solid ${(props) => props.$featured ? "rgba(14, 165, 233, 0.5)" : props.theme.colors.neutral200};
|
|
56
56
|
position: relative;
|
|
57
57
|
transition: all 0.3s ease;
|
|
58
58
|
box-shadow: ${(props) => props.$featured ? "0 20px 25px -5px rgba(14, 165, 233, 0.25), 0 8px 10px -6px rgba(14, 165, 233, 0.2)" : "0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.05)"};
|
|
@@ -125,7 +125,7 @@ const FeatureIcon = styled(Box)`
|
|
|
125
125
|
margin-top: 2px;
|
|
126
126
|
|
|
127
127
|
${(props) => props.$included ? `
|
|
128
|
-
background:
|
|
128
|
+
background: rgba(34, 197, 94, 0.15);
|
|
129
129
|
svg { color: #16A34A; }
|
|
130
130
|
` : `
|
|
131
131
|
background: #FEE2E2;
|
|
@@ -305,7 +305,7 @@ const UpgradePage = () => {
|
|
|
305
305
|
/* @__PURE__ */ jsx(TierName, { variant: "beta", children: tier.name }),
|
|
306
306
|
/* @__PURE__ */ jsxs(Flex, { alignItems: "baseline", gap: 1, children: [
|
|
307
307
|
/* @__PURE__ */ jsx(TierPrice, { variant: "alpha", children: tier.price }),
|
|
308
|
-
/* @__PURE__ */ jsx(Typography, { variant: "omega", style: { color: "#6B7280" }, children: tier.period })
|
|
308
|
+
/* @__PURE__ */ jsx(Typography, { variant: "omega", style: { color: "var(--colors-neutral600, #6B7280)" }, children: tier.period })
|
|
309
309
|
] }),
|
|
310
310
|
/* @__PURE__ */ jsx(TierDescription, { variant: "omega", children: tier.description }),
|
|
311
311
|
/* @__PURE__ */ jsx(LimitsBox, { children: /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: 2, children: [
|
|
@@ -328,7 +328,7 @@ const UpgradePage = () => {
|
|
|
328
328
|
variant: "omega",
|
|
329
329
|
style: {
|
|
330
330
|
fontSize: "14px",
|
|
331
|
-
color: feature.included ? "#374151" : "#9CA3AF",
|
|
331
|
+
color: feature.included ? "var(--colors-neutral800, #374151)" : "var(--colors-neutral500, #9CA3AF)",
|
|
332
332
|
textDecoration: feature.included ? "none" : "line-through"
|
|
333
333
|
},
|
|
334
334
|
children: feature.name
|
|
@@ -7,7 +7,7 @@ const admin = require("@strapi/strapi/admin");
|
|
|
7
7
|
const styled = require("styled-components");
|
|
8
8
|
const designSystem = require("@strapi/design-system");
|
|
9
9
|
const icons = require("@strapi/icons");
|
|
10
|
-
const index = require("./index-
|
|
10
|
+
const index = require("./index-D1AjX5wc.js");
|
|
11
11
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
12
12
|
const styled__default = /* @__PURE__ */ _interopDefault(styled);
|
|
13
13
|
const Container = styled__default.default(designSystem.Box)`
|
|
@@ -56,7 +56,7 @@ const TierCard = styled__default.default(designSystem.Box)`
|
|
|
56
56
|
background: ${(props) => props.theme.colors.neutral0};
|
|
57
57
|
border-radius: 16px;
|
|
58
58
|
padding: 32px;
|
|
59
|
-
border: 2px solid ${(props) => props.$featured ? "
|
|
59
|
+
border: 2px solid ${(props) => props.$featured ? "rgba(14, 165, 233, 0.5)" : props.theme.colors.neutral200};
|
|
60
60
|
position: relative;
|
|
61
61
|
transition: all 0.3s ease;
|
|
62
62
|
box-shadow: ${(props) => props.$featured ? "0 20px 25px -5px rgba(14, 165, 233, 0.25), 0 8px 10px -6px rgba(14, 165, 233, 0.2)" : "0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.05)"};
|
|
@@ -129,7 +129,7 @@ const FeatureIcon = styled__default.default(designSystem.Box)`
|
|
|
129
129
|
margin-top: 2px;
|
|
130
130
|
|
|
131
131
|
${(props) => props.$included ? `
|
|
132
|
-
background:
|
|
132
|
+
background: rgba(34, 197, 94, 0.15);
|
|
133
133
|
svg { color: #16A34A; }
|
|
134
134
|
` : `
|
|
135
135
|
background: #FEE2E2;
|
|
@@ -309,7 +309,7 @@ const UpgradePage = () => {
|
|
|
309
309
|
/* @__PURE__ */ jsxRuntime.jsx(TierName, { variant: "beta", children: tier.name }),
|
|
310
310
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { alignItems: "baseline", gap: 1, children: [
|
|
311
311
|
/* @__PURE__ */ jsxRuntime.jsx(TierPrice, { variant: "alpha", children: tier.price }),
|
|
312
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", style: { color: "#6B7280" }, children: tier.period })
|
|
312
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", style: { color: "var(--colors-neutral600, #6B7280)" }, children: tier.period })
|
|
313
313
|
] }),
|
|
314
314
|
/* @__PURE__ */ jsxRuntime.jsx(TierDescription, { variant: "omega", children: tier.description }),
|
|
315
315
|
/* @__PURE__ */ jsxRuntime.jsx(LimitsBox, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 2, children: [
|
|
@@ -332,7 +332,7 @@ const UpgradePage = () => {
|
|
|
332
332
|
variant: "omega",
|
|
333
333
|
style: {
|
|
334
334
|
fontSize: "14px",
|
|
335
|
-
color: feature.included ? "#374151" : "#9CA3AF",
|
|
335
|
+
color: feature.included ? "var(--colors-neutral800, #374151)" : "var(--colors-neutral500, #9CA3AF)",
|
|
336
336
|
textDecoration: feature.included ? "none" : "line-through"
|
|
337
337
|
},
|
|
338
338
|
children: feature.name
|