mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-03-25 07:16:51 +00:00
feat(export): tailor content batch dialog and widen layout menu
This commit is contained in:
@@ -143,7 +143,9 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
top: calc(100% + 6px);
|
top: calc(100% + 6px);
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: auto;
|
||||||
|
width: clamp(300px, 36vw, 420px);
|
||||||
|
max-width: calc(100vw - 40px);
|
||||||
background: var(--bg-primary);
|
background: var(--bg-primary);
|
||||||
border: 1px solid var(--border-color);
|
border: 1px solid var(--border-color);
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
@@ -1453,6 +1455,13 @@
|
|||||||
gap: 6px;
|
gap: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.format-note {
|
||||||
|
margin: 0 0 8px;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 1.45;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
.format-card {
|
.format-card {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
|
|||||||
@@ -1487,6 +1487,11 @@ function ExportPage() {
|
|||||||
if (payload.scope === 'content' && payload.contentType) {
|
if (payload.scope === 'content' && payload.contentType) {
|
||||||
if (payload.contentType === 'text') {
|
if (payload.contentType === 'text') {
|
||||||
next.exportMedia = false
|
next.exportMedia = false
|
||||||
|
next.exportImages = false
|
||||||
|
next.exportVoices = false
|
||||||
|
next.exportVideos = false
|
||||||
|
next.exportEmojis = false
|
||||||
|
next.exportAvatars = true
|
||||||
} else {
|
} else {
|
||||||
next.exportMedia = true
|
next.exportMedia = true
|
||||||
next.exportImages = payload.contentType === 'image'
|
next.exportImages = payload.contentType === 'image'
|
||||||
@@ -1536,6 +1541,7 @@ function ExportPage() {
|
|||||||
if (contentType === 'text') {
|
if (contentType === 'text') {
|
||||||
return {
|
return {
|
||||||
...base,
|
...base,
|
||||||
|
exportAvatars: true,
|
||||||
exportMedia: false,
|
exportMedia: false,
|
||||||
exportImages: false,
|
exportImages: false,
|
||||||
exportVoices: false,
|
exportVoices: false,
|
||||||
@@ -2365,6 +2371,10 @@ function ExportPage() {
|
|||||||
const formatCandidateOptions = exportDialog.scope === 'sns'
|
const formatCandidateOptions = exportDialog.scope === 'sns'
|
||||||
? formatOptions.filter(option => option.value === 'html' || option.value === 'json')
|
? formatOptions.filter(option => option.value === 'html' || option.value === 'json')
|
||||||
: formatOptions
|
: formatOptions
|
||||||
|
const isContentScopeDialog = exportDialog.scope === 'content'
|
||||||
|
const isContentTextDialog = isContentScopeDialog && exportDialog.contentType === 'text'
|
||||||
|
const shouldShowFormatSection = !isContentScopeDialog || isContentTextDialog
|
||||||
|
const shouldShowMediaSection = !isContentScopeDialog
|
||||||
const isTabCountComputing = isSharedTabCountsLoading && !isSharedTabCountsReady
|
const isTabCountComputing = isSharedTabCountsLoading && !isSharedTabCountsReady
|
||||||
const isSessionCardStatsLoading = isBaseConfigLoading || (isSharedTabCountsLoading && !isSharedTabCountsReady)
|
const isSessionCardStatsLoading = isBaseConfigLoading || (isSharedTabCountsLoading && !isSharedTabCountsReady)
|
||||||
const isSnsCardStatsLoading = !hasSeededSnsStats
|
const isSnsCardStatsLoading = !hasSeededSnsStats
|
||||||
@@ -2948,21 +2958,26 @@ function ExportPage() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="dialog-section">
|
{shouldShowFormatSection && (
|
||||||
<h4>对话文本导出格式选择</h4>
|
<div className="dialog-section">
|
||||||
<div className="format-grid">
|
<h4>对话文本导出格式选择</h4>
|
||||||
{formatCandidateOptions.map(option => (
|
{isContentTextDialog && (
|
||||||
<button
|
<div className="format-note">说明:此模式默认导出头像,不导出图片、语音、视频、表情包等媒体内容。</div>
|
||||||
key={option.value}
|
)}
|
||||||
className={`format-card ${options.format === option.value ? 'active' : ''}`}
|
<div className="format-grid">
|
||||||
onClick={() => setOptions(prev => ({ ...prev, format: option.value }))}
|
{formatCandidateOptions.map(option => (
|
||||||
>
|
<button
|
||||||
<div className="format-label">{option.label}</div>
|
key={option.value}
|
||||||
<div className="format-desc">{option.desc}</div>
|
className={`format-card ${options.format === option.value ? 'active' : ''}`}
|
||||||
</button>
|
onClick={() => setOptions(prev => ({ ...prev, format: option.value }))}
|
||||||
))}
|
>
|
||||||
|
<div className="format-label">{option.label}</div>
|
||||||
|
<div className="format-desc">{option.desc}</div>
|
||||||
|
</button>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
)}
|
||||||
|
|
||||||
<div className="dialog-section">
|
<div className="dialog-section">
|
||||||
<h4>时间范围</h4>
|
<h4>时间范围</h4>
|
||||||
@@ -3018,17 +3033,19 @@ function ExportPage() {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="dialog-section">
|
{shouldShowMediaSection && (
|
||||||
<h4>媒体与头像</h4>
|
<div className="dialog-section">
|
||||||
<div className="media-check-grid">
|
<h4>媒体与头像</h4>
|
||||||
<label><input type="checkbox" checked={options.exportImages} onChange={event => setOptions(prev => ({ ...prev, exportImages: event.target.checked }))} /> 图片</label>
|
<div className="media-check-grid">
|
||||||
<label><input type="checkbox" checked={options.exportVoices} onChange={event => setOptions(prev => ({ ...prev, exportVoices: event.target.checked }))} /> 语音</label>
|
<label><input type="checkbox" checked={options.exportImages} onChange={event => setOptions(prev => ({ ...prev, exportImages: event.target.checked }))} /> 图片</label>
|
||||||
<label><input type="checkbox" checked={options.exportVideos} onChange={event => setOptions(prev => ({ ...prev, exportVideos: event.target.checked }))} /> 视频</label>
|
<label><input type="checkbox" checked={options.exportVoices} onChange={event => setOptions(prev => ({ ...prev, exportVoices: event.target.checked }))} /> 语音</label>
|
||||||
<label><input type="checkbox" checked={options.exportEmojis} onChange={event => setOptions(prev => ({ ...prev, exportEmojis: event.target.checked }))} /> 表情包</label>
|
<label><input type="checkbox" checked={options.exportVideos} onChange={event => setOptions(prev => ({ ...prev, exportVideos: event.target.checked }))} /> 视频</label>
|
||||||
<label><input type="checkbox" checked={options.exportVoiceAsText} onChange={event => setOptions(prev => ({ ...prev, exportVoiceAsText: event.target.checked }))} /> 语音转文字</label>
|
<label><input type="checkbox" checked={options.exportEmojis} onChange={event => setOptions(prev => ({ ...prev, exportEmojis: event.target.checked }))} /> 表情包</label>
|
||||||
<label><input type="checkbox" checked={options.exportAvatars} onChange={event => setOptions(prev => ({ ...prev, exportAvatars: event.target.checked }))} /> 导出头像</label>
|
<label><input type="checkbox" checked={options.exportVoiceAsText} onChange={event => setOptions(prev => ({ ...prev, exportVoiceAsText: event.target.checked }))} /> 语音转文字</label>
|
||||||
|
<label><input type="checkbox" checked={options.exportAvatars} onChange={event => setOptions(prev => ({ ...prev, exportAvatars: event.target.checked }))} /> 导出头像</label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
)}
|
||||||
|
|
||||||
<div className="dialog-section">
|
<div className="dialog-section">
|
||||||
<h4>发送者名称显示</h4>
|
<h4>发送者名称显示</h4>
|
||||||
|
|||||||
Reference in New Issue
Block a user