mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-10-13 18:22:49 +03:00
don't edit a chat message while a reply streams
The edit button stayed active while a reply streamed. `submitConversation` returns early while loading, but the message bubble still closed its editor, so the edit was silently lost. The edit button is hidden while a reply streams, and an editor that's already open keeps its draft with send disabled until the reply ends.
This commit is contained in:
@@ -133,7 +133,7 @@ export function MessageBubble({
|
|||||||
variant="select"
|
variant="select"
|
||||||
size="icon"
|
size="icon"
|
||||||
className="size-9 rounded-full"
|
className="size-9 rounded-full"
|
||||||
disabled={!draftContent.trim()}
|
disabled={!draftContent.trim() || onEditSubmit == null}
|
||||||
onClick={handleEditSubmit}
|
onClick={handleEditSubmit}
|
||||||
aria-label={t("send")}
|
aria-label={t("send")}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -362,7 +362,7 @@ export default function ChatPage() {
|
|||||||
role="user"
|
role="user"
|
||||||
content={msg.content}
|
content={msg.content}
|
||||||
messageIndex={i}
|
messageIndex={i}
|
||||||
onEditSubmit={handleEditSubmit}
|
onEditSubmit={isLoading ? undefined : handleEditSubmit}
|
||||||
isComplete
|
isComplete
|
||||||
showStats={showStats}
|
showStats={showStats}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user