feat(export): tailor content batch dialog and widen layout menu

This commit is contained in:
tisonhuang
2026-03-02 15:33:44 +08:00
parent 0545be3244
commit 98a0233c4d
2 changed files with 51 additions and 25 deletions

View File

@@ -143,7 +143,9 @@
position: absolute;
top: calc(100% + 6px);
left: 0;
right: 0;
right: auto;
width: clamp(300px, 36vw, 420px);
max-width: calc(100vw - 40px);
background: var(--bg-primary);
border: 1px solid var(--border-color);
border-radius: 12px;
@@ -1453,6 +1455,13 @@
gap: 6px;
}
.format-note {
margin: 0 0 8px;
font-size: 12px;
line-height: 1.45;
color: var(--text-secondary);
}
.format-card {
width: 100%;
min-height: 0;

View File

@@ -1487,6 +1487,11 @@ function ExportPage() {
if (payload.scope === 'content' && payload.contentType) {
if (payload.contentType === 'text') {
next.exportMedia = false
next.exportImages = false
next.exportVoices = false
next.exportVideos = false
next.exportEmojis = false
next.exportAvatars = true
} else {
next.exportMedia = true
next.exportImages = payload.contentType === 'image'
@@ -1536,6 +1541,7 @@ function ExportPage() {
if (contentType === 'text') {
return {
...base,
exportAvatars: true,
exportMedia: false,
exportImages: false,
exportVoices: false,
@@ -2365,6 +2371,10 @@ function ExportPage() {
const formatCandidateOptions = exportDialog.scope === 'sns'
? formatOptions.filter(option => option.value === 'html' || option.value === 'json')
: formatOptions
const isContentScopeDialog = exportDialog.scope === 'content'
const isContentTextDialog = isContentScopeDialog && exportDialog.contentType === 'text'
const shouldShowFormatSection = !isContentScopeDialog || isContentTextDialog
const shouldShowMediaSection = !isContentScopeDialog
const isTabCountComputing = isSharedTabCountsLoading && !isSharedTabCountsReady
const isSessionCardStatsLoading = isBaseConfigLoading || (isSharedTabCountsLoading && !isSharedTabCountsReady)
const isSnsCardStatsLoading = !hasSeededSnsStats
@@ -2948,8 +2958,12 @@ function ExportPage() {
</div>
</div>
{shouldShowFormatSection && (
<div className="dialog-section">
<h4></h4>
{isContentTextDialog && (
<div className="format-note"></div>
)}
<div className="format-grid">
{formatCandidateOptions.map(option => (
<button
@@ -2963,6 +2977,7 @@ function ExportPage() {
))}
</div>
</div>
)}
<div className="dialog-section">
<h4></h4>
@@ -3018,6 +3033,7 @@ function ExportPage() {
)}
</div>
{shouldShowMediaSection && (
<div className="dialog-section">
<h4></h4>
<div className="media-check-grid">
@@ -3029,6 +3045,7 @@ function ExportPage() {
<label><input type="checkbox" checked={options.exportAvatars} onChange={event => setOptions(prev => ({ ...prev, exportAvatars: event.target.checked }))} /> </label>
</div>
</div>
)}
<div className="dialog-section">
<h4></h4>