mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-09 00:33:38 -05:00
fix: styling fixes (#721)
This commit is contained in:
parent
c2a729a5e0
commit
7cf7402cea
3 changed files with 28 additions and 10 deletions
|
@ -24,7 +24,6 @@ const PermissionEntry = styled.label<{ disabled?: boolean }>`
|
|||
width: 100%;
|
||||
margin: 8px 0;
|
||||
display: flex;
|
||||
font-size: 1.1em;
|
||||
align-items: center;
|
||||
|
||||
.title {
|
||||
|
|
|
@ -5,19 +5,33 @@ import styled from "styled-components/macro";
|
|||
|
||||
import { useEffect, useErrorBoundary, useState } from "preact/hooks";
|
||||
|
||||
import { Button } from "@revoltchat/ui";
|
||||
|
||||
import { GIT_REVISION } from "../revision";
|
||||
|
||||
const CrashContainer = styled.div`
|
||||
// defined for the Button component
|
||||
--error: #ed4245;
|
||||
--primary-background: #2d2d2d;
|
||||
|
||||
height: 100%;
|
||||
padding: 12px;
|
||||
|
||||
background: black;
|
||||
background: #191919;
|
||||
color: white;
|
||||
|
||||
h3 {
|
||||
margin: 0;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
code {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.buttonDivider {
|
||||
margin: 8px;
|
||||
}
|
||||
`;
|
||||
|
||||
interface Props {
|
||||
|
@ -65,15 +79,17 @@ export default function ErrorBoundary({ children, section }: Props) {
|
|||
{section === "client" ? (
|
||||
<>
|
||||
<h3>Client Crash Report</h3>
|
||||
<button onClick={ignoreError}>
|
||||
<Button onClick={ignoreError}>
|
||||
Ignore error and try to reload app
|
||||
</button>
|
||||
<button onClick={reset}>
|
||||
{confirm ? "Are you sure?" : "Reset all app data"}
|
||||
</button>
|
||||
<button onClick={() => location.reload()}>
|
||||
</Button>
|
||||
<div class="buttonDivider" />
|
||||
<Button onClick={() => location.reload()}>
|
||||
Refresh page
|
||||
</button>
|
||||
</Button>
|
||||
<div class="buttonDivider" />
|
||||
<Button palette="error" onClick={reset}>
|
||||
{confirm ? "Are you sure?" : "Reset all app data"}
|
||||
</Button>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
|
@ -83,6 +99,9 @@ export default function ErrorBoundary({ children, section }: Props) {
|
|||
</button>
|
||||
</>
|
||||
)}
|
||||
<br />
|
||||
<br />
|
||||
<div>Revolt has crashed. Here's the error:</div>
|
||||
<pre>
|
||||
<code>{error?.stack}</code>
|
||||
</pre>
|
||||
|
|
|
@ -45,7 +45,7 @@ export default function Developer() {
|
|||
</div>
|
||||
|
||||
<div style={{ padding: "16px" }}>
|
||||
<a onClick={() => setCrash(true)}>click to crash app</a>
|
||||
<a style={"cursor: pointer;"} onClick={() => setCrash(true)}>click to crash app</a>
|
||||
{crash && (window as any).sus.sus()}
|
||||
{/*<span>
|
||||
<b>Voice Status:</b> {VoiceStatus[voice.status]}
|
||||
|
|
Loading…
Reference in a new issue