Fix logs component states
Also just display text when sending which makes the button jump around a bit but avoids hardcoding the width
This commit is contained in:
@@ -16,7 +16,6 @@ limitations under the License.
|
|||||||
|
|
||||||
.rageshakeControl {
|
.rageshakeControl {
|
||||||
height: 50px;
|
height: 50px;
|
||||||
width: 176px;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,14 +40,14 @@ export const RageshakeButton = ({ description }: Props) => {
|
|||||||
if (!Config.get().rageshake?.submit_url) return null;
|
if (!Config.get().rageshake?.submit_url) return null;
|
||||||
|
|
||||||
let logsComponent: JSX.Element | null = null;
|
let logsComponent: JSX.Element | null = null;
|
||||||
if (sent) {
|
if (sending) {
|
||||||
|
logsComponent = <span>{t("Sending…")}</span>;
|
||||||
|
} else if (sent) {
|
||||||
logsComponent = <div>{t("Thanks!")}</div>;
|
logsComponent = <div>{t("Thanks!")}</div>;
|
||||||
} else {
|
} else {
|
||||||
let caption = t("Send debug logs");
|
let caption = t("Send debug logs");
|
||||||
if (error) {
|
if (error) {
|
||||||
caption = t("Retry sending logs");
|
caption = t("Retry sending logs");
|
||||||
} else if (sending) {
|
|
||||||
logsComponent = <span>{t("Sending…")}</span>;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
logsComponent = (
|
logsComponent = (
|
||||||
|
|||||||
Reference in New Issue
Block a user