|
|
@@ -12,7 +12,7 @@ import { useForm } from 'react-hook-form';
|
|
|
import { zodResolver } from '@hookform/resolvers/zod';
|
|
|
import { toast } from 'sonner';
|
|
|
import { DataTablePagination } from '@/client/admin-shadcn/components/DataTablePagination';
|
|
|
-import AvatarSelector from '@/client/admin-shadcn/components/AvatarSelector';
|
|
|
+import ImageSelector from '@/client/admin-shadcn/components/ImageSelector';
|
|
|
import AdvertisementTypeSelector from '@/client/admin-shadcn/components/AdvertisementTypeSelector';
|
|
|
import { advertisementClient } from '@/client/api';
|
|
|
import type { InferRequestType, InferResponseType } from 'hono/client';
|
|
|
@@ -419,7 +419,7 @@ export const AdvertisementsPage = () => {
|
|
|
<FormItem>
|
|
|
<FormLabel>广告图片</FormLabel>
|
|
|
<FormControl>
|
|
|
- <AvatarSelector
|
|
|
+ <ImageSelector
|
|
|
value={field.value || undefined}
|
|
|
onChange={field.onChange}
|
|
|
maxSize={2}
|
|
|
@@ -427,6 +427,8 @@ export const AdvertisementsPage = () => {
|
|
|
uploadButtonText="上传广告图片"
|
|
|
previewSize="medium"
|
|
|
placeholder="选择广告图片"
|
|
|
+ title="选择广告图片"
|
|
|
+ description="上传新图片或从已有图片中选择"
|
|
|
/>
|
|
|
</FormControl>
|
|
|
<FormDescription>推荐尺寸:1200x400px,支持jpg、png格式</FormDescription>
|
|
|
@@ -591,7 +593,7 @@ export const AdvertisementsPage = () => {
|
|
|
<FormItem>
|
|
|
<FormLabel>广告图片</FormLabel>
|
|
|
<FormControl>
|
|
|
- <AvatarSelector
|
|
|
+ <ImageSelector
|
|
|
value={field.value || undefined}
|
|
|
onChange={field.onChange}
|
|
|
maxSize={2}
|
|
|
@@ -599,6 +601,8 @@ export const AdvertisementsPage = () => {
|
|
|
uploadButtonText="上传广告图片"
|
|
|
previewSize="medium"
|
|
|
placeholder="选择广告图片"
|
|
|
+ title="选择广告图片"
|
|
|
+ description="上传新图片或从已有图片中选择"
|
|
|
/>
|
|
|
</FormControl>
|
|
|
<FormDescription>推荐尺寸:1200x400px,支持jpg、png格式</FormDescription>
|