1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-08-27 19:55:18 +02:00

Add a reload button to error boundary

There are sometimes edge cases on iOS which cause the app to crash,
it’s good to have a reload button as there’s no browser chrome (reload,
back, forward) in an iOS standalone PWA.
This commit is contained in:
nimbleghost 2023-06-17 22:15:02 +02:00
parent fafe478e5c
commit 9ba733d4e0
2 changed files with 7 additions and 2 deletions
web/src/components

View file

@ -101,11 +101,15 @@ class ErrorBoundaryImpl extends React.Component {
}}
/>
</p>
<p>
<div style={{ display: "flex", gap: 5 }}>
<Button variant="outlined" onClick={() => this.copyStack()}>
{t("error_boundary_button_copy_stack_trace")}
</Button>
</p>
<Button variant="outlined" onClick={() => window.location.reload()}>
{t("error_boundary_button_reload_ntfy")}
</Button>
</div>
<h3>{t("error_boundary_stack_trace")}</h3>
{this.state.niceStack ? (
<pre>{this.state.niceStack}</pre>