feat(dashboard): dont exit editing after submit just like in other cards

This commit is contained in:
Jake/Rads 2022-06-23 23:51:38 +02:00
parent 5985bb4f8a
commit b4b7525fc0

View File

@ -12,6 +12,7 @@
export let editMode: boolean; export let editMode: boolean;
export let user: System; export let user: System;
let loading: boolean; let loading: boolean;
let success = false;
let err: string[] = []; let err: string[] = [];
@ -42,7 +43,7 @@
user = res; user = res;
currentUser.update(() => res); currentUser.update(() => res);
err = []; err = [];
editMode = false; success = true;
loading = false; loading = false;
} catch (error) { } catch (error) {
console.log(error); console.log(error);
@ -56,6 +57,9 @@
{#each err as error} {#each err as error}
<Alert color="danger">{@html error}</Alert> <Alert color="danger">{@html error}</Alert>
{/each} {/each}
{#if success}
<Alert fade={false} color="success">System information updated!</Alert>
{/if}
<Row> <Row>
<Col xs={12} lg={4} class="mb-2"> <Col xs={12} lg={4} class="mb-2">
<Label>Name:</Label> <Label>Name:</Label>