diff --git a/src/components/auth/Register.svelte b/src/components/auth/Register.svelte index 71953de..bac8070 100644 --- a/src/components/auth/Register.svelte +++ b/src/components/auth/Register.svelte @@ -1,17 +1,25 @@ @@ -22,12 +30,33 @@

Choose a username

-
+ + {#if !(username.length === 0)} + + {/if} +
Back - +
diff --git a/src/lib/common/webnative.ts b/src/lib/common/webnative.ts index c563617..d8270ae 100644 --- a/src/lib/common/webnative.ts +++ b/src/lib/common/webnative.ts @@ -4,6 +4,7 @@ import type FileSystem from 'webnative/fs/index' import { USE_WNFS_IMPLEMENTATION } from 'webnative/auth/implementation/use-wnfs' import { setup } from 'webnative' +// runfission.net = staging setup.endpoints({ api: 'https://runfission.net', user: 'fissionuser.net' }) setup.setImplementations({ auth: USE_WNFS_IMPLEMENTATION.auth }) @@ -56,6 +57,13 @@ export const initialize = async (): Promise => { } } +export const isUsernameValid = async (username: string): Promise => { + return webnative.account.isUsernameValid(username) +} + +export const isUsernameAvailable = async (username: string): Promise => { + return webnative.account.isUsernameAvailable(username) +} // interface StateFS { // fs?: FileSystem // }