Don't show option to submit bug reports if no endpoint configured

This commit is contained in:
David Baker 2022-12-22 14:12:49 +00:00
parent 891ff86b49
commit de0f2e65a5
2 changed files with 12 additions and 6 deletions

View file

@ -9,6 +9,7 @@ import { useSubmitRageshake } from "./settings/submit-rageshake";
import { ErrorMessage } from "./input/Input";
import styles from "./FullScreenView.module.css";
import { translatedError, TranslatedError } from "./TranslatedError";
import { Config } from "./config/Config";
interface FullScreenViewProps {
className?: string;
@ -98,7 +99,7 @@ export function CrashView() {
logsComponent = <div>{t("Thanks! We'll get right on it.")}</div>;
} else if (sending) {
logsComponent = <div>{t("Sending…")}</div>;
} else {
} else if (Config.get().rageshake?.submit_url) {
logsComponent = (
<Button
size="lg"
@ -115,7 +116,9 @@ export function CrashView() {
<FullScreenView>
<Trans>
<h1>Oops, something's gone wrong.</h1>
<p>Submitting debug logs will help us track down the problem.</p>
{Config.get().rageshake?.submit_url && (
<p>Submitting debug logs will help us track down the problem.</p>
)}
</Trans>
<div className={styles.sendLogsSection}>{logsComponent}</div>
{error && (

View file

@ -32,6 +32,7 @@ import { SettingsModal } from "../settings/SettingsModal";
import { InviteModal } from "./InviteModal";
import { TooltipTrigger } from "../Tooltip";
import { FeedbackModal } from "./FeedbackModal";
import { Config } from "../config/Config";
interface Props {
roomIdOrAlias: string;
@ -117,10 +118,12 @@ export function OverflowMenu({
<SettingsIcon />
<span>{t("Settings")}</span>
</Item>
<Item key="feedback" textValue={t("Submit feedback")}>
<FeedbackIcon />
<span>{t("Submit feedback")}</span>
</Item>
{Config.get().rageshake?.submit_url && (
<Item key="feedback" textValue={t("Submit feedback")}>
<FeedbackIcon />
<span>{t("Submit feedback")}</span>
</Item>
)}
</Menu>
)}
</PopoverMenuTrigger>