diff --git a/src/Home/App.svelte b/src/Home/App.svelte index 9a23f03..0e90ae8 100644 --- a/src/Home/App.svelte +++ b/src/Home/App.svelte @@ -1,37 +1,44 @@
-

Home Page

+

Home Page

-

About

-

- OpenAuth is a Service to provide simple Authentication to a veriaty of Applications. - With a simple to use API and different Strategies, it can be easily integrated - into most Applications. -

+

About

+

+ OpenAuth is a Service to provide simple Authentication to a veriaty of + Applications. With a simple to use API and different Strategies, it can be + easily integrated into most Applications. +

-

QickLinks

-

- If you want to manage your Account, click here -

+

QickLinks

+

+ If you want to manage your Account, click + here +

-

Applications using OpenAuth

+

Applications using OpenAuth

- -
\ No newline at end of file + + diff --git a/src/User/App.svelte b/src/User/App.svelte index cfdb678..8c8a826 100644 --- a/src/User/App.svelte +++ b/src/User/App.svelte @@ -1,195 +1,207 @@ + + +
-
-
- {#if sidebar_button} - - {/if} +
+
+ {#if sidebar_button} + + {/if}

{page.title}

-
- -
- -
- -
+
+ +
+ +
+
{#if loading} -
-
-
-
-
+
+
+
+
+
{/if} - - \ No newline at end of file diff --git a/src/User/NavigationBar.svelte b/src/User/NavigationBar.svelte index 53e7205..43d58b2 100644 --- a/src/User/NavigationBar.svelte +++ b/src/User/NavigationBar.svelte @@ -1,5 +1,6 @@ @@ -17,6 +18,10 @@ /* justify-content: center; */ } + .active { + background: rgba(0, 0, 0, 0.1); + } + .icon { /* float: left; */ width: calc(var(--rel-size) * 3); @@ -36,9 +41,11 @@ {#each pages as page} -
open(page.id)}> +
open(page.id)}>
- + {page.title}

{page.title}

diff --git a/src/User/Pages/Account.svelte b/src/User/Pages/Account.svelte index 92e2509..0e2135a 100644 --- a/src/User/Pages/Account.svelte +++ b/src/User/Pages/Account.svelte @@ -6,7 +6,8 @@ import request from "../../request.ts"; export let loading = false; - let error = undefined; + let account_error = undefined; + let contact_error = undefined; const genderMap = new Map(); genderMap.set(0, "None"); @@ -36,6 +37,7 @@ {}, "GET", undefined, + true, true ); @@ -47,14 +49,32 @@ : undefined; } catch (err) { console.error(err); - error = err.message; + account_error = err.message; } } - let email = ["mail@fabianstamm.de", "fabian.stamm.koe@gmail.com"]; - let phone = ["+1 1233 123123123", "+21 1233 123 123 1"]; + let email = []; + let phone = []; - async function loadContact() {} + async function loadContact() { + try { + let { contact } = await request( + "/api/user/contact", + {}, + "GET", + undefined, + true, + true + ); + + email = contact.mails.map(e => e.mail); + phone = contact.phones.map(e => e.phone); + contact_error = undefined; + } catch (err) { + console.error(err); + contact_error = err.message; + } + } async function load() { loading = true; @@ -128,8 +148,8 @@

Profile

- {#if error} -

{error}

+ {#if account_error} +

{account_error}

{/if}
@@ -160,6 +180,9 @@

Contact

- - + {#if contact_error} +

{contact_error}

+ {/if} + +
diff --git a/src/User/Pages/BoxItem.svelte b/src/User/Pages/BoxItem.svelte index 5332945..6ea24fd 100644 --- a/src/User/Pages/BoxItem.svelte +++ b/src/User/Pages/BoxItem.svelte @@ -1,97 +1,94 @@
-
open=!open}> -
-
{name}
-
- {#if Array.isArray(value)} - {#each value as v, i} - {v} - {#if i < value.length - 1} -
- {/if} - {/each} - {:else} - {value} +
(open = !open)}> +
+
{name}
+
+ {#if Array.isArray(value)} + {#each value as v, i} + {v} + {#if i < value.length - 1} +
{/if} -
+ {/each} + {:else}{value}{/if}
+
+ {#if !noOpen} -
- {#if open} -
- -
- {/if} -
\ No newline at end of file + {/if} +
+ {#if open && !noOpen} +
+ +
+ {/if} +
diff --git a/src/User/Pages/Security.svelte b/src/User/Pages/Security.svelte index d14f5c6..fa76d17 100644 --- a/src/User/Pages/Security.svelte +++ b/src/User/Pages/Security.svelte @@ -22,6 +22,7 @@ undefined, "DELETE", undefined, + true, true ); loadTwoFactor(); @@ -33,6 +34,7 @@ undefined, undefined, undefined, + true, true ); twofactor = res.methods; @@ -46,6 +48,7 @@ undefined, "DELETE", undefined, + true, true ); loadToken(); @@ -58,6 +61,7 @@ undefined, undefined, undefined, + true, true ); token = res.token; diff --git a/src/global.css b/src/global.css index 4244752..b311a2e 100644 --- a/src/global.css +++ b/src/global.css @@ -1,5 +1,5 @@ :root { - --primary: #1E88E5; + --primary: #1e88e5; --mdc-theme-primary: var(--primary); --mdc-theme-primary-bg: var(--mdc-theme--primary); --mdc-theme-on-primary: white; @@ -10,7 +10,7 @@ } * { - font-family: 'Roboto', 'Helvetica', sans-serif; + font-family: "Roboto", "Helvetica", sans-serif; } html, @@ -29,7 +29,7 @@ body { min-height: 45px; } -.floating>input { +.floating > input { font-size: 1.2rem; padding: 10px 10px 10px 5px; appearance: none; @@ -46,13 +46,13 @@ body { box-sizing: border-box; } -.floating>input:focus { +.floating > input:focus { outline: none; } /* Label */ -.floating>label { +.floating > label { color: #999; font-size: 18px; font-weight: normal; @@ -65,10 +65,10 @@ body { /* active */ -.floating>input:focus~label, -.floating>input.used~label { - top: -.75em; - transform: scale(.75); +.floating > input:focus ~ label, +.floating > input.used ~ label { + top: -0.75em; + transform: scale(0.75); left: -2px; /* font-size: 14px; */ color: var(--primary); @@ -85,7 +85,7 @@ body { .bar:before, .bar:after { - content: ''; + content: ""; height: 2px; width: 0; bottom: 1px; @@ -104,8 +104,8 @@ body { /* active */ -.floating>input:focus~.bar:before, -.floating>input:focus~.bar:after { +.floating > input:focus ~ .bar:before, +.floating > input:focus ~ .bar:after { width: 50%; } @@ -123,7 +123,7 @@ body { /* active */ -.floating>input:focus~.highlight { +.floating > input:focus ~ .highlight { animation: inputHighlighter 0.3s ease; } @@ -140,7 +140,6 @@ body { } } - .btn { position: relative; @@ -153,12 +152,12 @@ body { border-width: 0; outline: none; border-radius: 4px; - box-shadow: 0 1px 4px rgba(0, 0, 0, .6); + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); background-color: #cccccc; color: #ecf0f1; - transition: background-color .3s; + transition: background-color 0.3s; height: 48px; @@ -172,7 +171,7 @@ body { filter: brightness(90%); } -.btn>* { +.btn > * { position: relative; } @@ -194,7 +193,7 @@ body { border-radius: 100%; - background-color: rgba(236, 240, 241, .3); + background-color: rgba(236, 240, 241, 0.3); -webkit-transform: translate(-50%, -50%); -moz-transform: translate(-50%, -50%); @@ -207,7 +206,7 @@ body { width: 120%; padding-top: 120%; - transition: width .2s ease-out, padding-top .2s ease-out; + transition: width 0.2s ease-out, padding-top 0.2s ease-out; } .loader_box { @@ -242,4 +241,8 @@ body { 100% { transform: rotate(360deg); } -} \ No newline at end of file +} + +#content { + height: 100%; +} diff --git a/tsconfig.json b/tsconfig.json index efa9663..82e875f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,12 +2,6 @@ "compilerOptions": { "module": "commonjs", "allowSyntheticDefaultImports": true - // "noImplicitAny": true, - // "removeComments": true, - // "preserveConstEnums": true, - // "sourceMap": true }, - "include": [ - "build.ts" - ] -} \ No newline at end of file + "include": ["build.ts"] +}