Add debug log url when submitting it to Support

This commit is contained in:
Fedor Indutny 2022-06-02 16:24:35 -07:00 committed by GitHub
parent e09d148c1d
commit ecdc583f2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 104 additions and 49 deletions

View file

@ -12,6 +12,7 @@ import { ToastDebugLogError } from './ToastDebugLogError';
import { ToastLinkCopied } from './ToastLinkCopied';
import { ToastLoadingFullLogs } from './ToastLoadingFullLogs';
import { openLinkInWebBrowser } from '../util/openLinkInWebBrowser';
import { createSupportUrl } from '../util/createSupportUrl';
import { useEscapeHandling } from '../hooks/useEscapeHandling';
enum LoadState {
@ -126,6 +127,13 @@ export const DebugLogWindow = ({
setToastType(ToastType.Copied);
};
const supportURL = createSupportUrl({
locale: i18n.getLocale(),
query: {
debugLog: publicLogURL,
},
});
return (
<div className="DebugLogWindow">
<div>
@ -144,11 +152,7 @@ export const DebugLogWindow = ({
</div>
<div className="DebugLogWindow__footer">
<Button
onClick={() => {
openLinkInWebBrowser(
'https://support.signal.org/hc/requests/new'
);
}}
onClick={() => openLinkInWebBrowser(supportURL)}
variant={ButtonVariant.Secondary}
>
{i18n('reportIssue')}