diff --git a/frontend/src/components/ChatBox/ChatBox.tsx b/frontend/src/components/ChatBox/ChatBox.tsx index 88aea43e5..1fe3f6e74 100644 --- a/frontend/src/components/ChatBox/ChatBox.tsx +++ b/frontend/src/components/ChatBox/ChatBox.tsx @@ -88,7 +88,7 @@ function ChatBox({ function inputKeyUp(event: KeyboardEvent) { // shift+enter shouldn't send message - if (event.key === "Enter" && !event.shiftKey) { + if (event.key === "Enter" && !event.shiftKey && !isSendingMessage) { // asynchronously send the message void sendChatMessage(); } diff --git a/frontend/src/components/ThemedButtons/LoadingButton.tsx b/frontend/src/components/ThemedButtons/LoadingButton.tsx index 67dd4c0fd..734f91863 100644 --- a/frontend/src/components/ThemedButtons/LoadingButton.tsx +++ b/frontend/src/components/ThemedButtons/LoadingButton.tsx @@ -9,7 +9,11 @@ function LoadingButton({ isLoading?: boolean; }) { return ( - + {isLoading ? ( diff --git a/frontend/src/components/ThemedButtons/ThemedButton.css b/frontend/src/components/ThemedButtons/ThemedButton.css index 85e8e494a..b72379437 100644 --- a/frontend/src/components/ThemedButtons/ThemedButton.css +++ b/frontend/src/components/ThemedButtons/ThemedButton.css @@ -27,7 +27,7 @@ color: var(--main-button-active-hover-text-colour); } -.themed-button[disabled] { +.themed-button.appearsDifferentWhenDisabled[disabled] { background-color: var(--main-button-disabled-background-colour); color: var(--main-button-disabled-text-colour); cursor: default; diff --git a/frontend/src/components/ThemedButtons/ThemedButton.tsx b/frontend/src/components/ThemedButtons/ThemedButton.tsx index 74b79d2c0..c1007c454 100644 --- a/frontend/src/components/ThemedButtons/ThemedButton.tsx +++ b/frontend/src/components/ThemedButtons/ThemedButton.tsx @@ -7,6 +7,7 @@ export interface ThemedButtonProps { isDisabled?: boolean; isSelected?: boolean; onClick: () => void; + appearsDifferentWhenDisabled?: boolean; } function ThemedButton({ @@ -14,8 +15,12 @@ function ThemedButton({ onClick, isDisabled = false, isSelected = false, + appearsDifferentWhenDisabled = true, }: ThemedButtonProps) { - const buttonClass = clsx("themed-button", { selected: isSelected }); + const buttonClass = clsx("themed-button", { + selected: isSelected, + appearsDifferentWhenDisabled: appearsDifferentWhenDisabled, + }); return (