@burdenoff/microfe-store 2026.703.1 → 2026.704.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/components/InstallAppModal.js +305 -140
- package/dist/components/InstallAppModal.js.map +1 -1
- package/dist/generated/global-operations.js +7 -0
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.js.map +1 -1
- package/dist/hooks/useInstallations.js.map +1 -1
- package/dist/hooks/useStoreGraphQL.js +42 -34
- package/dist/hooks/useStoreGraphQL.js.map +1 -1
- package/dist/hooks/useStoreGraphQLWithContext.js +10 -7
- package/dist/hooks/useStoreGraphQLWithContext.js.map +1 -1
- package/dist/pages/AdminDashboardPage.js +451 -378
- package/dist/pages/AdminDashboardPage.js.map +1 -1
- package/dist/pages/AdminReviewModerationPage.js +182 -150
- package/dist/pages/AdminReviewModerationPage.js.map +1 -1
- package/dist/pages/AdminStoresPage.js.map +1 -1
- package/dist/pages/AdminSubmissionsQueuePage.js +642 -305
- package/dist/pages/AdminSubmissionsQueuePage.js.map +1 -1
- package/dist/pages/AppDetailPage.js +200 -153
- package/dist/pages/AppDetailPage.js.map +1 -1
- package/dist/pages/AppSettingsPage.js.map +1 -1
- package/dist/pages/CartPage.js.map +1 -1
- package/dist/pages/InstalledAppsPage.js +335 -154
- package/dist/pages/InstalledAppsPage.js.map +1 -1
- package/dist/pages/MyLicensesPage.js.map +1 -1
- package/dist/pages/OrdersPage.js +5 -5
- package/dist/pages/ProductDetailPage.js +505 -451
- package/dist/pages/ProductDetailPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,37 @@
|
|
|
1
1
|
import { useStore as e } from "../providers/StoreProvider.js";
|
|
2
2
|
import { formatPriceForModel as t } from "../utils/index.js";
|
|
3
3
|
import { useCallback as n, useEffect as r, useState as i } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import { graphqlFetch as
|
|
6
|
-
import { jsx as
|
|
7
|
-
import { useNavigate as
|
|
8
|
-
import {
|
|
4
|
+
import { ArrowRight as a, Check as o, CheckCircle as s, ChevronDown as c, ChevronUp as l, Clock as u, ExternalLink as d, LayoutDashboard as f, MessageSquareWarning as p, PackageCheck as m, RefreshCw as h, Store as g, TrendingUp as _, Users as v, X as y, XCircle as b } from "lucide-react";
|
|
5
|
+
import { graphqlFetch as x } from "@burdenoff/fe-libs/shared/graphql";
|
|
6
|
+
import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
7
|
+
import { useNavigate as T } from "react-router-dom";
|
|
8
|
+
import { GlassCard as E, IllustratedEmptyState as D } from "@burdenoff/fe-libs/ui";
|
|
9
9
|
//#region src/pages/AdminDashboardPage.tsx
|
|
10
|
-
var
|
|
11
|
-
|
|
10
|
+
var O = "\n query AdminDashboardData {\n recentPending: pendingReviewProducts(limit: 5) {\n totalCount\n products {\n id\n slug\n name\n type\n nature\n category\n icon\n price\n currency\n pricingModel\n description\n submittedAt\n submittedBy\n productId\n publisher {\n name\n email\n }\n }\n }\n stores {\n id\n }\n recentPublished: products(filter: { status: PUBLISHED }, limit: 5) {\n id\n slug\n name\n icon\n type\n status\n publishedAt\n reviewedBy\n }\n recentRejected: products(filter: { status: REJECTED }, limit: 5) {\n id\n slug\n name\n icon\n type\n status\n reviewedAt\n rejectedReason\n }\n }\n", k = "\n mutation ApproveProduct($id: ID!) {\n approveProduct(id: $id) {\n id\n status\n }\n }\n", A = "\n mutation RejectProduct($id: ID!, $reason: String!) {\n rejectProduct(id: $id, reason: $reason) {\n id\n status\n }\n }\n", j = {
|
|
11
|
+
NODE: "bg-[var(--color-status-info-bg-subtle)] text-[var(--color-status-info-text)]",
|
|
12
|
+
WORKFLOW: "bg-[var(--color-status-warning-bg-subtle)] text-[var(--color-status-warning-text)]",
|
|
13
|
+
INTEGRATION: "bg-[var(--color-status-success-bg-subtle)] text-[var(--color-status-success-text)]",
|
|
14
|
+
VIBEMODULE: "bg-[var(--color-surface-accent-muted)] text-[var(--color-text-accent)]"
|
|
15
|
+
};
|
|
16
|
+
function M(e) {
|
|
17
|
+
return e ? j[e] ?? "bg-[var(--color-surface-muted)] text-[var(--color-text-secondary)]" : "bg-[var(--color-surface-muted)] text-[var(--color-text-secondary)]";
|
|
18
|
+
}
|
|
19
|
+
function N(e) {
|
|
20
|
+
return e ? new Date(e).toLocaleDateString(void 0, {
|
|
21
|
+
month: "short",
|
|
22
|
+
day: "numeric",
|
|
23
|
+
year: "numeric"
|
|
24
|
+
}) : "—";
|
|
25
|
+
}
|
|
26
|
+
function P(e) {
|
|
27
|
+
if (!e) return "—";
|
|
28
|
+
let t = Date.now() - new Date(e).getTime(), n = Math.floor(t / 6e4);
|
|
29
|
+
if (n < 60) return `${n}m ago`;
|
|
30
|
+
let r = Math.floor(n / 60);
|
|
31
|
+
return r < 24 ? `${r}h ago` : `${Math.floor(r / 24)}d ago`;
|
|
32
|
+
}
|
|
33
|
+
var F = () => {
|
|
34
|
+
let j = T(), { authToken: F, basePath: I } = e(), [L, R] = i({
|
|
12
35
|
pendingCount: 0,
|
|
13
36
|
totalStores: 0,
|
|
14
37
|
recentPending: [],
|
|
@@ -16,20 +39,20 @@ var D = "\n query AdminDashboardData {\n recentPending: pendingReviewProduct
|
|
|
16
39
|
recentRejected: [],
|
|
17
40
|
loading: !0,
|
|
18
41
|
error: null
|
|
19
|
-
}), [
|
|
20
|
-
|
|
42
|
+
}), [z, B] = i(null), [V, H] = i(null), [U, W] = i(""), [G, K] = i(null), [q, J] = i(null), Y = n(async () => {
|
|
43
|
+
R((e) => ({
|
|
21
44
|
...e,
|
|
22
45
|
loading: !0,
|
|
23
46
|
error: null
|
|
24
47
|
}));
|
|
25
48
|
try {
|
|
26
|
-
let e = await
|
|
49
|
+
let e = await x({
|
|
27
50
|
gateway: "global",
|
|
28
|
-
query:
|
|
29
|
-
authToken:
|
|
51
|
+
query: O,
|
|
52
|
+
authToken: F || void 0
|
|
30
53
|
});
|
|
31
54
|
if (e.errors?.length) throw Error(e.errors[0]?.message ?? "Failed to load dashboard");
|
|
32
|
-
|
|
55
|
+
R({
|
|
33
56
|
pendingCount: e.data?.recentPending.totalCount ?? 0,
|
|
34
57
|
totalStores: e.data?.stores.length ?? 0,
|
|
35
58
|
recentPending: e.data?.recentPending.products ?? [],
|
|
@@ -39,467 +62,517 @@ var D = "\n query AdminDashboardData {\n recentPending: pendingReviewProduct
|
|
|
39
62
|
error: null
|
|
40
63
|
});
|
|
41
64
|
} catch (e) {
|
|
42
|
-
|
|
65
|
+
R((t) => ({
|
|
43
66
|
...t,
|
|
44
67
|
loading: !1,
|
|
45
68
|
error: e instanceof Error ? e.message : "Failed to load dashboard"
|
|
46
69
|
}));
|
|
47
70
|
}
|
|
48
|
-
}, [
|
|
71
|
+
}, [F]);
|
|
49
72
|
r(() => {
|
|
50
|
-
|
|
51
|
-
}, [
|
|
52
|
-
let
|
|
53
|
-
|
|
73
|
+
Y();
|
|
74
|
+
}, [Y]);
|
|
75
|
+
let X = async (e) => {
|
|
76
|
+
B(e), K(null);
|
|
54
77
|
try {
|
|
55
|
-
let t = await
|
|
78
|
+
let t = await x({
|
|
56
79
|
gateway: "global",
|
|
57
|
-
query:
|
|
80
|
+
query: k,
|
|
58
81
|
variables: { id: e },
|
|
59
|
-
authToken:
|
|
82
|
+
authToken: F || void 0
|
|
60
83
|
});
|
|
61
84
|
if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Approval failed");
|
|
62
|
-
await
|
|
85
|
+
await Y();
|
|
63
86
|
} catch (e) {
|
|
64
|
-
|
|
87
|
+
K(e instanceof Error ? e.message : "Approval failed");
|
|
65
88
|
} finally {
|
|
66
|
-
|
|
89
|
+
B(null);
|
|
67
90
|
}
|
|
68
|
-
},
|
|
69
|
-
if (
|
|
70
|
-
|
|
91
|
+
}, Z = async (e) => {
|
|
92
|
+
if (U.trim()) {
|
|
93
|
+
B(e), K(null);
|
|
71
94
|
try {
|
|
72
|
-
let t = await
|
|
95
|
+
let t = await x({
|
|
73
96
|
gateway: "global",
|
|
74
|
-
query:
|
|
97
|
+
query: A,
|
|
75
98
|
variables: {
|
|
76
99
|
id: e,
|
|
77
|
-
reason:
|
|
100
|
+
reason: U.trim()
|
|
78
101
|
},
|
|
79
|
-
authToken:
|
|
102
|
+
authToken: F || void 0
|
|
80
103
|
});
|
|
81
104
|
if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Rejection failed");
|
|
82
|
-
|
|
105
|
+
H(null), W(""), await Y();
|
|
83
106
|
} catch (e) {
|
|
84
|
-
|
|
107
|
+
K(e instanceof Error ? e.message : "Rejection failed");
|
|
85
108
|
} finally {
|
|
86
|
-
|
|
109
|
+
B(null);
|
|
87
110
|
}
|
|
88
111
|
}
|
|
89
|
-
},
|
|
90
|
-
month: "short",
|
|
91
|
-
day: "numeric",
|
|
92
|
-
year: "numeric"
|
|
93
|
-
}) : "—", Y = [
|
|
112
|
+
}, Q = [
|
|
94
113
|
{
|
|
95
|
-
label: "Pending
|
|
96
|
-
value:
|
|
97
|
-
icon:
|
|
98
|
-
href: `${
|
|
114
|
+
label: "Pending review",
|
|
115
|
+
value: L.pendingCount,
|
|
116
|
+
icon: m,
|
|
117
|
+
href: `${I}/submissions`,
|
|
118
|
+
accent: L.pendingCount > 0 ? "border-[var(--color-status-warning-text)]/30 bg-[var(--color-status-warning-bg-subtle)]/20" : "",
|
|
119
|
+
valueClass: L.pendingCount > 0 ? "text-[var(--color-status-warning-text)]" : "text-[var(--color-text-primary)]",
|
|
120
|
+
cta: "Review queue"
|
|
99
121
|
},
|
|
100
122
|
{
|
|
101
123
|
label: "Stores in registry",
|
|
102
|
-
value:
|
|
103
|
-
icon:
|
|
104
|
-
href: `${
|
|
124
|
+
value: L.totalStores,
|
|
125
|
+
icon: g,
|
|
126
|
+
href: `${I}/stores`,
|
|
127
|
+
accent: "",
|
|
128
|
+
valueClass: "text-[var(--color-text-primary)]",
|
|
129
|
+
cta: "Manage stores"
|
|
105
130
|
},
|
|
106
131
|
{
|
|
107
|
-
label: "Review
|
|
132
|
+
label: "Review moderation",
|
|
108
133
|
value: "—",
|
|
109
|
-
icon:
|
|
110
|
-
href: `${
|
|
134
|
+
icon: p,
|
|
135
|
+
href: `${I}/reviews`,
|
|
136
|
+
accent: "",
|
|
137
|
+
valueClass: "text-[var(--color-text-primary)]",
|
|
138
|
+
cta: "Moderate reviews"
|
|
111
139
|
},
|
|
112
140
|
{
|
|
113
141
|
label: "Publishers",
|
|
114
142
|
value: "—",
|
|
115
|
-
icon:
|
|
116
|
-
href: `${
|
|
143
|
+
icon: v,
|
|
144
|
+
href: `${I}/dashboard`,
|
|
145
|
+
accent: "",
|
|
146
|
+
valueClass: "text-[var(--color-text-primary)]",
|
|
147
|
+
cta: "View publishers"
|
|
117
148
|
}
|
|
118
149
|
];
|
|
119
|
-
return /* @__PURE__ */
|
|
120
|
-
className: "min-h-screen bg-surface-default",
|
|
121
|
-
children: [/* @__PURE__ */
|
|
122
|
-
className: "border-b border-border-seam bg-surface-raised",
|
|
123
|
-
children: /* @__PURE__ */
|
|
124
|
-
className: "mx-auto max-w-
|
|
125
|
-
children:
|
|
150
|
+
return /* @__PURE__ */ w("div", {
|
|
151
|
+
className: "min-h-screen bg-[var(--color-surface-default)]",
|
|
152
|
+
children: [/* @__PURE__ */ C("header", {
|
|
153
|
+
className: "sticky top-0 z-10 border-b border-[var(--color-border-seam)] bg-[var(--color-surface-raised)] shadow-[var(--shadow-elevation-1)]",
|
|
154
|
+
children: /* @__PURE__ */ C("div", {
|
|
155
|
+
className: "mx-auto max-w-6xl px-6 py-4",
|
|
156
|
+
children: /* @__PURE__ */ w("div", {
|
|
126
157
|
className: "flex items-center justify-between",
|
|
127
|
-
children: [/* @__PURE__ */
|
|
128
|
-
className: "flex items-center gap-2",
|
|
129
|
-
children: [/* @__PURE__ */
|
|
130
|
-
className: "text-
|
|
131
|
-
children: "Store
|
|
132
|
-
})
|
|
133
|
-
|
|
158
|
+
children: [/* @__PURE__ */ w("div", {
|
|
159
|
+
className: "flex items-center gap-2.5",
|
|
160
|
+
children: [/* @__PURE__ */ C(f, { className: "size-5 text-[var(--color-text-primary)]" }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("h1", {
|
|
161
|
+
className: "text-lg font-semibold text-[var(--color-text-primary)]",
|
|
162
|
+
children: "Store Admin Dashboard"
|
|
163
|
+
}), /* @__PURE__ */ C("p", {
|
|
164
|
+
className: "text-xs text-[var(--color-text-secondary)]",
|
|
165
|
+
children: "Marketplace control room — submissions, registry, moderation"
|
|
166
|
+
})] })]
|
|
167
|
+
}), /* @__PURE__ */ w("button", {
|
|
134
168
|
type: "button",
|
|
135
|
-
onClick: () => void
|
|
136
|
-
disabled:
|
|
137
|
-
className: "inline-flex items-center gap-2 rounded-md border border-border-default bg-surface-default px-3 py-1.5 text-sm text-text-primary hover:bg-surface-hover disabled:opacity-
|
|
138
|
-
children: [/* @__PURE__ */
|
|
169
|
+
onClick: () => void Y(),
|
|
170
|
+
disabled: L.loading,
|
|
171
|
+
className: "inline-flex items-center gap-2 rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-1.5 text-sm text-[var(--color-text-primary)] hover:bg-[var(--color-surface-hover)] transition-colors disabled:opacity-50",
|
|
172
|
+
children: [/* @__PURE__ */ C(h, { className: `size-4 ${L.loading ? "animate-spin" : ""}` }), "Refresh"]
|
|
139
173
|
})]
|
|
140
|
-
})
|
|
141
|
-
className: "mt-1 text-sm text-text-secondary",
|
|
142
|
-
children: "Manage store submissions, multi-store registry, and review moderation."
|
|
143
|
-
})]
|
|
174
|
+
})
|
|
144
175
|
})
|
|
145
|
-
}), /* @__PURE__ */
|
|
146
|
-
className: "mx-auto max-w-
|
|
176
|
+
}), /* @__PURE__ */ w("main", {
|
|
177
|
+
className: "mx-auto max-w-6xl space-y-8 p-6",
|
|
147
178
|
children: [
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
-
/* @__PURE__ */ y(T, {
|
|
150
|
-
storageKey: "store-admin-dashboard",
|
|
151
|
-
steps: [
|
|
152
|
-
{
|
|
153
|
-
id: "clear-pending",
|
|
154
|
-
label: "Clear the pending queue",
|
|
155
|
-
description: "Approve or reject submissions right below, or open the full queue.",
|
|
156
|
-
onClick: () => A(`${M}/submissions`),
|
|
157
|
-
done: !N.loading && N.pendingCount === 0
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
id: "check-stores",
|
|
161
|
-
label: "Review your stores",
|
|
162
|
-
description: "Make sure each store has the right visibility and approval policy.",
|
|
163
|
-
onClick: () => A(`${M}/stores`)
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
id: "moderate-reviews",
|
|
167
|
-
label: "Moderate customer reviews",
|
|
168
|
-
description: "Remove reviews that break the content guidelines.",
|
|
169
|
-
onClick: () => A(`${M}/reviews`)
|
|
170
|
-
}
|
|
171
|
-
]
|
|
172
|
-
}),
|
|
173
|
-
N.error && /* @__PURE__ */ y("div", {
|
|
179
|
+
L.error && /* @__PURE__ */ C("div", {
|
|
174
180
|
role: "alert",
|
|
175
|
-
className: "rounded-
|
|
176
|
-
children:
|
|
181
|
+
className: "rounded-lg border border-[var(--color-border-danger)] bg-[var(--color-surface-danger-muted)] px-4 py-3 text-sm text-[var(--color-text-danger)]",
|
|
182
|
+
children: L.error
|
|
177
183
|
}),
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
className: "grid grid-cols-
|
|
180
|
-
children:
|
|
184
|
+
/* @__PURE__ */ C("section", { children: /* @__PURE__ */ C("div", {
|
|
185
|
+
className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
|
|
186
|
+
children: Q.map((e) => {
|
|
181
187
|
let t = e.icon;
|
|
182
|
-
return /* @__PURE__ */
|
|
188
|
+
return /* @__PURE__ */ w("button", {
|
|
183
189
|
type: "button",
|
|
184
|
-
onClick: () =>
|
|
185
|
-
className:
|
|
186
|
-
children: [/* @__PURE__ */
|
|
187
|
-
className: "flex items-
|
|
188
|
-
children: [/* @__PURE__ */
|
|
189
|
-
className: "text-xs font-medium uppercase tracking-wide
|
|
190
|
+
onClick: () => j(e.href),
|
|
191
|
+
className: `group relative overflow-hidden rounded-xl border border-[var(--color-border-seam)] bg-[var(--color-surface-raised)] p-5 text-left shadow-[var(--shadow-elevation-1)] transition-all hover:border-[var(--color-border-strong)] hover:shadow-[var(--shadow-elevation-2)] ${e.accent}`,
|
|
192
|
+
children: [/* @__PURE__ */ w("div", {
|
|
193
|
+
className: "flex items-start justify-between gap-2",
|
|
194
|
+
children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
195
|
+
className: "text-xs font-medium text-[var(--color-text-secondary)] uppercase tracking-wide",
|
|
190
196
|
children: e.label
|
|
191
|
-
}), /* @__PURE__ */
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
197
|
+
}), /* @__PURE__ */ C("p", {
|
|
198
|
+
className: `mt-2 text-3xl font-bold tabular-nums ${e.valueClass}`,
|
|
199
|
+
children: L.loading ? /* @__PURE__ */ C("span", { className: "inline-block w-8 animate-pulse rounded bg-[var(--color-surface-muted)] h-8" }) : e.value
|
|
200
|
+
})] }), /* @__PURE__ */ C("div", {
|
|
201
|
+
className: "rounded-lg bg-[var(--color-surface-muted)] p-2",
|
|
202
|
+
children: /* @__PURE__ */ C(t, { className: "size-5 text-[var(--color-text-secondary)]" })
|
|
203
|
+
})]
|
|
204
|
+
}), /* @__PURE__ */ w("div", {
|
|
205
|
+
className: "mt-3 flex items-center gap-1 text-xs font-medium text-[var(--color-text-accent)] group-hover:underline",
|
|
206
|
+
children: [e.cta, /* @__PURE__ */ C(a, { className: "size-3" })]
|
|
195
207
|
})]
|
|
196
208
|
}, e.label);
|
|
197
209
|
})
|
|
198
|
-
}),
|
|
199
|
-
/* @__PURE__ */
|
|
200
|
-
/* @__PURE__ */
|
|
201
|
-
className: "mb-
|
|
202
|
-
children: [/* @__PURE__ */
|
|
203
|
-
className: "
|
|
204
|
-
children: "
|
|
205
|
-
|
|
210
|
+
}) }),
|
|
211
|
+
/* @__PURE__ */ w("section", { children: [
|
|
212
|
+
/* @__PURE__ */ w("div", {
|
|
213
|
+
className: "mb-4 flex items-center justify-between",
|
|
214
|
+
children: [/* @__PURE__ */ w("div", {
|
|
215
|
+
className: "flex items-center gap-2",
|
|
216
|
+
children: [/* @__PURE__ */ C("h2", {
|
|
217
|
+
className: "text-base font-semibold text-[var(--color-text-primary)]",
|
|
218
|
+
children: "Pending Submissions"
|
|
219
|
+
}), L.pendingCount > 0 && /* @__PURE__ */ w("span", {
|
|
220
|
+
className: "rounded-full bg-[var(--color-status-warning-bg-subtle)] px-2 py-0.5 text-xs font-semibold text-[var(--color-status-warning-text)]",
|
|
221
|
+
children: [L.pendingCount, " waiting"]
|
|
222
|
+
})]
|
|
223
|
+
}), /* @__PURE__ */ w("button", {
|
|
206
224
|
type: "button",
|
|
207
|
-
onClick: () =>
|
|
208
|
-
className: "inline-flex items-center gap-1 text-xs text-text-
|
|
209
|
-
children: ["View all", /* @__PURE__ */
|
|
225
|
+
onClick: () => j(`${I}/submissions`),
|
|
226
|
+
className: "inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-1.5 text-xs font-medium text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)] hover:text-[var(--color-text-primary)] transition-colors",
|
|
227
|
+
children: ["View all", /* @__PURE__ */ C(d, { className: "size-3.5" })]
|
|
210
228
|
})]
|
|
211
229
|
}),
|
|
212
|
-
|
|
230
|
+
G && /* @__PURE__ */ C("div", {
|
|
213
231
|
role: "alert",
|
|
214
|
-
className: "mb-3 rounded-
|
|
215
|
-
children:
|
|
232
|
+
className: "mb-3 rounded-lg border border-[var(--color-border-danger)] bg-[var(--color-surface-danger-muted)] px-4 py-2.5 text-sm text-[var(--color-text-danger)]",
|
|
233
|
+
children: G
|
|
216
234
|
}),
|
|
217
|
-
|
|
218
|
-
className: "
|
|
219
|
-
children:
|
|
220
|
-
|
|
235
|
+
L.loading ? /* @__PURE__ */ C("div", {
|
|
236
|
+
className: "space-y-3",
|
|
237
|
+
children: [
|
|
238
|
+
1,
|
|
239
|
+
2,
|
|
240
|
+
3
|
|
241
|
+
].map((e) => /* @__PURE__ */ C("div", { className: "h-20 animate-pulse rounded-xl bg-[var(--color-surface-muted)]" }, e))
|
|
242
|
+
}) : L.recentPending.length === 0 ? /* @__PURE__ */ C(D, {
|
|
221
243
|
illustration: "empty-notifications",
|
|
222
244
|
title: "All caught up",
|
|
223
|
-
description: "
|
|
224
|
-
}) : /* @__PURE__ */
|
|
225
|
-
className: "
|
|
226
|
-
children:
|
|
227
|
-
className: "
|
|
228
|
-
children:
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
className: "
|
|
244
|
-
children:
|
|
245
|
-
|
|
246
|
-
|
|
245
|
+
description: "No submissions awaiting review. New products will appear here as publishers send them in."
|
|
246
|
+
}) : /* @__PURE__ */ C("div", {
|
|
247
|
+
className: "overflow-hidden rounded-xl border border-[var(--color-border-seam)] bg-[var(--color-surface-raised)] shadow-[var(--shadow-elevation-1)]",
|
|
248
|
+
children: /* @__PURE__ */ C("ul", {
|
|
249
|
+
className: "divide-y divide-[var(--color-border-seam)]",
|
|
250
|
+
children: L.recentPending.map((e) => /* @__PURE__ */ w("li", {
|
|
251
|
+
className: "overflow-hidden",
|
|
252
|
+
children: [
|
|
253
|
+
/* @__PURE__ */ w("div", {
|
|
254
|
+
className: "flex items-center gap-4 px-5 py-4",
|
|
255
|
+
children: [
|
|
256
|
+
e.icon ? /* @__PURE__ */ C("img", {
|
|
257
|
+
src: e.icon,
|
|
258
|
+
alt: "",
|
|
259
|
+
className: "size-10 shrink-0 rounded-lg object-cover"
|
|
260
|
+
}) : /* @__PURE__ */ C("div", {
|
|
261
|
+
className: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-[var(--color-surface-muted)] text-xs font-bold text-[var(--color-text-muted)] uppercase",
|
|
262
|
+
children: e.type.slice(0, 2)
|
|
263
|
+
}),
|
|
264
|
+
/* @__PURE__ */ w("div", {
|
|
265
|
+
className: "min-w-0 flex-1",
|
|
266
|
+
children: [/* @__PURE__ */ w("div", {
|
|
267
|
+
className: "flex items-center gap-2 flex-wrap",
|
|
268
|
+
children: [/* @__PURE__ */ C("p", {
|
|
269
|
+
className: "font-medium text-[var(--color-text-primary)] truncate",
|
|
270
|
+
children: e.name
|
|
271
|
+
}), /* @__PURE__ */ C("span", {
|
|
272
|
+
className: `shrink-0 rounded-full px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide ${M(e.type)}`,
|
|
273
|
+
children: e.type
|
|
274
|
+
})]
|
|
275
|
+
}), /* @__PURE__ */ w("div", {
|
|
276
|
+
className: "mt-0.5 flex items-center gap-3 flex-wrap text-xs text-[var(--color-text-secondary)]",
|
|
277
|
+
children: [
|
|
278
|
+
/* @__PURE__ */ C("span", { children: e.publisher?.name ?? "Unknown publisher" }),
|
|
279
|
+
/* @__PURE__ */ C("span", { children: "·" }),
|
|
280
|
+
/* @__PURE__ */ C("span", { children: t(e.price, e.currency, e.pricingModel) }),
|
|
281
|
+
e.submittedAt && /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C("span", { children: "·" }), /* @__PURE__ */ w("span", {
|
|
282
|
+
className: "flex items-center gap-1",
|
|
283
|
+
children: [/* @__PURE__ */ C(u, { className: "size-3" }), P(e.submittedAt)]
|
|
284
|
+
})] })
|
|
285
|
+
]
|
|
286
|
+
})]
|
|
287
|
+
}),
|
|
288
|
+
/* @__PURE__ */ w("div", {
|
|
289
|
+
className: "shrink-0 flex items-center gap-2",
|
|
247
290
|
children: [
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
291
|
+
/* @__PURE__ */ w("button", {
|
|
292
|
+
type: "button",
|
|
293
|
+
onClick: () => J(q === e.id ? null : e.id),
|
|
294
|
+
className: "inline-flex items-center gap-1 rounded-md border border-[var(--color-border-default)] px-2.5 py-1.5 text-xs text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)] transition-colors",
|
|
295
|
+
children: [q === e.id ? /* @__PURE__ */ C(l, { className: "size-3.5" }) : /* @__PURE__ */ C(c, { className: "size-3.5" }), "Details"]
|
|
296
|
+
}),
|
|
297
|
+
/* @__PURE__ */ w("button", {
|
|
298
|
+
type: "button",
|
|
299
|
+
onClick: () => void X(e.id),
|
|
300
|
+
disabled: z === e.id,
|
|
301
|
+
className: "inline-flex items-center gap-1 rounded-md bg-[var(--color-surface-success)] px-3 py-1.5 text-xs font-semibold text-[var(--color-text-on-success)] hover:opacity-90 disabled:opacity-50 transition-opacity",
|
|
302
|
+
children: [/* @__PURE__ */ C(o, { className: "size-3.5" }), "Approve"]
|
|
303
|
+
}),
|
|
304
|
+
/* @__PURE__ */ w("button", {
|
|
305
|
+
type: "button",
|
|
306
|
+
onClick: () => {
|
|
307
|
+
H(e.id), W(""), K(null);
|
|
308
|
+
},
|
|
309
|
+
disabled: z === e.id,
|
|
310
|
+
className: "inline-flex items-center gap-1 rounded-md border border-[var(--color-border-danger)] bg-[var(--color-surface-danger-muted)] px-3 py-1.5 text-xs font-semibold text-[var(--color-text-danger)] hover:bg-[var(--color-surface-danger)] hover:text-[var(--color-text-on-danger)] disabled:opacity-50 transition-colors",
|
|
311
|
+
children: [/* @__PURE__ */ C(y, { className: "size-3.5" }), "Reject"]
|
|
312
|
+
})
|
|
255
313
|
]
|
|
256
|
-
})
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
314
|
+
})
|
|
315
|
+
]
|
|
316
|
+
}),
|
|
317
|
+
q === e.id && /* @__PURE__ */ C("div", {
|
|
318
|
+
className: "border-t border-[var(--color-border-seam)] bg-[var(--color-surface-muted)] px-5 py-4",
|
|
319
|
+
children: /* @__PURE__ */ w("dl", {
|
|
320
|
+
className: "grid grid-cols-2 gap-x-8 gap-y-3 text-xs sm:grid-cols-3",
|
|
260
321
|
children: [
|
|
261
|
-
/* @__PURE__ */
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
className: "
|
|
281
|
-
children:
|
|
322
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("dt", {
|
|
323
|
+
className: "font-medium text-[var(--color-text-secondary)]",
|
|
324
|
+
children: "Slug"
|
|
325
|
+
}), /* @__PURE__ */ C("dd", {
|
|
326
|
+
className: "mt-0.5 font-mono text-[var(--color-text-primary)]",
|
|
327
|
+
children: e.slug
|
|
328
|
+
})] }),
|
|
329
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("dt", {
|
|
330
|
+
className: "font-medium text-[var(--color-text-secondary)]",
|
|
331
|
+
children: "Type"
|
|
332
|
+
}), /* @__PURE__ */ w("dd", {
|
|
333
|
+
className: "mt-0.5 text-[var(--color-text-primary)]",
|
|
334
|
+
children: [
|
|
335
|
+
e.type,
|
|
336
|
+
" · ",
|
|
337
|
+
e.nature ?? "—"
|
|
338
|
+
]
|
|
339
|
+
})] }),
|
|
340
|
+
e.category && /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("dt", {
|
|
341
|
+
className: "font-medium text-[var(--color-text-secondary)]",
|
|
342
|
+
children: "Category"
|
|
343
|
+
}), /* @__PURE__ */ C("dd", {
|
|
344
|
+
className: "mt-0.5 text-[var(--color-text-primary)]",
|
|
345
|
+
children: e.category
|
|
346
|
+
})] }),
|
|
347
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("dt", {
|
|
348
|
+
className: "font-medium text-[var(--color-text-secondary)]",
|
|
349
|
+
children: "Pricing"
|
|
350
|
+
}), /* @__PURE__ */ w("dd", {
|
|
351
|
+
className: "mt-0.5 text-[var(--color-text-primary)]",
|
|
352
|
+
children: [
|
|
353
|
+
t(e.price, e.currency, e.pricingModel),
|
|
354
|
+
" ",
|
|
355
|
+
/* @__PURE__ */ w("span", {
|
|
356
|
+
className: "text-[var(--color-text-muted)]",
|
|
357
|
+
children: [
|
|
358
|
+
"(",
|
|
359
|
+
e.pricingModel,
|
|
360
|
+
")"
|
|
361
|
+
]
|
|
362
|
+
})
|
|
363
|
+
]
|
|
364
|
+
})] }),
|
|
365
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("dt", {
|
|
366
|
+
className: "font-medium text-[var(--color-text-secondary)]",
|
|
367
|
+
children: "Publisher"
|
|
368
|
+
}), /* @__PURE__ */ w("dd", {
|
|
369
|
+
className: "mt-0.5 text-[var(--color-text-primary)]",
|
|
370
|
+
children: [e.publisher?.name ?? "—", e.publisher?.email && /* @__PURE__ */ C("span", {
|
|
371
|
+
className: "block text-[var(--color-text-muted)]",
|
|
372
|
+
children: e.publisher.email
|
|
373
|
+
})]
|
|
374
|
+
})] }),
|
|
375
|
+
e.productId && /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("dt", {
|
|
376
|
+
className: "font-medium text-[var(--color-text-secondary)]",
|
|
377
|
+
children: "Devportal app"
|
|
378
|
+
}), /* @__PURE__ */ C("dd", {
|
|
379
|
+
className: "mt-0.5",
|
|
380
|
+
children: /* @__PURE__ */ w("a", {
|
|
381
|
+
href: `/devportal/apps/${e.productId}`,
|
|
382
|
+
target: "_blank",
|
|
383
|
+
rel: "noreferrer",
|
|
384
|
+
className: "inline-flex items-center gap-1 font-mono text-[var(--color-text-accent)] hover:underline",
|
|
385
|
+
children: [
|
|
386
|
+
e.productId.slice(0, 16),
|
|
387
|
+
"…",
|
|
388
|
+
/* @__PURE__ */ C(d, { className: "size-3" })
|
|
389
|
+
]
|
|
390
|
+
})
|
|
391
|
+
})] }),
|
|
392
|
+
e.description && /* @__PURE__ */ w("div", {
|
|
393
|
+
className: "col-span-2 sm:col-span-3",
|
|
394
|
+
children: [/* @__PURE__ */ C("dt", {
|
|
395
|
+
className: "font-medium text-[var(--color-text-secondary)]",
|
|
396
|
+
children: "Description"
|
|
397
|
+
}), /* @__PURE__ */ C("dd", {
|
|
398
|
+
className: "mt-0.5 text-[var(--color-text-primary)]",
|
|
399
|
+
children: e.description
|
|
400
|
+
})]
|
|
282
401
|
})
|
|
283
402
|
]
|
|
284
403
|
})
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
className: "border-t border-border-seam bg-surface-muted p-4",
|
|
289
|
-
children: /* @__PURE__ */ b("dl", {
|
|
290
|
-
className: "grid grid-cols-2 gap-x-6 gap-y-3 text-xs sm:grid-cols-3",
|
|
404
|
+
}),
|
|
405
|
+
V === e.id && /* @__PURE__ */ w("div", {
|
|
406
|
+
className: "border-t border-[var(--color-border-seam)] bg-[var(--color-surface-danger-muted)]/30 px-5 py-4",
|
|
291
407
|
children: [
|
|
292
|
-
/* @__PURE__ */
|
|
293
|
-
className: "font-
|
|
294
|
-
children: "
|
|
295
|
-
}),
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("dt", {
|
|
321
|
-
className: "font-medium text-text-secondary",
|
|
322
|
-
children: "Pricing"
|
|
323
|
-
}), /* @__PURE__ */ b("dd", {
|
|
324
|
-
className: "mt-0.5 text-text-primary",
|
|
325
|
-
children: [
|
|
326
|
-
t(e.price, e.currency, e.pricingModel),
|
|
327
|
-
" ",
|
|
328
|
-
/* @__PURE__ */ b("span", {
|
|
329
|
-
className: "text-text-tertiary",
|
|
330
|
-
children: [
|
|
331
|
-
"(",
|
|
332
|
-
e.pricingModel,
|
|
333
|
-
")"
|
|
334
|
-
]
|
|
335
|
-
})
|
|
336
|
-
]
|
|
337
|
-
})] }),
|
|
338
|
-
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("dt", {
|
|
339
|
-
className: "font-medium text-text-secondary",
|
|
340
|
-
children: "Publisher"
|
|
341
|
-
}), /* @__PURE__ */ b("dd", {
|
|
342
|
-
className: "mt-0.5 text-text-primary",
|
|
343
|
-
children: [e.publisher?.name ?? "—", e.publisher?.email && /* @__PURE__ */ y("span", {
|
|
344
|
-
className: "block text-text-tertiary",
|
|
345
|
-
children: e.publisher.email
|
|
346
|
-
})]
|
|
347
|
-
})] }),
|
|
348
|
-
e.submittedBy && /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("dt", {
|
|
349
|
-
className: "font-medium text-text-secondary",
|
|
350
|
-
children: "Submitted by"
|
|
351
|
-
}), /* @__PURE__ */ y("dd", {
|
|
352
|
-
className: "mt-0.5 font-mono text-text-primary",
|
|
353
|
-
children: e.submittedBy
|
|
354
|
-
})] }),
|
|
355
|
-
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("dt", {
|
|
356
|
-
className: "font-medium text-text-secondary",
|
|
357
|
-
children: "Submitted at"
|
|
358
|
-
}), /* @__PURE__ */ y("dd", {
|
|
359
|
-
className: "mt-0.5 text-text-primary",
|
|
360
|
-
children: J(e.submittedAt)
|
|
361
|
-
})] }),
|
|
362
|
-
e.description && /* @__PURE__ */ b("div", {
|
|
363
|
-
className: "col-span-2 sm:col-span-3",
|
|
364
|
-
children: [/* @__PURE__ */ y("dt", {
|
|
365
|
-
className: "font-medium text-text-secondary",
|
|
366
|
-
children: "Description"
|
|
367
|
-
}), /* @__PURE__ */ y("dd", {
|
|
368
|
-
className: "mt-0.5 text-text-primary",
|
|
369
|
-
children: e.description
|
|
408
|
+
/* @__PURE__ */ C("p", {
|
|
409
|
+
className: "mb-2 text-xs font-semibold text-[var(--color-text-danger)]",
|
|
410
|
+
children: "Provide a rejection reason (the publisher will see this)"
|
|
411
|
+
}),
|
|
412
|
+
/* @__PURE__ */ C("textarea", {
|
|
413
|
+
id: `reject-reason-${e.id}`,
|
|
414
|
+
"aria-label": "Rejection reason",
|
|
415
|
+
value: U,
|
|
416
|
+
onChange: (e) => W(e.target.value),
|
|
417
|
+
rows: 2,
|
|
418
|
+
className: "w-full rounded-lg border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-2 text-sm text-[var(--color-text-primary)] focus:border-[var(--color-border-accent)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] resize-none",
|
|
419
|
+
placeholder: "Explain why this submission is being rejected…"
|
|
420
|
+
}),
|
|
421
|
+
/* @__PURE__ */ w("div", {
|
|
422
|
+
className: "mt-2 flex justify-end gap-2",
|
|
423
|
+
children: [/* @__PURE__ */ C("button", {
|
|
424
|
+
type: "button",
|
|
425
|
+
onClick: () => {
|
|
426
|
+
H(null), W("");
|
|
427
|
+
},
|
|
428
|
+
className: "rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-1 text-xs font-medium text-[var(--color-text-primary)] hover:bg-[var(--color-surface-hover)] transition-colors",
|
|
429
|
+
children: "Cancel"
|
|
430
|
+
}), /* @__PURE__ */ C("button", {
|
|
431
|
+
type: "button",
|
|
432
|
+
onClick: () => void Z(e.id),
|
|
433
|
+
disabled: !U.trim() || z === e.id,
|
|
434
|
+
className: "rounded-md bg-[var(--color-surface-danger)] px-3 py-1 text-xs font-semibold text-[var(--color-text-on-danger)] hover:opacity-90 disabled:opacity-50 transition-opacity",
|
|
435
|
+
children: "Submit rejection"
|
|
370
436
|
})]
|
|
371
437
|
})
|
|
372
438
|
]
|
|
373
439
|
})
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
children: [
|
|
378
|
-
/* @__PURE__ */ y("label", {
|
|
379
|
-
htmlFor: `reject-reason-${e.id}`,
|
|
380
|
-
className: "block text-xs font-medium text-text-secondary",
|
|
381
|
-
children: "Rejection reason (required)"
|
|
382
|
-
}),
|
|
383
|
-
/* @__PURE__ */ y("textarea", {
|
|
384
|
-
id: `reject-reason-${e.id}`,
|
|
385
|
-
"aria-label": "Rejection reason",
|
|
386
|
-
value: z,
|
|
387
|
-
onChange: (e) => B(e.target.value),
|
|
388
|
-
rows: 2,
|
|
389
|
-
className: "mt-1 w-full rounded-md border border-border-default bg-surface-default px-3 py-2 text-sm text-text-primary focus:border-border-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
390
|
-
placeholder: "Explain why this submission is being rejected…"
|
|
391
|
-
}),
|
|
392
|
-
/* @__PURE__ */ b("div", {
|
|
393
|
-
className: "mt-2 flex justify-end gap-2",
|
|
394
|
-
children: [/* @__PURE__ */ y("button", {
|
|
395
|
-
type: "button",
|
|
396
|
-
onClick: () => {
|
|
397
|
-
R(null), B("");
|
|
398
|
-
},
|
|
399
|
-
className: "rounded-md border border-border-default bg-surface-default px-3 py-1 text-xs text-text-primary hover:bg-surface-hover",
|
|
400
|
-
children: "Cancel"
|
|
401
|
-
}), /* @__PURE__ */ y("button", {
|
|
402
|
-
type: "button",
|
|
403
|
-
onClick: () => void q(e.id),
|
|
404
|
-
disabled: !z.trim() || F === e.id,
|
|
405
|
-
className: "rounded-md bg-surface-danger px-3 py-1 text-xs font-medium text-text-on-danger hover:bg-surface-danger-hover disabled:opacity-60",
|
|
406
|
-
children: "Submit rejection"
|
|
407
|
-
})]
|
|
408
|
-
})
|
|
409
|
-
]
|
|
410
|
-
})
|
|
411
|
-
]
|
|
412
|
-
}, e.id))
|
|
440
|
+
]
|
|
441
|
+
}, e.id))
|
|
442
|
+
})
|
|
413
443
|
})
|
|
414
444
|
] }),
|
|
415
|
-
/* @__PURE__ */
|
|
416
|
-
className: "mb-
|
|
417
|
-
children: "
|
|
418
|
-
|
|
445
|
+
/* @__PURE__ */ w("section", { children: [/* @__PURE__ */ w("div", {
|
|
446
|
+
className: "mb-4 flex items-center gap-2",
|
|
447
|
+
children: [/* @__PURE__ */ C(_, { className: "size-4 text-[var(--color-text-secondary)]" }), /* @__PURE__ */ C("h2", {
|
|
448
|
+
className: "text-base font-semibold text-[var(--color-text-primary)]",
|
|
449
|
+
children: "Recent Activity"
|
|
450
|
+
})]
|
|
451
|
+
}), /* @__PURE__ */ w("div", {
|
|
419
452
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
420
|
-
children: [/* @__PURE__ */
|
|
453
|
+
children: [/* @__PURE__ */ w(E, {
|
|
421
454
|
className: "overflow-hidden p-0",
|
|
422
|
-
children: [/* @__PURE__ */
|
|
423
|
-
className: "flex items-center gap-2 border-b border-border-seam px-4 py-3",
|
|
424
|
-
children: [
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
455
|
+
children: [/* @__PURE__ */ w("div", {
|
|
456
|
+
className: "flex items-center gap-2.5 border-b border-[var(--color-border-seam)] px-4 py-3",
|
|
457
|
+
children: [
|
|
458
|
+
/* @__PURE__ */ C("div", {
|
|
459
|
+
className: "flex size-7 items-center justify-center rounded-md bg-[var(--color-status-success-bg-subtle)]",
|
|
460
|
+
children: /* @__PURE__ */ C(s, { className: "size-4 text-[var(--color-status-success-text)]" })
|
|
461
|
+
}),
|
|
462
|
+
/* @__PURE__ */ C("h3", {
|
|
463
|
+
className: "text-sm font-semibold text-[var(--color-text-primary)]",
|
|
464
|
+
children: "Recently Approved"
|
|
465
|
+
}),
|
|
466
|
+
/* @__PURE__ */ C("span", {
|
|
467
|
+
className: "ml-auto text-xs text-[var(--color-text-muted)]",
|
|
468
|
+
children: "Last 5"
|
|
469
|
+
})
|
|
470
|
+
]
|
|
471
|
+
}), L.loading ? /* @__PURE__ */ C("div", {
|
|
472
|
+
className: "space-y-3 p-4",
|
|
473
|
+
children: [
|
|
474
|
+
1,
|
|
475
|
+
2,
|
|
476
|
+
3
|
|
477
|
+
].map((e) => /* @__PURE__ */ C("div", { className: "h-10 animate-pulse rounded-lg bg-[var(--color-surface-muted)]" }, e))
|
|
478
|
+
}) : L.recentPublished.length === 0 ? /* @__PURE__ */ C("p", {
|
|
479
|
+
className: "px-4 py-8 text-center text-sm text-[var(--color-text-muted)]",
|
|
433
480
|
children: "No approved products yet."
|
|
434
|
-
}) : /* @__PURE__ */
|
|
435
|
-
className: "divide-y divide-border-seam",
|
|
436
|
-
children:
|
|
481
|
+
}) : /* @__PURE__ */ C("ul", {
|
|
482
|
+
className: "divide-y divide-[var(--color-border-seam)]",
|
|
483
|
+
children: L.recentPublished.map((e) => /* @__PURE__ */ w("li", {
|
|
437
484
|
className: "flex items-center gap-3 px-4 py-3",
|
|
438
485
|
children: [
|
|
439
|
-
e.icon ? /* @__PURE__ */
|
|
486
|
+
e.icon ? /* @__PURE__ */ C("img", {
|
|
440
487
|
src: e.icon,
|
|
441
488
|
alt: "",
|
|
442
|
-
className: "size-8
|
|
443
|
-
}) : /* @__PURE__ */
|
|
444
|
-
className: "flex size-8
|
|
445
|
-
children: "?"
|
|
489
|
+
className: "size-8 shrink-0 rounded-lg object-cover"
|
|
490
|
+
}) : /* @__PURE__ */ C("div", {
|
|
491
|
+
className: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-[var(--color-surface-muted)] text-xs font-bold text-[var(--color-text-muted)] uppercase",
|
|
492
|
+
children: (e.type ?? "?").slice(0, 2)
|
|
446
493
|
}),
|
|
447
|
-
/* @__PURE__ */
|
|
494
|
+
/* @__PURE__ */ w("div", {
|
|
448
495
|
className: "min-w-0 flex-1",
|
|
449
|
-
children: [/* @__PURE__ */
|
|
450
|
-
className: "truncate text-sm font-medium text-text-primary",
|
|
496
|
+
children: [/* @__PURE__ */ C("p", {
|
|
497
|
+
className: "truncate text-sm font-medium text-[var(--color-text-primary)]",
|
|
451
498
|
children: e.name
|
|
452
|
-
}), /* @__PURE__ */
|
|
453
|
-
className: "text-xs text-text-secondary",
|
|
454
|
-
children: [e.reviewedBy ? `by ${e.reviewedBy} · ` : "",
|
|
499
|
+
}), /* @__PURE__ */ w("p", {
|
|
500
|
+
className: "text-xs text-[var(--color-text-secondary)]",
|
|
501
|
+
children: [e.reviewedBy ? `by ${e.reviewedBy} · ` : "", N(e.publishedAt)]
|
|
455
502
|
})]
|
|
456
503
|
}),
|
|
457
|
-
/* @__PURE__ */
|
|
458
|
-
className: "
|
|
504
|
+
/* @__PURE__ */ C("span", {
|
|
505
|
+
className: "shrink-0 rounded-full bg-[var(--color-status-success-bg-subtle)] px-2.5 py-1 text-xs font-medium text-[var(--color-status-success-text)]",
|
|
459
506
|
children: "Published"
|
|
460
507
|
})
|
|
461
508
|
]
|
|
462
509
|
}, e.id))
|
|
463
510
|
})]
|
|
464
|
-
}), /* @__PURE__ */
|
|
511
|
+
}), /* @__PURE__ */ w(E, {
|
|
465
512
|
className: "overflow-hidden p-0",
|
|
466
|
-
children: [/* @__PURE__ */
|
|
467
|
-
className: "flex items-center gap-2 border-b border-border-seam px-4 py-3",
|
|
468
|
-
children: [
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
513
|
+
children: [/* @__PURE__ */ w("div", {
|
|
514
|
+
className: "flex items-center gap-2.5 border-b border-[var(--color-border-seam)] px-4 py-3",
|
|
515
|
+
children: [
|
|
516
|
+
/* @__PURE__ */ C("div", {
|
|
517
|
+
className: "flex size-7 items-center justify-center rounded-md bg-[var(--color-status-error-bg-subtle)]",
|
|
518
|
+
children: /* @__PURE__ */ C(b, { className: "size-4 text-[var(--color-status-error-text)]" })
|
|
519
|
+
}),
|
|
520
|
+
/* @__PURE__ */ C("h3", {
|
|
521
|
+
className: "text-sm font-semibold text-[var(--color-text-primary)]",
|
|
522
|
+
children: "Recently Rejected"
|
|
523
|
+
}),
|
|
524
|
+
/* @__PURE__ */ C("span", {
|
|
525
|
+
className: "ml-auto text-xs text-[var(--color-text-muted)]",
|
|
526
|
+
children: "Last 5"
|
|
527
|
+
})
|
|
528
|
+
]
|
|
529
|
+
}), L.loading ? /* @__PURE__ */ C("div", {
|
|
530
|
+
className: "space-y-3 p-4",
|
|
531
|
+
children: [
|
|
532
|
+
1,
|
|
533
|
+
2,
|
|
534
|
+
3
|
|
535
|
+
].map((e) => /* @__PURE__ */ C("div", { className: "h-10 animate-pulse rounded-lg bg-[var(--color-surface-muted)]" }, e))
|
|
536
|
+
}) : L.recentRejected.length === 0 ? /* @__PURE__ */ C("p", {
|
|
537
|
+
className: "px-4 py-8 text-center text-sm text-[var(--color-text-muted)]",
|
|
477
538
|
children: "No rejected products yet."
|
|
478
|
-
}) : /* @__PURE__ */
|
|
479
|
-
className: "divide-y divide-border-seam",
|
|
480
|
-
children:
|
|
539
|
+
}) : /* @__PURE__ */ C("ul", {
|
|
540
|
+
className: "divide-y divide-[var(--color-border-seam)]",
|
|
541
|
+
children: L.recentRejected.map((e) => /* @__PURE__ */ w("li", {
|
|
481
542
|
className: "flex items-center gap-3 px-4 py-3",
|
|
482
543
|
children: [
|
|
483
|
-
e.icon ? /* @__PURE__ */
|
|
544
|
+
e.icon ? /* @__PURE__ */ C("img", {
|
|
484
545
|
src: e.icon,
|
|
485
546
|
alt: "",
|
|
486
|
-
className: "size-8
|
|
487
|
-
}) : /* @__PURE__ */
|
|
488
|
-
className: "flex size-8
|
|
489
|
-
children: "?"
|
|
547
|
+
className: "size-8 shrink-0 rounded-lg object-cover"
|
|
548
|
+
}) : /* @__PURE__ */ C("div", {
|
|
549
|
+
className: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-[var(--color-surface-muted)] text-xs font-bold text-[var(--color-text-muted)] uppercase",
|
|
550
|
+
children: (e.type ?? "?").slice(0, 2)
|
|
490
551
|
}),
|
|
491
|
-
/* @__PURE__ */
|
|
552
|
+
/* @__PURE__ */ w("div", {
|
|
492
553
|
className: "min-w-0 flex-1",
|
|
493
|
-
children: [
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
554
|
+
children: [
|
|
555
|
+
/* @__PURE__ */ C("p", {
|
|
556
|
+
className: "truncate text-sm font-medium text-[var(--color-text-primary)]",
|
|
557
|
+
children: e.name
|
|
558
|
+
}),
|
|
559
|
+
e.rejectedReason && /* @__PURE__ */ w("p", {
|
|
560
|
+
className: "truncate text-xs text-[var(--color-text-muted)]",
|
|
561
|
+
title: e.rejectedReason,
|
|
562
|
+
children: [
|
|
563
|
+
"\"",
|
|
564
|
+
e.rejectedReason,
|
|
565
|
+
"\""
|
|
566
|
+
]
|
|
567
|
+
}),
|
|
568
|
+
/* @__PURE__ */ C("p", {
|
|
569
|
+
className: "text-xs text-[var(--color-text-secondary)]",
|
|
570
|
+
children: N(e.reviewedAt)
|
|
571
|
+
})
|
|
572
|
+
]
|
|
500
573
|
}),
|
|
501
|
-
/* @__PURE__ */
|
|
502
|
-
className: "
|
|
574
|
+
/* @__PURE__ */ C("span", {
|
|
575
|
+
className: "shrink-0 rounded-full bg-[var(--color-status-error-bg-subtle)] px-2.5 py-1 text-xs font-medium text-[var(--color-status-error-text)]",
|
|
503
576
|
children: "Rejected"
|
|
504
577
|
})
|
|
505
578
|
]
|
|
@@ -512,6 +585,6 @@ var D = "\n query AdminDashboardData {\n recentPending: pendingReviewProduct
|
|
|
512
585
|
});
|
|
513
586
|
};
|
|
514
587
|
//#endregion
|
|
515
|
-
export {
|
|
588
|
+
export { F as AdminDashboardPage };
|
|
516
589
|
|
|
517
590
|
//# sourceMappingURL=AdminDashboardPage.js.map
|