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:
Rūdolfs Ošiņš
2023-10-13 18:05:19 +02:00
co-authored by dnlklmn
parent c5c609167e
commit d914710396
147 changed files with 5374 additions and 4191 deletions
+25 -14
View File
@@ -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>