diff --git a/www/public/global.css b/www/public/global.css index e9365e7..170486c 100644 --- a/www/public/global.css +++ b/www/public/global.css @@ -64,4 +64,4 @@ button:not(:disabled):active { button:focus { border-color: #666; -} \ No newline at end of file +} diff --git a/www/public/images/id-hand-drawn-symbol.png b/www/public/images/id-hand-drawn-symbol.png new file mode 100644 index 0000000..f57ef45 Binary files /dev/null and b/www/public/images/id-hand-drawn-symbol.png differ diff --git a/www/public/images/mosaic-of-four-hand-drawn-squares-tiles.png b/www/public/images/mosaic-of-four-hand-drawn-squares-tiles.png new file mode 100644 index 0000000..fcce534 Binary files /dev/null and b/www/public/images/mosaic-of-four-hand-drawn-squares-tiles.png differ diff --git a/www/public/images/next-user-hand-drawn-interface-symbol.png b/www/public/images/next-user-hand-drawn-interface-symbol.png new file mode 100644 index 0000000..bc44d76 Binary files /dev/null and b/www/public/images/next-user-hand-drawn-interface-symbol.png differ diff --git a/www/public/index.html b/www/public/index.html index 89a89a2..02fa54d 100644 --- a/www/public/index.html +++ b/www/public/index.html @@ -1,20 +1,17 @@ + + + - - - + Coucou - Coucou + + + - - - + + - - - - - - - \ No newline at end of file + + diff --git a/www/src/App.svelte b/www/src/App.svelte index 89c82d8..9800d4a 100644 --- a/www/src/App.svelte +++ b/www/src/App.svelte @@ -1,6 +1,6 @@ + + + + diff --git a/www/src/functions/user.ts b/www/src/functions/user.ts index c403c1e..fb4ab72 100644 --- a/www/src/functions/user.ts +++ b/www/src/functions/user.ts @@ -1,7 +1,8 @@ import type { LoginUserBody, UserInfo } from '@core'; import { post } from './request'; +import { currentUser } from '../store/user'; export async function login(raw: LoginUserBody) { const user = await post('/user/login', raw); - console.debug(user); + currentUser.set(user); } diff --git a/www/src/pages/Login.svelte b/www/src/pages/Login.svelte index 2653c9b..77b7deb 100644 --- a/www/src/pages/Login.svelte +++ b/www/src/pages/Login.svelte @@ -1,7 +1,9 @@ -
-
-
- - +
+ + + - - -
-
+ + + {$currentUser?.uuid} + {$currentUser?.username} + {$currentUser?.role} + + diff --git a/www/src/store/user.ts b/www/src/store/user.ts new file mode 100644 index 0000000..b62e357 --- /dev/null +++ b/www/src/store/user.ts @@ -0,0 +1,4 @@ +import { writable } from 'svelte/store'; +import type { UserInfo } from '@core'; + +export const currentUser = writable(null);