feat(export): hide display-name section for selected batch dialogs

This commit is contained in:
tisonhuang
2026-03-04 20:41:17 +08:00
parent ab6db27ea7
commit 7858b40ce4

View File

@@ -3492,6 +3492,18 @@ function ExportPage() {
const isContentTextDialog = isContentScopeDialog && exportDialog.contentType === 'text' const isContentTextDialog = isContentScopeDialog && exportDialog.contentType === 'text'
const shouldShowFormatSection = !isContentScopeDialog || isContentTextDialog const shouldShowFormatSection = !isContentScopeDialog || isContentTextDialog
const shouldShowMediaSection = !isContentScopeDialog const shouldShowMediaSection = !isContentScopeDialog
const shouldShowDisplayNameSection = !(
exportDialog.scope === 'sns' ||
(
exportDialog.scope === 'content' &&
(
exportDialog.contentType === 'voice' ||
exportDialog.contentType === 'image' ||
exportDialog.contentType === 'video' ||
exportDialog.contentType === 'emoji'
)
)
)
const isTabCountComputing = isSharedTabCountsLoading && !isSharedTabCountsReady const isTabCountComputing = isSharedTabCountsLoading && !isSharedTabCountsReady
const isSnsCardStatsLoading = !hasSeededSnsStats const isSnsCardStatsLoading = !hasSeededSnsStats
const taskRunningCount = tasks.filter(task => task.status === 'running').length const taskRunningCount = tasks.filter(task => task.status === 'running').length
@@ -4301,27 +4313,29 @@ function ExportPage() {
</div> </div>
)} )}
<div className="dialog-section"> {shouldShowDisplayNameSection && (
<h4></h4> <div className="dialog-section">
<div className="display-name-options" role="radiogroup" aria-label="发送者名称显示"> <h4></h4>
{displayNameOptions.map(option => { <div className="display-name-options" role="radiogroup" aria-label="发送者名称显示">
const isActive = options.displayNamePreference === option.value {displayNameOptions.map(option => {
return ( const isActive = options.displayNamePreference === option.value
<button return (
key={option.value} <button
type="button" key={option.value}
role="radio" type="button"
aria-checked={isActive} role="radio"
className={`display-name-item ${isActive ? 'active' : ''}`} aria-checked={isActive}
onClick={() => setOptions(prev => ({ ...prev, displayNamePreference: option.value }))} className={`display-name-item ${isActive ? 'active' : ''}`}
> onClick={() => setOptions(prev => ({ ...prev, displayNamePreference: option.value }))}
<span>{option.label}</span> >
<small>{option.desc}</small> <span>{option.label}</span>
</button> <small>{option.desc}</small>
) </button>
})} )
})}
</div>
</div> </div>
</div> )}
</div> </div>
<div className="dialog-actions"> <div className="dialog-actions">