mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-03-25 07:16:51 +00:00
fix(chat): hide export/transcribe/decrypt actions in standalone chat
This commit is contained in:
@@ -3703,7 +3703,7 @@ function ChatPage(props: ChatPageProps) {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="header-actions">
|
<div className="header-actions">
|
||||||
{isGroupChatSession(currentSession.username) && (
|
{!standaloneSessionWindow && isGroupChatSession(currentSession.username) && (
|
||||||
<button
|
<button
|
||||||
className="icon-btn group-analytics-btn"
|
className="icon-btn group-analytics-btn"
|
||||||
onClick={handleGroupAnalytics}
|
onClick={handleGroupAnalytics}
|
||||||
@@ -3721,56 +3721,62 @@ function ChatPage(props: ChatPageProps) {
|
|||||||
<Users size={18} />
|
<Users size={18} />
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
<button
|
{!standaloneSessionWindow && (
|
||||||
className={`icon-btn export-session-btn${isExportActionBusy ? ' exporting' : ''}`}
|
<button
|
||||||
onClick={handleExportCurrentSession}
|
className={`icon-btn export-session-btn${isExportActionBusy ? ' exporting' : ''}`}
|
||||||
disabled={!currentSessionId || isExportActionBusy}
|
onClick={handleExportCurrentSession}
|
||||||
title={isCurrentSessionExporting ? '导出中' : isPreparingExportDialog ? '正在准备导出模块' : '导出当前会话'}
|
disabled={!currentSessionId || isExportActionBusy}
|
||||||
>
|
title={isCurrentSessionExporting ? '导出中' : isPreparingExportDialog ? '正在准备导出模块' : '导出当前会话'}
|
||||||
{isExportActionBusy ? (
|
>
|
||||||
<Loader2 size={18} className="spin" />
|
{isExportActionBusy ? (
|
||||||
) : (
|
<Loader2 size={18} className="spin" />
|
||||||
<Download size={18} />
|
) : (
|
||||||
)}
|
<Download size={18} />
|
||||||
</button>
|
)}
|
||||||
<button
|
</button>
|
||||||
className={`icon-btn batch-transcribe-btn${isBatchTranscribing ? ' transcribing' : ''}`}
|
)}
|
||||||
onClick={() => {
|
{!standaloneSessionWindow && (
|
||||||
if (isBatchTranscribing) {
|
<button
|
||||||
setShowBatchProgress(true)
|
className={`icon-btn batch-transcribe-btn${isBatchTranscribing ? ' transcribing' : ''}`}
|
||||||
} else {
|
onClick={() => {
|
||||||
handleBatchTranscribe()
|
if (isBatchTranscribing) {
|
||||||
}
|
setShowBatchProgress(true)
|
||||||
}}
|
} else {
|
||||||
disabled={!currentSessionId}
|
handleBatchTranscribe()
|
||||||
title={isBatchTranscribing ? `批量转写中 (${batchTranscribeProgress.current}/${batchTranscribeProgress.total}),点击查看进度` : '批量语音转文字'}
|
}
|
||||||
>
|
}}
|
||||||
{isBatchTranscribing ? (
|
disabled={!currentSessionId}
|
||||||
<Loader2 size={18} className="spin" />
|
title={isBatchTranscribing ? `批量转写中 (${batchTranscribeProgress.current}/${batchTranscribeProgress.total}),点击查看进度` : '批量语音转文字'}
|
||||||
) : (
|
>
|
||||||
<Mic size={18} />
|
{isBatchTranscribing ? (
|
||||||
)}
|
<Loader2 size={18} className="spin" />
|
||||||
</button>
|
) : (
|
||||||
<button
|
<Mic size={18} />
|
||||||
className={`icon-btn batch-decrypt-btn${isBatchDecrypting ? ' transcribing' : ''}`}
|
)}
|
||||||
onClick={() => {
|
</button>
|
||||||
if (isBatchDecrypting) {
|
)}
|
||||||
setShowBatchDecryptToast(true)
|
{!standaloneSessionWindow && (
|
||||||
} else {
|
<button
|
||||||
handleBatchDecrypt()
|
className={`icon-btn batch-decrypt-btn${isBatchDecrypting ? ' transcribing' : ''}`}
|
||||||
}
|
onClick={() => {
|
||||||
}}
|
if (isBatchDecrypting) {
|
||||||
disabled={!currentSessionId}
|
setShowBatchDecryptToast(true)
|
||||||
title={isBatchDecrypting
|
} else {
|
||||||
? `批量解密中 (${batchDecryptProgress.current}/${batchDecryptProgress.total}),点击查看进度`
|
handleBatchDecrypt()
|
||||||
: '批量解密图片'}
|
}
|
||||||
>
|
}}
|
||||||
{isBatchDecrypting ? (
|
disabled={!currentSessionId}
|
||||||
<Loader2 size={18} className="spin" />
|
title={isBatchDecrypting
|
||||||
) : (
|
? `批量解密中 (${batchDecryptProgress.current}/${batchDecryptProgress.total}),点击查看进度`
|
||||||
<ImageIcon size={18} />
|
: '批量解密图片'}
|
||||||
)}
|
>
|
||||||
</button>
|
{isBatchDecrypting ? (
|
||||||
|
<Loader2 size={18} className="spin" />
|
||||||
|
) : (
|
||||||
|
<ImageIcon size={18} />
|
||||||
|
)}
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
<div className="jump-calendar-anchor" ref={jumpCalendarWrapRef}>
|
<div className="jump-calendar-anchor" ref={jumpCalendarWrapRef}>
|
||||||
<button
|
<button
|
||||||
className={`icon-btn jump-to-time-btn ${showJumpPopover ? 'active' : ''}`}
|
className={`icon-btn jump-to-time-btn ${showJumpPopover ? 'active' : ''}`}
|
||||||
|
|||||||
Reference in New Issue
Block a user