@@ -286,41 +286,37 @@ export function SendCommunicationForm({
286286
287287 return (
288288 < Card className = { className } >
289- < CardHeader >
290- < div className = "flex items-center justify-between" >
291- < div >
292- < CardTitle className = "flex items-center space-x-2 " >
293- < Send className = "h-5 w-5" />
294- < span > 发送提醒邮件 </ span >
289+ < CardHeader className = "space-y-3 lg:space-y-4" >
290+ < div className = "flex flex-col gap-3 lg:flex-row lg: items-start lg: justify-between" >
291+ < div className = "space-y-1.5" >
292+ < CardTitle className = "flex items-center gap-2 text-lg lg:text-xl " >
293+ < Send className = "h-4 w-4 lg:h-5 lg: w-5" />
294+ < span > 发送通知邮件 </ span >
295295 </ CardTitle >
296- < CardDescription >
297- 向 { eventTitle } 的参与者发送邮件提醒
298- < br />
299- < span className = "text-amber-600 text-sm" >
296+ < CardDescription className = "space-y-1 text-xs lg:text-sm" >
297+ < div > 向 { eventTitle } 的参与者发送邮件通知</ div >
298+ < div className = "text-amber-600" >
300299 ⚠️
301300 系统会自动跳过虚拟邮箱(@wechat.app)或无效邮箱
302- </ span >
303- < br />
304- < span className = "text-blue-600 text-sm" >
305- 🖼️ 支持上传一张提醒图片,邮件中会展示
306- </ span >
301+ </ div >
302+ < div className = "text-blue-600" >
303+ 🖼️ 支持上传一张通知图片,邮件中会展示
304+ </ div >
307305 </ CardDescription >
308306 </ div >
309- < div className = "text-right" >
310- < div className = "flex items-center space-x-2 text-sm text-muted-foreground" >
311- < Users className = "h-4 w-4" />
312- < span > { participantCount } 名参与者</ span >
313- </ div >
307+ < div className = "flex items-center gap-1.5 text-xs text-muted-foreground lg:text-sm" >
308+ < Users className = "h-3.5 w-3.5 lg:h-4 lg:w-4" />
309+ < span > { participantCount } 名参与者</ span >
314310 </ div >
315311 </ div >
316312
317313 < div className = "space-y-2" >
318- < div className = "flex items-center justify-between text-sm" >
314+ < div className = "flex items-center justify-between text-xs lg:text- sm" >
319315 < span className = "text-muted-foreground" >
320316 发送次数限制
321317 </ span >
322- < div className = "flex items-center space-x -2" >
323- < span className = "font-medium" >
318+ < div className = "flex items-center gap -2" >
319+ < span className = "font-medium text-xs lg:text-sm " >
324320 { limitInfo . totalUsed } / { limitInfo . maxAllowed }
325321 </ span >
326322 < Badge
@@ -329,7 +325,7 @@ export function SendCommunicationForm({
329325 ? "default"
330326 : "destructive"
331327 }
332- className = "text-xs"
328+ className = "text-[10px] lg:text- xs"
333329 >
334330 剩余 { limitInfo . remainingCount } 次
335331 </ Badge >
@@ -339,14 +335,14 @@ export function SendCommunicationForm({
339335 value = {
340336 ( limitInfo . totalUsed / limitInfo . maxAllowed ) * 100
341337 }
342- className = "h-2"
338+ className = "h-1.5 lg:h- 2"
343339 />
344340 </ div >
345341
346342 { ! limitInfo . canSend && (
347343 < Alert variant = "destructive" >
348344 < AlertCircle className = "h-4 w-4" />
349- < AlertDescription >
345+ < AlertDescription className = "text-xs lg:text-sm" >
350346 该活动已达到最大通信次数限制({ limitInfo . maxAllowed } { " " }
351347 次),无法继续发送消息。
352348 </ AlertDescription >
@@ -365,16 +361,18 @@ export function SendCommunicationForm({
365361 name = "type"
366362 render = { ( ) => (
367363 < FormItem >
368- < FormLabel > 通信类型</ FormLabel >
364+ < FormLabel className = "text-sm lg:text-base" >
365+ 通信类型
366+ </ FormLabel >
369367 < FormControl >
370- < div className = "border rounded-lg p-3 bg-muted" >
371- < div className = "flex items-center space-x -2" >
372- < Mail className = "h-4 w-4 text-primary" />
373- < div >
374- < div className = "font-medium" >
368+ < div className = "rounded-lg border bg-muted p-2.5 lg:p-3 " >
369+ < div className = "flex items-center gap -2" >
370+ < Mail className = "h-3.5 w-3.5 flex-shrink-0 text-primary lg:h-4 lg:w-4 " />
371+ < div className = "min-w-0" >
372+ < div className = "text-sm font-medium lg:text-base " >
375373 邮件通知
376374 </ div >
377- < div className = "text-xs text-muted-foreground" >
375+ < div className = "text-[10px] text-muted-foreground lg:text-xs " >
378376 发送到用户邮箱
379377 </ div >
380378 </ div >
@@ -391,7 +389,9 @@ export function SendCommunicationForm({
391389 name = "recipientScope"
392390 render = { ( { field } ) => (
393391 < FormItem >
394- < FormLabel > 发送范围</ FormLabel >
392+ < FormLabel className = "text-sm lg:text-base" >
393+ 发送范围
394+ </ FormLabel >
395395 < Select
396396 onValueChange = { ( value ) =>
397397 field . onChange (
@@ -401,7 +401,7 @@ export function SendCommunicationForm({
401401 value = { field . value }
402402 >
403403 < FormControl >
404- < SelectTrigger >
404+ < SelectTrigger className = "text-sm lg:text-base" >
405405 < SelectValue placeholder = "选择发送范围" />
406406 </ SelectTrigger >
407407 </ FormControl >
@@ -448,7 +448,7 @@ export function SendCommunicationForm({
448448 </ SelectItem >
449449 </ SelectContent >
450450 </ Select >
451- < FormDescription >
451+ < FormDescription className = "text-xs lg:text-sm" >
452452 无效邮箱会自动跳过,不会报错中断。
453453 </ FormDescription >
454454 < FormMessage />
@@ -648,19 +648,22 @@ export function SendCommunicationForm({
648648 name = "subject"
649649 render = { ( { field } ) => (
650650 < FormItem >
651- < FormLabel > 消息主题</ FormLabel >
651+ < FormLabel className = "text-sm lg:text-base" >
652+ 消息主题
653+ </ FormLabel >
652654 < FormControl >
653655 < Input
654656 placeholder = "请输入消息主题"
655657 { ...field }
656658 maxLength = { 200 }
659+ className = "text-sm lg:text-base"
657660 />
658661 </ FormControl >
659- < FormDescription className = "flex justify-between" >
662+ < FormDescription className = "flex justify-between text-xs lg:text-sm " >
660663 < span >
661664 简洁明了的主题有助于提高消息打开率
662665 </ span >
663- < span className = "text-xs text-muted-foreground" >
666+ < span className = "text-[10px] text-muted-foreground lg:text-xs " >
664667 { subjectLength } /200
665668 </ span >
666669 </ FormDescription >
@@ -674,18 +677,20 @@ export function SendCommunicationForm({
674677 name = "content"
675678 render = { ( { field } ) => (
676679 < FormItem >
677- < FormLabel > 消息内容</ FormLabel >
680+ < FormLabel className = "text-sm lg:text-base" >
681+ 消息内容
682+ </ FormLabel >
678683 < FormControl >
679684 < Textarea
680685 placeholder = "请输入邮件内容..."
681- className = "min-h-[120px ] resize-none"
686+ className = "min-h-[100px ] resize-none text-sm lg:min-h-[120px] lg:text-base "
682687 { ...field }
683688 maxLength = { 2000 }
684689 />
685690 </ FormControl >
686- < FormDescription className = "flex justify-between" >
691+ < FormDescription className = "flex justify-between text-xs lg:text-sm " >
687692 < span > 支持换行,会保持原有格式</ span >
688- < span className = "text-xs text-muted-foreground" >
693+ < span className = "text-[10px] text-muted-foreground lg:text-xs " >
689694 { contentLength } /2000
690695 </ span >
691696 </ FormDescription >
@@ -701,22 +706,22 @@ export function SendCommunicationForm({
701706 < FormItem >
702707 < FormControl >
703708 < ImageUpload
704- label = "提醒图片 (可选)"
709+ label = "通知图片 (可选)"
705710 value = { field . value }
706711 onChange = { field . onChange }
707712 onRemove = { ( ) =>
708713 field . onChange ( undefined )
709714 }
710715 description = "支持 JPG、PNG、WebP,建议宽图,邮件内会自动展示"
711- className = "p-4"
716+ className = "p-3 lg:p- 4"
712717 />
713718 </ FormControl >
714- < FormDescription className = "flex justify-between" >
719+ < FormDescription className = "flex justify-between text-xs lg:text-sm " >
715720 < span >
716721 不上传也可正常发送,仅发送文字消息
717722 </ span >
718723 { watchedImageUrl ? (
719- < span className = "text-xs text-muted-foreground" >
724+ < span className = "text-[10px] text-muted-foreground lg:text-xs " >
720725 已上传图片
721726 </ span >
722727 ) : null }
@@ -726,24 +731,25 @@ export function SendCommunicationForm({
726731 ) }
727732 />
728733
729- < div className = "flex justify-end" >
734+ < div className = "flex justify-end pt-2 " >
730735 < Button
731736 type = "submit"
732737 disabled = {
733738 disabled ||
734739 ! limitInfo . canSend ||
735740 isSubmitting
736741 }
737- className = "min-w-[120px]"
742+ className = "w-full min-w-[120px] lg:w-auto"
743+ size = "lg"
738744 >
739745 { isSubmitting ? (
740746 < >
741- < div className = "animate-spin rounded-full h-4 w-4 border-b-2 border-white mr-2 " />
747+ < div className = "mr-2 h-4 w-4 animate-spin rounded-full border-b-2 border-white" />
742748 发送中...
743749 </ >
744750 ) : (
745751 < >
746- < Send className = "h-4 w-4 mr-2 " />
752+ < Send className = "mr-2 h-4 w-4" />
747753 发送{ getTypeLabel ( ) }
748754 </ >
749755 ) }
0 commit comments