This commit is contained in:
2026-06-30 14:12:07 +03:30
8 changed files with 1002 additions and 19 deletions
+11
View File
@@ -101,6 +101,7 @@ export default function SlidersPage() {
await apiFetch(`/slider/${editing.id}`, { method: "POST", body });
toast.success("اسلایدر ویرایش شد.");
} else {
await apiFetch("/slider", { method: "POST", body });
await apiFetch("/slider", { method: "POST", body });
toast.success("اسلایدر افزوده شد.");
}
@@ -253,6 +254,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}