From c8db78df6ffd5b4bdeb53893f363659ae2eefd45 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Sat, 27 Feb 2021 19:09:14 +0100 Subject: [PATCH 01/48] =?UTF-8?q?=F0=9F=9A=80Bumped=20version=20to=20v0.0.?= =?UTF-8?q?1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index caeef94..0b17e76 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@odit/lfk-selfservice", - "version": "0.0.0", + "version": "0.0.1", "scripts": { "dev": "vite", "build": "vite build", From d18dbc3a1fdf1bc9f2e8c5b37cc2d3044857410a Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Mon, 1 Mar 2021 17:31:12 +0100 Subject: [PATCH 02/48] =?UTF-8?q?=F0=9F=8E=89=20working=20vue=20reactivity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ref #1 --- src/components/Register.vue | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/src/components/Register.vue b/src/components/Register.vue index 6d83529..eda3c37 100644 --- a/src/components/Register.vue +++ b/src/components/Register.vue @@ -64,10 +64,7 @@ />

{{ $t('please_provide_valid_mail') }}

- + @@ -180,16 +180,21 @@ \ No newline at end of file From e499357d6f151eaa8885ebfb78150e709ba4e753 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Tue, 2 Mar 2021 18:19:58 +0100 Subject: [PATCH 13/48] added sponsorings tab ref #5 --- src/components/Profile.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/Profile.vue b/src/components/Profile.vue index a80c71c..384ebeb 100644 --- a/src/components/Profile.vue +++ b/src/components/Profile.vue @@ -56,7 +56,7 @@ :class="{ 'tab-active border-b-2 font-medium border-blue-500': (activetab === 'profile') }" class="tab tab-underline py-4 px-6 block" type="button" - >Mein Profil + >Profil
+ >Rundenzeiten
+ >Spender
@@ -161,6 +161,9 @@
+
+
coming soon...
+
From 7fa459b71b2bdd96d4a5104b5356441e1232e5e8 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Tue, 2 Mar 2021 18:24:00 +0100 Subject: [PATCH 14/48] merge #6 into #5 --- src/components/Profile.vue | 80 +++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 44 deletions(-) diff --git a/src/components/Profile.vue b/src/components/Profile.vue index 384ebeb..16cbf1c 100644 --- a/src/components/Profile.vue +++ b/src/components/Profile.vue @@ -1,51 +1,43 @@ + \ No newline at end of file diff --git a/src/components/Imprint.vue b/src/components/Imprint.vue new file mode 100644 index 0000000..8fa9046 --- /dev/null +++ b/src/components/Imprint.vue @@ -0,0 +1,38 @@ + + + \ No newline at end of file diff --git a/src/components/Privacy.vue b/src/components/Privacy.vue new file mode 100644 index 0000000..94394c8 --- /dev/null +++ b/src/components/Privacy.vue @@ -0,0 +1,38 @@ + + + \ No newline at end of file diff --git a/src/components/simple.css b/src/components/simple.css new file mode 100644 index 0000000..671acf9 --- /dev/null +++ b/src/components/simple.css @@ -0,0 +1 @@ +.simplecontent *{margin:0;padding:0}.simplecontent address,.simplecontent area,.simplecontent article,.simplecontent aside,.simplecontent audio,.simplecontent blockquote,.simplecontent datalist,.simplecontent details,.simplecontent dl,.simplecontent fieldset,.simplecontent figure,.simplecontent form,.simplecontent iframe,.simplecontent img,.simplecontent input,.simplecontent meter,.simplecontent nav,.simplecontent ol,.simplecontent optgroup,.simplecontent option,.simplecontent output,.simplecontent p,.simplecontent pre,.simplecontent progress,.simplecontent ruby,.simplecontent section,.simplecontent table,.simplecontent textarea,.simplecontent ul,.simplecontent video{margin-bottom:1rem}.simplecontent button,.simplecontent html,.simplecontent input,.simplecontent select{font-family:var(--nc-font-sans)}.simplecontent body{margin:0 auto;max-width:750px;padding:2rem;border-radius:6px;overflow-x:hidden;word-break:break-word;overflow-wrap:break-word;background:var(--nc-bg-1);color:var(--nc-tx-2);font-size:1.03rem;line-height:1.5}.simplecontent h1,.simplecontent h2,.simplecontent h3,.simplecontent h4,.simplecontent h5,.simplecontent h6{line-height:1;color:var(--nc-tx-1);padding-top:.875rem}.simplecontent h1,.simplecontent h2,.simplecontent h3{color:var(--nc-tx-1);padding-bottom:2px;margin-bottom:8px;border-bottom:1px solid var(--nc-bg-2)}.simplecontent h4,.simplecontent h5,.simplecontent h6{margin-bottom:.3rem}.simplecontent h1{font-size:2.25rem}.simplecontent h2{font-size:1.85rem}.simplecontent h3{font-size:1.55rem}.simplecontent h4{font-size:1.25rem}.simplecontent h5{font-size:1rem}.simplecontent h6{font-size:.875rem}.simplecontent a{color:#3d5af1}.simplecontent a:hover{color:var(--nc-lk-2)}.simplecontent abbr:hover{cursor:help}.simplecontent blockquote{padding:1.5rem;background:#ddd;border-left:5px solid var(--nc-bg-3)}.simplecontent abbr{cursor:help}.simplecontent blockquote :last-child{padding-bottom:0;margin-bottom:0}.simplecontent header{background:#ddd;border-bottom:1px solid var(--nc-bg-3);padding:2rem 1.5rem;margin:-2rem calc(0px - (50vw - 50%)) 2rem;padding-left:calc(50vw - 50%);padding-right:calc(50vw - 50%)}.simplecontent header h1,.simplecontent header h2,.simplecontent header h3{padding-bottom:0;border-bottom:0}.simplecontent header>:first-child{margin-top:0;padding-top:0}.simplecontent header>:last-child{margin-bottom:0}.simplecontent a button,.simplecontent button,.simplecontent input[type=button],.simplecontent input[type=reset],.simplecontent input[type=submit]{font-size:1rem;display:inline-block;padding:6px 12px;text-align:center;text-decoration:none;white-space:nowrap;background:#3d5af1;color:var(--nc-lk-tx);border:0;border-radius:4px;box-sizing:border-box;cursor:pointer;color:var(--nc-lk-tx)}.simplecontent a button[disabled],.simplecontent button[disabled],.simplecontent input[type=button][disabled],.simplecontent input[type=reset][disabled],.simplecontent input[type=submit][disabled]{cursor:default;opacity:.5;cursor:not-allowed}.simplecontent .button:focus,.simplecontent .button:hover,.simplecontent button:focus,.simplecontent button:hover,.simplecontent input[type=button]:focus,.simplecontent input[type=button]:hover,.simplecontent input[type=reset]:focus,.simplecontent input[type=reset]:hover,.simplecontent input[type=submit]:focus,.simplecontent input[type=submit]:hover{background:var(--nc-lk-2)}.simplecontent code,.simplecontent kbd,.simplecontent pre,.simplecontent samp{font-family:var(--nc-font-mono)}.simplecontent code,.simplecontent kbd,.simplecontent pre,.simplecontent samp{background:#ddd;border:1px solid var(--nc-bg-3);border-radius:4px;padding:3px 6px;font-size:.9rem}.simplecontent kbd{border-bottom:3px solid var(--nc-bg-3)}.simplecontent pre{padding:1rem 1.4rem;max-width:100%;overflow:auto}.simplecontent pre code{background:inherit;font-size:inherit;color:inherit;border:0;padding:0;margin:0}.simplecontent code pre{display:inline;background:inherit;font-size:inherit;color:inherit;border:0;padding:0;margin:0}.simplecontent details{padding:.6rem 1rem;background:#ddd;border:1px solid var(--nc-bg-3);border-radius:4px}.simplecontent summary{cursor:pointer;font-weight:700}.simplecontent details[open]{padding-bottom:.75rem}.simplecontent details[open] summary{margin-bottom:6px}.simplecontent details[open]>:last-child{margin-bottom:0}.simplecontent dt{font-weight:700}.simplecontent dd::before{content:"→ "}.simplecontent hr{border:0;border-bottom:1px solid var(--nc-bg-3);margin:1rem auto}.simplecontent fieldset{margin-top:1rem;padding:2rem;border:1px solid var(--nc-bg-3);border-radius:4px}.simplecontent legend{padding:auto .5rem}.simplecontent table{border-collapse:collapse;width:100%}.simplecontent td,.simplecontent th{border:1px solid var(--nc-bg-3);text-align:left;padding:.5rem}.simplecontent th{background:#ddd}.simplecontent tr:nth-child(even){background:#ddd}.simplecontent table caption{font-weight:700;margin-bottom:.5rem}.simplecontent textarea{max-width:100%}.simplecontent ol,.simplecontent ul{padding-left:2rem}.simplecontent li{margin-top:.4rem}.simplecontent ol ol,.simplecontent ol ul,.simplecontent ul ol,.simplecontent ul ul{margin-bottom:0}.simplecontent mark{padding:3px 6px;background:var(--nc-ac-1);color:var(--nc-ac-tx)}.simplecontent input,.simplecontent select,.simplecontent textarea{padding:6px 12px;margin-bottom:.5rem;background:#ddd;color:var(--nc-tx-2);border:1px solid var(--nc-bg-3);border-radius:4px;box-shadow:none;box-sizing:border-box}.simplecontent img{max-width:100%}.simplecontent blockquote{background:#ececec;}.simplecontent ol{list-style-type: decimal;} .simplecontent ul{list-style-type: circle;} \ No newline at end of file diff --git a/src/locales/en.json b/src/locales/en.json index d5b6ac7..70b0021 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -5,6 +5,7 @@ "download_certificate": "Download certificate", "e_mail_adress": "mail address", "go_to_login": "Go To Login", + "imprint": "Imprint", "lap_time": "Lap time", "lap_times": "Lap times", "main_page_text": "Here you can register for the Lauf Für Kaya! or manage your runner profile.", @@ -15,6 +16,7 @@ "please_provide_a_valid_zipcode": "Please provide a valid zipcode...", "please_provide_valid_mail": "Please provide a valid mail address.", "plz": "zipcode", + "privacy_policy": "Privacy Policy", "profile": "Profile", "provide_address": "Provide a postal address?", "register": { diff --git a/src/main.js b/src/main.js index 78f8eb0..59bcfe3 100644 --- a/src/main.js +++ b/src/main.js @@ -22,6 +22,8 @@ const i18n = createI18n({ // --------------- const Home = import('./components/Home.vue'); +const Imprint = import('./components/Imprint.vue'); +const Privacy = import('./components/Privacy.vue'); const Register = import('./components/Register.vue'); const Profile = import('./components/Profile.vue'); // @@ -29,6 +31,8 @@ const router = createRouter({ history: createWebHistory(), routes: [ { path: '/', component: Home }, + { path: '/imprint', component: Imprint }, + { path: '/privacy', component: Privacy }, { path: '/register', component: Register }, { path: '/profile', component: Profile } ] From 20229ab14252e20ffb3ac0e3e8b9d8f7f31819a3 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Thu, 4 Mar 2021 17:09:47 +0100 Subject: [PATCH 21/48] fallback for env config errors ref #3 --- src/components/EnvError.vue | 7 +++++++ src/main.js | 15 +++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 src/components/EnvError.vue diff --git a/src/components/EnvError.vue b/src/components/EnvError.vue new file mode 100644 index 0000000..5e5e93a --- /dev/null +++ b/src/components/EnvError.vue @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/src/main.js b/src/main.js index 59bcfe3..a733e63 100644 --- a/src/main.js +++ b/src/main.js @@ -21,21 +21,28 @@ const i18n = createI18n({ }); // --------------- +const EnvError = import('./components/EnvError.vue'); const Home = import('./components/Home.vue'); const Imprint = import('./components/Imprint.vue'); const Privacy = import('./components/Privacy.vue'); const Register = import('./components/Register.vue'); const Profile = import('./components/Profile.vue'); // -const router = createRouter({ - history: createWebHistory(), - routes: [ +let routes = []; +if (config.baseurl && config.documentserver_key) { + routes = [ { path: '/', component: Home }, { path: '/imprint', component: Imprint }, { path: '/privacy', component: Privacy }, { path: '/register', component: Register }, { path: '/profile', component: Profile } - ] + ]; +} else { + routes = [ { path: '/*', component: EnvError } ]; +} +const router = createRouter({ + history: createWebHistory(), + routes }); // --------------- createApp(App).use(Toast).use(i18n).use(router).mount('#app'); From c92d5bf5f2ff7642e2a55abe0002ff94f2d64d3e Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Thu, 4 Mar 2021 19:56:17 +0100 Subject: [PATCH 22/48] added ui for configuration errors page ref #3 --- src/components/EnvError.vue | 34 ++++++++++++++++++++++++++++------ src/locales/de.json | 5 +++++ src/locales/en.json | 3 +++ src/main.js | 2 +- 4 files changed, 37 insertions(+), 7 deletions(-) diff --git a/src/components/EnvError.vue b/src/components/EnvError.vue index 5e5e93a..c326305 100644 --- a/src/components/EnvError.vue +++ b/src/components/EnvError.vue @@ -1,7 +1,29 @@ - - \ No newline at end of file +
+
+ + + +

{{ $t('configuration_error') }}

+

+ {{ $t('the_system_is_not_properly_configured_please_contact_the_system_administrator_for_help') }} +
+
+ {{ $t('if_you_are_the_system_administrator_please_refer_to_the_official_product_documentation_readme_for_configuration_guidance') }} +

+
+
+ \ No newline at end of file diff --git a/src/locales/de.json b/src/locales/de.json index 7f924ad..f71699c 100644 --- a/src/locales/de.json +++ b/src/locales/de.json @@ -1,10 +1,13 @@ { "already_have_an_account": "Sie haben bereits einen Account?", "apartment_suite_etc": "Addresszeile 2", + "configuration_error": "Konfigurationsfehler", "distance": "Distanz", "download_certificate": "Urkunde herunterladen", "e_mail_adress": "E-Mail Adresse", "go_to_login": "Zum Login", + "if_you_are_the_system_administrator_please_refer_to_the_official_product_documentation_readme_for_configuration_guidance": "Wenn Sie der Systemadministrator sind, finden Sie Konfigurationsanweisungen in der offiziellen Produktdokumentation / README.", + "imprint": "Impressum", "lap_time": "Rundenzeit", "lap_times": "Rundenzeiten", "main_page_text": "Hier können Sie sich für den Lauf Für Kaya! registrieren oder ihr Läuferprofil verwalten.", @@ -15,6 +18,7 @@ "please_provide_a_valid_zipcode": "Bitte geben Sie eine gültige Postleitzahl an...", "please_provide_valid_mail": "Bitte geben Sie eine gültige E-Mail Adresse an", "plz": "PLZ", + "privacy_policy": "Datenschutzerklärung", "profile": "Profil", "provide_address": "Adresse angeben?", "register": { @@ -25,6 +29,7 @@ "save_changes": "Änderungen speichern", "sponsoring": "Sponsoring", "strasse": "Straße", + "the_system_is_not_properly_configured_please_contact_the_system_administrator_for_help": "Das System ist nicht richtig konfiguriert. Bitte wenden Sie sich an den Systemadministrator, um Hilfe zu erhalten.", "this_is_not_a_valid_international_phone_number": "Dies ist keine gültige internationale Telefonnummer", "view_my_data": "Meine Läuferdaten einsehen", "vorname": "Vorname" diff --git a/src/locales/en.json b/src/locales/en.json index 70b0021..7ce8dba 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1,10 +1,12 @@ { "already_have_an_account": "Already have an account?", "apartment_suite_etc": "Apartment, suite, etc.", + "configuration_error": "Configuration error", "distance": "Distance", "download_certificate": "Download certificate", "e_mail_adress": "mail address", "go_to_login": "Go To Login", + "if_you_are_the_system_administrator_please_refer_to_the_official_product_documentation_readme_for_configuration_guidance": "If you are the system administrator, please refer to the official product documentation/ README for configuration guidance.", "imprint": "Imprint", "lap_time": "Lap time", "lap_times": "Lap times", @@ -27,6 +29,7 @@ "save_changes": "Save changes", "sponsoring": "Sponsoring", "strasse": "Street/ Block", + "the_system_is_not_properly_configured_please_contact_the_system_administrator_for_help": "The system is not properly configured. Please contact the system administrator for help.", "this_is_not_a_valid_international_phone_number": "This is not a valid international phone number", "view_my_data": "View my data", "vorname": "Firstname" diff --git a/src/main.js b/src/main.js index a733e63..993a4aa 100644 --- a/src/main.js +++ b/src/main.js @@ -38,7 +38,7 @@ if (config.baseurl && config.documentserver_key) { { path: '/profile', component: Profile } ]; } else { - routes = [ { path: '/*', component: EnvError } ]; + routes = [ { path: '/', component: EnvError } ]; } const router = createRouter({ history: createWebHistory(), From 987ac4d02cf63af5acdcc60f0ee2ec54534773cb Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Fri, 5 Mar 2021 18:47:15 +0100 Subject: [PATCH 23/48] =?UTF-8?q?=F0=9F=90=9E=20bugfix=20for=20non-existan?= =?UTF-8?q?t=20env.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ref #3 --- src/main.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main.js b/src/main.js index 993a4aa..bd77f66 100644 --- a/src/main.js +++ b/src/main.js @@ -28,17 +28,17 @@ const Privacy = import('./components/Privacy.vue'); const Register = import('./components/Register.vue'); const Profile = import('./components/Profile.vue'); // -let routes = []; -if (config.baseurl && config.documentserver_key) { - routes = [ - { path: '/', component: Home }, - { path: '/imprint', component: Imprint }, - { path: '/privacy', component: Privacy }, - { path: '/register', component: Register }, - { path: '/profile', component: Profile } - ]; -} else { - routes = [ { path: '/', component: EnvError } ]; +let routes = [ { path: '/', component: EnvError } ]; +if (typeof config !== 'undefined') { + if (config.baseurl && config.documentserver_key) { + routes = [ + { path: '/', component: Home }, + { path: '/imprint', component: Imprint }, + { path: '/privacy', component: Privacy }, + { path: '/register', component: Register }, + { path: '/profile', component: Profile } + ]; + } } const router = createRouter({ history: createWebHistory(), From 4c78712f83565f21f3cdee2168f9221e2a007951 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Fri, 5 Mar 2021 18:59:21 +0100 Subject: [PATCH 24/48] =?UTF-8?q?=F0=9F=93=83=20updated=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ref #3 --- README.md | 21 ++++++++++++++++++++- public/env.sample.js | 4 ++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ca13970..5eda5c2 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,22 @@ # @lfk/selfservice -runner selfservice portal \ No newline at end of file +runner selfservice portal + +## ⚡ Development +### Requirements +- Node.js v14.15.0 or newer +- yarn package manager >= v1.22.10 < 2 + +### Recommended Extensions +- will be automatically recommended via `./vscode/extensions.json` +- we also provide a config for i18n-ally in the `./vscode/` folder + +### Fastest Dev Environment +- You can install the [Remote - Containers](https://github.com/Microsoft/vscode-remote-release) extension and use all recommended extensions and editor settings via the provided `./devcontainer/` config + +## 🔨 environment config +- copy the `/public/env.sample.js` file to `/public/env.js` +- set the required environment variables + - `documentserver_key`: url to the [document server](https://git.odit.services/lfk/document-server) instance + - `baseurl`: url to the main instance + - see [@lfk/deployment](https://git.odit.services/lfk/deployment) for a complete deployment guide \ No newline at end of file diff --git a/public/env.sample.js b/public/env.sample.js index fc95691..1852851 100644 --- a/public/env.sample.js +++ b/public/env.sample.js @@ -1,6 +1,10 @@ const config = { + // required documentserver_key: '', + // required baseurl: '', + // optional, will fallback to /imprint url_imprint: '', + // optional, will fallback to /privacy url_privacy: '' }; From 335109285912a4df16d4f0aea90c0ba054089762 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Fri, 5 Mar 2021 19:27:44 +0100 Subject: [PATCH 25/48] fix accessibility in Profile component --- src/components/Profile.vue | 43 +++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/src/components/Profile.vue b/src/components/Profile.vue index ba9429c..0f883f1 100644 --- a/src/components/Profile.vue +++ b/src/components/Profile.vue @@ -3,10 +3,10 @@

Max Mustermann

-

Musterfirma > PR

+

Musterfirma > PR

@@ -183,12 +168,12 @@ \ No newline at end of file diff --git a/src/locales/en.json b/src/locales/en.json index 7ce8dba..e134b50 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1,36 +1,37 @@ { - "already_have_an_account": "Already have an account?", - "apartment_suite_etc": "Apartment, suite, etc.", - "configuration_error": "Configuration error", - "distance": "Distance", - "download_certificate": "Download certificate", - "e_mail_adress": "mail address", - "go_to_login": "Go To Login", - "if_you_are_the_system_administrator_please_refer_to_the_official_product_documentation_readme_for_configuration_guidance": "If you are the system administrator, please refer to the official product documentation/ README for configuration guidance.", - "imprint": "Imprint", - "lap_time": "Lap time", - "lap_times": "Lap times", - "main_page_text": "Here you can register for the Lauf Für Kaya! or manage your runner profile.", - "mittelname": "Middlename", - "nachname": "Lastname", - "ort": "City", - "phone_number": "Phone Number", - "please_provide_a_valid_zipcode": "Please provide a valid zipcode...", - "please_provide_valid_mail": "Please provide a valid mail address.", - "plz": "zipcode", - "privacy_policy": "Privacy Policy", - "profile": "Profile", - "provide_address": "Provide a postal address?", - "register": { - "register_now": "Register now for Lauf für Kaya! 2021." - }, - "register_now": "Register now!", - "registrieren": "Register Now", - "save_changes": "Save changes", - "sponsoring": "Sponsoring", - "strasse": "Street/ Block", - "the_system_is_not_properly_configured_please_contact_the_system_administrator_for_help": "The system is not properly configured. Please contact the system administrator for help.", - "this_is_not_a_valid_international_phone_number": "This is not a valid international phone number", - "view_my_data": "View my data", - "vorname": "Firstname" -} \ No newline at end of file + "already_have_an_account": "Already have an account?", + "apartment_suite_etc": "Apartment, suite, etc.", + "configuration_error": "Configuration error", + "distance": "Distance", + "download_certificate": "Download certificate", + "e_mail_adress": "mail address", + "go_to_login": "Go To Login", + "if_you_are_the_system_administrator_please_refer_to_the_official_product_documentation_readme_for_configuration_guidance": "If you are the system administrator, please refer to the official product documentation/ README for configuration guidance.", + "imprint": "Imprint", + "lap_time": "Lap time", + "lap_times": "Lap times", + "main_page_text": "Here you can register for the Lauf Für Kaya! or manage your runner profile.", + "mittelname": "Middlename", + "nachname": "Lastname", + "ort": "City", + "phone_number": "Phone Number", + "please_provide_a_valid_zipcode": "Please provide a valid zipcode...", + "please_provide_valid_mail": "Please provide a valid mail address.", + "plz": "zipcode", + "privacy_policy": "Privacy Policy", + "profile": "Profile", + "provide_address": "Provide a postal address?", + "register": { + "register_now": "Register now for Lauf für Kaya! 2021." + }, + "register_now": "Register now!", + "registrieren": "Register Now", + "save_changes": "Save changes", + "sponsoring": "Sponsoring", + "strasse": "Street/ Block", + "the_system_is_not_properly_configured_please_contact_the_system_administrator_for_help": "The system is not properly configured. Please contact the system administrator for help.", + "this_is_not_a_valid_international_phone_number": "This is not a valid international phone number", + "view_my_data": "View my data", + "vorname": "Firstname", + "no_laps_scans_were_recorded_yet": "No laps/ scans were recorded yet..." +} From 49c3507a71a6ca212b0b8ade2b1945ea90db96bc Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Sun, 7 Mar 2021 14:04:40 +0100 Subject: [PATCH 32/48] added empty state for scans ref #11 --- src/assets/empty_laps.svg | 1 + src/components/Profile.vue | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 src/assets/empty_laps.svg diff --git a/src/assets/empty_laps.svg b/src/assets/empty_laps.svg new file mode 100644 index 0000000..17ed002 --- /dev/null +++ b/src/assets/empty_laps.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/Profile.vue b/src/components/Profile.vue index 7a3fb7a..cc1bdea 100644 --- a/src/components/Profile.vue +++ b/src/components/Profile.vue @@ -145,6 +145,11 @@
+ {{ $t('no_laps_scans_were_recorded_yet') }}
From 4fb9aee25586cc873f7e276fd44e41458b633b70 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Sun, 7 Mar 2021 14:04:56 +0100 Subject: [PATCH 33/48] =?UTF-8?q?re-order=20language=20files=20?= =?UTF-8?q?=F0=9F=98=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ref #11 --- src/locales/en.json | 72 ++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index e134b50..f1be63e 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1,37 +1,37 @@ { - "already_have_an_account": "Already have an account?", - "apartment_suite_etc": "Apartment, suite, etc.", - "configuration_error": "Configuration error", - "distance": "Distance", - "download_certificate": "Download certificate", - "e_mail_adress": "mail address", - "go_to_login": "Go To Login", - "if_you_are_the_system_administrator_please_refer_to_the_official_product_documentation_readme_for_configuration_guidance": "If you are the system administrator, please refer to the official product documentation/ README for configuration guidance.", - "imprint": "Imprint", - "lap_time": "Lap time", - "lap_times": "Lap times", - "main_page_text": "Here you can register for the Lauf Für Kaya! or manage your runner profile.", - "mittelname": "Middlename", - "nachname": "Lastname", - "ort": "City", - "phone_number": "Phone Number", - "please_provide_a_valid_zipcode": "Please provide a valid zipcode...", - "please_provide_valid_mail": "Please provide a valid mail address.", - "plz": "zipcode", - "privacy_policy": "Privacy Policy", - "profile": "Profile", - "provide_address": "Provide a postal address?", - "register": { - "register_now": "Register now for Lauf für Kaya! 2021." - }, - "register_now": "Register now!", - "registrieren": "Register Now", - "save_changes": "Save changes", - "sponsoring": "Sponsoring", - "strasse": "Street/ Block", - "the_system_is_not_properly_configured_please_contact_the_system_administrator_for_help": "The system is not properly configured. Please contact the system administrator for help.", - "this_is_not_a_valid_international_phone_number": "This is not a valid international phone number", - "view_my_data": "View my data", - "vorname": "Firstname", - "no_laps_scans_were_recorded_yet": "No laps/ scans were recorded yet..." -} + "already_have_an_account": "Already have an account?", + "apartment_suite_etc": "Apartment, suite, etc.", + "configuration_error": "Configuration error", + "distance": "Distance", + "download_certificate": "Download certificate", + "e_mail_adress": "mail address", + "go_to_login": "Go To Login", + "if_you_are_the_system_administrator_please_refer_to_the_official_product_documentation_readme_for_configuration_guidance": "If you are the system administrator, please refer to the official product documentation/ README for configuration guidance.", + "imprint": "Imprint", + "lap_time": "Lap time", + "lap_times": "Lap times", + "main_page_text": "Here you can register for the Lauf Für Kaya! or manage your runner profile.", + "mittelname": "Middlename", + "nachname": "Lastname", + "no_laps_scans_were_recorded_yet": "No laps/ scans were recorded yet...", + "ort": "City", + "phone_number": "Phone Number", + "please_provide_a_valid_zipcode": "Please provide a valid zipcode...", + "please_provide_valid_mail": "Please provide a valid mail address.", + "plz": "zipcode", + "privacy_policy": "Privacy Policy", + "profile": "Profile", + "provide_address": "Provide a postal address?", + "register": { + "register_now": "Register now for Lauf für Kaya! 2021." + }, + "register_now": "Register now!", + "registrieren": "Register Now", + "save_changes": "Save changes", + "sponsoring": "Sponsoring", + "strasse": "Street/ Block", + "the_system_is_not_properly_configured_please_contact_the_system_administrator_for_help": "The system is not properly configured. Please contact the system administrator for help.", + "this_is_not_a_valid_international_phone_number": "This is not a valid international phone number", + "view_my_data": "View my data", + "vorname": "Firstname" +} \ No newline at end of file From cb3dc13c8acfeea3fad9ba9d5f9f6eade3e2310d Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Sun, 7 Mar 2021 14:05:28 +0100 Subject: [PATCH 34/48] center empty state image ref #11 --- src/components/Profile.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Profile.vue b/src/components/Profile.vue index cc1bdea..2d24e08 100644 --- a/src/components/Profile.vue +++ b/src/components/Profile.vue @@ -147,7 +147,7 @@
{{ $t('no_laps_scans_were_recorded_yet') }} From 69db350461231123796bc24a2452e6af47a7c83f Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Sun, 7 Mar 2021 14:06:11 +0100 Subject: [PATCH 35/48] =?UTF-8?q?=F0=9F=8C=8E=20added=20missing=20translat?= =?UTF-8?q?ions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ref #11 --- src/locales/de.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/locales/de.json b/src/locales/de.json index f71699c..0dd38e4 100644 --- a/src/locales/de.json +++ b/src/locales/de.json @@ -13,6 +13,7 @@ "main_page_text": "Hier können Sie sich für den Lauf Für Kaya! registrieren oder ihr Läuferprofil verwalten.", "mittelname": "Mittelname", "nachname": "Nachname", + "no_laps_scans_were_recorded_yet": "Es wurden noch keine Runden / Scans aufgezeichnet ...", "ort": "Ort", "phone_number": "Telefonnummer", "please_provide_a_valid_zipcode": "Bitte geben Sie eine gültige Postleitzahl an...", From c8d462100a660e8edfd3bc46bd0c8abbd002f661 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Sun, 7 Mar 2021 14:08:06 +0100 Subject: [PATCH 36/48] use api response object properly ref #11 --- src/components/Profile.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/Profile.vue b/src/components/Profile.vue index 2d24e08..8f566f8 100644 --- a/src/components/Profile.vue +++ b/src/components/Profile.vue @@ -139,8 +139,12 @@ - s.distance - s.time + + m + + + s + @@ -198,6 +202,7 @@ axios.get(`${config.baseurl}api/runners/me/${token}`) axios.get(`${config.baseurl}api/runners/me/${token}/scans`) .then(({ data }) => { state.scans = data; + // TODO: filter for valid=true scans only }).catch((error) => { toast.error("An error occured while loading your profile data"); }) From ff1f43e235ba318008b9c408853231c809760304 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Sun, 7 Mar 2021 14:22:03 +0100 Subject: [PATCH 37/48] format lap times + only display valid scans ref #11 --- src/components/Profile.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/Profile.vue b/src/components/Profile.vue index 8f566f8..2263b06 100644 --- a/src/components/Profile.vue +++ b/src/components/Profile.vue @@ -142,9 +142,7 @@ m - - s - + @@ -201,8 +199,12 @@ axios.get(`${config.baseurl}api/runners/me/${token}`) }) axios.get(`${config.baseurl}api/runners/me/${token}/scans`) .then(({ data }) => { + data.map(function(s) { + s.lapTime = Math.floor(s.lapTime / 60) + 'min ' + (Math.floor(s.lapTime % 60) + "").padStart(2, "0") + "s" + return s; + }) + data.filter(s => s.valid === true); state.scans = data; - // TODO: filter for valid=true scans only }).catch((error) => { toast.error("An error occured while loading your profile data"); }) From d405557aafb205c958914c85bd69c364d107370c Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Mon, 8 Mar 2021 22:18:19 +0100 Subject: [PATCH 38/48] i18n support for TOS checkbox ref #4 --- src/components/Register.vue | 10 ++++++++-- src/locales/de.json | 3 +++ src/locales/en.json | 3 +++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/components/Register.vue b/src/components/Register.vue index a8a6673..9de89c4 100644 --- a/src/components/Register.vue +++ b/src/components/Register.vue @@ -177,8 +177,14 @@
diff --git a/src/locales/de.json b/src/locales/de.json index f71699c..da1e2a1 100644 --- a/src/locales/de.json +++ b/src/locales/de.json @@ -6,6 +6,8 @@ "download_certificate": "Urkunde herunterladen", "e_mail_adress": "E-Mail Adresse", "go_to_login": "Zum Login", + "i_accept": "Ich habe die ", + "i_accept_end": "gelesen und akzeptiert.", "if_you_are_the_system_administrator_please_refer_to_the_official_product_documentation_readme_for_configuration_guidance": "Wenn Sie der Systemadministrator sind, finden Sie Konfigurationsanweisungen in der offiziellen Produktdokumentation / README.", "imprint": "Impressum", "lap_time": "Rundenzeit", @@ -31,6 +33,7 @@ "strasse": "Straße", "the_system_is_not_properly_configured_please_contact_the_system_administrator_for_help": "Das System ist nicht richtig konfiguriert. Bitte wenden Sie sich an den Systemadministrator, um Hilfe zu erhalten.", "this_is_not_a_valid_international_phone_number": "Dies ist keine gültige internationale Telefonnummer", + "tos": "AGBs", "view_my_data": "Meine Läuferdaten einsehen", "vorname": "Vorname" } \ No newline at end of file diff --git a/src/locales/en.json b/src/locales/en.json index 7ce8dba..868a9bb 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -6,6 +6,8 @@ "download_certificate": "Download certificate", "e_mail_adress": "mail address", "go_to_login": "Go To Login", + "i_accept": "I have read and accepted the ", + "i_accept_end": "", "if_you_are_the_system_administrator_please_refer_to_the_official_product_documentation_readme_for_configuration_guidance": "If you are the system administrator, please refer to the official product documentation/ README for configuration guidance.", "imprint": "Imprint", "lap_time": "Lap time", @@ -31,6 +33,7 @@ "strasse": "Street/ Block", "the_system_is_not_properly_configured_please_contact_the_system_administrator_for_help": "The system is not properly configured. Please contact the system administrator for help.", "this_is_not_a_valid_international_phone_number": "This is not a valid international phone number", + "tos": "Terms of Service", "view_my_data": "View my data", "vorname": "Firstname" } \ No newline at end of file From 641e7a0d8ff75ce5756d11f39b583f55731b821c Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Tue, 9 Mar 2021 17:27:48 +0100 Subject: [PATCH 39/48] Profile - display group ref #10 --- src/components/Profile.vue | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/components/Profile.vue b/src/components/Profile.vue index 7d60dcf..2dc30c7 100644 --- a/src/components/Profile.vue +++ b/src/components/Profile.vue @@ -9,7 +9,7 @@ class="text-3xl font-bold whitespace-nowrap" v-text="(state.firstname || '') + ' ' + (state.middlename || '') + ' ' + (state.lastname || '')" >

-

Musterfirma > PR

+

{{ state.group }}

-
+
@@ -116,7 +116,7 @@
-
+
@@ -158,7 +158,7 @@
-
+
coming soon...
@@ -181,8 +181,9 @@ const state = reactive({ firstname: "", middlename: "", lastname: "", + group: "", + activetab: "profile", }) -let activetab = ref("profile"); const toast = useToast(); const token = location.hash.substr(1).split('&')[0].split('=')[1]; axios.get(`${config.baseurl}api/runners/me/${token}`) @@ -192,6 +193,7 @@ axios.get(`${config.baseurl}api/runners/me/${token}`) state.firstname = data.firstname; state.middlename = data.middlename; state.lastname = data.lastname; + state.group = data.group; }).catch((error) => { toast.error("An error occured while loading your profile data"); }) From 56daa7c501e3f59e988f1912ed397e43d6311572 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Tue, 9 Mar 2021 17:39:20 +0100 Subject: [PATCH 40/48] fix fallback component routing for invalid env config ref #10 --- src/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.js b/src/main.js index 188d3ff..0611093 100644 --- a/src/main.js +++ b/src/main.js @@ -28,7 +28,7 @@ const Privacy = import('./components/Privacy.vue'); const Register = import('./components/Register.vue'); const Profile = () => import('./components/Profile.vue'); // -let routes = [ { path: '/', component: EnvError } ]; +let routes = [ { path: '/:pathMatch(.*)*', component: EnvError } ]; if (typeof config !== 'undefined') { if (config.baseurl && config.documentserver_key) { routes = [ From 36baf174a52e3a5ce21294f7d4e899d6893fd517 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Wed, 24 Mar 2021 17:38:51 +0100 Subject: [PATCH 41/48] =?UTF-8?q?=E2=8F=AB=20dependency=20bump?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index db9b0fc..97685c0 100644 --- a/package.json +++ b/package.json @@ -20,13 +20,13 @@ }, "devDependencies": { "@vitejs/plugin-vue": "^1.1.5", - "@vue/compiler-sfc": "^3.0.6", - "autoprefixer": "^10.2.4", - "postcss": "^8.2.6", - "release-it": "^14.4.1", - "tailwindcss": "^2.0.3", - "vite": "^2.0.3", - "vite-plugin-windicss": "^0.5.4" + "@vue/compiler-sfc": "^3.0.7", + "autoprefixer": "^10.2.5", + "postcss": "^8.2.8", + "release-it": "^14.5.0", + "tailwindcss": "^2.0.4", + "vite": "^2.1.2", + "vite-plugin-windicss": "^0.9.11" }, "release-it": { "git": { From 18d1ddacf7e99e67e6572533ebd9add3d0c0592f Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Thu, 25 Mar 2021 19:29:37 +0100 Subject: [PATCH 42/48] basic /register/:token route ref #15 --- src/components/Register.vue | 16 +++++++++++++++- src/main.js | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/components/Register.vue b/src/components/Register.vue index 9de89c4..dd2b3e9 100644 --- a/src/components/Register.vue +++ b/src/components/Register.vue @@ -219,16 +219,30 @@