diff --git a/src/page/SignIn/SignIn.svelte b/src/page/SignIn/SignIn.svelte index e95baf0..4ba92a9 100644 --- a/src/page/SignIn/SignIn.svelte +++ b/src/page/SignIn/SignIn.svelte @@ -4,6 +4,13 @@ import AccountStore from '../../store/AccountStore'; let homeserver = AccountStore.getState().homeserver; + let homeserverValid = homeserver.match(/.+(\..+){1,}/gm) !== null; + + const updStore = () => { + AccountStore.dispatch({ type: 'setHomeserver', homeserver }); + console.log(AccountStore.getState().homeserver); + homeserverValid = homeserver.match(/.+(\..+){1,}/gm) !== null; + }
@@ -11,7 +18,7 @@

To continue, you must choose a homeserver
- +
@@ -19,5 +26,11 @@

+ {#if (!homeserverValid)} +
+ + Error: Invalid URL + + {/if}

\ No newline at end of file