From a50ea15b38023b867a9f7757e973184cbcdd2457 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Sat, 2 Jan 2021 22:23:13 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9A=20move=20to=20tinro=20svelte=20rou?= =?UTF-8?q?ter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ref #23 --- nginx.conf | 25 +++- package.json | 1 + src/App.svelte | 187 ++++++++++++++++++------ src/components/Dashboard.svelte | 174 +++++++++------------- src/components/ForgotPassword.svelte | 9 +- src/components/Login.svelte | 6 +- src/components/MainDashContent.svelte | 135 +++++++++++++++++ src/components/NoComponentLoaded.svelte | 23 +++ src/components/Orgs.svelte | 23 +++ src/components/Runners.svelte | 23 +++ src/components/Settings.svelte | 46 ++++++ src/components/Transition.svelte | 11 ++ src/components/Users.svelte | 23 +++ 13 files changed, 530 insertions(+), 156 deletions(-) create mode 100644 src/components/MainDashContent.svelte create mode 100644 src/components/NoComponentLoaded.svelte create mode 100644 src/components/Orgs.svelte create mode 100644 src/components/Runners.svelte create mode 100644 src/components/Settings.svelte create mode 100644 src/components/Transition.svelte create mode 100644 src/components/Users.svelte diff --git a/nginx.conf b/nginx.conf index 0f0bce3b..124d151c 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,8 +1,10 @@ -events{} +events { +} http { include mime.types; sendfile on; server { + error_page 404 /index.html; root /usr/share/nginx/html; location ~* \.(?:ico|css|js|gif|jpe?g|png)$ { expires 1y; @@ -22,6 +24,25 @@ http { gzip_comp_level 6; gzip_buffers 16 8k; gzip_http_version 1.1; - gzip_types application/javascript application/rss+xml application/vnd.ms-fontobject application/x-font application/x-font-opentype application/x-font-otf application/x-font-truetype application/x-font-ttf application/x-javascript application/xhtml+xml application/xml font/opentype font/otf font/ttf image/svg+xml image/x-icon text/css text/javascript text/plain text/xml; + gzip_types application/javascript + application/rss+xml + application/vnd.ms-fontobject + application/x-font + application/x-font-opentype + application/x-font-otf + application/x-font-truetype + application/x-font-ttf + application/x-javascript + application/xhtml+xml + application/xml + font/opentype + font/otf + font/ttf + image/svg+xml + image/x-icon + text/css + text/javascript + text/plain + text/xml; } } \ No newline at end of file diff --git a/package.json b/package.json index bf635be4..b1eb1aa4 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "svelte-i18n": "^3.3.0", "svelte-spa-router": "^3.1.0", "tailwindcss": "^2.0.2", + "tinro": "^0.4.10", "toastify-js": "^1.9.3", "validator": "^13.5.2" }, diff --git a/src/App.svelte b/src/App.svelte index 2b0b6f43..914b0df5 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -1,8 +1,12 @@ - + + + + {#if $router.path === '/forgot_password'} + + + + {:else if $router.path === '/about'} + + + + {:else if $store.isLoggedIn} + + + + + + + + + + + + + +

Portfolio introduction

+ + +
+ +
+
+ +
+
+
+
+ + + + + + +
+
+ {:else} + + {/if} +
diff --git a/src/components/Dashboard.svelte b/src/components/Dashboard.svelte index abb4bf89..b4144fc5 100644 --- a/src/components/Dashboard.svelte +++ b/src/components/Dashboard.svelte @@ -1,5 +1,9 @@
@@ -50,9 +62,9 @@ import store from "../store";
@@ -252,7 +295,7 @@ import store from "../store"; d="M10 2a6 6 0 00-6 6v3.586l-.707.707A1 1 0 004 14h12a1 1 0 00.707-1.707L16 11.586V8a6 6 0 00-6-6zM10 18a3 3 0 01-3-3h6a3 3 0 01-3 3z" /> - +
-
{ - navOpen = false; - }}> - - -

- Dashboard - hello there, {store.state.jwtinfo.userdetails.firstname} 👋 -

-
- -
- -
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
- -
- - -
-
-
-
Regular
-
Text inputs
-
-
-
-
-
-
Label
-
This is a hint
-
-
-
-
-
First name
-
First name is required
-
-
-
-
-
First name
-
First name is valid
-
-
-
-
-
- -
-
- - + + +
{$_('goback')} @@ -125,6 +125,11 @@ {$_('send-a-mail-to-lfk-odit-services')}
+
diff --git a/src/components/Login.svelte b/src/components/Login.svelte index ac8d44cb..d9a83cc8 100644 --- a/src/components/Login.svelte +++ b/src/components/Login.svelte @@ -21,7 +21,7 @@ OpenAPI.TOKEN = value.access_token; const jwtinfo = JSON.parse(atob(OpenAPI.TOKEN.split(".")[1])); store.login(value.access_token, jwtinfo); - replace("/dashboard/"); + replace("/"); Toastify({ text: $_("welcome_wavinghand"), duration: 500, @@ -56,7 +56,7 @@ OpenAPI.TOKEN = result.access_token; const jwtinfo = JSON.parse(atob(OpenAPI.TOKEN.split(".")[1])); store.login(result.access_token, jwtinfo); - replace("/dashboard/"); + replace("/"); Toastify({ text: $_("welcome_wavinghand"), duration: 500, @@ -149,7 +149,7 @@
{$_('forgot_password?')} diff --git a/src/components/MainDashContent.svelte b/src/components/MainDashContent.svelte new file mode 100644 index 00000000..7aae906c --- /dev/null +++ b/src/components/MainDashContent.svelte @@ -0,0 +1,135 @@ + + +
{ + navOpen = false; + }}> + + +

+ Dashboard - hello there, +

+
+ +
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ +
+ +
+
+
+
+
Regular
+
Text inputs
+
+
+
+
+
+
Label
+
This is a hint
+
+
+
+
+
First name
+
First name is required
+
+
+
+
+
First name
+
First name is valid
+
+
+
+
+
+ +
+
+ +
diff --git a/src/components/NoComponentLoaded.svelte b/src/components/NoComponentLoaded.svelte new file mode 100644 index 00000000..a5f96fc2 --- /dev/null +++ b/src/components/NoComponentLoaded.svelte @@ -0,0 +1,23 @@ + + + +
+
+
+
+ Internal Error +
+
+

+ Something went wrong in the UI logic +

+ {$_('goback')} +
+
+
+ diff --git a/src/components/Orgs.svelte b/src/components/Orgs.svelte new file mode 100644 index 00000000..e53849a7 --- /dev/null +++ b/src/components/Orgs.svelte @@ -0,0 +1,23 @@ + + + +
+
+
+
+ Orgs +
+
+

+ bla +

+ {$_('goback')} +
+
+
+ diff --git a/src/components/Runners.svelte b/src/components/Runners.svelte new file mode 100644 index 00000000..c1e4c925 --- /dev/null +++ b/src/components/Runners.svelte @@ -0,0 +1,23 @@ + + + +
+
+
+
+ Runners +
+
+

+ bla +

+ {$_('goback')} +
+
+
+ diff --git a/src/components/Settings.svelte b/src/components/Settings.svelte new file mode 100644 index 00000000..c915390b --- /dev/null +++ b/src/components/Settings.svelte @@ -0,0 +1,46 @@ + + + + + + + +
+
+

+ 🔨
Settings +

+

+ configure your profile however you want +

+
+
+ +
+
+

+ General +

+
+

+ Lorem ipsum dolor sit amet consectetur, adipisicing elit. Temporibus et + amet voluptate nulla accusantium vero blanditiis nobis facere veritatis. + Impedit deserunt saepe aliquid unde consequuntur officia consequatur + fugit iusto dolorem? +

+
+
+
+
diff --git a/src/components/Transition.svelte b/src/components/Transition.svelte new file mode 100644 index 00000000..41998e76 --- /dev/null +++ b/src/components/Transition.svelte @@ -0,0 +1,11 @@ + + + +{#key $router.path} +
+ +
+{/key} diff --git a/src/components/Users.svelte b/src/components/Users.svelte new file mode 100644 index 00000000..1b347fcc --- /dev/null +++ b/src/components/Users.svelte @@ -0,0 +1,23 @@ + + + +
+
+
+
+ Users +
+
+

+ bla +

+ {$_('goback')} +
+
+
+