From 8e6380db0b68b93bdd8feebf6ff4f83ef6435b17 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 24 Jul 2023 21:33:13 +0100 Subject: [PATCH] Fix logs component states Also just display text when sending which makes the button jump around a bit but avoids hardcoding the width --- src/settings/RageshakeButton.module.css | 1 - src/settings/RageshakeButton.tsx | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/settings/RageshakeButton.module.css b/src/settings/RageshakeButton.module.css index 66d0e2d9..5a621b6c 100644 --- a/src/settings/RageshakeButton.module.css +++ b/src/settings/RageshakeButton.module.css @@ -16,7 +16,6 @@ limitations under the License. .rageshakeControl { height: 50px; - width: 176px; text-align: center; vertical-align: middle; } diff --git a/src/settings/RageshakeButton.tsx b/src/settings/RageshakeButton.tsx index b6b045d8..599c565d 100644 --- a/src/settings/RageshakeButton.tsx +++ b/src/settings/RageshakeButton.tsx @@ -40,14 +40,14 @@ export const RageshakeButton = ({ description }: Props) => { if (!Config.get().rageshake?.submit_url) return null; let logsComponent: JSX.Element | null = null; - if (sent) { + if (sending) { + logsComponent = {t("Sending…")}; + } else if (sent) { logsComponent =
{t("Thanks!")}
; } else { let caption = t("Send debug logs"); if (error) { caption = t("Retry sending logs"); - } else if (sending) { - logsComponent = {t("Sending…")}; } logsComponent = (