mirror of
https://github.com/perfect-panel/ppanel-web.git
synced 2026-02-06 03:30:25 -05:00
🐛 fix: Replace MarkdownEditor with HTMLEditor in EmailBroadcastForm; simplify content rendering in EmailTaskManager; disable eslint in service index files
This commit is contained in:
parent
ab6f6a64c2
commit
e2d83ec9e6
@ -31,7 +31,7 @@ import {
|
||||
} from '@workspace/ui/components/sheet';
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@workspace/ui/components/tabs';
|
||||
import { Textarea } from '@workspace/ui/components/textarea';
|
||||
import { MarkdownEditor } from '@workspace/ui/custom-components/editor';
|
||||
import { HTMLEditor } from '@workspace/ui/custom-components/editor';
|
||||
import { EnhancedInput } from '@workspace/ui/custom-components/enhanced-input';
|
||||
import { Icon } from '@workspace/ui/custom-components/icon';
|
||||
import { useTranslations } from 'next-intl';
|
||||
@ -286,7 +286,7 @@ export default function EmailBroadcastForm() {
|
||||
<FormItem>
|
||||
<FormLabel>{t('content')}</FormLabel>
|
||||
<FormControl>
|
||||
<MarkdownEditor
|
||||
<HTMLEditor
|
||||
value={field.value}
|
||||
onChange={(value) => {
|
||||
form.setValue(field.name, value || '');
|
||||
|
||||
@ -253,10 +253,7 @@ export default function EmailTaskManager() {
|
||||
<h4 className='text-muted-foreground mb-2 text-sm font-medium'>
|
||||
{t('content')}
|
||||
</h4>
|
||||
<div
|
||||
className='prose prose-sm max-w-none'
|
||||
dangerouslySetInnerHTML={{ __html: selectedTask.content }}
|
||||
/>
|
||||
<div dangerouslySetInnerHTML={{ __html: selectedTask.content }} />
|
||||
</div>
|
||||
{selectedTask.additional && (
|
||||
<div>
|
||||
@ -278,10 +275,11 @@ export default function EmailTaskManager() {
|
||||
onClick={() => refreshTaskStatus(row.id)}
|
||||
disabled={refreshing[row.id]}
|
||||
>
|
||||
{refreshing[row.id] && (
|
||||
{refreshing[row.id] ? (
|
||||
<Icon icon='mdi:loading' className='mr-2 h-3 w-3 animate-spin' />
|
||||
) : (
|
||||
<Icon icon='mdi:refresh' className='mr-2 h-3 w-3' />
|
||||
)}
|
||||
<Icon icon='mdi:refresh' className='h-3 w-3' />
|
||||
</Button>,
|
||||
...([0, 1].includes(row.status)
|
||||
? [
|
||||
|
||||
@ -155,7 +155,6 @@ export default function PaymentForm<T>({
|
||||
<ScrollArea className='-mx-6 h-[calc(100vh-48px-36px-36px-env(safe-area-inset-top))]'>
|
||||
<Form {...form}>
|
||||
<form onSubmit={form.handleSubmit(handleSubmit)} className='space-y-6 px-6 pt-4'>
|
||||
{/* 基本信息分组 */}
|
||||
<div className='space-y-4'>
|
||||
<div className='grid grid-cols-1 gap-4 sm:grid-cols-2'>
|
||||
<FormField
|
||||
|
||||
@ -211,6 +211,16 @@ export function ProTable<
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [pagination.pageIndex, pagination.pageSize, columnFilters]);
|
||||
|
||||
useEffect(() => {
|
||||
if (initialFilters) {
|
||||
const newFilters = Object.entries(initialFilters).map(([id, value]) => ({
|
||||
id,
|
||||
value,
|
||||
})) as ColumnFiltersState;
|
||||
setColumnFilters(newFilters);
|
||||
}
|
||||
}, [initialFilters]);
|
||||
|
||||
const selectedRows = table.getSelectedRowModel().flatRows.map((row) => row.original);
|
||||
const selectedCount = selectedRows.length;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user