chatbox 必须输入文字

This commit is contained in:
北枳 2025-08-26 00:52:24 +08:00
parent f9c1a70b8f
commit dbb6493712

View File

@ -225,12 +225,12 @@ export function InputBar({ onSend, setVideoPreview, initialVideoUrl, initialVide
/>
</label>
{/* 发送按钮 */}
{/* 发送按钮 必须有文字 */}
<button
onClick={handleSend}
className="inline-flex items-center gap-2 p-2 rounded-full bg-[#f1f3f4] text-[#25294b] shadow disabled:text-white/25 disabled:border disabled:border-white/10 disabled:bg-[#1b1b1b80] disabled:cursor-not-allowed"
data-alt="send-button"
disabled={!text.trim() && !imageUrl && !videoUrl}
disabled={!text.trim()}
>
<ArrowUp size={18} />
</button>
@ -241,7 +241,7 @@ export function InputBar({ onSend, setVideoPreview, initialVideoUrl, initialVide
onClick={handleSend}
className="inline-flex items-center gap-2 p-2 my-2 rounded-full bg-[#f1f3f4] text-[#25294b] shadow disabled:text-white/25 disabled:border disabled:border-white/10 disabled:bg-[#1b1b1b80] disabled:cursor-not-allowed"
data-alt="send-button"
disabled={!text.trim() && !imageUrl && !videoUrl}
disabled={!text.trim()}
>
<ArrowUp size={18} />
</button>