diff --git a/sdks/js/package.json b/sdks/js/package.json index fd4f560..ed103fe 100644 --- a/sdks/js/package.json +++ b/sdks/js/package.json @@ -1,6 +1,6 @@ { "name": "@upnd/upend", - "version": "0.5.1", + "version": "0.5.2", "description": "Client library to interact with the UpEnd system.", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/sdks/js/src/api.ts b/sdks/js/src/api.ts index 83ea2c0..083c355 100644 --- a/sdks/js/src/api.ts +++ b/sdks/js/src/api.ts @@ -434,6 +434,17 @@ export class UpEndApi { } } + public async register(credentials: { + username: string; + password: string; + }): Promise { + await this.fetch(`${this.apiUrl}/auth/register`, undefined, { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify(credentials), + }); + } + public async authStatus( options?: ApiFetchOptions, ): Promise<{ user: string } | undefined> { diff --git a/webui/src/lib/components/AddModal.svelte b/webui/src/lib/components/AddModal.svelte index 0469fb6..58754b0 100644 --- a/webui/src/lib/components/AddModal.svelte +++ b/webui/src/lib/components/AddModal.svelte @@ -17,6 +17,7 @@ import { goto } from '$app/navigation'; import { i18n } from '$lib/i18n'; import { selected } from '$lib/components/EntitySelect.svelte'; + import Modal from '$lib/components/layout/Modal.svelte'; let files: File[] = []; let URLs: string[] = []; @@ -114,9 +115,8 @@ - -
-
+{#if visible} +
{#each files as file}
@@ -163,8 +163,8 @@
{/if} -
-
+ +{/if} diff --git a/webui/src/lib/components/layout/Modal.svelte b/webui/src/lib/components/layout/Modal.svelte new file mode 100644 index 0000000..2e05f33 --- /dev/null +++ b/webui/src/lib/components/layout/Modal.svelte @@ -0,0 +1,59 @@ + + + + + + + +