mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-03-25 07:16:51 +00:00
feat(export): compact task center entry
This commit is contained in:
@@ -20,6 +20,12 @@
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.export-top-bar {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
.export-section-title-row {
|
.export-section-title-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -255,6 +261,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.global-export-controls {
|
.global-export-controls {
|
||||||
|
flex: 1;
|
||||||
background: var(--card-bg);
|
background: var(--card-bg);
|
||||||
border: 1px solid var(--border-color);
|
border: 1px solid var(--border-color);
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
@@ -499,67 +506,53 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.task-center-control {
|
.secondary-btn {
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 4px;
|
|
||||||
min-width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.task-center-inline {
|
|
||||||
min-height: 34px;
|
|
||||||
border: 1px solid var(--border-color);
|
|
||||||
border-radius: 8px;
|
|
||||||
background: var(--bg-secondary);
|
|
||||||
padding: 0 8px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
gap: 6px;
|
|
||||||
flex-wrap: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.task-summary {
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 6px;
|
|
||||||
font-size: 11px;
|
|
||||||
color: var(--text-secondary);
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
min-width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.task-open-btn {
|
|
||||||
border: 1px solid var(--border-color);
|
|
||||||
background: var(--bg-primary);
|
|
||||||
border-radius: 7px;
|
border-radius: 7px;
|
||||||
padding: 3px 7px;
|
padding: 6px 9px;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
color: var(--text-secondary);
|
gap: 4px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-center-card {
|
||||||
|
min-width: 92px;
|
||||||
|
min-height: 42px;
|
||||||
|
border: 1px solid var(--border-color);
|
||||||
|
border-radius: 12px;
|
||||||
|
background: var(--card-bg);
|
||||||
|
color: var(--text-primary);
|
||||||
|
padding: 10px 12px;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 6px;
|
justify-content: center;
|
||||||
|
gap: 8px;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
transition: border-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
|
transition: border-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
border-color: var(--primary);
|
border-color: var(--primary);
|
||||||
color: var(--primary);
|
color: var(--primary);
|
||||||
|
transform: translateY(-1px);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.active-running {
|
&.has-alert {
|
||||||
border-color: rgba(255, 77, 79, 0.45);
|
border-color: rgba(255, 77, 79, 0.28);
|
||||||
color: #ff4d4f;
|
box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.08);
|
||||||
box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.16);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.task-running-badge {
|
.task-center-card-label {
|
||||||
min-width: 16px;
|
line-height: 1;
|
||||||
height: 16px;
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-center-card-badge {
|
||||||
|
min-width: 18px;
|
||||||
|
height: 18px;
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
background: #ff4d4f;
|
background: #ff4d4f;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
@@ -568,19 +561,10 @@
|
|||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 0 4px;
|
padding: 0 5px;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2);
|
box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.16);
|
||||||
animation: exportTaskBadgePulse 1.2s ease-in-out infinite;
|
animation: exportTaskBadgePulse 1.2s ease-in-out infinite;
|
||||||
}
|
|
||||||
|
|
||||||
.secondary-btn {
|
|
||||||
border-radius: 7px;
|
|
||||||
padding: 6px 9px;
|
|
||||||
font-size: 11px;
|
|
||||||
gap: 4px;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-card-grid {
|
.content-card-grid {
|
||||||
@@ -3288,6 +3272,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1360px) {
|
@media (max-width: 1360px) {
|
||||||
|
.export-top-bar {
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.global-export-controls {
|
.global-export-controls {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
@@ -3307,12 +3295,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 760px) {
|
@media (max-width: 760px) {
|
||||||
|
.export-top-bar {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: stretch;
|
||||||
|
}
|
||||||
|
|
||||||
.global-export-controls {
|
.global-export-controls {
|
||||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
}
|
}
|
||||||
|
|
||||||
.task-center-control {
|
.task-center-card {
|
||||||
grid-column: 1 / -1;
|
width: 100%;
|
||||||
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4884,6 +4884,7 @@ function ExportPage() {
|
|||||||
const isSnsCardStatsLoading = !hasSeededSnsStats
|
const isSnsCardStatsLoading = !hasSeededSnsStats
|
||||||
const taskRunningCount = tasks.filter(task => task.status === 'running').length
|
const taskRunningCount = tasks.filter(task => task.status === 'running').length
|
||||||
const taskQueuedCount = tasks.filter(task => task.status === 'queued').length
|
const taskQueuedCount = tasks.filter(task => task.status === 'queued').length
|
||||||
|
const taskCenterAlertCount = taskRunningCount + taskQueuedCount
|
||||||
const hasFilteredContacts = filteredContacts.length > 0
|
const hasFilteredContacts = filteredContacts.length > 0
|
||||||
const sessionLoadDetailUpdatedAt = useMemo(() => {
|
const sessionLoadDetailUpdatedAt = useMemo(() => {
|
||||||
let latest = 0
|
let latest = 0
|
||||||
@@ -5149,6 +5150,7 @@ function ExportPage() {
|
|||||||
return (
|
return (
|
||||||
<div className="export-board-page">
|
<div className="export-board-page">
|
||||||
<div className="export-top-panel">
|
<div className="export-top-panel">
|
||||||
|
<div className="export-top-bar">
|
||||||
<div className="global-export-controls">
|
<div className="global-export-controls">
|
||||||
<div className="path-control">
|
<div className="path-control">
|
||||||
<span className="control-label">导出位置</span>
|
<span className="control-label">导出位置</span>
|
||||||
@@ -5184,27 +5186,20 @@ function ExportPage() {
|
|||||||
await configService.setExportSessionNamePrefixEnabled(enabled)
|
await configService.setExportSessionNamePrefixEnabled(enabled)
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className="task-center-control">
|
|
||||||
<span className="control-label">任务中心</span>
|
|
||||||
<div className="task-center-inline">
|
|
||||||
<div className="task-summary">
|
|
||||||
<span>进行中 {taskRunningCount}</span>
|
|
||||||
<span>排队 {taskQueuedCount}</span>
|
|
||||||
<span>总计 {tasks.length}</span>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
className={`task-open-btn ${taskRunningCount > 0 ? 'active-running' : ''}`}
|
className={`task-center-card ${taskCenterAlertCount > 0 ? 'has-alert' : ''}`}
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => setIsTaskCenterOpen(true)}
|
onClick={() => setIsTaskCenterOpen(true)}
|
||||||
>
|
>
|
||||||
任务卡片
|
<span className="task-center-card-label">任务中心</span>
|
||||||
{taskRunningCount > 0 && <span className="task-running-badge">{taskRunningCount}</span>}
|
{taskCenterAlertCount > 0 && (
|
||||||
|
<span className="task-center-card-badge">{taskCenterAlertCount}</span>
|
||||||
|
)}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<TaskCenterModal
|
<TaskCenterModal
|
||||||
isOpen={isTaskCenterOpen}
|
isOpen={isTaskCenterOpen}
|
||||||
|
|||||||
Reference in New Issue
Block a user