Refactor seed view

Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
This commit is contained in:
Rūdolfs Ošiņš
2023-04-20 14:41:19 +02:00
parent 26419a74e2
commit 9704318248
8 changed files with 205 additions and 217 deletions
+32
View File
@@ -0,0 +1,32 @@
<script lang="ts">
import Clipboard from "@app/components/Clipboard.svelte";
export let message: string;
export let stackTrace: string | undefined = undefined;
</script>
<style>
.error {
padding: 1rem;
color: var(--color-negative);
border-radius: var(--border-radius);
background-color: var(--color-negative-3);
display: flex;
align-items: center;
}
.stack-trace {
display: flex;
align-self: flex-end;
}
</style>
<div class="error">
{message}
{#if stackTrace}
<div class="stack-trace">
<Clipboard
tooltip="Copy error to clipboard"
text={JSON.stringify({ errorMessage: message, stackTrace }, null, 2)} />
</div>
{/if}
</div>