Compare commits

...
Author SHA1 Message Date
philipp ba604f77e9 added env config instructions
ref #27
2021-03-31 19:03:07 +02:00
philipp c178932d94 Home - route fixes
ref #27
2021-03-31 18:56:34 +02:00
philipp 63d9ee2f86 favicon fix
ref #27
2021-03-31 18:55:30 +02:00
philipp 106bf4c0ff route fix for favicon + background
ref #27
2021-03-31 18:55:00 +02:00
philipp 2e7a718daa load main.js as deferred
ref #27
2021-03-31 18:45:23 +02:00
philipp f603e53151 added missing routes
ref #27
2021-03-31 18:45:04 +02:00
philipp 6e0bf56289 🚀Bumped version to v0.3.1
continuous-integration/drone/push Build is passing
2021-03-31 17:14:20 +02:00
philipp 27b81d87ae 🐞 fixed Vite/ Tailwind build 2021-03-31 17:13:57 +02:00
philipp cb5f48d913 🚀Bumped version to v0.3.0
continuous-integration/drone/push Build is passing
2021-03-30 18:17:31 +02:00
philipp ae44d7e2e8 🐞 fix release config 2021-03-30 18:17:09 +02:00
philipp 69bfe9e585 Merge branch 'bugfix/23-broken-build' into dev
continuous-integration/drone/push Build is passing
close #23
2021-03-30 18:12:04 +02:00
philipp 15b60f60b5 migrate to Tailwind JIT + views + router/ build fix
ref #23
2021-03-30 18:05:55 +02:00
niggl 83924a9416 🚀Bumped version to v0.2.0
continuous-integration/drone/push Build is passing
2021-03-27 19:44:28 +01:00
niggl bd29d99120 Added image to docker-compose
continuous-integration/drone/push Build is passing
ref #17
2021-03-27 19:38:36 +01:00
niggl 323ddc1c3d Now building latest from main [ci-skip]
continuous-integration/drone/push Build is passing
ref #17
2021-03-27 19:34:03 +01:00
niggl a174df19dd Added ci to build dev and tags
continuous-integration/drone/push Build is passing
ref #17
2021-03-27 19:32:32 +01:00
niggl eec6a358d8 Added releaseit config
ref #17
2021-03-27 19:29:47 +01:00
philipp 5253fb1832 🚀Bumped version to v0.1.2 2021-03-27 19:02:19 +01:00
philipp 00f8d8023e package dependency cleanup 2021-03-26 21:05:18 +01:00
philipp ef304c576b Merge branch 'feature/0.1.1' into dev 2021-03-26 20:45:11 +01:00
philipp e2be86c558 ⏫ v0.1.1 changelog 2021-03-26 20:44:53 +01:00
philipp 4d57812c04 ⏫ version bump to 0.1.1 2021-03-26 20:43:52 +01:00
philipp 829fe32743 org registration - add team select
close #18
2021-03-26 20:42:20 +01:00
philipp 760b1b32a2 added baseurl_selfservice config
close #22
2021-03-26 20:10:26 +01:00
philipp 7b0bc22a71 [tmp] vue i18n error 2021-03-26 18:36:52 +01:00
philipp 88996f81d8 Merge tag '0.1.0' into dev
working basics
2021-03-26 18:01:03 +01:00
philipp 5876e0c9df Merge branch 'release/0.1.0' 2021-03-26 18:00:50 +01:00
philipp ace5c958f1 ⏫ version bump to 0.1.0 2021-03-26 18:00:31 +01:00
philipp aa287cf452 add required confirmation of data on registration 2021-03-26 17:47:50 +01:00
philipp aca2dff129 drop profile data editing
close #20
2021-03-26 16:48:34 +01:00
philipp d41824b735 Merge pull request 'feature/15_company_registration' (#16) from feature/15_company_registration into dev
Reviewed-on: #16
close #15
2021-03-25 19:01:59 +00:00
philipp 7904151a52 enable org registration
ref #15
2021-03-25 19:51:44 +01:00
philipp a39cf75c7f move profile to path param
ref #15
2021-03-25 19:49:35 +01:00
philipp 79d8545ed6 working path params for org registration
ref #15
2021-03-25 19:36:31 +01:00
philipp 18d1ddacf7 basic /register/:token route
ref #15
2021-03-25 19:29:37 +01:00
philipp 36baf174a5 ⏫ dependency bump 2021-03-24 17:38:51 +01:00
philipp 857b5c3d89 Merge pull request 'i18n support for TOS checkbox' (#14) from feature/4-component-interpolation into dev
Reviewed-on: #14
close #4
2021-03-09 16:56:34 +00:00
niggl 9da54d15bf Merge branch 'dev' into feature/4-component-interpolation 2021-03-09 16:53:45 +00:00
philipp 9e5252181e Merge pull request 'feature/11-user-scans' (#13) from feature/11-user-scans into dev
Reviewed-on: #13
close #11
2021-03-09 16:51:53 +00:00
philipp 45c0bdd5cf Merge branch 'dev' into feature/11-user-scans
# Conflicts:
#	src/components/Profile.vue
2021-03-09 17:45:19 +01:00
philipp 853f817c8f Merge pull request 'feature/10-my-profile-data' (#12) from feature/10-my-profile-data into dev
Reviewed-on: #12
close #10
2021-03-09 16:42:09 +00:00
philipp 56daa7c501 fix fallback component routing for invalid env config
ref #10
2021-03-09 17:39:20 +01:00
philipp 641e7a0d8f Profile - display group
ref #10
2021-03-09 17:27:48 +01:00
philipp d405557aaf i18n support for TOS checkbox
ref #4
2021-03-08 22:18:19 +01:00
philipp ff1f43e235 format lap times + only display valid scans
ref #11
2021-03-07 14:22:03 +01:00
philipp c8d462100a use api response object properly
ref #11
2021-03-07 14:08:06 +01:00
philipp 69db350461 🌎 added missing translations
ref #11
2021-03-07 14:06:11 +01:00
philipp cb3dc13c8a center empty state image
ref #11
2021-03-07 14:05:28 +01:00
philipp 4fb9aee255 re-order language files 😬
ref #11
2021-03-07 14:04:56 +01:00
philipp 49c3507a71 added empty state for scans
ref #11
2021-03-07 14:04:40 +01:00
philipp 14369480ea basic lap/ scans ui
ref #11
2021-03-07 14:04:29 +01:00
philipp 8205c11bd9 Profile - remove form styling. data is not editable yet
ref #10
2021-03-07 13:49:56 +01:00
philipp b30277b617 display user name in Profile title
ref #10
2021-03-07 13:46:25 +01:00
philipp 0929f2bbc7 Profile - fetch user profile data from api
ref #10
2021-03-07 13:30:23 +01:00
philipp ac9f1ba2ac routing import fix
ref #10
2021-03-07 13:30:05 +01:00
philipp f8ceec492d ✨ Profile - basic parsing for hash based query params
ref #10
2021-03-07 13:21:43 +01:00
philipp 3351092859 fix accessibility in Profile component 2021-03-05 19:27:44 +01:00
philipp b668c50eac Merge pull request 'feature/3_env_file' (#9) from feature/3_env_file into dev
Reviewed-on: #9
close #3
2021-03-05 18:09:13 +00:00
philipp 4c78712f83 📃 updated README
ref #3
2021-03-05 18:59:21 +01:00
philipp 987ac4d02c 🐞 bugfix for non-existant env.js
ref #3
2021-03-05 18:47:15 +01:00
philipp c92d5bf5f2 added ui for configuration errors page
ref #3
2021-03-04 19:56:17 +01:00
philipp 20229ab142 fallback for env config errors
ref #3
2021-03-04 17:09:47 +01:00
philipp 5a5261d6b0 basic markdown rendering + routing for /imprint and /privacy
ref #3
2021-03-03 19:14:26 +01:00
philipp 747c1d2a90 ✨ basic env.js file for api baseurl, documentserver_key
ref #3
2021-03-03 18:20:53 +01:00
philipp faf19d9e43 Merge pull request 'feature/5_basic_ui_lap_times' (#8) from feature/5_basic_ui_lap_times into dev
Reviewed-on: #8
close #5
2021-03-03 17:07:47 +00:00
philipp a1175b849b Merge branch 'dev' into feature/5_basic_ui_lap_times
# Conflicts:
#	src/components/Profile.vue

ref #5
2021-03-03 18:01:46 +01:00
philipp c8bf0b2685 added more example laps
ref #5
2021-03-02 18:40:04 +01:00
philipp cf5c279eac 🌎 translation for lap times + distance
ref #6
2021-03-02 18:35:41 +01:00
philipp b518730fab 🌎 Profile - i18n compatibility
ref #5
2021-03-02 18:33:36 +01:00
philipp 503aafba06 ✨ Profile - lap times table responsiveness
ref #5
2021-03-02 18:25:30 +01:00
philipp 7fa459b71b merge #6 into #5 2021-03-02 18:24:00 +01:00
philipp 95e84b2efd Merge pull request 'use new flex grid for responsive displaying action buttons' (#7) from feature/6_profile_action_buttons into dev
Reviewed-on: #7
close #6
2021-03-02 17:20:17 +00:00
philipp e499357d6f added sponsorings tab
ref #5
2021-03-02 18:19:58 +01:00
philipp 13543c3cd2 Profile - basic ui reactivity logic
ref #5
2021-03-02 18:18:29 +01:00
philipp 2b9c454395 use new flex grid for responsive displaying action buttons
ref #6
2021-03-02 17:55:51 +01:00
philipp f10f009334 Merge pull request 'feature/1-register-disable-submit-address' (#2) from feature/1-register-disable-submit-address into dev
Reviewed-on: #2
close #1
2021-03-02 16:30:01 +00:00
philipp e8583340c7 ✨ Register - disable register button when invalid phone number is set
ref #1
2021-03-02 17:21:47 +01:00
philipp e633ad6cea ✨ Register - invalid phone number error state
ref #1
2021-03-02 17:18:34 +01:00
philipp 43ee4b51f9 🐞 Register - fix zipcode submitting
ref #1
2021-03-01 18:45:37 +01:00
philipp 3404fc06bf 🐞 Register - display error state for empty + required address inputs
ref #1
2021-03-01 18:42:00 +01:00
philipp b5eade9633 ✅ added zipcode validation
ref #1
2021-03-01 18:31:19 +01:00
philipp 9d970b02b8 🐞 fix for address submitting
ref #1
2021-03-01 18:10:26 +01:00
philipp 2822fcdeba 🌟 added requirement stars to Register ui
ref #1
2021-03-01 17:52:04 +01:00
philipp 2153944894 📍🏠 added address2 field to Register
ref #1
2021-03-01 17:51:40 +01:00
philipp d18dbc3a1f 🎉 working vue reactivity
ref #1
2021-03-01 17:31:12 +01:00
philipp c8db78df6f 🚀Bumped version to v0.0.1 2021-02-27 19:09:14 +01:00
philipp f1c45dff11 🌎 first translations for landing page 2021-02-27 19:07:07 +01:00
philipp 72f65234f0 Register - correct phone number validation 2021-02-27 19:00:18 +01:00
philipp ff89071156 sample toast integration 2021-02-27 18:28:32 +01:00
philipp b7f15f4d68 accessibility fixes for input borders 2021-02-27 18:28:20 +01:00
philipp 2b303ac9b2 Register - basic form validations 2021-02-27 15:32:43 +01:00
philipp 94f5787988 🧹 added order script for i18n keys 2021-02-27 14:14:37 +01:00
philipp 37b7ed75c5 🌎 basic i18n keys for Register component 2021-02-27 14:08:21 +01:00
36 changed files with 1193 additions and 572 deletions

No files matched your search

+109
View File
@@ -0,0 +1,109 @@
---
kind: secret
name: docker_username
get:
path: odit-registry-builder
name: username
---
kind: secret
name: docker_password
get:
path: odit-registry-builder
name: password
---
kind: secret
name: git_ssh
get:
path: odit-git-bot
name: sshkey
---
kind: pipeline
type: kubernetes
name: build:dev
steps:
# - name: run full license export
# depends_on: ["clone"]
# image: node:alpine
# commands:
# - yarn
# - yarn licenses:export
# - name: push new licenses file to repo
# depends_on: ["run full license export"]
# image: appleboy/drone-git-push
# settings:
# branch: dev
# commit: true
# commit_message: new license file version [CI SKIP]
# author_email: bot@odit.services
# remote: git@git.odit.services:lfk/selfservice.git
# ssh_key:
# from_secret: git_ssh
- name: build dev
image: plugins/docker
depends_on: [clone]
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: registry.odit.services/lfk/selfservice
tags:
- dev
registry: registry.odit.services
mtu: 1000
trigger:
branch:
- dev
event:
- push
---
kind: pipeline
type: kubernetes
name: build:latest
steps:
- name: build latest
image: plugins/docker
depends_on: [clone]
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: registry.odit.services/lfk/selfservice
tags:
- latest
registry: registry.odit.services
mtu: 1000
trigger:
branch:
- main
event:
- push
---
kind: pipeline
type: kubernetes
name: build:tags
steps:
- name: build $DRONE_TAG
image: plugins/docker
depends_on: [clone]
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: registry.odit.services/lfk/selfservice
tags:
- '${DRONE_TAG}'
registry: registry.odit.services
mtu: 1000
trigger:
event:
- tag
+2 -1
View File
@@ -182,4 +182,5 @@ docs/_book
test/
/package-lock.json
/yarn.lock
/yarn.lock
/public/env.js
+2 -1
View File
@@ -1,5 +1,6 @@
{
"i18n-ally.localesPaths": [
"src/locales"
]
],
"i18n-ally.keystyle": "nested"
}
+125
View File
@@ -0,0 +1,125 @@
### Changelog
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
#### [0.3.1](https://git.odit.services/lfk/selfservice/compare/0.3.0...0.3.1)
- 🐞 fixed Vite/ Tailwind build [`27b81d8`](https://git.odit.services/lfk/selfservice/commit/27b81d87aeb907f6c3d35ea6f55b4fe56c1e79b4)
#### [0.3.0](https://git.odit.services/lfk/selfservice/compare/0.2.0...0.3.0)
> 30 March 2021
- Merge branch 'bugfix/23-broken-build' into dev [`#23`](https://git.odit.services/lfk/selfservice/issues/23)
- migrate to Tailwind JIT + views + router/ build fix [`15b60f6`](https://git.odit.services/lfk/selfservice/commit/15b60f60b5d4f3c4035460f25807c5f5f2f19578)
- 🚀Bumped version to v0.3.0 [`cb5f48d`](https://git.odit.services/lfk/selfservice/commit/cb5f48d913b8aff2b138c93c4e29a2b8a553529d)
- 🐞 fix release config [`ae44d7e`](https://git.odit.services/lfk/selfservice/commit/ae44d7e2e86b9bee74d453301846d02b29c632f2)
- 🚀Bumped version to v0.1.2 [`5253fb1`](https://git.odit.services/lfk/selfservice/commit/5253fb18325ce9069e84180b30110ae97752ef20)
#### [0.2.0](https://git.odit.services/lfk/selfservice/compare/0.1.1...0.2.0)
> 27 March 2021
- 🚀Bumped version to v0.2.0 [`83924a9`](https://git.odit.services/lfk/selfservice/commit/83924a9416dc966a417b32fa19b5fb725181e5ee)
- Added ci to build dev and tags [`a174df1`](https://git.odit.services/lfk/selfservice/commit/a174df19ddbf65b0229af38947a9416b1bcd0703)
- Now building latest from main [ci-skip] [`323ddc1`](https://git.odit.services/lfk/selfservice/commit/323ddc1c3d91ffa74200ed9250b891d2fe4da78d)
- Added releaseit config [`eec6a35`](https://git.odit.services/lfk/selfservice/commit/eec6a358d899a40eb6bac92bb3af37b2d37a5d91)
- package dependency cleanup [`00f8d80`](https://git.odit.services/lfk/selfservice/commit/00f8d8023e3ca47eb650c8b1c5c550112ed0d503)
- Added image to docker-compose [`bd29d99`](https://git.odit.services/lfk/selfservice/commit/bd29d9912023539b26cdac36997d7cb29ec0d538)
#### [0.1.1](https://git.odit.services/lfk/selfservice/compare/0.1.0...0.1.1)
> 26 March 2021
- org registration - add team select [`#18`](https://git.odit.services/lfk/selfservice/issues/18)
- added baseurl_selfservice config [`#22`](https://git.odit.services/lfk/selfservice/issues/22)
- [tmp] vue i18n error [`7b0bc22`](https://git.odit.services/lfk/selfservice/commit/7b0bc22a7157ee4551ab69dd5be856abed90b60c)
- ⏫ v0.1.1 changelog [`e2be86c`](https://git.odit.services/lfk/selfservice/commit/e2be86c5589f9ca9053d5bcdc61be3a642b94791)
- ⏫ version bump to 0.1.1 [`4d57812`](https://git.odit.services/lfk/selfservice/commit/4d57812c043e9078656818a33d241df220127a92)
- Merge tag '0.1.0' into dev [`88996f8`](https://git.odit.services/lfk/selfservice/commit/88996f81d8990969048f00a7c175d2a30da2588b)
#### 0.1.0
> 26 March 2021
- drop profile data editing [`#20`](https://git.odit.services/lfk/selfservice/issues/20)
- Merge pull request 'feature/15_company_registration' (#16) from feature/15_company_registration into dev [`#15`](https://git.odit.services/lfk/selfservice/issues/15)
- Merge pull request 'i18n support for TOS checkbox' (#14) from feature/4-component-interpolation into dev [`#4`](https://git.odit.services/lfk/selfservice/issues/4)
- Merge pull request 'feature/11-user-scans' (#13) from feature/11-user-scans into dev [`#11`](https://git.odit.services/lfk/selfservice/issues/11)
- Merge pull request 'feature/10-my-profile-data' (#12) from feature/10-my-profile-data into dev [`#10`](https://git.odit.services/lfk/selfservice/issues/10)
- Merge pull request 'feature/3_env_file' (#9) from feature/3_env_file into dev [`#3`](https://git.odit.services/lfk/selfservice/issues/3)
- Merge pull request 'feature/5_basic_ui_lap_times' (#8) from feature/5_basic_ui_lap_times into dev [`#5`](https://git.odit.services/lfk/selfservice/issues/5)
- Merge pull request 'use new flex grid for responsive displaying action buttons' (#7) from feature/6_profile_action_buttons into dev [`#6`](https://git.odit.services/lfk/selfservice/issues/6)
- Merge pull request 'feature/1-register-disable-submit-address' (#2) from feature/1-register-disable-submit-address into dev [`#1`](https://git.odit.services/lfk/selfservice/issues/1)
- Initial commit [`7c2154a`](https://git.odit.services/lfk/selfservice/commit/7c2154ad026e8850727c40e9759757c4ceb56d0b)
- sample routes + first landing page and routing logic [`3e92597`](https://git.odit.services/lfk/selfservice/commit/3e92597a563399149b5fbfab74fce6a0ecd6aba4)
- basic ui for profile page [`a0cbeae`](https://git.odit.services/lfk/selfservice/commit/a0cbeae8fef54c298883c379a9e9e9440f6d3336)
- 🎉 initial commit [`4ca10e1`](https://git.odit.services/lfk/selfservice/commit/4ca10e1db4b99b0181fdb0bdad1c042f958b2267)
- ✨refined Register component for basic requirements [`e63367e`](https://git.odit.services/lfk/selfservice/commit/e63367e84e382607d372dd5f14f3dd13da0426de)
- Profile - basic ui reactivity logic [`13543c3`](https://git.odit.services/lfk/selfservice/commit/13543c3cd2792b3f7829a2e0d5d64e73852d7feb)
- 🚚 tmp move Login component [`a661064`](https://git.odit.services/lfk/selfservice/commit/a661064f34d31dd1ef5a01919cc8d5a2d81882b9)
- basic lap/ scans ui [`1436948`](https://git.odit.services/lfk/selfservice/commit/14369480ea23e8b0af8548596a6bf3d331de13e5)
- basic markdown rendering + routing for /imprint and /privacy [`5a5261d`](https://git.odit.services/lfk/selfservice/commit/5a5261d6b0d4adc62c100a29cebd07d25b89028d)
- Register - basic form validations [`2b303ac`](https://git.odit.services/lfk/selfservice/commit/2b303ac9b279423bc0cee687e4d9ef3bdb3727c2)
- use new flex grid for responsive displaying action buttons [`2b9c454`](https://git.odit.services/lfk/selfservice/commit/2b9c454395a4789236878b7e2a77dc1fa230eafe)
- merge #6 into #5 [`7fa459b`](https://git.odit.services/lfk/selfservice/commit/7fa459b71b2bdd96d4a5104b5356441e1232e5e8)
- re-order language files 😬 [`4fb9aee`](https://git.odit.services/lfk/selfservice/commit/4fb9aee25586cc873f7e276fd44e41458b633b70)
- 🐳 working docker config + Dockerfile [`5a258d8`](https://git.odit.services/lfk/selfservice/commit/5a258d8e6ceadb6a66cf628e8093876d1f4a783c)
- 🧹 added order script for i18n keys [`94f5787`](https://git.odit.services/lfk/selfservice/commit/94f578798818f7188ff83e6accb201a50aaa43a2)
- Profile - remove form styling. data is not editable yet [`8205c11`](https://git.odit.services/lfk/selfservice/commit/8205c11bd9a38c49608b0641dd89df22f492efd0)
- 🌎 basic i18n keys for Register component [`37b7ed7`](https://git.odit.services/lfk/selfservice/commit/37b7ed75c52cea16b413fcd2af586a30392496d5)
- Register - reactive AGB registration button [`9effcb4`](https://git.odit.services/lfk/selfservice/commit/9effcb457540b512c261286cbf46bbd856b7d8b9)
- Register - basic input POST to api [`8bf0803`](https://git.odit.services/lfk/selfservice/commit/8bf08034b798da354fdbbbc7ce6e5a72616bb16b)
- added ui for configuration errors page [`c92d5bf`](https://git.odit.services/lfk/selfservice/commit/c92d5bf5f2ff7642e2a55abe0002ff94f2d64d3e)
- fix accessibility in Profile component [`3351092`](https://git.odit.services/lfk/selfservice/commit/335109285912a4df16d4f0aea90c0ba054089762)
- 🌎 Profile - i18n compatibility [`b518730`](https://git.odit.services/lfk/selfservice/commit/b518730fab90927b111f1708b532c5eb34e2aee2)
- basic demo for i18n integration along with i18n-ally [`63bb34e`](https://git.odit.services/lfk/selfservice/commit/63bb34ef997bed202f3f208645e14861318e66ef)
- basic input styling for Profile page [`8fd6f47`](https://git.odit.services/lfk/selfservice/commit/8fd6f47b2f5d21a58ce356a949910db7d7e6064b)
- 🎉 working vue reactivity [`d18dbc3`](https://git.odit.services/lfk/selfservice/commit/d18dbc3a1fdf1bc9f2e8c5b37cc2d3044857410a)
- 📍🏠 added address2 field to Register [`2153944`](https://git.odit.services/lfk/selfservice/commit/215394489461e17760263cebf606475938500e6b)
- Profile - fetch user profile data from api [`0929f2b`](https://git.odit.services/lfk/selfservice/commit/0929f2bbc7037106bc6c9a4c948f51c59148a10b)
- 🐳 basic devcontainer config [`5bfeac6`](https://git.odit.services/lfk/selfservice/commit/5bfeac693e8f9bfe6f62a38e12bf259744330c39)
- 📃 updated README [`4c78712`](https://git.odit.services/lfk/selfservice/commit/4c78712f83565f21f3cdee2168f9221e2a007951)
- Profile - display group [`641e7a0`](https://git.odit.services/lfk/selfservice/commit/641e7a0d8ff75ce5756d11f39b583f55731b821c)
- accessibility fixes for input borders [`b7f15f4`](https://git.odit.services/lfk/selfservice/commit/b7f15f4d6827c893aa1fc4d47996df2fb46602ff)
- add required confirmation of data on registration [`aa287cf`](https://git.odit.services/lfk/selfservice/commit/aa287cf452e588a41ec0f74063dcbecdb08d476a)
- 🐞 bugfix for non-existant env.js [`987ac4d`](https://git.odit.services/lfk/selfservice/commit/987ac4d02cf63af5acdcc60f0ee2ec54534773cb)
- fallback for env config errors [`20229ab`](https://git.odit.services/lfk/selfservice/commit/20229ab14252e20ffb3ac0e3e8b9d8f7f31819a3)
- move profile to path param [`a39cf75`](https://git.odit.services/lfk/selfservice/commit/a39cf75c7fc2e29a5a1a34a7db39355e59ce9476)
- sample toast integration [`ff89071`](https://git.odit.services/lfk/selfservice/commit/ff89071156325b40239d39bc5c21106cfb6448a0)
- ⚙ basic release config [`35b4796`](https://git.odit.services/lfk/selfservice/commit/35b4796f3794f332940becc25a617777216cc1f3)
- added more example laps [`c8bf0b2`](https://git.odit.services/lfk/selfservice/commit/c8bf0b2685f1e0db4df5e4ce405268865775eb41)
- Register - correct phone number validation [`72f6523`](https://git.odit.services/lfk/selfservice/commit/72f65234f09fc2b9c7179fa1b43e217fab59ae60)
- basic /register/:token route [`18d1dda`](https://git.odit.services/lfk/selfservice/commit/18d1ddacf7e99e67e6572533ebd9add3d0c0592f)
- i18n support for TOS checkbox [`d405557`](https://git.odit.services/lfk/selfservice/commit/d405557aafb205c958914c85bd69c364d107370c)
- 🌎 first translations for landing page [`f1c45df`](https://git.odit.services/lfk/selfservice/commit/f1c45dff11bfa088f04922f5cd2d8f4f5f873f2f)
- enable org registration [`7904151`](https://git.odit.services/lfk/selfservice/commit/7904151a52af1a1592706e6a468943c8e9c57518)
- working path params for org registration [`79d8545`](https://git.odit.services/lfk/selfservice/commit/79d8545ed6b2e0e64ca02194bc7009b48d2c8f2d)
- ⏫ dependency bump [`36baf17`](https://git.odit.services/lfk/selfservice/commit/36baf174a52e3a5ce21294f7d4e899d6893fd517)
- ✨ basic env.js file for api baseurl, documentserver_key [`747c1d2`](https://git.odit.services/lfk/selfservice/commit/747c1d2a906ed46325b999ebc0f079265ad81eeb)
- ✅ added zipcode validation [`b5eade9`](https://git.odit.services/lfk/selfservice/commit/b5eade9633fb88659cdfe882220db0579e39ada1)
- 🌟 added requirement stars to Register ui [`2822fcd`](https://git.odit.services/lfk/selfservice/commit/2822fcdeba3c5f559c165d512a2743949bf9c61e)
- ⏫ dependency bumps [`70ac314`](https://git.odit.services/lfk/selfservice/commit/70ac31401654c316a5c162dbc142421788fccee7)
- format lap times + only display valid scans [`ff1f43e`](https://git.odit.services/lfk/selfservice/commit/ff1f43e235ba318008b9c408853231c809760304)
- Register - basic email input validation [`0c006cc`](https://git.odit.services/lfk/selfservice/commit/0c006cc09c983041d906621677b4a7a32ca1bb22)
- Register - reactive address checkbox [`2b3f4ab`](https://git.odit.services/lfk/selfservice/commit/2b3f4abe1ac13318f5dee873b3454eb06577d1c5)
- use api response object properly [`c8d4621`](https://git.odit.services/lfk/selfservice/commit/c8d462100a660e8edfd3bc46bd0c8abbd002f661)
- added sponsorings tab [`e499357`](https://git.odit.services/lfk/selfservice/commit/e499357d6f151eaa8885ebfb78150e709ba4e753)
- 🌎 translation for lap times + distance [`cf5c279`](https://git.odit.services/lfk/selfservice/commit/cf5c279eacde5d62b62c030b21ba51caad56eac4)
- 🐞 fix for address submitting [`9d970b0`](https://git.odit.services/lfk/selfservice/commit/9d970b02b8a7ab54109fc3df2c652d01e0c99a8e)
- ⏫ version bump to 0.1.0 [`ace5c95`](https://git.odit.services/lfk/selfservice/commit/ace5c958f1ce63c1a91ae730b129de45ee9b975a)
- added empty state for scans [`49c3507`](https://git.odit.services/lfk/selfservice/commit/49c3507a71a6ca212b0b8ade2b1945ea90db96bc)
- ✨ Register - invalid phone number error state [`e633ad6`](https://git.odit.services/lfk/selfservice/commit/e633ad6cea5d1fe8596cb67319ca7da7548bc770)
- display user name in Profile title [`b30277b`](https://git.odit.services/lfk/selfservice/commit/b30277b617c1329702cb538b7e98d98929ca2346)
- ✨ Profile - basic parsing for hash based query params [`f8ceec4`](https://git.odit.services/lfk/selfservice/commit/f8ceec492d720ced359da9001088bf691cb8c28f)
- ✨ Profile - lap times table responsiveness [`503aafb`](https://git.odit.services/lfk/selfservice/commit/503aafba06d0d72fd980dedd9a56905c6673ce28)
- 🐞 Register - display error state for empty + required address inputs [`3404fc0`](https://git.odit.services/lfk/selfservice/commit/3404fc06bf8e7163319680991f8d98208869478c)
- fix fallback component routing for invalid env config [`56daa7c`](https://git.odit.services/lfk/selfservice/commit/56daa7c501e3f59e988f1912ed397e43d6311572)
- center empty state image [`cb3dc13`](https://git.odit.services/lfk/selfservice/commit/cb3dc13c8acfeea3fad9ba9d5f9f6eade3e2310d)
- routing import fix [`ac9f1ba`](https://git.odit.services/lfk/selfservice/commit/ac9f1ba2aca43d38d67604a4f6e77c5b29a670af)
- ✨ Register - disable register button when invalid phone number is set [`e858334`](https://git.odit.services/lfk/selfservice/commit/e8583340c761663067aa51a4937d0795b75d21f1)
- 🐞 Register - fix zipcode submitting [`43ee4b5`](https://git.odit.services/lfk/selfservice/commit/43ee4b51f9973a20fbb2f4f7774763f5c089b0e1)
- 🚀Bumped version to v0.0.1 [`c8db78d`](https://git.odit.services/lfk/selfservice/commit/c8db78df6ffd5b4bdeb53893f363659ae2eefd45)
- Register - style agb link with underline [`c8e1b5d`](https://git.odit.services/lfk/selfservice/commit/c8e1b5d80db0ce20043a5cda5588c995e71ee090)
- new favicon [`9958fed`](https://git.odit.services/lfk/selfservice/commit/9958fed045e683cbf25b51c66deec405fd342073)
- 🌎 added missing translations [`69db350`](https://git.odit.services/lfk/selfservice/commit/69db350461231123796bc24a2452e6af47a7c83f)
+29 -2
View File
@@ -1,3 +1,30 @@
# selfservice
# @lfk/selfservice
runner selfservice portal
runner selfservice portal
## ⚡ Development
### Requirements
- Node.js v14.16.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
### Manual Dev Environment
```
yarn && yarn dev --open
```
## 🔨 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 lfk instance - WITH TRAILING SLASH
- see [@lfk/deployment](https://git.odit.services/lfk/deployment) for a complete deployment guide
- `baseurl_selfservice`: location of the selfservice instance - WITH TRAILING SLASH
- e.g. path: `/selfservice/`
- e.g. url: `https://example.com/selfservice/`
+3
View File
@@ -2,5 +2,8 @@ version: "3"
services:
httpd:
build: .
#image: registry.odit.services/lfk/selfservice:dev
volumes:
- ./public/env.sample.js:/usr/share/nginx/html/env.js
ports:
- 4050:80
+2 -1
View File
@@ -10,7 +10,8 @@
<body class="dark:bg-gray-900 text-black dark:text-white p-0">
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
<script src="/env.js"></script>
<script defer type="module" src="/src/main.js"></script>
</body>
</html>
+16
View File
@@ -0,0 +1,16 @@
const fs = require('fs');
// get all language files
const files = fs.readdirSync('./src/locales/');
files.forEach((f) => {
// read file as object
const unordered = JSON.parse(fs.readFileSync(`src/locales/${f}`));
// order object by keys alpabetically A-Z
const ordered = Object.keys(unordered).sort().reduce((obj, key) => {
obj[key] = unordered[key];
return obj;
}, {});
// format output as json for commit diff compatibility
const out = JSON.stringify(ordered, 0, 4);
// write output file
fs.writeFileSync(`src/locales/${f}`, out);
});
+50 -42
View File
@@ -1,42 +1,50 @@
{
"name": "@odit/lfk-selfservice",
"version": "0.0.0",
"scripts": {
"dev": "vite",
"build": "vite build",
"release": "release-it --only-version"
},
"dependencies": {
"got": "^11.8.2",
"redaxios": "^0.4.1",
"toastify-js": "^1.9.3",
"validator": "^13.5.2",
"vue": "^3.0.5",
"vue-i18n": "^9.0.0",
"vue-phone-number-input": "^1.1.10",
"vue-router": "4"
},
"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"
},
"release-it": {
"git": {
"commit": true,
"requireCleanWorkingDir": false,
"commitMessage": "🚀Bumped version to v${version}",
"requireBranch": "dev",
"push": false,
"tag": false
},
"npm": {
"publish": false
}
}
}
{
"name": "@odit/lfk-selfservice",
"version": "0.3.1",
"scripts": {
"dev": "vite",
"build": "vite build",
"release": "release-it --only-version"
},
"dependencies": {
"marked": "2.0.1",
"redaxios": "0.4.1",
"toastify-js": "1.10.0",
"validator": "13.5.2",
"vue-i18n": "9.0.0",
"vue-toastification": "2.0.0-rc.1",
"vue": "3.0.9",
"vue-router": "4.0.5"
},
"devDependencies": {
"@tailwindcss/jit": "0.1.18",
"@tailwindcss/aspect-ratio": "0.2.0",
"@tailwindcss/forms": "0.3.2",
"@tailwindcss/line-clamp": "0.2.0",
"@tailwindcss/typography": "0.4.0",
"@vitejs/plugin-vue": "1.2.1",
"@vue/compiler-sfc": "3.0.10",
"autoprefixer": "10.2.5",
"tailwindcss": "2.0.4",
"release-it": "14.5.0",
"vite": "2.1.5"
},
"release-it": {
"git": {
"commit": true,
"requireCleanWorkingDir": false,
"commitMessage": "🚀Bumped version to v${version}",
"requireBranch": "dev",
"push": false,
"tag": true,
"tagName": null,
"tagAnnotation": "v${version}"
},
"npm": {
"publish": false
},
"hooks": {
"after:bump": "npx auto-changelog --commit-limit false -p -u --hide-credit && git add CHANGELOG.md && node order_i18n.js && git add src/locales"
}
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
'@tailwindcss/jit': {},
autoprefixer: {},
},
}
+12
View File
@@ -0,0 +1,12 @@
const config = {
// required
documentserver_key: '',
// required, with trailing slash
baseurl: '',
// optional, will fallback to /selfservice/
baseurl_selfservice: '/selfservice/',
// optional, will fallback to /imprint
url_imprint: '',
// optional, will fallback to /privacy
url_privacy: ''
};
+1
View File
@@ -0,0 +1 @@
TODO:
+1
View File
@@ -0,0 +1 @@
TODO:
+4 -8
View File
@@ -1,9 +1,5 @@
<template>
<router-view></router-view>
</template>
<script setup>
// import HelloWorld from "./components/HelloWorld.vue";
// import LoginForm from "./components/LoginForm.vue";
// import Footer from "./components/Footer.vue";
</script>
<main>
<router-view></router-view>
</main>
</template>
+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500"><path d="M307.18 117.6c21.3 1.09 42.83 9.39 57.52 22 46.68 39.91 40.22 110.84 5.81 156.19-33.82 44.58-91.54 70.06-147.13 68a153 153 0 01-48.79-9.79c-27.05-10.33-62.88-30.25-73.29-59.11-12.52-34.72 23.7-41.72 47.84-32.89 19.42 7.12 39 19.43 60.05 9.57 23.33-10.91 35.2-36.06 36.4-60.82 1.3-26.77-13.13-55.71 10.43-77.1 13.63-12.33 32.31-17.01 51.16-16.05z" fill="#407bff"/><path d="M307.18 117.6c21.3 1.09 42.83 9.39 57.52 22 46.68 39.91 40.22 110.84 5.81 156.19-33.82 44.58-91.54 70.06-147.13 68a153 153 0 01-48.79-9.79c-27.05-10.33-62.88-30.25-73.29-59.11-12.52-34.72 23.7-41.72 47.84-32.89 19.42 7.12 39 19.43 60.05 9.57 23.33-10.91 35.2-36.06 36.4-60.82 1.3-26.77-13.13-55.71 10.43-77.1 13.63-12.33 32.31-17.01 51.16-16.05z" fill="#fff" opacity=".9"/><ellipse cx="250" cy="416.24" rx="193.89" ry="11.32" fill="#f5f5f5"/><path fill="#407bff" d="M259.8 382.52H79.91L63.12 316H243l16.8 66.52z"/><path fill="#407bff" d="M242.79 316H62.9l-16.8 66.52h179.89l16.8-66.52z"/><path style="isolation:isolate" fill="#fff" opacity=".6" d="M242.79 316H62.9l-16.8 66.52h179.89l16.8-66.52z"/><path fill="#407bff" d="M449.92 382.52H270.03L253.24 316h179.88l16.8 66.52z"/><path fill="#407bff" d="M432.91 316H253.02l-16.8 66.52h179.89l16.8-66.52z"/><path style="isolation:isolate" fill="#fff" opacity=".6" d="M432.91 316H253.02l-16.8 66.52h179.89l16.8-66.52z"/><g><path d="M266 176a11.19 11.19 0 00-11.52-6.35c-9 .83-17.67 12.16-25.83 9.83S221.5 172 221.5 172s-3 7.39 7.17 13.6 24-9.46 35.48-4.8z" fill="#2e353a"/><path d="M266 176a14.65 14.65 0 00-12.52-9.39c-9.62-.75-15.25 11.41-22.62 9.39" fill="none" stroke="#263238" stroke-linecap="round" stroke-linejoin="round" stroke-width=".48"/><path d="M288.12 189.65s3.42-14.12-8.43-17-17.19 4.1-19.19 11.79 3 18.4 13.77 16.63 13.42-8.07 13.85-11.42z" fill="#2e353a"/><path d="M292.51 211.59c9.74-4.53 22.54-14.45 22.3-18.06s-10.06-27.9-10.06-27.9a7.65 7.65 0 01-2.26-1.08c-1-.72-2.17-9.66-.72-10.14a44.09 44.09 0 017.49-1.21c1.2 0 .72 8 .24 9.9 0 0 15.58 21.72 14.55 32.12s-25.18 28.47-33.63 31 2.09-14.63 2.09-14.63zM186.81 329.9l2.76-5.88 8.63 2.88 7.92 2.66-2.14 7.51-9.1-3.79-8.07-3.38z" fill="#e4897b"/><path d="M190.54 322.94c.64.32-3.61 8-3.61 8s-7.29 2.56-10.64 6.79-5 .23-2.46-5.09l6.17-13.11c1.79-3.78 3.89.1 10.54 3.41z" fill="#2e353a"/><path d="M183.72 335.61a.55.55 0 01-.18 0 .84.84 0 01-.76-.59c-.28-1.1 2.2-3.2 2.7-3.61a.19.19 0 01.1-.05.34.34 0 01.14.05c.07.07 1.61 1.61 1.55 2.9a1.37 1.37 0 01-.51 1 .8.8 0 01-.92.2c-.4-.22-.56-1-.6-1.79a3.62 3.62 0 01-1 1.69 1 1 0 01-.52.2zm1.55-3.43c-1.05.94-2.17 2.19-2 2.71 0 0 .05.18.4.25a.5.5 0 00.38-.1c.56-.42 1-1.88 1.22-2.86zm.54-.07c-.11 1.39 0 2.82.33 3 .1.06.29-.08.39-.16a.9.9 0 00.35-.68 3.92 3.92 0 00-1.07-2.16z" fill="#407bff"/><path style="isolation:isolate" opacity=".2" d="M194.7 333.19l3.34-6.36 8 2.69-2.1 7.53-9.24-3.86z"/><path d="M288.12 290.82c-3.62 15.68-19.81 69.19-45 67.19S199.5 342.15 199 335.83s1.44-9.8 7.72-9.82 24.71 5.64 32.74 5.07S255 296.41 255 296.41z" fill="#407bff"/><path d="M288.12 290.82c-3.62 15.68-19.81 69.19-45 67.19S199.5 342.15 199 335.83s1.44-9.8 7.72-9.82 24.71 5.64 32.74 5.07S255 296.41 255 296.41z" style="isolation:isolate" opacity=".4"/><path fill="#e4897b" d="M352.37 403.04l-5.97 2.58-4.56-7.88-4.18-7.23 6.58-4.21 4.3 8.86 3.83 7.88z"/><path d="M345 405.79c-.27-.66 8-3.64 8-3.64s7.15 2.91 12.47 2 3.87 3.11-1.53 5.44l-13.34 5.76c-3.84 1.65-2.85-2.68-5.6-9.56z" fill="#2e353a"/><path d="M355 402.91a5.6 5.6 0 00-.61.09h-.13a.68.68 0 01-.21-.11v-.08a.08.08 0 000-.06v-.06s.05-.06.05-.09c0-.09-.11-2.27.79-3.2a1.33 1.33 0 011.07-.42q.68 0 .84.45c.16.43-.23 1.1-.74 1.74a3.68 3.68 0 011.9-.59 1 1 0 01.67.36.93.93 0 01.18 1c-.48.81-2.69.97-3.81.97zm2.8-1.88a6.36 6.36 0 00-2.73 1.32c1.41 0 3.08-.21 3.33-.68 0 0 .08-.17-.13-.45a.47.47 0 00-.36-.18zm-1.87-2c-.27 0-.49.31-.67.5a4.1 4.1 0 00-.63 2.44c1-1 1.88-2.26 1.74-2.63a.6.6 0 00-.4-.31z" fill="#407bff"/><path style="isolation:isolate" opacity=".2" d="M348.62 395.35l-6.71 2.56-4.22-7.32 6.57-4.25 4.36 9.01z"/><path d="M257.71 259.72s-14 20.78-11.11 36.26c3.4 18.27 47.4 38.84 59.4 47.93s17.62 43.42 32.56 50l8.13-2.91s4.14-5.72 1.05-15.45c-13-40.8-23.74-60.3-59.62-84.73 0 0 2.36-19.78 1.37-29.8z" fill="#407bff"/><path d="M257.71 259.72s-14 20.78-11.11 36.26c3.4 18.27 47.4 38.84 59.4 47.93s17.62 43.42 32.56 50l8.13-2.91s4.14-5.72 1.05-15.45c-13-40.8-23.74-60.3-59.62-84.73 0 0 2.36-19.78 1.37-29.8z" style="isolation:isolate" opacity=".3"/><path d="M342.38 392.54l-2 .72c-4.54-5.78-8.25-16.2-12.14-27.14-4.13-11.59-8.4-23.57-13.43-28.33-3.5-3.31-11.26-8.52-20.25-14.56-18.35-12.33-39.16-26.3-40.55-34.82-1.47-9.06 3.16-22 5.93-28.6l2.14.09c-2.63 6.23-7.53 19.41-6.09 28.19 1.25 7.66 23.46 22.59 39.68 33.48 9.07 6.09 16.89 11.34 20.52 14.77 5.37 5.09 9.53 16.75 13.93 29.11 3.8 10.67 7.72 21.68 12.26 27.09z" fill="#407bff"/><path d="M288.12 290.82S280.75 286 271.5 280l13.5 5.41a55.44 55.44 0 004.71-19.48 236.85 236.85 0 01-1.59 24.89Line truncated

After

Width:  |  Height:  |  Size: 8.9 KiB

+29
View File
@@ -0,0 +1,29 @@
<template>
<section class="container px-4 py-32 mx-auto">
<div class="w-full mx-auto lg:w-1/3">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="h-20 feather feather-alert-triangle"
viewBox="0 0 24 24"
>
<path
d="M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0zM12 9v4M12 17h.01"
/>
</svg>
<p
class="mt-5 mb-3 text-xl font-bold text-black dark:text-gray-50 md:text-2xl"
>{{ $t('configuration_error') }}</p>
<p class="mb-3 text-base font-medium text-gray-700 dark:text-gray-400">
{{ $t('the_system_is_not_properly_configured_please_contact_the_system_administrator_for_help') }}
<br />
<br />
{{ $t('if_you_are_the_system_administrator_please_refer_to_the_official_product_documentation_readme_for_configuration_guidance') }}
</p>
</div>
</section>
</template>
+12 -2
View File
@@ -14,16 +14,26 @@
<a
target="_blank"
rel="noopener,noreferrer"
href="/impressum/"
:href="[[imprint_url]]"
class="ml-3 text-gray-400 underline"
>Impressum</a>
<a
target="_blank"
rel="noopener,noreferrer"
href="/datenschutz/"
:href="[[privacy_url]]"
class="ml-3 text-gray-400 underline"
>Datenschutzerklärung</a>
</span>
</div>
</footer>
</template>
<script>
export default {
data() {
return {
imprint_url: config.url_imprint || "/imprint/"
, privacy_url: config.url_privacy || "/privacy/"
}
},
}
</script>
-3
View File
@@ -97,11 +97,8 @@ import Toastify from "toastify-js";
let mail = ref("");
let loading = ref(false);
function login() {
console.log("ihi");
console.log(mail.value);
loading.value = true;
axios.get("").then((res) => {
console.log(res.data);
loading.value = false;
Toastify({
text: "This is a toast",
-3
View File
@@ -97,11 +97,8 @@ import Toastify from "toastify-js";
let mail = ref("");
let loading = ref(false);
function login() {
console.log("ihi");
console.log(mail.value);
loading.value = true;
axios.get("").then((res) => {
console.log(res.data);
loading.value = false;
Toastify({
text: "This is a toast",
-250
View File
@@ -1,250 +0,0 @@
<template>
<div class="min-h-screen w-full p-4">
<!-- <div class="section-title w-full mb-6 pt-3">
<div class="flex flex-row items-center justify-between mb-4">
<div class="flex flex-col">
<div class="text-xs uppercase font-light text-gray-500">Pages</div>
<div class="text-xl font-bold">User profile</div>
</div>
</div>
</div>
<div
class="w-full p-4 mb-4 rounded-lg bg-white border border-gray-100 dark:bg-gray-900 dark:border-gray-800"
>-->
<div class="flex flex-row items-center justify-start p-4">
<div class="py-2 px-2">
<p class="text-3xl font-bold whitespace-nowrap">Max Mustermann</p>
<p class="text-md text-gray-500 whitespace-nowrap">Musterfirma > PR</p>
</div>
<div class="ml-auto flex-shrink-0 space-x-2 hidden lg:flex">
<button
type="button"
class="focus:border-black focus:ring-2 focus:ring-black text-white text-sm py-2.5 px-5 rounded-md bg-blue-500 hover:bg-blue-600 hover:shadow-lg"
>
<svg
style="display:inline;"
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="feather feather-download"
>
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />
<polyline points="7 10 12 15 17 10" />
<line x1="12" y1="15" x2="12" y2="3" />
</svg> Urkunde herunterladen
</button>
<button
type="button"
class="focus:border-black focus:ring-2 focus:ring-black text-white text-sm py-2.5 px-5 rounded-md bg-green-600 hover:bg-green-800 hover:shadow-lg opacity-50"
>Änderungen speichern</button>
</div>
</div>
<div class="flex flex-wrap">
<div class="w-full p-4">
<div class="flex flex-wrap flex-col w-full tabs">
<div class="flex lg:flex-wrap flex-row lg:space-x-2">
<div class="flex-none">
<button
class="tab tab-underline tab-active py-4 px-6 block border-b-2 font-medium border-blue-500"
type="button"
>Mein Profil</button>
</div>
<div class="flex-none">
<button class="tab tab-underline py-4 px-6 block" type="button">Meine Rundenzeiten</button>
</div>
<div class="flex-none">
<button class="tab tab-underline py-4 px-6 block" type="button">Meine Spender</button>
</div>
</div>
<div class="tab-content block">
<div class="py-4 w-full">
<div class="flex flex-col">
<form class="form flex flex-wrap w-full">
<div class="w-full">
<div class="form-element">
<div class="form-label">First name</div>
<input
name="first-name"
class="w-full dark:bg-gray-800 rounded border border-gray-700 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-900 text-base outline-none dark:text-gray-100 text-gray-600 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out"
type="text"
placeholder="first name"
/>
</div>
<div class="form-element">
<div class="form-label">middle name</div>
<input
name="middle-name"
class="w-full dark:bg-gray-800 rounded border border-gray-700 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-900 text-base outline-none dark:text-gray-100 text-gray-600 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out"
type="text"
placeholder="middle name"
/>
</div>
<div class="form-element">
<div class="form-label">Last name</div>
<input
name="last-name"
type="text"
class="w-full dark:bg-gray-800 rounded border border-gray-700 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-900 text-base outline-none dark:text-gray-100 text-gray-600 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out"
placeholder="last name"
/>
</div>
<div class="form-element">
<div class="form-label">Email address</div>
<input
name="email"
type="email"
class="w-full dark:bg-gray-800 rounded border border-gray-700 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-900 text-base outline-none dark:text-gray-100 text-gray-600 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out"
placeholder="email address"
/>
</div>
<div class="form-element">
<div class="form-label">phone number</div>
<input
name="tel"
type="tel"
class="w-full dark:bg-gray-800 rounded border border-gray-700 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-900 text-base outline-none dark:text-gray-100 text-gray-600 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out"
placeholder="phone number"
/>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="tab-content hidden">
<div class="py-4 w-full lg:w-1/2">
<div class="flex flex-col">
<form class="form flex flex-wrap w-full">
<div class="w-full">
<div class="form-element">
<div class="form-label">Current email</div>
<input
name="email"
type="email"
class="w-full dark:bg-gray-800 rounded border border-gray-700 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-900 text-base outline-none dark:text-gray-100 text-gray-600 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out"
placeholder="current email address"
/>
</div>
<div class="form-element">
<div class="form-label">New email</div>
<input
name="email"
type="email"
class="w-full dark:bg-gray-800 rounded border border-gray-700 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-900 text-base outline-none dark:text-gray-100 text-gray-600 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out"
placeholder="new email address"
/>
</div>
<div class="form-element">
<div class="form-label">Daily updates</div>
<div class="flex items-center justify-start space-x-2">
<label class="flex items-center justify-start space-x-2">
<input
type="radio"
name="daily-updates"
class="form-radio h-4 w-4"
value="yes"
/>
<span class>Yes</span>
</label>
<label class="flex items-center justify-start space-x-2">
<input
type="radio"
name="daily-updates"
class="form-radio h-4 w-4"
value="no"
/>
<span class>No</span>
</label>
</div>
</div>
<div class="form-element">
<div class="form-label">Weekly updates</div>
<div class="flex items-center justify-start space-x-2">
<label class="flex items-center justify-start space-x-2">
<input
type="radio"
name="weekle-updates"
class="form-radio h-4 w-4"
value="yes"
/>
<span class>Yes</span>
</label>
<label class="flex items-center justify-start space-x-2">
<input
type="radio"
name="weekle-updates"
class="form-radio h-4 w-4"
value="no"
/>
<span class>No</span>
</label>
</div>
</div>
</div>
<input
type="submit"
class="btn btn-default bg-blue-500 hover:bg-blue-600 text-white btn-rounded"
/>
</form>
</div>
</div>
</div>
<div class="tab-content hidden">
<div class="py-4 w-full lg:w-1/2">
<div class="flex flex-col">
<form class="form flex flex-wrap w-full">
<div class="w-full">
<div class="form-element">
<div class="form-label">Current password</div>
<input
name="current-password"
type="password"
class="w-full dark:bg-gray-800 rounded border border-gray-700 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-900 text-base outline-none dark:text-gray-100 text-gray-600 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out"
placeholder="Enter your current password"
/>
</div>
<div class="form-element">
<div class="form-label">New password</div>
<input
name="new-password"
type="password"
class="w-full dark:bg-gray-800 rounded border border-gray-700 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-900 text-base outline-none dark:text-gray-100 text-gray-600 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out"
placeholder="Enter your new password"
/>
</div>
<div class="form-element">
<div class="form-label">Confirm new password</div>
<input
name="confirm-new-password"
type="password"
class="w-full dark:bg-gray-800 rounded border border-gray-700 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-900 text-base outline-none dark:text-gray-100 text-gray-600 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out"
placeholder="Enter your new password confirmation"
/>
</div>
</div>
<input
type="submit"
class="btn btn-default bg-blue-500 hover:bg-blue-600 text-white btn-rounded"
/>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- </div> -->
</template>
<script setup>
import { ref } from "vue";
import axios from "redaxios";
import Toastify from "toastify-js";
</script>
-193
View File
@@ -1,193 +0,0 @@
<template>
<div class="min-h-screen flex items-center justify-center">
<div class="max-w-md w-full py-12 px-6">
<img class="mx-auto h-24 w-auto" src="/favicon.png" alt />
<h1
class="sm:text-3xl text-2xl font-medium title-font mb-4 text-center"
>Lauf für Kaya! - Registrieren</h1>
<p
class="mx-auto leading-relaxed text-base text-center"
>{{ $t('register.register_now') }}</p>
<div class="mt-4">
<label for="first_name" class="block font-medium">
Vorname
<span class="font-bold">*</span>
</label>
<input
v-model="userdetails.firstname"
name="firstname"
id="first_name"
autocomplete="off"
placeholder="Vorname"
type="text"
class="dark:bg-gray-800 mt-1 focus:ring-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 rounded-md p-2"
/>
<label for="middle_name" class="block font-medium">Mittelname</label>
<input
v-model="userdetails.middlename"
name="middlename"
id="middle_name"
autocomplete="off"
placeholder="Mittelname"
type="text"
class="dark:bg-gray-800 mt-1 focus:ring-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 rounded-md p-2"
/>
<label for="last_name" class="block font-medium">
Nachname
<span class="font-bold">*</span>
</label>
<input
v-model="userdetails.lastname"
name="lastname"
id="last_name"
autocomplete="off"
placeholder="Nachname"
type="text"
class="dark:bg-gray-800 mt-1 focus:ring-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 rounded-md p-2"
/>
<label for="email_address" class="block font-medium">
E-Mail Adresse
<span class="font-bold">*</span>
</label>
<input
v-model="userdetails.mail"
name="email_address"
id="email_address"
autocomplete="off"
placeholder="E-Mail Adresse"
type="email"
:class="{ 'border-red-500': (!isEmail(userdetails.mail)), 'border-gray-300': (isEmail(userdetails.mail)) }"
class="dark:bg-gray-800 mt-1 block w-full shadow-sm rounded-l-md sm:text-sm border bg-gray-50 text-gray-100 rounded-md p-2"
/>
<p class="text-sm">Bitte geben Sie eine gültige E-Mail Adresse an</p>
<div class="grid grid-cols-6 mt-6">
<div class="col-span-6"></div>
<div class="flex items-start col-span-6">
<div class="flex items-center h-5">
<input
v-model="provide_address"
id="address_activated"
name="address_activated"
type="checkbox"
class="focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300 rounded"
/>
</div>
<div class="ml-3 text-sm">
<label for="address_activated" class="font-medium text-gray-400">Adresse angeben?</label>
</div>
</div>
<div v-if="provide_address === true" class="col-span-6">
<div class="col-span-6">
<label for="street" class="block font-medium">Straße</label>
<input
type="text"
name="street"
placeholder="Straße"
id="street"
autocomplete="street-address"
class="dark:bg-gray-800 mt-1 focus:ring-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 rounded-md p-2"
/>
</div>
<div class="col-span-6 sm:col-span-6 lg:col-span-2">
<label for="city" class="block font-medium">Ort</label>
<input
type="text"
name="city"
placeholder="Ort"
id="city"
class="dark:bg-gray-800 mt-1 focus:ring-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 rounded-md p-2"
/>
</div>
<div class="col-span-6 sm:col-span-3 lg:col-span-2">
<label for="postal_code" class="block font-medium">PLZ</label>
<input
type="text"
name="postal_code"
placeholder="PLZ"
id="postal_code"
autocomplete="postal-code"
class="dark:bg-gray-800 mt-1 focus:ring-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 rounded-md p-2"
/>
</div>
</div>
</div>
<div class="flex items-start mt-6">
<div class="flex items-center h-5">
<input
v-model="agb_accepted"
id="agb_accepted"
name="agb_accepted"
type="checkbox"
class="focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300 rounded"
/>
</div>
<div class="ml-3 text-sm">
<label for="agb_accepted" class="font-medium text-gray-400 select-none">
Ich habe die
<a target="_blank" rel="noreferrer,noopener" href class="underline">AGBs</a> gelesen und akzeptiert.
</label>
</div>
</div>
<div class="mt-6">
<button
@click="login"
:disabled="(agb_accepted === false)"
:class="{ 'opacity-50': (agb_accepted === false), 'cursor-not-allowed': (agb_accepted === false) }"
class="text-white block w-full text-center py-2 px-3 border border-gray-300 rounded-md p-1 bg-blue-800 font-medium hover:border-gray-400 focus:outline-none focus:border-gray-400 sm:text-sm"
>Registrieren</button>
</div>
</div>
<div class="mt-6">
<div class="relative">
<div class="absolute inset-0 flex items-center">
<div class="w-full border-t border-gray-300"></div>
</div>
<div class="relative flex justify-center text-sm">
<span class="px-2 bg-white dark:bg-gray-900">Sie haben bereits einen Account?</span>
</div>
</div>
<div class="mt-6">
<a
href="./login"
class="block w-full text-center py-2 px-3 border border-gray-300 rounded-md p-1 dark:bg-gray-800 font-medium hover:border-gray-400 focus:outline-none focus:border-gray-400 sm:text-sm"
>Zum Login</a>
</div>
</div>
</div>
</div>
</template>
<script setup>
import { ref } from "vue";
import axios from "redaxios";
import Toastify from "toastify-js";
import isEmail from 'validator/es/lib/isEmail';
let userdetails = ref({ firstname: "", lastname: "", middlename: "", mail: "" });
let provide_address = ref(false);
let agb_accepted = ref(false);
function login() {
userdetails = userdetails.value;
if (isEmail(userdetails.mail)) {
axios.post('https://dev.lauf-fuer-kaya.de/api/runners/register', {
"email": userdetails.mail,
"firstname": userdetails.firstname,
"middlename": userdetails.middlename,
"lastname": userdetails.lastname,
"address": {}
})
.then(function(response) {
response = response.data;
const token = response.token;
const userid = JSON.parse(atob(token.split(".")[1])).id;
console.log({ token });
console.log({ userid });
})
.catch(function(error) {
console.log(error);
});
}
// console.log(agb_accepted.value);
// alert("AGB was " + (agb_accepted.value === true ? "accepted" : "not accepted"));
}
</script>
+14
View File
@@ -0,0 +1,14 @@
import * as keys_en from './locales/en.json';
import * as keys_de from './locales/de.json';
import { createI18n } from 'vue-i18n';
const messages = {
en: keys_en,
de: keys_de
};
const browserlocale = ((navigator.languages && navigator.languages[0]) || '').substr(0, 2);
export const i18n = createI18n({
locale: browserlocale,
fallbackLocale: 'en',
messages
});
+40 -4
View File
@@ -1,5 +1,41 @@
{
"register": {
"register_now": "Jetzt für den Lauf für Kaya! 2021 registrieren."
}
}
"already_have_an_account": "Sie haben bereits einen Account?",
"apartment_suite_etc": "Addresszeile 2",
"configuration_error": "Konfigurationsfehler",
"confirm_personal_data": "Hiermit bestätige ich die Vollständigkeit und Richtigkeit der oben genannten Angaben",
"distance": "Distanz",
"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",
"lap_times": "Rundenzeiten",
"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...",
"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": {
"register_now": "Jetzt für den Lauf für Kaya! 2021 registrieren."
},
"register_now": "Jetzt registrieren!",
"registrieren": "Registrieren",
"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",
"tos": "AGBs",
"view_my_data": "Meine Läuferdaten einsehen",
"vorname": "Vorname"
}
+42 -4
View File
@@ -1,5 +1,43 @@
{
"register": {
"register_now": "Register now for Lauf für Kaya! 2021."
}
}
"already_have_an_account": "Already have an account?",
"apartment_suite_etc": "Apartment, suite, etc.",
"configuration_error": "Configuration error",
"confirm_personal_data": "I hereby confirm that the above information is complete and correct",
"distance": "Distance",
"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",
"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...",
"organization": "Organization",
"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",
"tos": "Terms of Service",
"view_my_data": "View my data",
"vorname": "Firstname",
"you_have_been_registered": "You have been registered!"
}
+14 -28
View File
@@ -1,35 +1,21 @@
import { createApp } from 'vue';
import { createWebHistory, createWebHashHistory, createRouter } from 'vue-router';
import App from './App.vue';
import { createI18n } from 'vue-i18n';
import 'windi.css';
import './tailwind.css';
import 'toastify-js/src/toastify.css';
import * as keys_en from './locales/en.json';
import * as keys_de from './locales/de.json';
import 'vue-toastification/dist/index.css';
import App from './App.vue';
import { routes } from './routes.js';
import { createRouter, createWebHistory } from 'vue-router';
import { i18n } from './language';
import Toast from 'vue-toastification';
const messages = {
en: keys_en,
de: keys_de
};
const i18n = createI18n({
locale: 'de',
fallbackLocale: 'en',
messages
});
const app = createApp(App);
// ---------------
const Home = import('./components/Home.vue');
const Register = import('./components/Register.vue');
const Profile = import('./components/Profile.vue');
//
const router = createRouter({
// history: createWebHashHistory(),
history: createWebHistory(),
routes: [
{ path: '/', component: Home },
{ path: '/register', component: Register },
{ path: '/profile', component: Profile }
]
routes
});
// ---------------
createApp(App).use(i18n).use(router).mount('#app');
app.use(router);
app.use(i18n);
app.use(Toast);
app.mount('#app');
+24
View File
@@ -0,0 +1,24 @@
// import EnvError from './components/EnvError.vue';
import Home from './views/Home.vue';
import Imprint from './views/Imprint.vue';
import Privacy from './views/Privacy.vue';
import Register from './views/Register.vue';
import Profile from './views/Profile.vue';
import ProfileNone from './views/ProfileNone.vue';
console.log(config);
/** @type {import('vue-router').RouterOptions['routes']} */
export const routes = [
{ path: config.baseurl_selfservice + '', component: Home },
{ path: config.baseurl_selfservice + 'imprint', component: Imprint },
{ path: config.baseurl_selfservice + 'imprint/', component: Imprint },
{ path: config.baseurl_selfservice + 'privacy', component: Privacy },
{ path: config.baseurl_selfservice + 'privacy/', component: Privacy },
{ path: config.baseurl_selfservice + 'register', component: Register },
{ path: config.baseurl_selfservice + 'register/', component: Register },
{ path: config.baseurl_selfservice + 'register/:token', component: Register, props: true },
{ path: config.baseurl_selfservice + 'profile', component: Profile },
{ path: config.baseurl_selfservice + 'profile/', component: ProfileNone },
{ path: config.baseurl_selfservice + 'profile/:token', component: Profile, props: true }
];
+1
View File
@@ -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,.sLine truncated
+3
View File
@@ -0,0 +1,3 @@
@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';
+10 -12
View File
@@ -1,5 +1,5 @@
<template>
<div class="bg-cover bg-fixed m-0 h-screen" style="background-image: url('/background.jpg');">
<div class="bg-cover bg-fixed m-0 h-screen" style="background-image: url('./background.jpg');">
<section class="container px-4 py-24 mx-auto">
<div class="w-full mx-auto text-center">
<img src="/favicon.png" class="h-32 mx-auto" />
@@ -7,18 +7,16 @@
class="mb-6 text-4xl font-extrabold leading-none tracking-normal text-white md:text-6xl md:tracking-tight"
>Lauf Für Kaya!</h1>
<p class="px-0 mb-6 text-lg text-gray-100 md:text-xl lg:px-24">Selfservice Portal</p>
<p
class="px-0 mb-6 text-md text-gray-100 lg:px-24"
>Hier können Sie sich für den Lauf Für Kaya! registrieren oder ihr Läuferprofil verwalten.</p>
<p class="px-0 mb-6 text-md text-gray-100 lg:px-24">{{ $t('main_page_text') }}</p>
<div class="mt-6 sm:flex place-content-center">
<router-link
<a
class="w-full sm:w-auto inline-flex px-6 py-3 border border-transparent text-base font-semibold rounded-md text-gray-900 bg-white shadow-sm hover:text-gray-600 focus:outline-none focus:text-gray-600 transition ease-in-out duration-150 xl:text-lg xl:py-4"
to="/register"
>Jetzt registrieren!</router-link>
<router-link
to="/profile"
href="./register/"
>{{ $t('register_now') }}</a>
<a
href="./profile/"
class="mt-4 sm:ml-4 sm:mt-0 w-full sm:w-auto inline-flex px-6 py-3 border border-transparent text-base font-semibold rounded-md text-white bg-gray-800 shadow-sm hover:bg-gray-700 focus:outline-none focus:bg-gray-700 transition ease-in-out duration-150 xl:text-lg xl:py-4"
>Meine Läuferdaten einsehen</router-link>
>{{ $t('view_my_data') }}</a>
</div>
</div>
</section>
@@ -27,6 +25,6 @@
</template>
<script setup>
import LoginForm from "./LoginForm.vue";
import Footer from "./Footer.vue";
import Footer from "@/components/Footer.vue";
console.log(config);
</script>
+38
View File
@@ -0,0 +1,38 @@
<template>
<section class="container px-4 py-24 mx-auto">
<div class="simplecontent">
<div class="mb-24 text-left md:text-center">
<h1
class="mb-4 text-4xl font-bold leading-tight text-gray-900 dark:text-gray-50 md:text-5xl"
>{{$t('imprint')}}</h1>
</div>
<div class="mx-auto prose" v-html="content"></div>
</div>
</section>
</template>
<style src="../simple.css">
</style>
<script>
import marked from "marked";
export default {
data() {
return {
content: ""
}
},
async beforeMount() {
const browserlocale = ((navigator.languages && navigator.languages[0]) || '').substr(0, 2);
let md = "";
try {
md = await fetch(`/imprint_${browserlocale}.md`);
} catch (error) {
try {
md = await fetch(`/imprint_en.md`);
} catch (error) {
md = "Error loading Imprint";
}
}
this.content = marked(await md.text());
},
}
</script>
+38
View File
@@ -0,0 +1,38 @@
<template>
<section class="container px-4 py-24 mx-auto">
<div class="simplecontent">
<div class="mb-24 text-left md:text-center">
<h1
class="mb-4 text-4xl font-bold leading-tight text-gray-900 dark:text-gray-50 md:text-5xl"
>{{ $t('privacy_policy') }}</h1>
</div>
<div class="mx-auto prose" v-html="content"></div>
</div>
</section>
</template>
<style src="../simple.css">
</style>
<script>
import marked from "marked";
export default {
data() {
return {
content: ""
}
},
async beforeMount() {
const browserlocale = ((navigator.languages && navigator.languages[0]) || '').substr(0, 2);
let md = "";
try {
md = await fetch(`/privacy_${browserlocale}.md`);
} catch (error) {
try {
md = await fetch(`/privacy_en.md`);
} catch (error) {
md = "Error loading Privacy Policy";
}
}
this.content = marked(await md.text());
},
}
</script>
+209
View File
@@ -0,0 +1,209 @@
<template>
<div class="min-h-screen w-full p-4">
<section class="text-white body-font">
<div class="container mx-auto flex items-center md:flex-row flex-col">
<div
class="flex flex-col md:pr-10 md:mb-0 mb-6 pr-0 w-full md:w-auto md:text-left text-center text-black dark:text-gray-200"
>
<p
class="text-3xl font-bold whitespace-nowrap"
v-text="(state.firstname || '') + ' ' + (state.middlename || '') + ' ' + (state.lastname || '')"
></p>
<p class="text-md whitespace-nowrap">{{ state.group }}</p>
</div>
<div class="inline-flex md:ml-auto md:mr-0 mx-auto items-center">
<button
type="button"
class="focus:border-black focus:ring-2 focus:ring-black text-white text-sm py-2.5 px-5 rounded-md bg-blue-500 hover:bg-blue-600 hover:shadow-lg"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="feather feather-download"
style="display: inline;height: 1rem;vertical-align: sub;"
>
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />
<polyline points="7 10 12 15 17 10" />
<line x1="12" y1="15" x2="12" y2="3" />
</svg>
{{ $t('download_certificate') }}
</button>
</div>
</div>
</section>
<div class="flex flex-wrap">
<div class="w-full p-4">
<div class="flex flex-wrap flex-col w-full tabs">
<div class="flex lg:flex-wrap flex-row lg:space-x-2">
<div class="flex-none">
<button
@click="() => { state.activetab = 'profile' }"
:class="{ 'tab-active border-b-2 font-medium border-blue-500': (state.activetab === 'profile') }"
class="tab tab-underline py-4 px-6 block"
type="button"
>{{ $t('profile') }}</button>
</div>
<div class="flex-none">
<button
@click="() => { state.activetab = 'laptimes' }"
:class="{ 'tab-active border-b-2 font-medium border-blue-500': (state.activetab === 'laptimes') }"
class="tab tab-underline py-4 px-6 block"
type="button"
>{{ $t('lap_times') }}</button>
</div>
<div class="flex-none">
<button
@click="() => { state.activetab = 'sponsorings' }"
:class="{ 'tab-active border-b-2 font-medium border-blue-500': (state.activetab === 'sponsorings') }"
class="tab tab-underline py-4 px-6 block"
type="button"
>{{ $t('sponsoring') }}</button>
</div>
</div>
<div v-if="(state.activetab === 'profile')" class="tab-content block">
<div class="py-4 w-full">
<div class="flex flex-col">
<form class="form flex flex-wrap w-full">
<div class="w-full">
<div class="form-element">
<div class="text-lg">{{ $t('vorname') }}</div>
<p
class="h-10 w-full dark:bg-gray-800 rounded text-base outline-none dark:text-gray-100 text-gray-600 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out"
v-text="state.firstname"
/>
</div>
<div class="form-element">
<div class="text-lg">{{ $t('mittelname') }}</div>
<p
class="h-10 w-full dark:bg-gray-800 rounded text-base outline-none dark:text-gray-100 text-gray-600 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out"
v-text="state.middlename"
/>
</div>
<div class="form-element">
<div class="text-lg">{{ $t('nachname') }}</div>
<p
class="h-10 w-full dark:bg-gray-800 rounded text-base outline-none dark:text-gray-100 text-gray-600 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out"
v-text="state.lastname"
/>
</div>
<div class="form-element">
<div class="text-lg">{{ $t('e_mail_adress') }}</div>
<p
class="h-10 w-full dark:bg-gray-800 rounded text-base outline-none dark:text-gray-100 text-gray-600 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out"
v-text="state.email"
/>
</div>
<div class="form-element">
<div class="text-lg">{{ $t('phone_number') }}</div>
<p
class="h-10 w-full dark:bg-gray-800 rounded text-base outline-none dark:text-gray-100 text-gray-600 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out"
v-text="state.phone"
/>
</div>
</div>
</form>
</div>
</div>
</div>
<div v-if="(state.activetab === 'laptimes')" class="tab-content block">
<div class="py-4 w-full">
<section class="text-gray-400 dark:bg-gray-900 body-font">
<div class="container mx-auto">
<div class="lg:w-2/3 w-full mx-auto overflow-auto">
<table
v-if="state.scans.length > 0"
class="table-auto w-full text-left whitespace-no-wrap"
>
<thead
class="text-black bg-gray-300 dark:text-white text-sm dark:bg-gray-800"
>
<tr>
<th
class="px-4 py-3 title-font tracking-wider font-medium"
>{{ $t('distance') }}</th>
<th
class="px-4 py-3 title-font tracking-wider font-medium"
>{{ $t('lap_time') }}</th>
</tr>
</thead>
<tbody class="text-gray-900 dark:text-gray-50">
<tr v-for="s in state.scans" :key="s.id">
<td class="px-4 py-3">
<span v-text="s.distance"></span>m
</td>
<td class="px-4 py-3" v-text="s.lapTime"></td>
</tr>
</tbody>
</table>
<div v-else class="text-center font-bold text-black dark:text-white text-2xl">
<img
src="../assets/empty_laps.svg"
style="height:25rem; margin:0 auto;"
:alt="[[$t('no_laps_scans_were_recorded_yet')]]"
/>
{{ $t('no_laps_scans_were_recorded_yet') }}
</div>
</div>
</div>
</section>
</div>
</div>
<div v-if="(state.activetab === 'sponsorings')" class="tab-content block">
<div class="py-4 w-full">coming soon...</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script setup>
import { reactive } from "vue";
import { useToast } from "vue-toastification";
import axios from "redaxios";
const state = reactive({
phone: "",
email: "",
firstname: "",
middlename: "",
lastname: "",
scans: [],
group: "",
activetab: "profile",
})
const toast = useToast();
const props = defineProps({
token: String
})
const accesstoken = atob(props.token);
axios.get(`${config.baseurl_selfservice}/api/runners/me/${accesstoken}`)
.then(({ data }) => {
state.phone = data.phone;
state.email = data.email;
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");
})
axios.get(`${config.baseurl}api/runners/me/${accesstoken}/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;
}).catch((error) => {
toast.error("An error occured while loading your profile data");
})
</script>
+1
View File
@@ -0,0 +1 @@
<template>You have not provided a valid access key...</template>
+339
View File
@@ -0,0 +1,339 @@
<template>
<div class="min-h-screen flex items-center justify-center">
<div class="max-w-md w-full py-12 px-6">
<img class="mx-auto h-24 w-auto" src="/favicon.png" alt />
<h1
class="sm:text-3xl text-2xl font-medium title-font mb-4 text-center"
>Lauf für Kaya! - {{ $t('registrieren') }}</h1>
<p class="mx-auto leading-relaxed text-base text-center">{{ $t('register.register_now') }}</p>
<p
v-if="state.org_name !== ''"
class="mx-auto leading-relaxed text-base text-center"
>{{ $t('organization') }}: {{ state.org_name }}</p>
<p
v-if="state.org_name !== '' && state.org_teams.length > 0"
class="mx-auto leading-relaxed text-base text-center"
>Team:</p>
<select
v-model="org_team"
v-if="state.org_name !== '' && state.org_teams.length > 0"
class="w-full border bg-white rounded px-3 py-2 outline-none block mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-select focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray"
>
<option v-for="t in state.org_teams" :key="t.id" :value="t.id">{{ t.name }}</option>
</select>
<p
v-if="state.org_name === ''"
class="mx-auto leading-relaxed text-base text-center"
>Bürgerlauf</p>
<div class="mt-4">
<label for="first_name" class="block font-medium">
{{ $t('vorname') }}
<span class="font-bold">*</span>
</label>
<input
v-model="userdetails.firstname"
name="firstname"
id="first_name"
autocomplete="off"
:placeholder="[[$t('vorname')]]"
type="text"
:class="{ 'border-red-500': (!userdetails.firstname.trim()), 'border-green-300': (userdetails.firstname.trim()) }"
class="dark:bg-gray-800 mt-1 block w-full shadow-sm sm:text-sm border-gray-300 border-2 bg-gray-50 text-gray-500 rounded-md p-2"
/>
<!-- -->
<label for="middle_name" class="block font-medium">{{ $t('mittelname') }}</label>
<input
v-model="userdetails.middlename"
name="middlename"
id="middle_name"
autocomplete="off"
:placeholder="[[$t('mittelname')]]"
type="text"
class="dark:bg-gray-800 mt-1 block w-full shadow-sm sm:text-sm border-gray-300 border-2 bg-gray-50 text-gray-500 rounded-md p-2"
/>
<!-- -->
<label for="last_name" class="block font-medium">
{{ $t('nachname') }}
<span class="font-bold">*</span>
</label>
<input
v-model="userdetails.lastname"
name="lastname"
id="last_name"
autocomplete="off"
:placeholder="[[$t('nachname')]]"
type="text"
:class="{ 'border-red-500': (!userdetails.lastname.trim()), 'border-green-300': (userdetails.lastname.trim()) }"
class="dark:bg-gray-800 mt-1 block w-full shadow-sm sm:text-sm border-gray-300 border-2 bg-gray-50 text-gray-500 rounded-md p-2"
/>
<!-- -->
<label for="email_address" class="block font-medium">
{{ $t('e_mail_adress') }}
<span class="font-bold">*</span>
</label>
<input
v-model="userdetails.mail"
name="email_address"
id="email_address"
autocomplete="off"
:placeholder="[[$t('e_mail_adress')]]"
type="email"
:class="{ 'border-red-500': (!isEmail(userdetails.mail)), 'border-green-300': (isEmail(userdetails.mail)) }"
class="dark:bg-gray-800 mt-1 block w-full shadow-sm sm:text-sm border-2 bg-gray-50 text-gray-500 rounded-md p-2"
/>
<p v-if="!isEmail(userdetails.mail)" class="text-sm">{{ $t('please_provide_valid_mail') }}</p>
<!-- -->
<label for="phone" class="select-none block font-medium">{{ $t('phone_number') }}</label>
<input
v-model="userdetails.phone"
name="phone"
id="phone"
autocomplete="off"
:placeholder="[[$t('phone_number')]]"
type="text"
:class="{ 'border-red-500': (!isMobilePhone(userdetails.phone) && userdetails.phone.trim()), 'border-green-300': (isMobilePhone(userdetails.phone) && userdetails.phone.trim()) }"
class="dark:bg-gray-800 mt-1 block w-full shadow-sm sm:text-sm border-2 bg-gray-50 text-gray-500 rounded-md p-2"
/>
<p
v-if="(!isMobilePhone(userdetails.phone) && userdetails.phone.trim())"
class="text-sm"
>{{ $t('this_is_not_a_valid_international_phone_number') }}</p>
<!-- -->
<div class="grid grid-cols-6 mt-6">
<div class="col-span-6"></div>
<div class="flex items-start col-span-6">
<div class="flex items-center h-5">
<input
v-model="provide_address"
id="address_activated"
name="address_activated"
type="checkbox"
class="h-4 w-4 text-indigo-600 border-gray-300 rounded"
/>
</div>
<div class="ml-3 text-sm">
<label
for="address_activated"
class="font-medium text-gray-400 select-none"
>{{ $t('provide_address') }}</label>
</div>
</div>
<div v-if="provide_address === true" class="col-span-6">
<div class="col-span-6">
<label for="street" class="block font-medium">
{{ $t('strasse') }}
<span class="font-bold">*</span>
</label>
<input
v-model="userdetails.address.street"
type="text"
name="street"
:placeholder="[[$t('strasse')]]"
id="street"
autocomplete="street-address"
:class="{ 'border-red-500': (!userdetails.address.street.trim()), 'border-green-300': (userdetails.address.street.trim()) }"
class="dark:bg-gray-800 mt-1 block w-full shadow-sm sm:text-sm border-gray-300 border-2 bg-gray-50 text-gray-500 rounded-md p-2"
/>
</div>
<div class="col-span-6">
<label for="address2" class="block font-medium">{{ $t('apartment_suite_etc') }}</label>
<input
v-model="userdetails.address.address2"
type="text"
name="address2"
:placeholder="[[$t('apartment_suite_etc')]]"
id="address2"
autocomplete="street-address"
class="dark:bg-gray-800 mt-1 block w-full shadow-sm sm:text-sm border-gray-300 border-2 bg-gray-50 text-gray-500 rounded-md p-2"
/>
</div>
<div class="col-span-6 sm:col-span-6 lg:col-span-2">
<label for="city" class="block font-medium">
{{ $t('ort') }}
<span class="font-bold">*</span>
</label>
<input
v-model="userdetails.address.city"
type="text"
name="city"
:placeholder="[[$t('ort')]]"
id="city"
:class="{ 'border-red-500': (!userdetails.address.city.trim()), 'border-green-300': (userdetails.address.city.trim()) }"
class="dark:bg-gray-800 mt-1 block w-full shadow-sm sm:text-sm border-gray-300 border-2 bg-gray-50 text-gray-500 rounded-md p-2"
/>
</div>
<div class="col-span-6 sm:col-span-3 lg:col-span-2">
<label for="postal_code" class="block font-medium">
{{ $t('plz') }}
<span class="font-bold">*</span>
</label>
<input
v-model="userdetails.address.zipcode"
type="text"
name="postal_code"
:placeholder="[[$t('plz')]]"
id="postal_code"
autocomplete="postal-code"
:class="{ 'border-red-500': (!isPostalCode(userdetails.address.zipcode, 'DE')), 'border-green-300': (isPostalCode(userdetails.address.zipcode, 'DE')) }"
class="dark:bg-gray-800 mt-1 block w-full shadow-sm sm:text-sm border-gray-300 border-2 bg-gray-50 text-gray-500 rounded-md p-2"
/>
</div>
<p
v-if="!isPostalCode(userdetails.address.zipcode, 'DE')"
class="text-sm"
>{{ $t('please_provide_a_valid_zipcode') }}</p>
</div>
</div>
<div class="flex items-start mt-6">
<div class="flex items-center h-5">
<input
v-model="agb_accepted"
id="agb_accepted"
name="agb_accepted"
type="checkbox"
class="h-4 w-4 text-indigo-600 border-gray-300 rounded"
/>
</div>
<div class="ml-3 text-sm">
<label for="agb_accepted" class="font-medium text-gray-400 select-none">
{{ $t('i_accept', { tos: $t('tos') }) }}
<a
target="_blank"
rel="noreferrer,noopener"
href
class="underline"
>{{ $t('tos') }}</a>
{{ $t('i_accept_end') }}
<span class="font-bold">*</span>
</label>
</div>
</div>
<div class="flex items-start mt-6">
<div class="flex items-center h-5">
<input
v-model="data_confirmed"
id="data_confirmed"
name="data_confirmed"
type="checkbox"
class="h-4 w-4 text-indigo-600 border-gray-300 rounded"
/>
</div>
<div class="ml-3 text-sm">
<label for="data_confirmed" class="font-medium text-gray-400 select-none">
{{ $t('confirm_personal_data') }}
<span class="font-bold">*</span>
</label>
</div>
</div>
<div class="mt-6">
<button
@click="login"
:disabled="(!state.submit_enabled)"
:class="{ 'opacity-50': (!state.submit_enabled), 'cursor-not-allowed': (!state.submit_enabled) }"
class="text-white block w-full text-center py-2 px-3 border-2 border-gray-300 rounded-md p-1 bg-blue-800 font-medium hover:border-gray-400 focus:outline-none focus:border-gray-400 sm:text-sm"
>{{ $t('registrieren') }}</button>
</div>
</div>
<div class="mt-6">
<div class="relative">
<div class="absolute inset-0 flex items-center">
<div class="w-full border-t border-gray-300"></div>
</div>
<div class="relative flex justify-center text-sm">
<span class="px-2 bg-white dark:bg-gray-900">{{ $t('already_have_an_account') }}</span>
</div>
</div>
<div class="mt-6">
<a
href="./login"
class="block w-full text-center py-2 px-3 border-2 border-gray-300 rounded-md p-1 dark:bg-gray-800 font-medium hover:border-gray-400 focus:outline-none focus:border-gray-400 sm:text-sm"
>{{ $t('go_to_login') }}</a>
</div>
</div>
</div>
</div>
</template>
<script setup>
import { computed, ref, reactive, defineProps } from "vue";
import axios from "redaxios";
import isEmail from 'validator/es/lib/isEmail';
import isMobilePhone from 'validator/es/lib/isMobilePhone';
import isPostalCode from 'validator/es/lib/isPostalCode';
import { useToast } from "vue-toastification";
// import { router } from '../router';
import { i18n } from '../language';
const props = defineProps({
token: String
})
if (props.token) {
props.token = atob(props.token);
axios.get(`${config.baseurl}api/organizations/selfservice/${props.token}`)
.then(({ data }) => {
state.org_name = data.name;
state.org_teams = data.teams;
org_team.value = data.teams[0]?.id;
})
.catch((error) => {
console.log(error);
});
}
let userdetails = ref({ firstname: "", lastname: "", middlename: "", mail: "", phone: "", address: { street: "", address2: "", city: "", zipcode: "" } });
let provide_address = ref(false);
let agb_accepted = ref(false);
let data_confirmed = ref(false);
let org_team = ref("");
//
const state = reactive({
org_name: "",
org_teams: [],
submit_enabled: computed(() => agb_accepted.value === true && data_confirmed.value === true && (isMobilePhone(userdetails.value.phone) || !userdetails.value.phone.trim()) && isEmail(userdetails.value.mail)
&& userdetails.value.firstname
&& userdetails.value.lastname && (provide_address.value === false || provide_address.value === true && (userdetails.value.address.street.trim() && userdetails.value.address.city.trim() && isPostalCode(userdetails.value.address.zipcode, "DE"))))
})
const toast = useToast();
function login() {
userdetails = userdetails.value;
if (userdetails.phone === "" || isMobilePhone(userdetails.phone)) {
if (isEmail(userdetails.mail)) {
let postdata = {
"email": userdetails.mail,
"firstname": userdetails.firstname,
"middlename": userdetails.middlename,
"lastname": userdetails.lastname,
"address": {}
}
if (isMobilePhone(userdetails.phone)) {
postdata.phone = userdetails.phone;
}
if (provide_address.value === true) {
postdata.address = {
address1: userdetails.address.street,
address2: userdetails.address.address2 || "",
city: userdetails.address.city,
postalcode: userdetails.address.zipcode,
country: "DE",
}
}
if (state.org_name !== '' && state.org_teams.length > 0) {
postdata.team = org_team.value;
}
toast("registration in progress...");
let url = `${config.baseurl}api/runners/register`;
if (props.token) {
url = `${config.baseurl}api/runners/register/${props.token}`
}
axios.post(url, postdata)
.then(({ data }) => {
const token = btoa(data.token);
// router.push(`${config.baseurl_selfservice}/profile/${token}`);
})
.catch((error) => {
console.log(error);
});
}
}
}
</script>
+10 -10
View File
@@ -1,11 +1,11 @@
module.exports = {
purge: [],
darkMode: "media", // or 'media' or 'class'
theme: {
extend: {},
},
variants: {
extend: {},
},
plugins: [],
}
purge: [ './index.html', './src/**/*.{vue,js,ts,jsx,tsx}' ],
darkMode: 'media', // or 'media' or 'class'
theme: {
extend: {}
},
variants: {
extend: {}
},
plugins: []
};
+11 -7
View File
@@ -1,9 +1,13 @@
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import WindiCSS from 'vite-plugin-windicss';
import path from 'path';
/**
* @type {import('vite').UserConfig}
*/
export default {
plugins: [ vue(), WindiCSS() ]
};
export default defineConfig({
plugins: [ vue() ],
base: './',
resolve: {
alias: {
'@': path.resolve(__dirname, '/src')
}
}
});