diff --git a/src/lib/layout/shell.svelte b/src/lib/layout/shell.svelte index 181e3aade..7eb4e1f36 100644 --- a/src/lib/layout/shell.svelte +++ b/src/lib/layout/shell.svelte @@ -180,7 +180,7 @@ {:else}

- {$title} + {$title ? $title : '-'}

{/if} {#if $page.url.pathname.includes('/console/account')} diff --git a/src/routes/console/project-[project]/authentication/+page.svelte b/src/routes/console/project-[project]/authentication/+page.svelte index b7e097375..0ad3fbba2 100644 --- a/src/routes/console/project-[project]/authentication/+page.svelte +++ b/src/routes/console/project-[project]/authentication/+page.svelte @@ -34,7 +34,10 @@ }; $: if (search) offset = 0; - $: usersList.load([Query.limit($pageLimit), Query.offset(offset)], search); + $: usersList.load( + [Query.limit($pageLimit), Query.offset(offset), Query.orderDesc('$createdAt')], + search + ); @@ -56,7 +59,7 @@ Name - Email + Identifier Status ID Joined @@ -67,11 +70,31 @@ href={`${base}/console/project-${project}/authentication/user/${user.$id}`}>
- - {user.name ? user.name : 'n/a'} + {#if user.email || user.phone} + {#if user.name} + + {user.name} + {:else} +
+
+ {/if} + {:else} +
+
+ {user.name} + {/if}
- {user.email} + + {user.email && user.phone + ? [user.email, user.phone].join(',') + : user.email || user.phone} + {#if user.status} @@ -102,7 +125,7 @@ {:else if search} - +
Sorry, we couldn’t find ‘{search}’
@@ -128,7 +151,14 @@ type: 'user' } }}> -

Add Your First User To Get Started

+
+

Create your first User to get started.

+

Need a hand? Check out our documentation.

+
+
+ + +
{/if} diff --git a/src/routes/console/project-[project]/authentication/_createUser.svelte b/src/routes/console/project-[project]/authentication/_createUser.svelte index 8f33df69f..d91508898 100644 --- a/src/routes/console/project-[project]/authentication/_createUser.svelte +++ b/src/routes/console/project-[project]/authentication/_createUser.svelte @@ -6,6 +6,7 @@ InputPassword, InputEmail, InputText, + InputPhone, Form, FormList } from '$lib/elements/forms'; @@ -18,18 +19,24 @@ const dispatch = createEventDispatcher(); let showDropdown = false; - let name: string, mail: string, pass: string, id: string; + let name: string, mail: string, pass: string, id: string, phone: string; let error: string; const create = async () => { try { - const user = await sdkForProject.users.create(id ?? 'unique()', mail, pass, name); + const user = await sdkForProject.users.create( + id ?? 'unique()', + mail, + phone, + pass, + name + ); mail = pass = name = ''; showCreate = false; showDropdown = false; addNotification({ type: 'success', - message: `${user.name} has been created` + message: `${user.name ?? 'User'} has been created` }); dispatch('created', user); } catch ({ message }) { @@ -56,17 +63,12 @@ placeholder="Enter name" autofocus={true} bind:value={name} /> - + + diff --git a/src/routes/console/project-[project]/authentication/teams/+page.svelte b/src/routes/console/project-[project]/authentication/teams/+page.svelte index 00936a441..ef22133bc 100644 --- a/src/routes/console/project-[project]/authentication/teams/+page.svelte +++ b/src/routes/console/project-[project]/authentication/teams/+page.svelte @@ -33,7 +33,10 @@ }; $: if (search) offset = 0; - $: teamsList.load([Query.limit(limit), Query.offset(offset)], search); + $: teamsList.load( + [Query.limit(limit), Query.offset(offset), Query.orderDesc('$createdAt')], + search + ); @@ -81,7 +84,7 @@
{:else if search} - +
Sorry, we couldn’t find ‘{search}’
@@ -107,7 +110,14 @@ type: 'team' } }}> -

Create your first team to get started

+
+

Create your first Tser to get started.

+

Need a hand? Check out our documentation.

+
+
+ + +
{/if} diff --git a/src/routes/console/project-[project]/authentication/user/[user]/+page.svelte b/src/routes/console/project-[project]/authentication/user/[user]/+page.svelte index a43453202..8b3fa2c54 100644 --- a/src/routes/console/project-[project]/authentication/user/[user]/+page.svelte +++ b/src/routes/console/project-[project]/authentication/user/[user]/+page.svelte @@ -292,7 +292,7 @@ - + @@ -312,9 +312,7 @@ - + @@ -334,9 +332,7 @@ - + @@ -459,9 +455,15 @@ -
{$user.name}
+
+ {$user.email || $user.phone || $user.name ? $user.name : 'Anonymous'} +
-

{$user.email}

+

+ {$user.email && $user.phone + ? [$user.email, $user.phone].join(',') + : $user.email || $user.phone} +