From 6d9e75bb0c0c009572c712161ca7b1a89806f3ee Mon Sep 17 00:00:00 2001 From: Julian Krauser Date: Sun, 25 Aug 2024 13:37:23 +0200 Subject: [PATCH] setup route for first user --- .env.example | 1 + .gitignore | 4 +- README.md | 21 ++++- src/App.vue | 6 ++ src/components/ContextMenu.vue | 48 ++++++++++++ src/components/Modal.vue | 27 +++++++ src/router/authGuards.ts | 41 +++++----- src/router/index.ts | 20 +++++ src/router/setupGuard.ts | 16 ++++ src/serverCom.ts | 6 +- src/stores/admin/navigation.ts | 12 +++ src/stores/context-menu.ts | 32 ++++++++ src/stores/modal.ts | 23 ++++++ src/templates/Main.vue | 2 +- src/views/Login.vue | 1 - src/views/admin/View.vue | 19 ++++- src/views/admin/members/Overview.vue | 4 +- src/views/setup/Setup.vue | 85 ++++++++++++++++++++ src/views/setup/Verify.vue | 112 +++++++++++++++++++++++++++ tsconfig.app.json | 5 +- 20 files changed, 455 insertions(+), 30 deletions(-) create mode 100644 .env.example create mode 100644 src/components/ContextMenu.vue create mode 100644 src/components/Modal.vue create mode 100644 src/router/setupGuard.ts create mode 100644 src/stores/context-menu.ts create mode 100644 src/stores/modal.ts create mode 100644 src/views/setup/Setup.vue create mode 100644 src/views/setup/Verify.vue diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..f968fcf --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +SERVER_ADDRESS = serveradress diff --git a/.gitignore b/.gitignore index e1f930a..9a2b281 100644 --- a/.gitignore +++ b/.gitignore @@ -38,4 +38,6 @@ coverage *.sln *.sw? -*.tsbuildinfo \ No newline at end of file +*.tsbuildinfo + +.env \ No newline at end of file diff --git a/README.md b/README.md index 51b4921..96de736 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,22 @@ # member-administration-ui -Mitgliederverwaltung \ No newline at end of file +Memberadministration + +## Installation + +### Requirements + +1. Access to the internet + +### Configuration + +1. Copy the .env.example file to .env and fill in the required information +2. Install all packages via `npm install` +3. Start the backend application +4. Start the application +5. Run `npm run dev` to run inside dev-environment + +### Usage + +1. Open the browser and navigate to `http://localhost:5173` or the URL you specified in the server configuration +2. Go to route `/setup` to create the first user (this path is disabled after the first user is created) diff --git a/src/App.vue b/src/App.vue index bd8a4af..587c449 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,4 +1,7 @@