add (wip) error message in settings form

This commit is contained in:
Tixie 2020-03-03 22:25:40 +01:00
parent d64b384203
commit c4d7185672
3 changed files with 12 additions and 5 deletions

View File

@ -113,6 +113,10 @@ input {
line-height: 1.3em;
}
input.error {
border-color: #da0000;
}
input[readonly] {
background: #f1f1f1;
}

View File

@ -9,15 +9,17 @@
$notif-success: #00d1b2;
$notif-warning: #ffdd57;
$notif-error: #ff3860;
$notif-error: rgba(#da0000, .15);
/* ----------------------------------------------------------- */
/* == module */
/* ----------------------------------------------------------- */
.notif {
padding: 1em;
border-radius: 4px;
margin-top: .5rem;
padding: .5em 1em;
border-radius: .3rem;
font-size: 1.3rem;
}
.notif--success {
@ -32,5 +34,5 @@ $notif-error: #ff3860;
.notif--error {
background-color: $notif-error;
color: #fff;
color: #9e0000;
}

View File

@ -9,7 +9,8 @@
<div class="settings-side__subtitle">The mastodon instance from the toods are fetched</div>
</div>
<div class="settings-main">
<input class="f-size-full" type="text" id="domain" name="domain" on:change={handleChange} bind:value={$form.domain}>
<input class="f-size-full error" type="text" id="domain" name="domain" on:change={handleChange} bind:value={$form.domain}>
<div class="notif notif--error">Le format n'est pas bon, déso</div>
</div>
{#if $errors.domain}
<span>{$errors.domain}</span>