Compare commits
4
Commits
012d928120
...
V1.0.22
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e0c97d9158 | ||
|
|
8db8fbb143 | ||
|
|
58e794372d | ||
|
|
4fc1aec66e |
@@ -0,0 +1,303 @@
|
||||
"use client";
|
||||
|
||||
import { useState } from "react";
|
||||
import { apiFetch, ApiError, toFormData } from "@/lib/api";
|
||||
import { useList } from "@/lib/useResource";
|
||||
import { useToast } from "@/components/toast";
|
||||
import { DataTable, type Column } from "@/components/DataTable";
|
||||
import {
|
||||
Button,
|
||||
ConfirmDialog,
|
||||
Field,
|
||||
Input,
|
||||
Modal,
|
||||
PageHeader,
|
||||
Textarea,
|
||||
} from "@/components/ui";
|
||||
import { EditIcon, PlusIcon, TrashIcon } from "@/components/icons";
|
||||
import { toFa } from "@/lib/utils";
|
||||
import { MediaPreview } from "@/components/MediaPreview";
|
||||
import { ImagePicker } from "@/components/ImagePicker";
|
||||
import { pickUrl, IMAGE_KEYS } from "@/lib/media";
|
||||
|
||||
interface Announcement {
|
||||
id: number;
|
||||
title?: string;
|
||||
description?: string;
|
||||
link?: string;
|
||||
start_date?: string | null;
|
||||
end_date?: string | null;
|
||||
image_id?: number | null;
|
||||
image?: unknown;
|
||||
}
|
||||
|
||||
// Datetime ISO string -> "YYYY-MM-DD" for a <input type="date">.
|
||||
function toDateInput(value?: string | null): string {
|
||||
return value ? value.slice(0, 10) : "";
|
||||
}
|
||||
|
||||
// "YYYY-MM-DD" Gregorian -> Persian display, or "—".
|
||||
function toFaDate(value?: string | null): string {
|
||||
if (!value) return "—";
|
||||
const d = value.slice(0, 10);
|
||||
try {
|
||||
return new Intl.DateTimeFormat("fa-IR").format(new Date(d));
|
||||
} catch {
|
||||
return d;
|
||||
}
|
||||
}
|
||||
|
||||
export default function AnnouncementsPage() {
|
||||
const { data, loading, error, reload } =
|
||||
useList<Announcement>("/announcements");
|
||||
const toast = useToast();
|
||||
|
||||
const [editing, setEditing] = useState<Announcement | null>(null);
|
||||
const [open, setOpen] = useState(false);
|
||||
const [title, setTitle] = useState("");
|
||||
const [description, setDescription] = useState("");
|
||||
const [link, setLink] = useState("");
|
||||
const [startDate, setStartDate] = useState("");
|
||||
const [endDate, setEndDate] = useState("");
|
||||
const [imageId, setImageId] = useState<number | null>(null);
|
||||
const [imageFile, setImageFile] = useState<File | null>(null);
|
||||
const [saving, setSaving] = useState(false);
|
||||
|
||||
const [deleting, setDeleting] = useState<Announcement | null>(null);
|
||||
const [removing, setRemoving] = useState(false);
|
||||
|
||||
function openCreate() {
|
||||
setEditing(null);
|
||||
setTitle("");
|
||||
setDescription("");
|
||||
setLink("");
|
||||
setStartDate("");
|
||||
setEndDate("");
|
||||
setImageId(null);
|
||||
setImageFile(null);
|
||||
setOpen(true);
|
||||
}
|
||||
function openEdit(row: Announcement) {
|
||||
setEditing(row);
|
||||
setTitle(row.title ?? "");
|
||||
setDescription(row.description ?? "");
|
||||
setLink(row.link ?? "");
|
||||
setStartDate(toDateInput(row.start_date));
|
||||
setEndDate(toDateInput(row.end_date));
|
||||
setImageId(row.image_id ?? null);
|
||||
setImageFile(null);
|
||||
setOpen(true);
|
||||
}
|
||||
|
||||
async function save(e: React.FormEvent) {
|
||||
e.preventDefault();
|
||||
setSaving(true);
|
||||
try {
|
||||
// Multipart (the image is a file). Edit posts to /announcements/:id,
|
||||
// which the backend also accepts as a multipart update.
|
||||
const body = toFormData({
|
||||
title,
|
||||
description,
|
||||
link,
|
||||
start_date: startDate,
|
||||
end_date: endDate,
|
||||
image_id: imageId,
|
||||
image: imageFile,
|
||||
});
|
||||
if (editing) {
|
||||
await apiFetch(`/announcements/${editing.id}`, { method: "POST", body });
|
||||
toast.success("اعلان ویرایش شد.");
|
||||
} else {
|
||||
await apiFetch("/announcements", { method: "POST", body });
|
||||
toast.success("اعلان افزوده شد.");
|
||||
}
|
||||
setOpen(false);
|
||||
reload();
|
||||
} catch (err) {
|
||||
toast.error(err instanceof ApiError ? err.message : "خطا در ذخیرهسازی");
|
||||
} finally {
|
||||
setSaving(false);
|
||||
}
|
||||
}
|
||||
|
||||
async function confirmDelete() {
|
||||
if (!deleting) return;
|
||||
setRemoving(true);
|
||||
try {
|
||||
await apiFetch(`/announcements/${deleting.id}`, { method: "DELETE" });
|
||||
toast.success("اعلان حذف شد.");
|
||||
setDeleting(null);
|
||||
reload();
|
||||
} catch (err) {
|
||||
toast.error(err instanceof ApiError ? err.message : "خطا در حذف");
|
||||
} finally {
|
||||
setRemoving(false);
|
||||
}
|
||||
}
|
||||
|
||||
const columns: Column<Announcement>[] = [
|
||||
{ key: "id", header: "شناسه", render: (r) => toFa(r.id), className: "w-20" },
|
||||
{
|
||||
key: "thumbnail",
|
||||
header: "تصویر",
|
||||
className: "w-20",
|
||||
render: (r) => (
|
||||
<MediaPreview kind="image" src={pickUrl(r, IMAGE_KEYS)} label={r.title} />
|
||||
),
|
||||
},
|
||||
{ key: "title", header: "عنوان", render: (r) => r.title ?? "—" },
|
||||
{
|
||||
key: "link",
|
||||
header: "لینک",
|
||||
render: (r) =>
|
||||
r.link ? (
|
||||
<span dir="ltr" className="block max-w-[12rem] truncate">
|
||||
{r.link}
|
||||
</span>
|
||||
) : (
|
||||
"—"
|
||||
),
|
||||
},
|
||||
{
|
||||
key: "start_date",
|
||||
header: "تاریخ شروع",
|
||||
render: (r) => toFaDate(r.start_date),
|
||||
className: "w-32",
|
||||
},
|
||||
{
|
||||
key: "end_date",
|
||||
header: "تاریخ پایان",
|
||||
render: (r) => toFaDate(r.end_date),
|
||||
className: "w-32",
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageHeader
|
||||
title="اعلانها"
|
||||
subtitle="مدیریت اعلانهای برنامه (تصویر، عنوان، توضیح، لینک و بازه زمانی)"
|
||||
action={
|
||||
<Button icon={<PlusIcon className="h-4 w-4" />} onClick={openCreate}>
|
||||
اعلان جدید
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
|
||||
<DataTable
|
||||
columns={columns}
|
||||
rows={data}
|
||||
loading={loading}
|
||||
error={error}
|
||||
onRetry={reload}
|
||||
emptyMessage="هنوز اعلانی ثبت نشده است."
|
||||
emptyAction={
|
||||
<Button icon={<PlusIcon className="h-4 w-4" />} onClick={openCreate}>
|
||||
اعلان جدید
|
||||
</Button>
|
||||
}
|
||||
actions={(row) => (
|
||||
<>
|
||||
<Button variant="ghost" onClick={() => openEdit(row)} aria-label="ویرایش">
|
||||
<EditIcon className="h-4 w-4" />
|
||||
</Button>
|
||||
<Button
|
||||
variant="ghost"
|
||||
onClick={() => setDeleting(row)}
|
||||
aria-label="حذف"
|
||||
className="text-danger"
|
||||
>
|
||||
<TrashIcon className="h-4 w-4" />
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
<Modal
|
||||
open={open}
|
||||
onClose={() => setOpen(false)}
|
||||
title={editing ? "ویرایش اعلان" : "اعلان جدید"}
|
||||
footer={
|
||||
<>
|
||||
<Button variant="secondary" onClick={() => setOpen(false)}>
|
||||
انصراف
|
||||
</Button>
|
||||
<Button form="announcement-form" type="submit" loading={saving}>
|
||||
ذخیره
|
||||
</Button>
|
||||
</>
|
||||
}
|
||||
>
|
||||
<form
|
||||
id="announcement-form"
|
||||
onSubmit={save}
|
||||
className="flex flex-col gap-4"
|
||||
>
|
||||
<Field label="عنوان" required>
|
||||
<Input
|
||||
value={title}
|
||||
onChange={(e) => setTitle(e.target.value)}
|
||||
placeholder="مثلاً تخفیف ویژه نوروز"
|
||||
required
|
||||
autoFocus
|
||||
/>
|
||||
</Field>
|
||||
|
||||
<Field label="توضیحات">
|
||||
<Textarea
|
||||
value={description}
|
||||
onChange={(e) => setDescription(e.target.value)}
|
||||
placeholder="توضیح کوتاه درباره اعلان"
|
||||
/>
|
||||
</Field>
|
||||
|
||||
<Field label="تصویر" hint="انتخاب از کتابخانه یا بارگذاری تصویر جدید">
|
||||
<ImagePicker
|
||||
imageId={imageId}
|
||||
onPickId={setImageId}
|
||||
file={imageFile}
|
||||
onPickFile={setImageFile}
|
||||
existingUrl={editing ? pickUrl(editing, IMAGE_KEYS) : null}
|
||||
/>
|
||||
</Field>
|
||||
|
||||
<Field label="لینک">
|
||||
<Input
|
||||
value={link}
|
||||
onChange={(e) => setLink(e.target.value)}
|
||||
placeholder="https://"
|
||||
dir="ltr"
|
||||
/>
|
||||
</Field>
|
||||
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
<Field label="تاریخ شروع">
|
||||
<Input
|
||||
type="date"
|
||||
value={startDate}
|
||||
onChange={(e) => setStartDate(e.target.value)}
|
||||
dir="ltr"
|
||||
/>
|
||||
</Field>
|
||||
<Field label="تاریخ پایان">
|
||||
<Input
|
||||
type="date"
|
||||
value={endDate}
|
||||
onChange={(e) => setEndDate(e.target.value)}
|
||||
dir="ltr"
|
||||
/>
|
||||
</Field>
|
||||
</div>
|
||||
</form>
|
||||
</Modal>
|
||||
|
||||
<ConfirmDialog
|
||||
open={!!deleting}
|
||||
message={`آیا از حذف «${deleting?.title}» مطمئن هستید؟`}
|
||||
loading={removing}
|
||||
onConfirm={confirmDelete}
|
||||
onClose={() => setDeleting(null)}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -34,6 +34,8 @@ interface Media {
|
||||
caption?: string;
|
||||
// The API returns a `categories` array (many-to-many).
|
||||
categories?: Category[];
|
||||
// The API returns `sub_categories` (snake_case); keep the other casings as fallbacks.
|
||||
sub_categories?: Category[];
|
||||
subcategories?: Category[];
|
||||
subCategories?: Category[];
|
||||
type?: string;
|
||||
@@ -142,7 +144,9 @@ export default function MediaPage() {
|
||||
setCaption(row.caption ?? "");
|
||||
setCategoryIds((row.categories ?? []).map((c) => c.id));
|
||||
setSubcategoryIds(
|
||||
(row.subcategories ?? row.subCategories ?? []).map((c) => c.id),
|
||||
(row.sub_categories ?? row.subcategories ?? row.subCategories ?? []).map(
|
||||
(c) => c.id,
|
||||
),
|
||||
);
|
||||
setType(row.type ?? "audio");
|
||||
setDuration(row.duration != null ? String(row.duration) : "");
|
||||
|
||||
@@ -17,6 +17,9 @@ import {
|
||||
} from "@/components/ui";
|
||||
import { EditIcon, PlusIcon, TrashIcon } from "@/components/icons";
|
||||
import { toFa } from "@/lib/utils";
|
||||
import { MediaPreview } from "@/components/MediaPreview";
|
||||
import { ImagePicker } from "@/components/ImagePicker";
|
||||
import { pickUrl, IMAGE_KEYS } from "@/lib/media";
|
||||
|
||||
interface SliderAction {
|
||||
path?: string;
|
||||
@@ -29,6 +32,8 @@ interface Slider {
|
||||
description?: string;
|
||||
url?: string;
|
||||
action?: SliderAction;
|
||||
image_id?: number | null;
|
||||
image?: unknown;
|
||||
}
|
||||
|
||||
const ACTION_TYPES = [
|
||||
@@ -47,6 +52,8 @@ export default function SlidersPage() {
|
||||
const [url, setUrl] = useState("");
|
||||
const [actionPath, setActionPath] = useState("");
|
||||
const [actionType, setActionType] = useState("screen");
|
||||
const [imageId, setImageId] = useState<number | null>(null);
|
||||
const [imageFile, setImageFile] = useState<File | null>(null);
|
||||
const [saving, setSaving] = useState(false);
|
||||
|
||||
const [deleting, setDeleting] = useState<Slider | null>(null);
|
||||
@@ -59,6 +66,8 @@ export default function SlidersPage() {
|
||||
setUrl("");
|
||||
setActionPath("");
|
||||
setActionType("screen");
|
||||
setImageId(null);
|
||||
setImageFile(null);
|
||||
setOpen(true);
|
||||
}
|
||||
function openEdit(row: Slider) {
|
||||
@@ -68,6 +77,8 @@ export default function SlidersPage() {
|
||||
setUrl(row.url ?? "");
|
||||
setActionPath(row.action?.path ?? "");
|
||||
setActionType(row.action?.type ?? "screen");
|
||||
setImageId(row.image_id ?? null);
|
||||
setImageFile(null);
|
||||
setOpen(true);
|
||||
}
|
||||
|
||||
@@ -75,30 +86,23 @@ export default function SlidersPage() {
|
||||
e.preventDefault();
|
||||
setSaving(true);
|
||||
try {
|
||||
// Both create and edit go through multipart (the image is a file). The
|
||||
// nested action uses literal bracket keys; edit posts to /slider/:id,
|
||||
// which the backend also accepts as a multipart update.
|
||||
const body = toFormData({
|
||||
title,
|
||||
description,
|
||||
url,
|
||||
"action[path]": actionPath,
|
||||
"action[type]": actionType,
|
||||
image_id: imageId,
|
||||
image: imageFile,
|
||||
});
|
||||
if (editing) {
|
||||
// Update is JSON on /slider/:id with a nested action object.
|
||||
await apiFetch(`/slider/${editing.id}`, {
|
||||
method: "PUT",
|
||||
body: {
|
||||
title,
|
||||
description,
|
||||
url,
|
||||
action: { path: actionPath, type: actionType },
|
||||
},
|
||||
});
|
||||
await apiFetch(`/slider/${editing.id}`, { method: "POST", body });
|
||||
toast.success("اسلایدر ویرایش شد.");
|
||||
} else {
|
||||
// Create is multipart with literal bracket keys for the nested action.
|
||||
await apiFetch("/slider", {
|
||||
method: "POST",
|
||||
body: toFormData({
|
||||
title,
|
||||
description,
|
||||
"action[path]": actionPath,
|
||||
"action[type]": actionType,
|
||||
url,
|
||||
}),
|
||||
});
|
||||
await apiFetch("/slider", { method: "POST", body });
|
||||
toast.success("اسلایدر افزوده شد.");
|
||||
}
|
||||
setOpen(false);
|
||||
@@ -127,6 +131,14 @@ export default function SlidersPage() {
|
||||
|
||||
const columns: Column<Slider>[] = [
|
||||
{ key: "id", header: "شناسه", render: (r) => toFa(r.id), className: "w-24" },
|
||||
{
|
||||
key: "thumbnail",
|
||||
header: "تصویر",
|
||||
className: "w-20",
|
||||
render: (r) => (
|
||||
<MediaPreview kind="image" src={pickUrl(r, IMAGE_KEYS)} label={r.title} />
|
||||
),
|
||||
},
|
||||
{ key: "title", header: "عنوان", render: (r) => r.title ?? "—" },
|
||||
{
|
||||
key: "description",
|
||||
@@ -232,6 +244,16 @@ export default function SlidersPage() {
|
||||
/>
|
||||
</Field>
|
||||
|
||||
<Field label="تصویر" hint="انتخاب از کتابخانه یا بارگذاری تصویر جدید">
|
||||
<ImagePicker
|
||||
imageId={imageId}
|
||||
onPickId={setImageId}
|
||||
file={imageFile}
|
||||
onPickFile={setImageFile}
|
||||
existingUrl={editing ? pickUrl(editing, IMAGE_KEYS) : null}
|
||||
/>
|
||||
</Field>
|
||||
|
||||
<Field label="آدرس (URL)">
|
||||
<Input
|
||||
value={url}
|
||||
|
||||
@@ -0,0 +1,259 @@
|
||||
"use client";
|
||||
|
||||
import { useState } from "react";
|
||||
import { apiFetch, ApiError } from "@/lib/api";
|
||||
import { useList } from "@/lib/useResource";
|
||||
import { useToast } from "@/components/toast";
|
||||
import { DataTable, type Column } from "@/components/DataTable";
|
||||
import {
|
||||
Badge,
|
||||
Button,
|
||||
Field,
|
||||
Input,
|
||||
Switch,
|
||||
Modal,
|
||||
PageHeader,
|
||||
} from "@/components/ui";
|
||||
import { EditIcon } from "@/components/icons";
|
||||
import { toFa } from "@/lib/utils";
|
||||
|
||||
interface Theme {
|
||||
id: number;
|
||||
key: string;
|
||||
name: string;
|
||||
colors: Record<string, string>;
|
||||
order?: number;
|
||||
is_active?: boolean;
|
||||
}
|
||||
|
||||
// "#FF156395" (ARGB) or "#156395" → a CSS color the browser understands.
|
||||
function cssColor(c?: string): string {
|
||||
if (!c) return "transparent";
|
||||
const hex = c.replace("#", "");
|
||||
if (hex.length === 8) return `#${hex.slice(2)}${hex.slice(0, 2)}`; // ARGB → RGBA
|
||||
return `#${hex}`;
|
||||
}
|
||||
|
||||
// The RGB part for a native <input type="color"> (which can't represent alpha).
|
||||
function toNativeRgb(argb?: string): string {
|
||||
const hex = (argb ?? "").replace("#", "");
|
||||
if (hex.length === 8) return `#${hex.slice(2)}`;
|
||||
if (hex.length === 6) return `#${hex}`;
|
||||
return "#000000";
|
||||
}
|
||||
|
||||
// Editable color cell: a native picker for the RGB part (preserving any alpha)
|
||||
// plus a free-text field for full ARGB control.
|
||||
function ColorInput({
|
||||
value,
|
||||
onChange,
|
||||
}: {
|
||||
value: string;
|
||||
onChange: (v: string) => void;
|
||||
}) {
|
||||
const hex = (value ?? "").replace("#", "");
|
||||
const alpha = hex.length === 8 ? hex.slice(0, 2) : "";
|
||||
return (
|
||||
<div className="flex items-center gap-2">
|
||||
<input
|
||||
type="color"
|
||||
aria-label="انتخاب رنگ"
|
||||
value={toNativeRgb(value)}
|
||||
onChange={(e) =>
|
||||
onChange(`#${alpha}${e.target.value.replace("#", "")}`.toUpperCase())
|
||||
}
|
||||
className="h-9 w-9 shrink-0 cursor-pointer rounded border border-border bg-transparent p-0.5"
|
||||
/>
|
||||
<Input
|
||||
value={value}
|
||||
onChange={(e) => onChange(e.target.value)}
|
||||
dir="ltr"
|
||||
className="font-mono"
|
||||
placeholder="#FFFFFFFF"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default function ThemesPage() {
|
||||
// include_inactive so the editor also lists themes that are turned off.
|
||||
const { data, loading, error, reload } = useList<Theme>("/themes", {
|
||||
include_inactive: 1,
|
||||
});
|
||||
const toast = useToast();
|
||||
|
||||
const [editing, setEditing] = useState<Theme | null>(null);
|
||||
const [open, setOpen] = useState(false);
|
||||
const [saving, setSaving] = useState(false);
|
||||
|
||||
const [name, setName] = useState("");
|
||||
const [order, setOrder] = useState("");
|
||||
const [isActive, setIsActive] = useState(true);
|
||||
const [colors, setColors] = useState<Record<string, string>>({});
|
||||
|
||||
function openEdit(row: Theme) {
|
||||
setEditing(row);
|
||||
setName(row.name ?? "");
|
||||
setOrder(row.order != null ? String(row.order) : "");
|
||||
setIsActive(row.is_active ?? true);
|
||||
// Clone so edits don't mutate the loaded row before saving.
|
||||
setColors({ ...(row.colors ?? {}) });
|
||||
setOpen(true);
|
||||
}
|
||||
|
||||
function setColor(key: string, value: string) {
|
||||
setColors((prev) => ({ ...prev, [key]: value }));
|
||||
}
|
||||
|
||||
async function save(e: React.FormEvent) {
|
||||
e.preventDefault();
|
||||
if (!editing) return;
|
||||
setSaving(true);
|
||||
try {
|
||||
await apiFetch(`/themes/${editing.id}`, {
|
||||
method: "PUT",
|
||||
body: {
|
||||
name,
|
||||
order: order === "" ? undefined : Number(order),
|
||||
is_active: isActive,
|
||||
colors,
|
||||
},
|
||||
});
|
||||
toast.success("تم ویرایش شد.");
|
||||
setOpen(false);
|
||||
reload();
|
||||
} catch (err) {
|
||||
toast.error(err instanceof ApiError ? err.message : "خطا در ذخیرهسازی");
|
||||
} finally {
|
||||
setSaving(false);
|
||||
}
|
||||
}
|
||||
|
||||
const swatchKeys = [
|
||||
"themeUp",
|
||||
"themeDown",
|
||||
"lightColorGradient",
|
||||
"darkColorGradient",
|
||||
];
|
||||
|
||||
const columns: Column<Theme>[] = [
|
||||
{ key: "id", header: "شناسه", render: (r) => toFa(r.id), className: "w-20" },
|
||||
{
|
||||
key: "preview",
|
||||
header: "پیشنمایش",
|
||||
render: (r) => (
|
||||
<span className="inline-flex overflow-hidden rounded-full border border-border">
|
||||
{swatchKeys.map((k) => (
|
||||
<span
|
||||
key={k}
|
||||
className="h-5 w-5"
|
||||
style={{ backgroundColor: cssColor(r.colors?.[k]) }}
|
||||
/>
|
||||
))}
|
||||
</span>
|
||||
),
|
||||
className: "w-32",
|
||||
},
|
||||
{ key: "name", header: "نام" },
|
||||
{
|
||||
key: "key",
|
||||
header: "کلید",
|
||||
render: (r) => <span dir="ltr" className="font-mono">{r.key}</span>,
|
||||
className: "w-28",
|
||||
},
|
||||
{
|
||||
key: "order",
|
||||
header: "ترتیب",
|
||||
render: (r) => toFa(r.order ?? 0),
|
||||
className: "w-20",
|
||||
},
|
||||
{
|
||||
key: "is_active",
|
||||
header: "وضعیت",
|
||||
render: (r) =>
|
||||
r.is_active ? (
|
||||
<Badge tone="success">فعال</Badge>
|
||||
) : (
|
||||
<Badge>غیرفعال</Badge>
|
||||
),
|
||||
className: "w-24",
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageHeader
|
||||
title="تمها"
|
||||
subtitle="ویرایش رنگهای تمهای صحنه"
|
||||
/>
|
||||
|
||||
<DataTable
|
||||
columns={columns}
|
||||
rows={data}
|
||||
loading={loading}
|
||||
error={error}
|
||||
onRetry={reload}
|
||||
emptyMessage="هنوز تمی ثبت نشده است."
|
||||
actions={(row) => (
|
||||
<Button variant="ghost" onClick={() => openEdit(row)} aria-label="ویرایش">
|
||||
<EditIcon className="h-4 w-4" />
|
||||
</Button>
|
||||
)}
|
||||
/>
|
||||
|
||||
<Modal
|
||||
open={open}
|
||||
onClose={() => setOpen(false)}
|
||||
title={editing ? `ویرایش تم «${editing.name}»` : "ویرایش تم"}
|
||||
footer={
|
||||
<>
|
||||
<Button variant="secondary" onClick={() => setOpen(false)}>
|
||||
انصراف
|
||||
</Button>
|
||||
<Button form="theme-form" type="submit" loading={saving}>
|
||||
ذخیره
|
||||
</Button>
|
||||
</>
|
||||
}
|
||||
>
|
||||
<form id="theme-form" onSubmit={save} className="flex flex-col gap-4">
|
||||
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2">
|
||||
<Field label="نام" required>
|
||||
<Input
|
||||
value={name}
|
||||
onChange={(e) => setName(e.target.value)}
|
||||
required
|
||||
/>
|
||||
</Field>
|
||||
<Field label="ترتیب">
|
||||
<Input
|
||||
type="number"
|
||||
value={order}
|
||||
onChange={(e) => setOrder(e.target.value)}
|
||||
dir="ltr"
|
||||
/>
|
||||
</Field>
|
||||
</div>
|
||||
|
||||
<Field label="فعال">
|
||||
<Switch checked={isActive} onChange={setIsActive} />
|
||||
</Field>
|
||||
|
||||
<div className="border-t border-border pt-4">
|
||||
<p className="mb-3 text-sm font-medium text-foreground">رنگها</p>
|
||||
<div className="grid grid-cols-1 gap-3 sm:grid-cols-2">
|
||||
{Object.keys(colors).map((key) => (
|
||||
<Field key={key} label={key}>
|
||||
<ColorInput
|
||||
value={colors[key] ?? ""}
|
||||
onChange={(v) => setColor(key, v)}
|
||||
/>
|
||||
</Field>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</Modal>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,289 @@
|
||||
"use client";
|
||||
|
||||
import { useState } from "react";
|
||||
import { apiFetch, ApiError, toFormData } from "@/lib/api";
|
||||
import { useList } from "@/lib/useResource";
|
||||
import { useToast } from "@/components/toast";
|
||||
import { DataTable, type Column } from "@/components/DataTable";
|
||||
import {
|
||||
Button,
|
||||
ConfirmDialog,
|
||||
Field,
|
||||
Input,
|
||||
Modal,
|
||||
PageHeader,
|
||||
Textarea,
|
||||
} from "@/components/ui";
|
||||
import { EditIcon, PlusIcon, TrashIcon } from "@/components/icons";
|
||||
import { toFa } from "@/lib/utils";
|
||||
import { MediaPreview } from "@/components/MediaPreview";
|
||||
import { ImagePicker } from "@/components/ImagePicker";
|
||||
import { pickUrl, IMAGE_KEYS } from "@/lib/media";
|
||||
|
||||
interface AppVersion {
|
||||
id: number;
|
||||
title?: string;
|
||||
description?: string;
|
||||
version_name?: string;
|
||||
version_code?: number;
|
||||
link?: string;
|
||||
image_id?: number | null;
|
||||
image?: unknown;
|
||||
}
|
||||
|
||||
export default function VersionsPage() {
|
||||
const { data, loading, error, reload } = useList<AppVersion>("/versions");
|
||||
const toast = useToast();
|
||||
|
||||
const [editing, setEditing] = useState<AppVersion | null>(null);
|
||||
const [open, setOpen] = useState(false);
|
||||
const [title, setTitle] = useState("");
|
||||
const [description, setDescription] = useState("");
|
||||
const [versionName, setVersionName] = useState("");
|
||||
const [versionCode, setVersionCode] = useState("");
|
||||
const [link, setLink] = useState("");
|
||||
const [imageId, setImageId] = useState<number | null>(null);
|
||||
const [imageFile, setImageFile] = useState<File | null>(null);
|
||||
const [saving, setSaving] = useState(false);
|
||||
|
||||
const [deleting, setDeleting] = useState<AppVersion | null>(null);
|
||||
const [removing, setRemoving] = useState(false);
|
||||
|
||||
function openCreate() {
|
||||
setEditing(null);
|
||||
setTitle("");
|
||||
setDescription("");
|
||||
setVersionName("");
|
||||
setVersionCode("");
|
||||
setLink("");
|
||||
setImageId(null);
|
||||
setImageFile(null);
|
||||
setOpen(true);
|
||||
}
|
||||
function openEdit(row: AppVersion) {
|
||||
setEditing(row);
|
||||
setTitle(row.title ?? "");
|
||||
setDescription(row.description ?? "");
|
||||
setVersionName(row.version_name ?? "");
|
||||
setVersionCode(row.version_code != null ? String(row.version_code) : "");
|
||||
setLink(row.link ?? "");
|
||||
setImageId(row.image_id ?? null);
|
||||
setImageFile(null);
|
||||
setOpen(true);
|
||||
}
|
||||
|
||||
async function save(e: React.FormEvent) {
|
||||
e.preventDefault();
|
||||
setSaving(true);
|
||||
try {
|
||||
// Multipart (the image is a file). Edit posts to /versions/:id, which the
|
||||
// backend also accepts as a multipart update.
|
||||
const body = toFormData({
|
||||
title,
|
||||
description,
|
||||
version_name: versionName,
|
||||
version_code: versionCode,
|
||||
link,
|
||||
image_id: imageId,
|
||||
image: imageFile,
|
||||
});
|
||||
if (editing) {
|
||||
await apiFetch(`/versions/${editing.id}`, { method: "POST", body });
|
||||
toast.success("نسخه ویرایش شد.");
|
||||
} else {
|
||||
await apiFetch("/versions", { method: "POST", body });
|
||||
toast.success("نسخه افزوده شد.");
|
||||
}
|
||||
setOpen(false);
|
||||
reload();
|
||||
} catch (err) {
|
||||
toast.error(err instanceof ApiError ? err.message : "خطا در ذخیرهسازی");
|
||||
} finally {
|
||||
setSaving(false);
|
||||
}
|
||||
}
|
||||
|
||||
async function confirmDelete() {
|
||||
if (!deleting) return;
|
||||
setRemoving(true);
|
||||
try {
|
||||
await apiFetch(`/versions/${deleting.id}`, { method: "DELETE" });
|
||||
toast.success("نسخه حذف شد.");
|
||||
setDeleting(null);
|
||||
reload();
|
||||
} catch (err) {
|
||||
toast.error(err instanceof ApiError ? err.message : "خطا در حذف");
|
||||
} finally {
|
||||
setRemoving(false);
|
||||
}
|
||||
}
|
||||
|
||||
const columns: Column<AppVersion>[] = [
|
||||
{ key: "id", header: "شناسه", render: (r) => toFa(r.id), className: "w-20" },
|
||||
{
|
||||
key: "thumbnail",
|
||||
header: "تصویر",
|
||||
className: "w-20",
|
||||
render: (r) => (
|
||||
<MediaPreview kind="image" src={pickUrl(r, IMAGE_KEYS)} label={r.title} />
|
||||
),
|
||||
},
|
||||
{ key: "title", header: "عنوان", render: (r) => r.title ?? "—" },
|
||||
{
|
||||
key: "version_name",
|
||||
header: "نام نسخه",
|
||||
render: (r) => (
|
||||
<span dir="ltr" className="block">
|
||||
{r.version_name ?? "—"}
|
||||
</span>
|
||||
),
|
||||
className: "w-28",
|
||||
},
|
||||
{
|
||||
key: "version_code",
|
||||
header: "کد نسخه",
|
||||
render: (r) => (r.version_code != null ? toFa(r.version_code) : "—"),
|
||||
className: "w-24",
|
||||
},
|
||||
{
|
||||
key: "link",
|
||||
header: "لینک",
|
||||
render: (r) =>
|
||||
r.link ? (
|
||||
<span dir="ltr" className="block max-w-[12rem] truncate">
|
||||
{r.link}
|
||||
</span>
|
||||
) : (
|
||||
"—"
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageHeader
|
||||
title="نسخهها"
|
||||
subtitle="مدیریت نسخههای برنامه (بررسی بهروزرسانی)"
|
||||
action={
|
||||
<Button icon={<PlusIcon className="h-4 w-4" />} onClick={openCreate}>
|
||||
نسخه جدید
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
|
||||
<DataTable
|
||||
columns={columns}
|
||||
rows={data}
|
||||
loading={loading}
|
||||
error={error}
|
||||
onRetry={reload}
|
||||
emptyMessage="هنوز نسخهای ثبت نشده است."
|
||||
emptyAction={
|
||||
<Button icon={<PlusIcon className="h-4 w-4" />} onClick={openCreate}>
|
||||
نسخه جدید
|
||||
</Button>
|
||||
}
|
||||
actions={(row) => (
|
||||
<>
|
||||
<Button variant="ghost" onClick={() => openEdit(row)} aria-label="ویرایش">
|
||||
<EditIcon className="h-4 w-4" />
|
||||
</Button>
|
||||
<Button
|
||||
variant="ghost"
|
||||
onClick={() => setDeleting(row)}
|
||||
aria-label="حذف"
|
||||
className="text-danger"
|
||||
>
|
||||
<TrashIcon className="h-4 w-4" />
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
<Modal
|
||||
open={open}
|
||||
onClose={() => setOpen(false)}
|
||||
title={editing ? "ویرایش نسخه" : "نسخه جدید"}
|
||||
footer={
|
||||
<>
|
||||
<Button variant="secondary" onClick={() => setOpen(false)}>
|
||||
انصراف
|
||||
</Button>
|
||||
<Button form="version-form" type="submit" loading={saving}>
|
||||
ذخیره
|
||||
</Button>
|
||||
</>
|
||||
}
|
||||
>
|
||||
<form id="version-form" onSubmit={save} className="flex flex-col gap-4">
|
||||
<Field label="عنوان" required>
|
||||
<Input
|
||||
value={title}
|
||||
onChange={(e) => setTitle(e.target.value)}
|
||||
placeholder="مثلاً نسخه ۱.۲.۰"
|
||||
required
|
||||
autoFocus
|
||||
/>
|
||||
</Field>
|
||||
|
||||
<Field label="توضیحات">
|
||||
<Textarea
|
||||
value={description}
|
||||
onChange={(e) => setDescription(e.target.value)}
|
||||
placeholder="توضیح تغییرات این نسخه"
|
||||
/>
|
||||
</Field>
|
||||
|
||||
<Field label="تصویر" hint="انتخاب از کتابخانه یا بارگذاری تصویر جدید">
|
||||
<ImagePicker
|
||||
imageId={imageId}
|
||||
onPickId={setImageId}
|
||||
file={imageFile}
|
||||
onPickFile={setImageFile}
|
||||
existingUrl={editing ? pickUrl(editing, IMAGE_KEYS) : null}
|
||||
/>
|
||||
</Field>
|
||||
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
<Field label="نام نسخه" required>
|
||||
<Input
|
||||
value={versionName}
|
||||
onChange={(e) => setVersionName(e.target.value)}
|
||||
placeholder="1.2.0"
|
||||
dir="ltr"
|
||||
required
|
||||
/>
|
||||
</Field>
|
||||
<Field label="کد نسخه" required>
|
||||
<Input
|
||||
type="number"
|
||||
value={versionCode}
|
||||
onChange={(e) => setVersionCode(e.target.value)}
|
||||
placeholder="42"
|
||||
dir="ltr"
|
||||
required
|
||||
/>
|
||||
</Field>
|
||||
</div>
|
||||
|
||||
<Field label="لینک">
|
||||
<Input
|
||||
value={link}
|
||||
onChange={(e) => setLink(e.target.value)}
|
||||
placeholder="https://"
|
||||
dir="ltr"
|
||||
/>
|
||||
</Field>
|
||||
</form>
|
||||
</Modal>
|
||||
|
||||
<ConfirmDialog
|
||||
open={!!deleting}
|
||||
message={`آیا از حذف «${deleting?.title}» مطمئن هستید؟`}
|
||||
loading={removing}
|
||||
onConfirm={confirmDelete}
|
||||
onClose={() => setDeleting(null)}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+11
@@ -72,6 +72,7 @@ export const NAV: NavSection[] = [
|
||||
items: [
|
||||
{ href: "/dashboard/scenes", label: "صحنهها" },
|
||||
{ href: "/dashboard/scenes/settings", label: "تنظیمات صحنه" },
|
||||
{ href: "/dashboard/themes", label: "تمها" },
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -79,6 +80,16 @@ export const NAV: NavSection[] = [
|
||||
icon: SliderIcon,
|
||||
items: [{ href: "/dashboard/sliders", label: "اسلایدرها" }],
|
||||
},
|
||||
{
|
||||
label: "اعلانها",
|
||||
icon: SliderIcon,
|
||||
items: [{ href: "/dashboard/announcements", label: "اعلانها" }],
|
||||
},
|
||||
{
|
||||
label: "نسخهها",
|
||||
icon: SliderIcon,
|
||||
items: [{ href: "/dashboard/versions", label: "نسخههای برنامه" }],
|
||||
},
|
||||
{
|
||||
label: "تصاویر",
|
||||
icon: ImageIcon,
|
||||
|
||||
Generated
+59
-15
@@ -67,7 +67,6 @@
|
||||
"integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^7.29.7",
|
||||
"@babel/generator": "^7.29.7",
|
||||
@@ -277,10 +276,32 @@
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@emnapi/core": {
|
||||
"version": "1.11.1",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.1.tgz",
|
||||
"integrity": "sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@emnapi/wasi-threads": "1.2.2",
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@emnapi/runtime": {
|
||||
"version": "1.11.1",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.1.tgz",
|
||||
"integrity": "sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==",
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@emnapi/wasi-threads": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz",
|
||||
"integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==",
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz",
|
||||
"integrity": "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
@@ -1560,7 +1581,6 @@
|
||||
"integrity": "sha512-esJiCAnl0kfpNdE69f3So4WJUXy95dLZydX0KwK46riIHDzHM7O9Vtf9xCHW0PXIqvgqNrswl522kA/5yx+F4w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"csstype": "^3.2.2"
|
||||
}
|
||||
@@ -1620,7 +1640,6 @@
|
||||
"integrity": "sha512-A0M6ua6H252bVjPvvtSgl2QA4+ET9S5Mtkb2GDyTxIhH/C4qDItT7RQNO5PhMC6NXGYXOR9dIalcDDgBKT7oFA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "8.60.1",
|
||||
"@typescript-eslint/types": "8.60.1",
|
||||
@@ -2142,6 +2161,40 @@
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@unrs/resolver-binding-wasm32-wasi/node_modules/@emnapi/core": {
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz",
|
||||
"integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@emnapi/wasi-threads": "1.2.1",
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@unrs/resolver-binding-wasm32-wasi/node_modules/@emnapi/runtime": {
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz",
|
||||
"integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@unrs/resolver-binding-wasm32-wasi/node_modules/@emnapi/wasi-threads": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz",
|
||||
"integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@unrs/resolver-binding-win32-arm64-msvc": {
|
||||
"version": "1.12.2",
|
||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.12.2.tgz",
|
||||
@@ -2190,7 +2243,6 @@
|
||||
"integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"acorn": "bin/acorn"
|
||||
},
|
||||
@@ -2534,7 +2586,6 @@
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"baseline-browser-mapping": "^2.10.12",
|
||||
"caniuse-lite": "^1.0.30001782",
|
||||
@@ -3102,7 +3153,6 @@
|
||||
"integrity": "sha512-XoMjdBOwe/esVgEvLmNsD3IRHkm7fbKIUGvrleloJXUZgDHig2IPWNniv+GwjyJXzuNqVjlr5+4yVUZjycJwfQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.8.0",
|
||||
"@eslint-community/regexpp": "^4.12.1",
|
||||
@@ -3288,7 +3338,6 @@
|
||||
"integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@rtsao/scc": "^1.1.0",
|
||||
"array-includes": "^3.1.9",
|
||||
@@ -5475,7 +5524,6 @@
|
||||
"resolved": "https://registry.npmjs.org/react/-/react-19.2.4.tgz",
|
||||
"integrity": "sha512-9nfp2hYpCwOjAN+8TZFGhtWEwgvWHXqESH8qT89AT/lWklpLON22Lc8pEtnpsZz7VmawabSU0gCjnj8aC0euHQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
@@ -5485,7 +5533,6 @@
|
||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.4.tgz",
|
||||
"integrity": "sha512-AXJdLo8kgMbimY95O2aKQqsz2iWi9jMgKJhRBAxECE4IFxfcazB2LmzloIoibJI3C12IlY20+KFaLv+71bUJeQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"scheduler": "^0.27.0"
|
||||
},
|
||||
@@ -6177,7 +6224,6 @@
|
||||
"integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
@@ -6340,7 +6386,6 @@
|
||||
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
@@ -6619,7 +6664,6 @@
|
||||
"integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/colinhacks"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user