Use libsignal-client for parsing crash reports

This commit is contained in:
Fedor Indutny 2024-02-13 13:41:48 -08:00 committed by GitHub
parent d7f0978c6d
commit 9ad6d5b66b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 86 additions and 241 deletions

View file

@ -24,9 +24,9 @@ export function Basic(): JSX.Element {
<CrashReportDialog
i18n={i18n}
isPending={isPending}
uploadCrashReports={async () => {
writeCrashReportsToLog={async () => {
setIsPending(true);
action('uploadCrashReports')();
action('writeCrashReportsToLog')();
await sleep(5000);
setIsPending(false);
}}

View file

@ -9,7 +9,7 @@ import { Modal } from './Modal';
import { Spinner } from './Spinner';
type PropsActionsType = {
uploadCrashReports: () => void;
writeCrashReportsToLog: () => void;
eraseCrashReports: () => void;
};
@ -19,7 +19,7 @@ export type PropsType = {
} & PropsActionsType;
export function CrashReportDialog(props: Readonly<PropsType>): JSX.Element {
const { i18n, isPending, uploadCrashReports, eraseCrashReports } = props;
const { i18n, isPending, writeCrashReportsToLog, eraseCrashReports } = props;
const onEraseClick = (event: React.MouseEvent) => {
event.preventDefault();
@ -30,7 +30,7 @@ export function CrashReportDialog(props: Readonly<PropsType>): JSX.Element {
const onSubmitClick = (event: React.MouseEvent) => {
event.preventDefault();
uploadCrashReports();
writeCrashReportsToLog();
};
const footer = (

View file

@ -240,7 +240,7 @@ const useProps = (overrideProps: OverridePropsType = {}): PropsType => {
<CrashReportDialog
i18n={i18n}
isPending={false}
uploadCrashReports={action('uploadCrashReports')}
writeCrashReportsToLog={action('writeCrashReportsToLog')}
eraseCrashReports={action('eraseCrashReports')}
/>
),