mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-03-24 23:06:51 +00:00
fix(export): refine defaults modal interactions
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
z-index: 1015;
|
z-index: 2400;
|
||||||
}
|
}
|
||||||
|
|
||||||
.export-date-range-dialog {
|
.export-date-range-dialog {
|
||||||
|
|||||||
@@ -126,6 +126,50 @@ export function ExportDefaultsSettingsForm({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`export-defaults-settings-form ${layout === 'split' ? 'layout-split' : 'layout-stacked'}`}>
|
<div className={`export-defaults-settings-form ${layout === 'split' ? 'layout-split' : 'layout-stacked'}`}>
|
||||||
|
<div className="form-group">
|
||||||
|
<div className="form-copy">
|
||||||
|
<label>导出并发数</label>
|
||||||
|
<span className="form-hint">导出多个会话时的最大并发(1~6)</span>
|
||||||
|
</div>
|
||||||
|
<div className="form-control">
|
||||||
|
<div className="select-field" ref={exportConcurrencyDropdownRef}>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
className={`select-trigger ${showExportConcurrencySelect ? 'open' : ''}`}
|
||||||
|
onClick={() => {
|
||||||
|
setShowExportConcurrencySelect(!showExportConcurrencySelect)
|
||||||
|
setShowExportFormatSelect(false)
|
||||||
|
setIsExportDateRangeDialogOpen(false)
|
||||||
|
setShowExportExcelColumnsSelect(false)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<span className="select-value">{exportConcurrencyLabel}</span>
|
||||||
|
<ChevronDown size={16} />
|
||||||
|
</button>
|
||||||
|
{showExportConcurrencySelect && (
|
||||||
|
<div className="select-dropdown">
|
||||||
|
{exportConcurrencyOptions.map((option) => (
|
||||||
|
<button
|
||||||
|
key={option}
|
||||||
|
type="button"
|
||||||
|
className={`select-option ${exportDefaultConcurrency === option ? 'active' : ''}`}
|
||||||
|
onClick={async () => {
|
||||||
|
setExportDefaultConcurrency(option)
|
||||||
|
await configService.setExportDefaultConcurrency(option)
|
||||||
|
onDefaultsChanged?.({ concurrency: option })
|
||||||
|
notify(`已将导出并发数设为 ${option}`, true)
|
||||||
|
setShowExportConcurrencySelect(false)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<span className="option-label">{option}</span>
|
||||||
|
</button>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="form-group">
|
<div className="form-group">
|
||||||
<div className="form-copy">
|
<div className="form-copy">
|
||||||
<label>默认导出格式</label>
|
<label>默认导出格式</label>
|
||||||
@@ -310,49 +354,6 @@ export function ExportDefaultsSettingsForm({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="form-group">
|
|
||||||
<div className="form-copy">
|
|
||||||
<label>导出并发数</label>
|
|
||||||
<span className="form-hint">导出多个会话时的最大并发(1~6)</span>
|
|
||||||
</div>
|
|
||||||
<div className="form-control">
|
|
||||||
<div className="select-field" ref={exportConcurrencyDropdownRef}>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className={`select-trigger ${showExportConcurrencySelect ? 'open' : ''}`}
|
|
||||||
onClick={() => {
|
|
||||||
setShowExportConcurrencySelect(!showExportConcurrencySelect)
|
|
||||||
setShowExportFormatSelect(false)
|
|
||||||
setIsExportDateRangeDialogOpen(false)
|
|
||||||
setShowExportExcelColumnsSelect(false)
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<span className="select-value">{exportConcurrencyLabel}</span>
|
|
||||||
<ChevronDown size={16} />
|
|
||||||
</button>
|
|
||||||
{showExportConcurrencySelect && (
|
|
||||||
<div className="select-dropdown">
|
|
||||||
{exportConcurrencyOptions.map((option) => (
|
|
||||||
<button
|
|
||||||
key={option}
|
|
||||||
type="button"
|
|
||||||
className={`select-option ${exportDefaultConcurrency === option ? 'active' : ''}`}
|
|
||||||
onClick={async () => {
|
|
||||||
setExportDefaultConcurrency(option)
|
|
||||||
await configService.setExportDefaultConcurrency(option)
|
|
||||||
onDefaultsChanged?.({ concurrency: option })
|
|
||||||
notify(`已将导出并发数设为 ${option}`, true)
|
|
||||||
setShowExportConcurrencySelect(false)
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<span className="option-label">{option}</span>
|
|
||||||
</button>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5282,7 +5282,6 @@ function ExportPage() {
|
|||||||
<div className="export-defaults-modal-header">
|
<div className="export-defaults-modal-header">
|
||||||
<div>
|
<div>
|
||||||
<h3>更多导出设置</h3>
|
<h3>更多导出设置</h3>
|
||||||
<p>这里的配置与设置页中的导出设置保持一致,并会立即生效。</p>
|
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
className="close-icon-btn"
|
className="close-icon-btn"
|
||||||
|
|||||||
Reference in New Issue
Block a user