mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 10:10:30 +08:00
Implement new design
Co-authored-by: dnlklmn <pelicansinberlin@gmail.com> Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
This commit is contained in:
@@ -1,36 +1,47 @@
|
||||
<script lang="ts">
|
||||
import Clipboard from "@app/components/Clipboard.svelte";
|
||||
import Command from "./Command.svelte";
|
||||
import Icon from "./Icon.svelte";
|
||||
|
||||
export let message: string;
|
||||
export let stackTrace: string | undefined = undefined;
|
||||
export let error: any | undefined = undefined;
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.error {
|
||||
align-items: center;
|
||||
background-color: var(--color-negative-3);
|
||||
border-radius: inherit;
|
||||
color: var(--color-negative);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
font-family: var(--font-family-sans-serif);
|
||||
font-size: inherit;
|
||||
padding: 1rem;
|
||||
width: 100%;
|
||||
border-radius: var(--border-radius-small);
|
||||
gap: 1rem;
|
||||
}
|
||||
.stack-trace {
|
||||
display: flex;
|
||||
align-self: flex-end;
|
||||
|
||||
.help {
|
||||
font-size: var(--font-size-small);
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="error">
|
||||
<Icon name="alert" size="48" />
|
||||
{message}
|
||||
{#if stackTrace}
|
||||
<div class="stack-trace">
|
||||
<Clipboard
|
||||
small
|
||||
tooltip="Copy error to clipboard"
|
||||
text={JSON.stringify({ errorMessage: message, stackTrace }, null, 2)} />
|
||||
{#if error}
|
||||
<div class="help">
|
||||
If you need help resolving this issue, copy the error message
|
||||
<br />
|
||||
below and send it to us on
|
||||
<a class="txt-link" href="https://radicle.zulipchat.com/" target="_blank">
|
||||
radicle.zulipchat.com
|
||||
</a>
|
||||
</div>
|
||||
<div style:max-width="25rem">
|
||||
<Command
|
||||
command={JSON.stringify({ message: error.message, stack: error.stack })}
|
||||
fullWidth
|
||||
showPrompt={false} />
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user