Compare commits
174 Commits
f98eb098f5
...
v.0.3.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 7dc392631d | |||
| 98f8e0b79b | |||
| 4c31ccd021 | |||
| 57d35a01ba | |||
| 6f6efa5886 | |||
| 4498c865f2 | |||
| a58adbcc8d | |||
| 8a18b95031 | |||
| c867d9d51f | |||
| 4905ef607b | |||
| 2c18c59f51 | |||
| d622fda7a9 | |||
| 831a667a27 | |||
| 947ed225b6 | |||
| b74da2dc3b | |||
| da484b08a9 | |||
| 22d7b2a11d | |||
| ac21e8d607 | |||
| 7c78226864 | |||
| fa2c7f2e8b | |||
| 07f486c72e | |||
| b5364639a5 | |||
| 2e15d4a960 | |||
| 1b0f48d374 | |||
| b3ebbff732 | |||
| e8b50da142 | |||
| 57358fa818 | |||
| 366f1060e3 | |||
| 9d41a14926 | |||
| d4fbda26d7 | |||
| e02f2d252e | |||
| 1dc5740f03 | |||
| baf763c4cb | |||
| 7fdecdbc5d | |||
| f2bb4b6954 | |||
| 2d77a793d8 | |||
| 7912e38932 | |||
| 70e508ce7a | |||
| 86acedc8aa | |||
| ae577dc023 | |||
| c0d110f386 | |||
| 2b14f76d4b | |||
| 0911cdbe5c | |||
| 24f44e73f4 | |||
| e690fb984d | |||
| b97cc1af20 | |||
| 1b85d0eca9 | |||
| c58be89104 | |||
| b84d542352 | |||
| be1bc85f40 | |||
| 0a1d85a0fe | |||
| d10f84750c | |||
| 47e045dde3 | |||
| 844898bb3c | |||
| 9ec8e382cf | |||
| 80dd2a0ae8 | |||
| b7eca62403 | |||
| ce097e2098 | |||
| c3d0cc2879 | |||
| ffccd9f2d4 | |||
| a3e8d30b6c | |||
| 3359400494 | |||
| 8da0f01699 | |||
| 16fd40f11d | |||
| 80a4dcfdc9 | |||
| ba4f4720d2 | |||
| 9052c59254 | |||
| b6205f374b | |||
| 82cd2d0e98 | |||
| 0f78d3eecc | |||
| 012c544bde | |||
| 33342345f9 | |||
| c570a04052 | |||
| cdb3f02156 | |||
| fedb821a72 | |||
| 10d6142fff | |||
| 8de3ca481a | |||
| 3faa89a749 | |||
| 1f0933e2a9 | |||
| b1eea15bac | |||
| 70227329f2 | |||
| 386800f31a | |||
| 36f87bdbd3 | |||
| 4e6be355ea | |||
| 3e53a606a6 | |||
| 40161a136a | |||
| 7880a444b1 | |||
| 59470f5396 | |||
| 41106a8686 | |||
| c8d87f6643 | |||
| 6c33de3d87 | |||
| f8bdb54c33 | |||
| 203f8428a7 | |||
| 1d4daac9ae | |||
| 0ec11aacf7 | |||
| cfb8fb9d7d | |||
| 49b436d588 | |||
| 913e067ad2 | |||
| 4b745eef99 | |||
| 58c7282701 | |||
| fe2cea5529 | |||
| 41a7cbc9da | |||
| 3dd7b1d4c6 | |||
| 4b2764e33c | |||
| 10c0d0838f | |||
| d1cdf1f8fb | |||
| e48782b897 | |||
| 8165f17fc8 | |||
| bfffd72a4a | |||
| e2f6fb9c52 | |||
| 17e6b08129 | |||
| 67ed71858c | |||
| 14766fb39b | |||
| e177cf53e6 | |||
| bd53b8edfc | |||
| d6997229c4 | |||
| be5cc090fe | |||
| 907e0082e1 | |||
| a6ca7eedde | |||
| 0616409f14 | |||
| 8d0b141217 | |||
| 513c73c5c1 | |||
| ef0c48ae17 | |||
| c6c8cf0ae8 | |||
| e2dd49e21b | |||
| 169fcdf03c | |||
| da98fc73c0 | |||
| d36dbced8e | |||
| 0856540441 | |||
| 6dd49f630d | |||
| 531f964841 | |||
| 3dc4c7af1e | |||
| fd4c1d5a65 | |||
| 8329a6ae09 | |||
| 5b8f1fbead | |||
| abe1b496a2 | |||
| bc62174566 | |||
| b245e3803a | |||
| 8b4db9ccc8 | |||
| 564cf144ff | |||
| d7eae540b1 | |||
| 47fbb564b2 | |||
| 3863661b3c | |||
| 89e91c3213 | |||
| 718dbe30b7 | |||
| 54d13686cf | |||
| ed264ff026 | |||
| 5b3a753233 | |||
| 7b245da959 | |||
| 9ee344f45f | |||
| 2847bd940f | |||
| 39ce77ea63 | |||
| 8594763fa6 | |||
| 55fd203c7f | |||
| fd06b8a9a4 | |||
| f6e4bfdf2f | |||
| 767269a7cf | |||
| f10c0ef4e9 | |||
| 7ebc3c1c77 | |||
| 6ff577ece1 | |||
| 2d0dc274bf | |||
| 20e8ce1024 | |||
| f82f6ce9af | |||
| c18f0e0484 | |||
| 6af4388671 | |||
| babf1c77ce | |||
| 22cc811ae5 | |||
| 4d1eec023d | |||
| 8b1a396f68 | |||
| cfd1d29302 | |||
| 7338bb216a | |||
| 8af11151d3 | |||
| d4be64a0e9 | |||
| e607a09631 |
3
.vscode/settings.json
vendored
@@ -11,6 +11,5 @@
|
|||||||
"i18n-ally.enabledFrameworks": [
|
"i18n-ally.enabledFrameworks": [
|
||||||
"vue"
|
"vue"
|
||||||
],
|
],
|
||||||
"i18n-ally.keystyle": "nested",
|
"i18n-ally.keystyle": "nested"
|
||||||
"i18n-ally.extract.autoDetect": true,
|
|
||||||
}
|
}
|
||||||
24
CHANGELOG.md
@@ -1,28 +1,11 @@
|
|||||||
# v.0.4.0 (2025-08-30)
|
# v.0.3.0 (Release Candidate 1)
|
||||||
|
|
||||||
## 🚀 Features
|
|
||||||
|
|
||||||
- Exercise selection system
|
|
||||||
|
|
||||||
## 🌟 Enhancements
|
|
||||||
|
|
||||||
- Tooltips on append icons in toolbar
|
|
||||||
- Exercise page icon adds open exercises badge
|
|
||||||
- Finished english translation
|
|
||||||
- Icons on exercise groups on help page
|
|
||||||
- Welcome dialog: New page for look and feel, merge database and exercise creation in one step
|
|
||||||
- Add links to GitHub and project page on settings
|
|
||||||
|
|
||||||
|
|
||||||
# v.0.3.0 (2025-02-28)
|
|
||||||
## 🚀 Features
|
## 🚀 Features
|
||||||
- Swagger Documentation
|
- Swagger Documentation
|
||||||
- RPM Image
|
|
||||||
|
|
||||||
## 🐛 Bugfixes
|
## 🐛 Bugfixes
|
||||||
- Bugfix on search page for Band datasets
|
- Bugfix on search page for Band datasets
|
||||||
|
|
||||||
# v.0.2.0 (2024-12-05)
|
# v.0.2.0 (Beta)
|
||||||
## 🚀 Features
|
## 🚀 Features
|
||||||
- Adding "Test Environment" banner in the bottom right corner
|
- Adding "Test Environment" banner in the bottom right corner
|
||||||
- License handling system
|
- License handling system
|
||||||
@@ -41,7 +24,8 @@
|
|||||||
- More server stability
|
- More server stability
|
||||||
- Bugfix file manager in Electron application
|
- Bugfix file manager in Electron application
|
||||||
|
|
||||||
# v.0.1.0 (2024-11-21)
|
|
||||||
|
# v.0.1.0 (Alpha)
|
||||||
## 🚀 Features
|
## 🚀 Features
|
||||||
- Frontend
|
- Frontend
|
||||||
- VueJS frontend framework with Vuetify UI library
|
- VueJS frontend framework with Vuetify UI library
|
||||||
|
|||||||
122
README.md
@@ -1,116 +1,30 @@
|
|||||||
<p align="center">
|
# EventMaster
|
||||||
<img src="misc/images/logo.png" width="300" />
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h1 align="center">EventMaster</h1>
|
The most hackable Ticket-Shop!
|
||||||
<h2 align="center">The most hackable Ticket-Shop!</h2>
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## About the project
|
|
||||||
|
|
||||||
EventMaster is a desktop application for simulating various hacking methods for web applications. It's the perfect tool to understand vulnerabilities in modern web applications.
|
|
||||||
|
|
||||||
The shop offers tickets for concerts of popular bands with a complete ordering system, account management and admin interface. The program has been deliberately provided with vulnerabilities for teaching purposes, e.g. SQL injections. If a task is solved and a vulnerability is identified, the system provides visual feedback. The progress can be viewed on an overview page.
|
|
||||||
|
|
||||||
This project is created during my Bachelor thesis. It will be used at Leibniz University Hannover for foundation lectures.
|
|
||||||
|
|
||||||
## Important notes!
|
|
||||||
- ⚠️ The project is under development, bugs may occur
|
|
||||||
- ⚠️ The software is developed for educational purposes, don't use the attack techniques without permission on other applications and systems!
|
|
||||||
- ⚠️ Works 100% offline, no data transmission to or from external services
|
|
||||||
|
|
||||||
## Features
|
|
||||||
- 13 exercises
|
|
||||||
- 3 attack techniques
|
|
||||||
- SQL-Injections
|
|
||||||
- Cross-Site-Scripting
|
|
||||||
- Broken Access Control
|
|
||||||
- Exercise control system - check the progress and get feedback for solved exercises!
|
|
||||||
- Full working ticket shop:
|
|
||||||
- Vuetify design
|
|
||||||
- Account management system
|
|
||||||
- Order process system
|
|
||||||
- Event locations with seat plan and seat reservation system during ordering process
|
|
||||||
- Global search
|
|
||||||
- Admin panel
|
|
||||||
- Product pages
|
|
||||||
- ExpressJs-Backend server
|
|
||||||
- REST-API
|
|
||||||
- SQLite Database
|
|
||||||
- URL simulation bar for electron application
|
|
||||||
- Works 100% offline
|
|
||||||
- Multi language support (German, English)
|
|
||||||
- Dark/Light-Mode
|
|
||||||
- Exercise progress PDF generation
|
|
||||||
- API-Documentation with Swagger
|
|
||||||
- Desktop application packed with Electron
|
|
||||||
- Database can be resetted complete or partially
|
|
||||||
|
|
||||||
### Techstack
|
|
||||||
|
|
||||||
- Axios
|
|
||||||
- Electron
|
|
||||||
- Electron Builder
|
|
||||||
- Express.js
|
|
||||||
- JsonWebToken
|
|
||||||
- jspdf
|
|
||||||
- Moment.js
|
|
||||||
- NPM
|
|
||||||
- Nodemon
|
|
||||||
- Pinia
|
|
||||||
- Sequelize
|
|
||||||
- SQLite 3
|
|
||||||
- Swagger
|
|
||||||
- TypeScript
|
|
||||||
- Vite
|
|
||||||
- Vue i18n
|
|
||||||
- Vue.js
|
|
||||||
- VueRouter
|
|
||||||
- Vuetify
|
|
||||||
|
|
||||||
### Planned features
|
|
||||||
|
|
||||||
- More attack techniques
|
|
||||||
- More exercises
|
|
||||||
- More languages
|
|
||||||
- Customize the offered set of exercises (for trainer)
|
|
||||||
- Image license view system (currently only in admin panel)
|
|
||||||
|
|
||||||
### Screenshots
|
|
||||||
|
|
||||||
#### Band Detail page
|
|
||||||

|
|
||||||
|
|
||||||
#### Booking page
|
|
||||||

|
|
||||||
|
|
||||||
#### Admin panel
|
|
||||||

|
|
||||||
|
|
||||||
#### Global search
|
|
||||||

|
|
||||||
|
|
||||||
#### Feedback on exercise solution
|
|
||||||

|
|
||||||
|
|
||||||
## How to use
|
## How to use
|
||||||
|
|
||||||
### Download pre-builded images
|
### Prepare development environment
|
||||||
|
|
||||||
Go to releases and download one of the pre-builded images for your operating system.
|
1. Install node.js
|
||||||
|
|
||||||
### Build yourself
|
```bash
|
||||||
|
sudo apt install npm
|
||||||
|
|
||||||
1. Download + extract the project
|
# If outdated version:
|
||||||
2. Open the root folder with VS Code (recommended)
|
sudo npm install -g n
|
||||||
3. Open the bash inside VS Code and install all necessary packages:
|
sudo n stable
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Download + extract the project
|
||||||
|
3. Open the root folder with VS Code (recommended)
|
||||||
|
4. Open the bash inside VS Code and install all necessary packages:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm i
|
npm i
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Test/development
|
### Test/development
|
||||||
|
|
||||||
There are multiple commands to test parts or the whole project:
|
There are multiple commands to test parts or the whole project:
|
||||||
|
|
||||||
@@ -120,7 +34,7 @@ There are multiple commands to test parts or the whole project:
|
|||||||
|
|
||||||
The frontend runs on `http://localhost:5173/` and the backend on `http://localhost:3000/`
|
The frontend runs on `http://localhost:5173/` and the backend on `http://localhost:3000/`
|
||||||
|
|
||||||
#### Build
|
### Build
|
||||||
|
|
||||||
- `npm run vite:build`: Build Vue frontend only
|
- `npm run vite:build`: Build Vue frontend only
|
||||||
- `npm run server:build`: Build ExpressJs backend only
|
- `npm run server:build`: Build ExpressJs backend only
|
||||||
@@ -133,7 +47,3 @@ The frontend runs on `http://localhost:5173/` and the backend on `http://localho
|
|||||||
|
|
||||||
### Database
|
### Database
|
||||||

|

|
||||||
|
|
||||||
### Frontend-Backend-System
|
|
||||||
|
|
||||||

|
|
||||||
|
|||||||
@@ -3,144 +3,127 @@
|
|||||||
{
|
{
|
||||||
"nameDe": "Den Shop kennenlernen",
|
"nameDe": "Den Shop kennenlernen",
|
||||||
"nameEn": "Getting to know the shop",
|
"nameEn": "Getting to know the shop",
|
||||||
"icon": "mdi-human-greeting",
|
|
||||||
"groupNr": 0,
|
"groupNr": 0,
|
||||||
"descriptionDe": "Vor einem Angriff ist es wichtig zu verstehen, wie die Webseite aufgebaut ist. Wie sind die URLs strukturiert? Wo befinden sich Eingabefelder welche im Backend eine SQL Abfrage stellen?",
|
"descriptionDe": "Vor einem Angriff ist es wichtig zu verstehen, wie die Webseite aufgebaut ist. Wie sind die URLs strukturiert? Wo befinden sich Eingabefelder welche im Backend eine SQL Abfrage stellen?",
|
||||||
"descriptionEn": "Before an attack, it's important to understand how the website is structured. How are the URLs structured? Where are input fields located that execute SQL queries in the backend?",
|
"descriptionEn": "todo",
|
||||||
"exercises": [
|
"exercises": [
|
||||||
{
|
{
|
||||||
"uuid": "getting-known-register",
|
|
||||||
"nameDe": "Registrieren",
|
"nameDe": "Registrieren",
|
||||||
"nameEn": "Register",
|
"nameEn": "Register",
|
||||||
"exerciseNr": 1,
|
"exerciseNr": 1,
|
||||||
"descriptionDe": "Wir richten uns einen gewöhnlichen Account auf der Plattform ein. Navigiere hierzu auf die Account-Seite und registriere dich.",
|
"descriptionDe": "Wir richten uns einen gewöhnlichen Account auf der Plattform ein. Navigiere hierzu auf die Account-Seite und registriere dich.",
|
||||||
"descriptionEn": "We'll set up a regular account on the platform. To do this, navigate to the account page and register."
|
"descriptionEn": "Create a new account in the online shop"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"uuid": "getting-known-profile",
|
|
||||||
"nameDe": "Profil vervollständigen",
|
"nameDe": "Profil vervollständigen",
|
||||||
"nameEn": "Complete profile",
|
"nameEn": "Complete profile",
|
||||||
"exerciseNr": 2,
|
"exerciseNr": 2,
|
||||||
"descriptionDe": "Bestellungen sind erst möglich, wenn das Account-Profil vervollständigt ist. Logge dich ein, navigiere zu den Account-Einstellungen, fülle den Namen aus und füge je eine Adresse und Bezahlart hinzu. Speichere alles zum Schluss ab.",
|
"descriptionDe": "Bestellungen sind erst möglich, wenn das Account-Profil vervollständigt ist. Logge dich ein, navigiere zu den Account-Einstellungen, fülle den Namen aus und füge je eine Adresse und Bezahlart hinzu. Speichere alles zum Schluss ab.",
|
||||||
"descriptionEn": "Orders are only possible once your account profile is complete. Log in, navigate to your account settings, fill in your name, and add an address and payment method. Finally, save everything."
|
"descriptionEn": "Search for an event of choice and buy a ticket for"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"uuid": "getting-known-buy-ticket",
|
|
||||||
"nameDe": "Ein Ticket kaufen",
|
"nameDe": "Ein Ticket kaufen",
|
||||||
"nameEn": "Buy a ticket",
|
"nameEn": "Buy a ticket",
|
||||||
"exerciseNr": 3,
|
"exerciseNr": 3,
|
||||||
"descriptionDe": "Wir führen nun einen Bestellvorgang durch. Wähle hierzu ein Konzert deiner Wahl und lege Tickets in den Warenkorb. Öffne diesen und schließe die Bestellung ab. Beachte die Struktur der URL wenn du ein Konzert buchen willst. Sieh dir ruhig 2-3 Buchungsseiten an, wie sich die URL jeweils verändert.",
|
"descriptionDe": "Wir führen nun einen Bestellvorgang durch. Wähle hierzu ein Konzert deiner Wahl und lege Tickets in den Warenkorb. Öffne diesen und schließe die Bestellung ab. Beachte die Struktur der URL wenn du ein Konzert buchen willst. Sieh dir ruhig 2-3 Buchungsseiten an, wie sich die URL jeweils verändert.",
|
||||||
"descriptionEn": "We'll now complete the order process. Select a concert of your choice and add tickets to your shopping cart. Open the shopping cart and complete your order. Pay attention to the URL structure when booking a concert. Feel free to look at two or three booking pages to see how the URL changes each time."
|
"descriptionEn": "Search for an event of choice and buy a ticket for"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nameDe": "Broken Access Control",
|
"nameDe": "Broken Access Control",
|
||||||
"nameEn": "Broken Access Control",
|
"nameEn": "Broken Access Control",
|
||||||
"icon": "mdi-application-outline",
|
|
||||||
"groupNr": 1,
|
"groupNr": 1,
|
||||||
"descriptionDe": "Eine Webseite beinhaltet öffentlich einsehbare und einige geschützte Seiten. Letztere sind nur mit passenden Berechtigungen erreichbar. Beispiele hierfür sind ein Admin-Panel oder der persönliche Warenkorb. Der Zugriff wird oft über Cookies oder eine Authentifizierung an einem Backend-Server geregelt. Bei Broken Access Control ist dieser Sicherheits-Mechanismus nicht oder fehlerhaft implementiert. Somit lassen sich Seiten unberechtigterweise über die URL erreichen.",
|
"descriptionDe": "Eine Webseite beinhaltet öffentlich einsehbare und einige geschützte Seiten. Letztere sind nur mit passenden Berechtigungen erreichbar. Beispiele hierfür sind ein Admin-Panel oder der persönliche Warenkorb. Der Zugriff wird oft über Cookies oder eine Authentifizierung an einem Backend-Server geregelt. Bei Broken Access Control ist dieser Sicherheits-Mechanismus nicht oder fehlerhaft implementiert. Somit lassen sich Seiten unberechtigterweise über die URL erreichen.",
|
||||||
"descriptionEn": "A website contains publicly visible pages and some protected pages. The latter can only be accessed with appropriate permissions. Examples include an admin panel or the personal shopping cart. Access is often controlled via cookies or authentication on a backend server. With broken access control, this security mechanism is either not implemented or is incorrectly implemented. This allows pages to be accessed without authorization via the URL.",
|
"descriptionEn": "todo",
|
||||||
"exercises": [
|
"exercises": [
|
||||||
{
|
{
|
||||||
"uuid": "broken-access-control-exercise-page",
|
|
||||||
"nameDe": "Hilfe-Seite aufrufen",
|
"nameDe": "Hilfe-Seite aufrufen",
|
||||||
"nameEn": "Access Help Page",
|
"nameEn": "Access Help Page",
|
||||||
"exerciseNr": 1,
|
"exerciseNr": 1,
|
||||||
"descriptionDe": "Die Hilfe-Seite erlaubt dir einen Einblick auf den Bearbeitungszustand der Aufgaben. Sie ist dementsprechend nicht abgesichert, aber auch (noch) nicht in der Titel-Leiste als Button erreichbar. Erweitere die URL in der Adresszeile so, dass du auf die Hilfeseite gelangst.",
|
"descriptionDe": "Die Hilfe-Seite erlaubt dir einen Einblick auf den Bearbeitungszustand der Aufgaben. Sie ist dementsprechend nicht abgesichert, aber auch (noch) nicht in der Titel-Leiste als Button erreichbar. Erweitere die URL in der Adresszeile so, dass du auf die Hilfeseite gelangst.",
|
||||||
"descriptionEn": "The help page provides insight into the processing status of tasks. It's therefore not secure, but it's also not (yet) accessible as a button in the title bar. Expand the URL in the address bar to access the help page."
|
"descriptionEn": "Manipulate the URL and access the help page"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"uuid": "broken-access-control-hidden-concert",
|
|
||||||
"nameDe": "Das versteckte Konzert buchen",
|
"nameDe": "Das versteckte Konzert buchen",
|
||||||
"nameEn": "Book the hidden concert",
|
"nameEn": "Book the hidden concert",
|
||||||
"exerciseNr": 2,
|
"exerciseNr": 2,
|
||||||
"descriptionDe": "Die Band >>Arctic Monkeys<< will auf ihrer >>European Tour<< drei Konzerte spielen. Im Shop finden sich allerdings nur zwei Einträge. Zwischen den beiden Tourdaten soll eine Show in der Lanxess Arena in Köln stattfinden, der Datensatz hierfür ist bereits angelegt, jedoch nicht freigeschaltet. Besuche die Seite der Band. Sieh dir den Zeitraum zwischen beiden Konzerten an, in denen das versteckte Event liegen könnte. Öffne eine Buchungsseite eines anderen Konzertes und ändere die URL so ab, dass du das versteckte Konzert buchen kannst. Reserviere dir mindestens ein Ticket und schließe den Bestellprozess ab.",
|
"descriptionDe": "Die Band >>Arctic Monkeys<< will auf ihrer >>European Tour<< drei Konzerte spielen. Im Shop finden sich allerdings nur zwei Einträge. Zwischen den beiden Tourdaten soll eine Show in der Lanxess Arena in Köln stattfinden, der Datensatz hierfür ist bereits angelegt, jedoch nicht freigeschaltet. Besuche die Seite der Band. Sieh dir den Zeitraum zwischen beiden Konzerten an, in denen das versteckte Event liegen könnte. Öffne eine Buchungsseite eines anderen Konzertes und ändere die URL so ab, dass du das versteckte Konzert buchen kannst. Reserviere dir mindestens ein Ticket und schließe den Bestellprozess ab.",
|
||||||
"descriptionEn": "The band >>Arctic Monkeys<< plans to play three shows on their >>European Tour<<. However, there are only two entries in the shop. A show at the Lanxess Arena in Cologne is scheduled to take place between the two tour dates. The dataset for this has already been created but is not yet activated. Visit the band's website. Look at the time period between the two concerts, where the hidden event could take place. Open a booking page for another concert and change the URL so that you can book the hidden concert. Reserve at least one ticket and complete the order process."
|
"descriptionEn": "Manipulate the URL and access the sold out concert and buy a ticket"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nameDe": "SQL Injections",
|
"nameDe": "SQL Injections",
|
||||||
"nameEn": "SQL Injections",
|
"nameEn": "SQL Injections",
|
||||||
"icon": "mdi-needle",
|
|
||||||
"groupNr": 2,
|
"groupNr": 2,
|
||||||
"descriptionDe": "Eine Datenbank arbeitet mit SQL Befehlen um Datensätze anzulegen, abzurufen, zu verändern und löschen. Ein Server wird über API-Schnittstellen angesprochen, führt die Befehle in der Datenbank aus und liefert das Ergebnis zurück. Der Client darf keinen direkten Zugriff auf die Datenbank haben. Bei SQL Injections wird versucht, diesen Sicherheitsmechanismus zu umgehen und über die API-Schnittstellen direkte SQL Befehle auszuführen.",
|
"descriptionDe": "Eine Datenbank arbeitet mit SQL Befehlen um Datensätze anzulegen, abzurufen, zu verändern und löschen. Ein Server wird über API-Schnittstellen angesprochen, führt die Befehle in der Datenbank aus und liefert das Ergebnis zurück. Der Client darf keinen direkten Zugriff auf die Datenbank haben. Bei SQL Injections wird versucht, diesen Sicherheitsmechanismus zu umgehen und über die API-Schnittstellen direkte SQL Befehle auszuführen.",
|
||||||
"descriptionEn": "A database uses SQL commands to create, retrieve, modify, and delete records. A server is accessed via API interfaces, executes the commands in the database, and returns the results. The client must not have direct access to the database. SQL injection attempts to circumvent this security mechanism and execute SQL commands directly via the API interfaces.",
|
"descriptionEn": "todo",
|
||||||
"exercises": [
|
"exercises": [
|
||||||
{
|
{
|
||||||
"uuid": "sql-injection-database-scheme",
|
|
||||||
"nameDe": "Wie sieht die Datenbank aus?",
|
"nameDe": "Wie sieht die Datenbank aus?",
|
||||||
"nameEn": "How does the database look like?",
|
"nameEn": "How does the database look like?",
|
||||||
"exerciseNr": 1,
|
"exerciseNr": 1,
|
||||||
"descriptionDe": "Wir versuchen nun die Datenbank im Hintergrund anzugreifen. Aktuell wissen wir aber noch nicht wie die Datenbank aussieht, also welche Tabellen sie beinhaltet. Wir können uns aber mit einem SQL-Befehl ausgeben. Gehe zur globalen Suchseite. Öffne mit der Tastenkombination >>Strg<< + >>D<< die >>Developer Tools<<. Klicke auf den Reiter >>Network<<. Hier siehst du, wie das Frontend mit dem Server kommuniziert. Schreibe nun eine SQL-Injection, welche den Suchbegriff ignoriert und dir stattdessen alle Datensätze der Tabelle >>sqlite_master<< zurück gibt, sofern die Bedingung >>type='table'<< erfüllt ist. Kopiere dir bei erfolgreicher Rückmeldung des Backends die Namen der Tabellen in eine Text-Datei, damit wir für die kommenden Aufgaben die richtigen Namen der Tabellen angeben können.",
|
"descriptionDe": "Wir versuchen nun die Datenbank im Hintergrund anzugreifen. Aktuell wissen wir aber noch nicht wie die Datenbank aussieht, also welche Tabellen sie beinhaltet. Wir können uns aber mit einem SQL-Befehl ausgeben. Gehe zur globalen Suchseite. Öffne mit der Tastenkombination >>Strg<< + >>D<< die >>Developer Tools<<. Klicke auf den Reiter >>Network<<. Hier siehst du, wie das Frontend mit dem Server kommuniziert. Schreibe nun eine SQL-Injection, welche den Suchbegriff ignoriert und dir stattdessen alle Datensätze der Tabelle >>sqlite_master<< zurück gibt, sofern die Bedingung >>type='table'<< erfüllt ist. Kopiere dir bei erfolgreicher Rückmeldung des Backends die Namen der Tabellen in eine Text-Datei, damit wir für die kommenden Aufgaben die richtigen Namen der Tabellen angeben können.",
|
||||||
"descriptionEn": "We'll now attempt to attack the database in the background. Currently, we don't yet know what the database looks like, or which tables it contains. However, we can use an SQL command to inject it. Go to the global search page. Open the Developer Tools using the keyboard shortcut Ctrl + D. Click on the Network tab. Here you can see how the frontend communicates with the server. Now write an SQL injection that ignores the search term and instead returns all records in the sqlite_master table, provided the type='table' condition is met. If the backend responds successfully, copy the table names into a text file so that we can specify the correct table names for future tasks."
|
"descriptionEn": "todo"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"uuid": "sql-injection-all-accounts",
|
|
||||||
"nameDe": "Alle Accounts ausspähen",
|
"nameDe": "Alle Accounts ausspähen",
|
||||||
"nameEn": "Get all accounts",
|
"nameEn": "Get all accounts",
|
||||||
"exerciseNr": 2,
|
"exerciseNr": 2,
|
||||||
"descriptionDe": "Schreibe nun eine SQL-Injection, welche den Suchbegriff ignoriert und dir stattdessen alle Datensätze der Account-Tabelle zurück liefert. Führe den Angriff über das Suchfeld aus. Sieh dir die Rückmeldung des Servers an.",
|
"descriptionDe": "Schreibe nun eine SQL-Injection, welche den Suchbegriff ignoriert und dir stattdessen alle Datensätze der Account-Tabelle zurück liefert. Führe den Angriff über das Suchfeld aus. Sieh dir die Rückmeldung des Servers an.",
|
||||||
"descriptionEn": "Now write an SQL injection that ignores the search term and instead returns all records in the account table. Execute the attack using the search field. Watch the server's response."
|
"descriptionEn": "Execute an SQL-Injection on the Search page to get all datasets from >>Accounts<< table."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"uuid": "sql-injection-account-roles",
|
|
||||||
"nameDe": "Alle Berechtigungsgruppen ausspähen",
|
"nameDe": "Alle Berechtigungsgruppen ausspähen",
|
||||||
"nameEn": "Get all account roles",
|
"nameEn": "Get all account roles",
|
||||||
"exerciseNr": 3,
|
"exerciseNr": 3,
|
||||||
"descriptionDe": "Wir sehen nun alle Accounts. Jeder hat eine Berechtigungs-ID (accountRoleId) mit der Berechtigungen wie der Zugriff aufs Admin-Panel geregelt werden. Wir wissen aber nicht, was die ID's bedeuten. Schreibe darum eine SQL-Injection, welche den Suchbegriff ignoriert und dir stattdessen alle Datensätze der Tabelle >>AccountRoles<< zurück liefert. Führe den Angriff über das Suchfeld aus. Beobachte die Rückmeldung des Servers über den >>Network<<-Tab.",
|
"descriptionDe": "Wir sehen nun alle Accounts. Jeder hat eine Berechtigungs-ID (accountRoleId) mit der Berechtigungen wie der Zugriff aufs Admin-Panel geregelt werden. Wir wissen aber nicht, was die ID's bedeuten. Schreibe darum eine SQL-Injection, welche den Suchbegriff ignoriert und dir stattdessen alle Datensätze der Tabelle >>AccountRoles<< zurück liefert. Führe den Angriff über das Suchfeld aus. Beobachte die Rückmeldung des Servers über den >>Network<<-Tab.",
|
||||||
"descriptionEn": "We now see all the accounts. Each has an authorization ID (accountRoleId) that controls permissions such as access to the admin panel. However, we don't know what the IDs mean. Therefore, write an SQL injection that ignores the search term and instead returns all records in the >>AccountRoles<< table. Execute the attack via the search field. Observe the server's response via the >>Network<< tab."
|
"descriptionEn": "Execute an SQL-Injection on the Search page to get all datasets from >>AccountRoles<< table."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"uuid": "sql-injection-upgrade-privileges",
|
|
||||||
"nameDe": "Eigene Berechtigungen erhöhen",
|
"nameDe": "Eigene Berechtigungen erhöhen",
|
||||||
"nameEn": "Upgrade your privileges",
|
"nameEn": "Upgrade your privileges",
|
||||||
"exerciseNr": 4,
|
"exerciseNr": 4,
|
||||||
"descriptionDe": "Jetzt bearbeiten wir unseren eigenen Account. Schreibe hierfür einen >>UPDATE<<-SQL-Befehl, welcher die >>accountRoleId<< auf das Niveau eines >>Admin<< erhöht für deinen Account-Namen.",
|
"descriptionDe": "Jetzt bearbeiten wir unseren eigenen Account. Schreibe hierfür einen >>UPDATE<<-SQL-Befehl, welcher die >>accountRoleId<< auf das Niveau eines >>Admin<< erhöht für deinen Account-Namen.",
|
||||||
"descriptionEn": "Now we'll edit our own account. To do this, write an >>UPDATE<< SQL command that elevates the >>accountRoleId<< to the level of >>Admin<< for your account name."
|
"descriptionEn": "Change the privileges of your account"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"uuid": "sql-injection-capture-account",
|
|
||||||
"nameDe": "Einen fremden Account übernehmen",
|
"nameDe": "Einen fremden Account übernehmen",
|
||||||
"nameEn": "Capture another account",
|
"nameEn": "Capture another account",
|
||||||
"exerciseNr": 5,
|
"exerciseNr": 5,
|
||||||
"descriptionDe": "Statt unsere eigenen Berechtigungen zu erhöhen, können wir auch einen Account übernehmen, welcher bereits ein >>Super-Admin<< ist. Suche dir dafür aus der Liste der in Aufgabe 2.1 erhaltenen Accounts einen aus, welcher die Rolle >>Super-Admin<< inne hat. Nur damit lässt sich die Dateiverwaltung öffnen, welche wir später brauchen. Hast du den Account-Namen gefunden, gehe ins Login-Menü (logge dich aus, falls du noch angemeldet bist). Führe nun einen SQL-Injektion durch um diesen Account zu übernehmen.",
|
"descriptionDe": "Statt unsere eigenen Berechtigungen zu erhöhen, können wir auch einen Account übernehmen, welcher bereits ein >>Super-Admin<< ist. Suche dir dafür aus der Liste der in Aufgabe 2.1 erhaltenen Accounts einen aus, welcher die Rolle >>Super-Admin<< inne hat. Nur damit lässt sich die Dateiverwaltung öffnen, welche wir später brauchen. Hast du den Account-Namen gefunden, gehe ins Login-Menü (logge dich aus, falls du noch angemeldet bist). Führe nun einen SQL-Injektion durch um diesen Account zu übernehmen.",
|
||||||
"descriptionEn": "Instead of increasing our own permissions, we can also take over an account that is already a >>super admin<<. To do this, select one from the list of accounts obtained in Task 2.1 that has the >>super admin<< role. Only then can we open the file manager, which we'll need later. Once you've found the account name, go to the login menu (log out if you're still logged in). Now perform an SQL injection to take over this account."
|
"descriptionEn": "todo"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"uuid": "sql-injection-delete-rating",
|
|
||||||
"nameDe": "Bewertungen löschen",
|
"nameDe": "Bewertungen löschen",
|
||||||
"nameEn": "Delete ratings",
|
"nameEn": "Delete ratings",
|
||||||
"exerciseNr": 6,
|
"exerciseNr": 6,
|
||||||
"descriptionDe": "Jede Band hat Bewertungen auf einer Skala von eins bis fünf Sternen erhalten. Wir wollen alle Fünf-Sterne Bewertungen aus der Datenbank löschen. Schreibe eine SQL Injection, welche in der Bewertungs-Tabelle alle Einträge mit der Bedingung >>rating = 5<< entfernt. Führe die Injection über die globale Suche aus.",
|
"descriptionDe": "Jede Band hat Bewertungen auf einer Skala von eins bis fünf Sternen erhalten. Wir wollen alle Fünf-Sterne Bewertungen aus der Datenbank löschen. Schreibe eine SQL Injection, welche in der Bewertungs-Tabelle alle Einträge mit der Bedingung >>rating = 5<< entfernt. Führe die Injection über die globale Suche aus.",
|
||||||
"descriptionEn": "Each band has received ratings on a scale of one to five stars. We want to delete all five-star ratings from the database. Write an SQL injection that removes all entries in the ratings table with the condition >>rating = 5<<. Execute the injection via the global search."
|
"descriptionEn": "todo"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nameDe": "Cross-Site Scripting (XSS)",
|
"nameDe": "Cross-Site Scripting (XSS)",
|
||||||
"nameEn": "Cross-Site Scripting (XSS)",
|
"nameEn": "Cross-Site Scripting (XSS)",
|
||||||
"icon": "mdi-code-brackets",
|
|
||||||
"groupNr": 3,
|
"groupNr": 3,
|
||||||
"descriptionDe": "Als nächstes wollen wir Schadcode in die Web-Applikation einschleusen. Zunächst testen wir, ob die Webseite hierfür anfällig ist. Manipuliere die URL der Band-Seite so, dass du eine >>Hallo Welt!<<-Nachricht als >>alert<< siehst. Hinweis: Nutze einen image tag! Setze als >>src<< die Zahl >>1<<. Den Befehl kannst du im Tag >>onerror<< ausführen.",
|
"descriptionDe": "Als nächstes wollen wir Schadcode in die Web-Applikation einschleusen. Zunächst testen wir, ob die Webseite hierfür anfällig ist. Manipuliere die URL der Band-Seite so, dass du eine >>Hallo Welt!<<-Nachricht als >>alert<< siehst. Hinweis: Nutze einen image tag! Setze als >>src<< die Zahl >>1<<. Den Befehl kannst du im Tag >>onerror<< ausführen.",
|
||||||
"descriptionEn": "Next, we want to inject malicious code into the web application. First, we'll test whether the website is vulnerable to this. Manipulate the URL of the band's page so that you see a >>Hello World!<< message as an >>alert<<. Note: Use an image tag! Set the number >>1<< as the >>src<<. You can execute the command in the >>onerror<< tag.",
|
"descriptionEn": "todo",
|
||||||
"exercises": [
|
"exercises": [
|
||||||
{
|
{
|
||||||
"uuid": "cross-site-scripting-hello-world",
|
|
||||||
"nameDe": "Hallo Welt!",
|
"nameDe": "Hallo Welt!",
|
||||||
"nameEn": "Hello World!",
|
"nameEn": "Hello World!",
|
||||||
"exerciseNr": 1,
|
"exerciseNr": 1,
|
||||||
"descriptionDe": "Als nächstes wollen wir Schadcode in die Web-Applikation einschleusen. Zunächst testen wir, ob die Webseite hierfür anfällig ist. Gehe hierzu auf die Seite >>Alle Bands<< und filtere die Einträge nach einem beliebigen Genre deiner Wahl. In der URL-Leiste siehst du nun, dass hinter der URL und dem Ressourcen-Ziel ein Parameter angegeben ist (der Part hinter dem Fragezeichen). Wir tauschen diesen Parameter gegen einen HTML Tag aus. Der Trick hierbei: Als Quelle geben wir den Zahlenwert >>1<< an, wodurch automatisch das ausgeführt wird, was im >>onerror<<-Tag drinnen steht. Genau hier soll eine Alert-Meldung mit >>Hello World!<< als JavaScript Code eingefügt werden. Verändere die URL so, dass sie die Meldung ausgibt. Falls du nicht mit JavaScript vertraut bist, sieh dir die letzte Seite mit nützlichen Befehlen an.",
|
"descriptionDe": "Als nächstes wollen wir Schadcode in die Web-Applikation einschleusen. Zunächst testen wir, ob die Webseite hierfür anfällig ist. Gehe hierzu auf die Seite >>Alle Bands<< und filtere die Einträge nach einem beliebigen Genre deiner Wahl. In der URL-Leiste siehst du nun, dass hinter der URL und dem Ressourcen-Ziel ein Parameter angegeben ist (der Part hinter dem Fragezeichen). Wir tauschen diesen Parameter gegen einen HTML Tag aus. Der Trick hierbei: Als Quelle geben wir den Zahlenwert >>1<< an, wodurch automatisch das ausgeführt wird, was im >>onerror<<-Tag drinnen steht. Genau hier soll eine Alert-Meldung mit >>Hello World!<< als JavaScript Code eingefügt werden. Verändere die URL so, dass sie die Meldung ausgibt. Falls du nicht mit JavaScript vertraut bist, sieh dir die letzte Seite mit nützlichen Befehlen an.",
|
||||||
"descriptionEn": "Next, we want to inject malicious code into the web application. First, we'll test whether the website is vulnerable to malicious code. To do this, go to the >>All Bands<< page and filter the entries by any genre of your choice. In the URL bar, you'll now see that a parameter is specified after the URL and the resource target (the part after the question mark). We'll replace this parameter with an HTML tag. The trick here: We specify the numeric value >>1<< as the source, which automatically executes what's contained in the >>onerror<< tag. This is exactly where we want to insert an alert message with >>Hello World!<< as JavaScript code. Change the URL so that it displays the message. If you're not familiar with JavaScript, check out the last page for useful commands."
|
"descriptionEn": "Take an URL of the shop and extend it with JavaScript code so that a 'Hello World' message appears whent the link is opened"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"uuid": "cross-site-scripting-external-script",
|
|
||||||
"nameDe": "Ein externes Script aufrufen",
|
"nameDe": "Ein externes Script aufrufen",
|
||||||
"nameEn": "Run an external script",
|
"nameEn": "Run an external script",
|
||||||
"exerciseNr": 2,
|
"exerciseNr": 2,
|
||||||
"descriptionDe": "Wir haben festgestellt, dass die Seite für Cross-Site-Scripting durch Reflected XSS angreifbar ist! Im zweiten Schritt binden wir nun das Script ein. Es wurde bereits auf den Server hochgeladen. Logge dich wahlweise mit einem Admin-Account (Aufgabe 2.5) oder deinem eigenen nun berechtigten Account (Aufgabe 2.4) ein. Öffne nun das Admin-Panel über den Button rechts oben. Suche über die Dateiverwaltung im Admin-Panel nach dem Skript und notiere dir die darunter angezeigte Adresse auf dem Backend-Server. Logge dich aus. Wir wollen das Skript auf der nun sichtbaren Login-Seite über eine veränderte URL einbinden. Nutze hierfür das gleiche Prinzip wie in Aufgabe 3.1. Statt >>genreName<< kannst du einen beliebigen anderen Parameter-Namen verwenden. Nutze die Konsole mit der Tastenkombination Strg + D vor dem Abschicken der URL.Logge dich nach erfolgreicher Aufgabenlösung ein und sieh in der Konsole, wie deine Login-Daten abgegriffen werden.",
|
"descriptionDe": "Wir haben festgestellt, dass die Seite für Cross-Site-Scripting durch Reflected XSS angreifbar ist! Im zweiten Schritt binden wir nun das Script ein. Es wurde bereits auf den Server hochgeladen. Logge dich wahlweise mit einem Admin-Account (Aufgabe 2.5) oder deinem eigenen nun berechtigten Account (Aufgabe 2.4) ein. Öffne nun das Admin-Panel über den Button rechts oben. Suche über die Dateiverwaltung im Admin-Panel nach dem Skript und notiere dir die darunter angezeigte Adresse auf dem Backend-Server. Logge dich aus. Wir wollen das Skript auf der nun sichtbaren Login-Seite über eine veränderte URL einbinden. Nutze hierfür das gleiche Prinzip wie in Aufgabe 3.1. Statt >>genreName<< kannst du einen beliebigen anderen Parameter-Namen verwenden. Nutze die Konsole mit der Tastenkombination Strg + D vor dem Abschicken der URL.Logge dich nach erfolgreicher Aufgabenlösung ein und sieh in der Konsole, wie deine Login-Daten abgegriffen werden.",
|
||||||
"descriptionEn": "We've determined that the page is vulnerable to cross-site scripting through Reflected XSS! In the second step, we'll integrate the script. It's already been uploaded to the server. Log in either with an admin account (Task 2.5) or your own, now authorized account (Task 2.4). Now open the admin panel using the button in the top right. Search for the script using the file manager in the admin panel and note the address displayed below it on the backend server. Log out. We want to integrate the script into the now visible login page using a modified URL. Use the same principle as in Task 3.1. Instead of >>genreName<<, you can use any other parameter name. Use the console by pressing Ctrl + D before submitting the URL. After successfully completing the task, log in and watch in the console how your login data is being retrieved."
|
"descriptionEn": "Create an URL of the shop, which calls the script"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,6 @@ import { ExerciseGroup } from "./exerciseGroup.model";
|
|||||||
|
|
||||||
@Table({ timestamps: false })
|
@Table({ timestamps: false })
|
||||||
export class Exercise extends Model {
|
export class Exercise extends Model {
|
||||||
@Column
|
|
||||||
uuid: string
|
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
nameDe: string
|
nameDe: string
|
||||||
|
|
||||||
|
|||||||
@@ -9,9 +9,6 @@ export class ExerciseGroup extends Model {
|
|||||||
@Column
|
@Column
|
||||||
nameEn: string
|
nameEn: string
|
||||||
|
|
||||||
@Column
|
|
||||||
icon: string
|
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
groupNr: number
|
groupNr: number
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ app.use("/files", files)
|
|||||||
|
|
||||||
// Add delay for more realistic response times
|
// Add delay for more realistic response times
|
||||||
app.use((req, res, next) => {
|
app.use((req, res, next) => {
|
||||||
setTimeout(next, Math.floor((Math.random() * 500) + 100))
|
setTimeout(next, Math.floor((Math.random() * 1000) + 100))
|
||||||
})
|
})
|
||||||
|
|
||||||
// Routes
|
// Routes
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
"icon": "public/logo-small.png"
|
"icon": "public/logo-small.png"
|
||||||
},
|
},
|
||||||
"linux": {
|
"linux": {
|
||||||
"target": ["deb", "rpm"],
|
"target": ["deb"],
|
||||||
"maintainer": "Tobias Zoghaib",
|
"maintainer": "Tobias Zoghaib",
|
||||||
"icon": "public/logo-small.png",
|
"icon": "public/logo-small.png",
|
||||||
"category": "Education"
|
"category": "Education"
|
||||||
@@ -35,8 +35,6 @@
|
|||||||
"!release",
|
"!release",
|
||||||
"!src",
|
"!src",
|
||||||
"!dist",
|
"!dist",
|
||||||
"!out",
|
"!out"
|
||||||
"!misc",
|
|
||||||
"!database.sqlite"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
{
|
|
||||||
"theme": "dark",
|
|
||||||
"language": "en",
|
|
||||||
"notAvailableExercises": [
|
|
||||||
"getting-known-register",
|
|
||||||
"getting-known-profile",
|
|
||||||
"getting-known-buy-ticket",
|
|
||||||
"broken-access-control-exercise-page",
|
|
||||||
"broken-access-control-hidden-concert",
|
|
||||||
"sql-injection-database-schema",
|
|
||||||
"sql-injection-all-accounts",
|
|
||||||
"sql-injection-account-roles",
|
|
||||||
"sql-injection-upgrade-privileges",
|
|
||||||
"sql-injection-capture-account",
|
|
||||||
"sql-injection-delete-rating",
|
|
||||||
"cross-site-scripting-hello-world",
|
|
||||||
"cross-site-scripting-external-script"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,84 +0,0 @@
|
|||||||
<mxfile host="Electron" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/26.0.9 Chrome/128.0.6613.186 Electron/32.2.5 Safari/537.36" version="26.0.9">
|
|
||||||
<diagram name="Page-1" id="6ideKt-3XiqBCAVgAsyQ">
|
|
||||||
<mxGraphModel dx="1195" dy="689" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
|
|
||||||
<root>
|
|
||||||
<mxCell id="0" />
|
|
||||||
<mxCell id="1" parent="0" />
|
|
||||||
<mxCell id="KDqfIFqn06qLZiIO6-10-49" value="Frontend" style="rounded=0;whiteSpace=wrap;html=1;verticalAlign=top;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="40" y="90" width="400" height="220" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="KDqfIFqn06qLZiIO6-10-52" value="Subpage<div>"All Bands"</div>" style="rounded=0;whiteSpace=wrap;html=1;verticalAlign=top;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="50" y="120" width="150" height="180" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="KDqfIFqn06qLZiIO6-10-50" value="Backend" style="rounded=0;whiteSpace=wrap;html=1;verticalAlign=top;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="630" y="90" width="210" height="280" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="KDqfIFqn06qLZiIO6-10-55" value="API Endpoint" style="rounded=0;whiteSpace=wrap;html=1;verticalAlign=top;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="650" y="120" width="170" height="100" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="KDqfIFqn06qLZiIO6-10-46" value="bandStore" style="rounded=0;whiteSpace=wrap;html=1;verticalAlign=top;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="270" y="120" width="160" height="160" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="KDqfIFqn06qLZiIO6-10-70" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=#00CC00;" parent="1" source="KDqfIFqn06qLZiIO6-10-47" target="KDqfIFqn06qLZiIO6-10-65" edge="1">
|
|
||||||
<mxGeometry relative="1" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="KDqfIFqn06qLZiIO6-10-71" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=#00CC00;" parent="1" source="KDqfIFqn06qLZiIO6-10-47" target="KDqfIFqn06qLZiIO6-10-66" edge="1">
|
|
||||||
<mxGeometry relative="1" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="KDqfIFqn06qLZiIO6-10-73" value="<font color="#00cc00">Handles</font><div><font color="#00cc00">changes</font></div>" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=#00CC00;" parent="1" source="KDqfIFqn06qLZiIO6-10-47" target="KDqfIFqn06qLZiIO6-10-72" edge="1">
|
|
||||||
<mxGeometry x="0.168" y="24" relative="1" as="geometry">
|
|
||||||
<mxPoint as="offset" />
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="KDqfIFqn06qLZiIO6-10-47" value="bands" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="290" y="230" width="120" height="30" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="KDqfIFqn06qLZiIO6-10-59" value="<div style=""><font style="color: rgb(204, 0, 0);">Stores</font></div><div style=""><font style="color: rgb(204, 0, 0);">results</font></div>" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;align=left;fillColor=#e51400;strokeColor=#B20000;" parent="1" source="KDqfIFqn06qLZiIO6-10-48" target="KDqfIFqn06qLZiIO6-10-47" edge="1">
|
|
||||||
<mxGeometry x="-0.2" y="10" relative="1" as="geometry">
|
|
||||||
<mxPoint as="offset" />
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="KDqfIFqn06qLZiIO6-10-67" value="<font style="color: rgb(0, 29, 188);">requests</font>" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.25;exitDx=0;exitDy=0;entryX=0;entryY=0.25;entryDx=0;entryDy=0;verticalAlign=bottom;fillColor=#0050ef;strokeColor=#001DBC;" parent="1" source="KDqfIFqn06qLZiIO6-10-48" target="KDqfIFqn06qLZiIO6-10-56" edge="1">
|
|
||||||
<mxGeometry relative="1" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="KDqfIFqn06qLZiIO6-10-48" value="getBands()" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="290" y="150" width="120" height="30" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="KDqfIFqn06qLZiIO6-10-53" value="<font color="#bd7000">Call function</font>" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.25;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;verticalAlign=bottom;fillColor=#f0a30a;strokeColor=#BD7000;" parent="1" source="KDqfIFqn06qLZiIO6-10-52" target="KDqfIFqn06qLZiIO6-10-48" edge="1">
|
|
||||||
<mxGeometry x="-0.2148" y="7" relative="1" as="geometry">
|
|
||||||
<mxPoint as="offset" />
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="KDqfIFqn06qLZiIO6-10-68" value="<font style="color: rgb(0, 87, 0);">send http code &amp;</font><div><span style="color: light-dark(rgb(0, 87, 0), rgb(0, 87, 0)); background-color: light-dark(#ffffff, var(--ge-dark-color, #121212));">data sets</span></div>" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.75;exitDx=0;exitDy=0;entryX=1;entryY=0.75;entryDx=0;entryDy=0;verticalAlign=top;fillColor=#008a00;strokeColor=#005700;" parent="1" source="KDqfIFqn06qLZiIO6-10-56" target="KDqfIFqn06qLZiIO6-10-48" edge="1">
|
|
||||||
<mxGeometry relative="1" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="KDqfIFqn06qLZiIO6-10-56" value="/bands" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="670" y="150" width="120" height="30" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="KDqfIFqn06qLZiIO6-10-63" value="<font style="color: rgb(0, 153, 153);">get raw</font><div><font color="#009999">datasets</font></div>" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.855;exitY=0;exitDx=0;exitDy=4.35;exitPerimeter=0;align=left;strokeColor=#009999;" parent="1" source="KDqfIFqn06qLZiIO6-10-61" edge="1">
|
|
||||||
<mxGeometry x="-0.2154" y="-9" relative="1" as="geometry">
|
|
||||||
<mxPoint as="offset" />
|
|
||||||
<mxPoint x="751" y="180" as="targetPoint" />
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="KDqfIFqn06qLZiIO6-10-61" value="DB" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="700" y="280" width="60" height="80" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="KDqfIFqn06qLZiIO6-10-62" value="<font style="color: rgb(255, 0, 255);">sends</font><div><font style="color: rgb(255, 0, 255);">SQL</font></div><div><font style="color: rgb(255, 0, 255);">command</font></div>" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.321;exitY=1.017;exitDx=0;exitDy=0;entryX=0.145;entryY=0;entryDx=0;entryDy=4.35;entryPerimeter=0;align=right;strokeColor=#FF00FF;exitPerimeter=0;" parent="1" source="KDqfIFqn06qLZiIO6-10-56" target="KDqfIFqn06qLZiIO6-10-61" edge="1">
|
|
||||||
<mxGeometry x="0.2159" y="-9" relative="1" as="geometry">
|
|
||||||
<mxPoint as="offset" />
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="KDqfIFqn06qLZiIO6-10-65" value="Coldplay" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="65" y="170" width="120" height="30" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="KDqfIFqn06qLZiIO6-10-66" value="Muse" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="65" y="210" width="120" height="30" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="KDqfIFqn06qLZiIO6-10-72" value="Radiohead" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="65" y="250" width="120" height="30" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
</root>
|
|
||||||
</mxGraphModel>
|
|
||||||
</diagram>
|
|
||||||
</mxfile>
|
|
||||||
181
misc/frontend-structure.drawio
Normal file
@@ -0,0 +1,181 @@
|
|||||||
|
<mxfile host="Electron" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/24.7.17 Chrome/128.0.6613.36 Electron/32.0.1 Safari/537.36" version="24.7.17">
|
||||||
|
<diagram name="Page-1" id="z4ePnmX8JLkG3N1GDPOr">
|
||||||
|
<mxGraphModel dx="1783" dy="1720" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
||||||
|
<root>
|
||||||
|
<mxCell id="0" />
|
||||||
|
<mxCell id="1" parent="0" />
|
||||||
|
<mxCell id="Fk8QGSgGJ1bhqam2HO4i-20" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="Fk8QGSgGJ1bhqam2HO4i-1" target="Fk8QGSgGJ1bhqam2HO4i-3" edge="1">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Fk8QGSgGJ1bhqam2HO4i-21" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="Fk8QGSgGJ1bhqam2HO4i-1" target="Fk8QGSgGJ1bhqam2HO4i-15" edge="1">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-12" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" target="fY-Wzga6seKQwhded4A5-7">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="-360" y="700" as="targetPoint" />
|
||||||
|
<mxPoint x="-720" y="240" as="sourcePoint" />
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="-720" y="540" />
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-16" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Fk8QGSgGJ1bhqam2HO4i-1" target="Fk8QGSgGJ1bhqam2HO4i-13">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-17" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Fk8QGSgGJ1bhqam2HO4i-1" target="fY-Wzga6seKQwhded4A5-8">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-22" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="Fk8QGSgGJ1bhqam2HO4i-1">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="-680" y="-20" as="targetPoint" />
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="-720" y="-20" />
|
||||||
|
<mxPoint x="-680" y="-20" />
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-23" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Fk8QGSgGJ1bhqam2HO4i-1" target="fY-Wzga6seKQwhded4A5-1">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-24" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Fk8QGSgGJ1bhqam2HO4i-1" target="Fk8QGSgGJ1bhqam2HO4i-14">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-25" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Fk8QGSgGJ1bhqam2HO4i-1" target="Fk8QGSgGJ1bhqam2HO4i-4">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Fk8QGSgGJ1bhqam2HO4i-1" value="Homepage<div><font face="Courier New"><b>/</b></font></div>" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||||
|
<mxGeometry x="-800" y="-120" width="160" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-26" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Fk8QGSgGJ1bhqam2HO4i-2" target="Fk8QGSgGJ1bhqam2HO4i-9">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-27" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Fk8QGSgGJ1bhqam2HO4i-2" target="Fk8QGSgGJ1bhqam2HO4i-8">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-28" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Fk8QGSgGJ1bhqam2HO4i-2" target="Fk8QGSgGJ1bhqam2HO4i-7">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-40" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;dashed=1;fillColor=#6d8764;strokeColor=#3A5431;" edge="1" parent="1" target="Fk8QGSgGJ1bhqam2HO4i-2">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="-679.6666666666667" y="70" as="targetPoint" />
|
||||||
|
<mxPoint x="-680" y="-20" as="sourcePoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-43" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Fk8QGSgGJ1bhqam2HO4i-2" target="fY-Wzga6seKQwhded4A5-42">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Fk8QGSgGJ1bhqam2HO4i-2" value="AccountHomePage<div><b style="font-family: &quot;Courier New&quot;;"><font style="font-size: 10px;">/account</font></b><br></div>" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||||
|
<mxGeometry x="-600" y="-40" width="160" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-31" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Fk8QGSgGJ1bhqam2HO4i-3" target="Fk8QGSgGJ1bhqam2HO4i-5">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Fk8QGSgGJ1bhqam2HO4i-3" value="BandsPage<div><b style="font-family: &quot;Courier New&quot;;"><font style="font-size: 10px;">/bands</font></b><br></div>" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||||
|
<mxGeometry x="-600" y="280" width="160" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Fk8QGSgGJ1bhqam2HO4i-4" value="PreferencesPage<div><b style="font-family: &quot;Courier New&quot;;"><font style="font-size: 10px;">/preferences</font></b><br></div>" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||||
|
<mxGeometry x="-600" y="600" width="160" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-10" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="Fk8QGSgGJ1bhqam2HO4i-5" target="fY-Wzga6seKQwhded4A5-5">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="-280" y="330" />
|
||||||
|
<mxPoint x="-280" y="330" />
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Fk8QGSgGJ1bhqam2HO4i-5" value="BandDetailPage<div><b style="font-family: &quot;Courier New&quot;;"><font style="font-size: 10px;">/bands/detail/:bandName</font></b><br></div>" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||||
|
<mxGeometry x="-360" y="280" width="160" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-41" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;dashed=1;fillColor=#e51400;strokeColor=#B20000;" edge="1" parent="1" target="Fk8QGSgGJ1bhqam2HO4i-7">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="-200" y="-220" as="targetPoint" />
|
||||||
|
<mxPoint x="-680" y="-20" as="sourcePoint" />
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="-680" y="140" />
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Fk8QGSgGJ1bhqam2HO4i-7" value="LoginPage<div><b style="font-family: &quot;Courier New&quot;;"><font style="font-size: 10px;">/account/login</font></b><br></div>" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||||
|
<mxGeometry x="-360" y="120" width="160" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Fk8QGSgGJ1bhqam2HO4i-8" value="AccountData<div><b style="font-family: &quot;Courier New&quot;;"><font style="font-size: 10px;">/account/data</font></b><br></div>" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||||
|
<mxGeometry x="-360" y="40" width="160" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Fk8QGSgGJ1bhqam2HO4i-9" value="OrdersPage<div><b style="font-family: &quot;Courier New&quot;;"><font style="font-size: 10px;">/account/orders</font></b><br></div>" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||||
|
<mxGeometry x="-360" y="-40" width="160" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Fk8QGSgGJ1bhqam2HO4i-13" value="AdminHome<span style="background-color: initial;">Page</span><div><div><b style="font-family: &quot;Courier New&quot;;"><font style="font-size: 10px;">/admin</font></b><br></div></div>" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||||
|
<mxGeometry x="-600" y="760" width="160" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Fk8QGSgGJ1bhqam2HO4i-14" value="HelpPage<div><b style="font-family: &quot;Courier New&quot;;"><font style="font-size: 10px;">/help</font></b><br></div>" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||||
|
<mxGeometry x="-600" y="680" width="160" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-32" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Fk8QGSgGJ1bhqam2HO4i-15" target="Fk8QGSgGJ1bhqam2HO4i-16">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Fk8QGSgGJ1bhqam2HO4i-15" value="LocationsPage<div><b style="font-family: &quot;Courier New&quot;;"><font style="font-size: 10px;">/locations</font></b><br></div>" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||||
|
<mxGeometry x="-600" y="440" width="160" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-9" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="Fk8QGSgGJ1bhqam2HO4i-16" target="fY-Wzga6seKQwhded4A5-5">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="-280" y="420" />
|
||||||
|
<mxPoint x="-280" y="420" />
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="Fk8QGSgGJ1bhqam2HO4i-16" value="LocationsDetailPage<div><b style="font-family: &quot;Courier New&quot;;"><font style="font-size: 10px;">/locations/detail/:name</font></b><br></div>" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||||
|
<mxGeometry x="-360" y="440" width="160" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-30" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="fY-Wzga6seKQwhded4A5-1" target="fY-Wzga6seKQwhded4A5-5">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-1" value="ConcertsPage<div><b style="font-family: &quot;Courier New&quot;;"><font style="font-size: 10px;">/concerts</font></b><br></div>" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-600" y="360" width="160" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-3" value="if logged in" style="text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-680" y="-60" width="80" height="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-4" value="else" style="text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-690" y="110" width="80" height="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-34" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="fY-Wzga6seKQwhded4A5-5" target="fY-Wzga6seKQwhded4A5-7">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="-160" y="380" />
|
||||||
|
<mxPoint x="-160" y="540" />
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-5" value="ConcertsBookingPage<div><b style="font-family: &quot;Courier New&quot;;"><font style="font-size: 10px;">/concerts/booking/:id</font></b><br></div>" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-360" y="360" width="160" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-7" value="BasketPage<div><b style="font-family: &quot;Courier New&quot;;"><font style="font-size: 10px;">/basket</font></b><br></div>" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-600" y="520" width="160" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-37" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="fY-Wzga6seKQwhded4A5-8" target="Fk8QGSgGJ1bhqam2HO4i-5">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-38" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="fY-Wzga6seKQwhded4A5-8" target="fY-Wzga6seKQwhded4A5-5">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-39" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="fY-Wzga6seKQwhded4A5-8" target="Fk8QGSgGJ1bhqam2HO4i-16">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-8" value="SearchPage<div><b style="font-family: &quot;Courier New&quot;;"><font style="font-size: 10px;">/search</font></b><br></div>" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-600" y="200" width="160" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-14" value="if ticket add to basket" style="text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-290" y="510" width="130" height="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-29" value="on log out" style="text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-460" y="90" width="60" height="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="fY-Wzga6seKQwhded4A5-42" value="AccountRatingsPage<div><b style="font-family: &quot;Courier New&quot;;"><font style="font-size: 10px;">/account/ratings</font></b><br></div>" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-360" y="-120" width="160" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
</root>
|
||||||
|
</mxGraphModel>
|
||||||
|
</diagram>
|
||||||
|
</mxfile>
|
||||||
|
Before Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 11 MiB |
|
Before Width: | Height: | Size: 133 KiB |
|
Before Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 11 KiB |
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "eventmaster",
|
"name": "eventmaster",
|
||||||
"version": "0.4.0",
|
"version": "0.3.0",
|
||||||
"author": "Tobias Zoghaib",
|
"author": "Tobias Zoghaib",
|
||||||
"description": "Hackable ticket store for educational purposes",
|
"description": "Hackable ticket store for educational purposes",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"homepage": "https://www.itsec.uni-hannover.de/de/usec/forschung/eventmaster-learning-web-attacks",
|
"homepage": "www.uni-hannover.de",
|
||||||
"main": "build/src/electron/index.js",
|
"main": "build/src/electron/index.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -3,33 +3,17 @@ defineProps({
|
|||||||
/** Displayed smaller text on the left side */
|
/** Displayed smaller text on the left side */
|
||||||
descriptionText: {
|
descriptionText: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: ""
|
||||||
},
|
|
||||||
loading: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/** Displayed bigger text on the right side */
|
/** Displayed bigger text on the right side */
|
||||||
valueText: [String, Number],
|
valueText: [ String, Number ]
|
||||||
});
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<v-card variant="outlined" class="my-1 px-2">
|
<v-card variant="outlined" class="my-1 px-2">
|
||||||
<v-row v-if="loading">
|
<v-row class="d-flex justify-center align-center">
|
||||||
<v-col>
|
|
||||||
<v-skeleton-loader
|
|
||||||
type="heading"
|
|
||||||
:loading="loading"
|
|
||||||
style="background-color: transparent"
|
|
||||||
>
|
|
||||||
sdasd
|
|
||||||
</v-skeleton-loader>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
|
|
||||||
<v-row class="d-flex justify-center align-center" v-else>
|
|
||||||
<v-col class="text-caption text-left" v-if="descriptionText.length > 0">
|
<v-col class="text-caption text-left" v-if="descriptionText.length > 0">
|
||||||
{{ descriptionText }}
|
{{ descriptionText }}
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|||||||
@@ -1,122 +1,50 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useAccountStore } from "@/stores/account.store";
|
import { useAccountStore } from '@/stores/account.store';
|
||||||
import { useBasketStore } from "@/stores/basket.store";
|
import { useBasketStore } from '@/stores/basket.store';
|
||||||
import { useExerciseStore } from "@/stores/exercise.store";
|
import { useExerciseStore } from '@/stores/exercise.store';
|
||||||
import { ref, watch } from "vue";
|
|
||||||
|
|
||||||
const accountStore = useAccountStore();
|
const accountStore = useAccountStore()
|
||||||
const basketStore = useBasketStore();
|
const basketStore = useBasketStore()
|
||||||
const exerciseStore = useExerciseStore();
|
const exerciseStore = useExerciseStore()
|
||||||
const basketItems = ref(0);
|
|
||||||
|
|
||||||
exerciseStore.getAllExercises();
|
exerciseStore.getAllExercises()
|
||||||
|
|
||||||
watch(
|
|
||||||
() => basketStore.itemsInBasket,
|
|
||||||
() => {
|
|
||||||
basketItems.value = basketStore.itemsInBasket.reduce((tot, item) => {
|
|
||||||
return tot + item.seats.length;
|
|
||||||
}, 0);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<!-- Global search -->
|
<v-btn variant="plain" icon="mdi-magnify" to="/search" />
|
||||||
<v-tooltip :text="$t('misc.search.globalsearch')" location="bottom">
|
|
||||||
<template #activator="{ props }">
|
|
||||||
<v-btn v-bind="props" variant="plain" icon="mdi-magnify" to="/search" />
|
|
||||||
</template>
|
|
||||||
</v-tooltip>
|
|
||||||
|
|
||||||
<!-- Account -->
|
<v-btn
|
||||||
<v-tooltip :text="$t('account.account')" location="bottom">
|
v-if="accountStore.userAccountToken == ''"
|
||||||
<template #activator="{ props }">
|
variant="plain"
|
||||||
<v-btn
|
icon="mdi-account"
|
||||||
v-if="accountStore.userAccountToken == ''"
|
to="/account/login"
|
||||||
v-bind="props"
|
/>
|
||||||
variant="plain"
|
|
||||||
icon="mdi-account"
|
|
||||||
to="/account/login"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<v-btn
|
<v-btn v-else variant="plain" icon="mdi-account-check" to="/account/home" />
|
||||||
v-else
|
|
||||||
v-bind="props"
|
|
||||||
variant="plain"
|
|
||||||
icon="mdi-account-check"
|
|
||||||
to="/account/home"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</v-tooltip>
|
|
||||||
|
|
||||||
<!-- Basket -->
|
<div>
|
||||||
<v-tooltip :text="$t('basket.basket')" location="bottom">
|
<v-badge
|
||||||
<template #activator="{ props }">
|
:content="basketStore.itemsInBasket.reduce((tot, item) => {
|
||||||
<v-badge
|
return tot + item.seats.length
|
||||||
v-if="basketItems > 0"
|
}, 0)"
|
||||||
:content="basketItems"
|
color="error" offset-x="8" offset-y="8">
|
||||||
color="error"
|
<v-btn variant="plain" icon="mdi-cart" to="/basket" />
|
||||||
offset-x="8"
|
</v-badge>
|
||||||
offset-y="8"
|
</div>
|
||||||
>
|
|
||||||
<v-btn v-bind="props" variant="plain" icon="mdi-cart" to="/basket" />
|
|
||||||
</v-badge>
|
|
||||||
|
|
||||||
<v-btn
|
<v-btn
|
||||||
v-else
|
v-if="accountStore.adminPanelVisible"
|
||||||
v-bind="props"
|
variant="plain"
|
||||||
variant="plain"
|
icon="mdi-table-cog"
|
||||||
icon="mdi-cart"
|
to="/admin"
|
||||||
to="/basket"
|
/>
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</v-tooltip>
|
|
||||||
|
|
||||||
<!-- Exercise page -->
|
<v-btn
|
||||||
<v-tooltip :text="$t('misc.firstStartup.exercises')" location="bottom">
|
v-if="exerciseStore.helpPageVisible"
|
||||||
<template #activator="{ props }">
|
variant="plain"
|
||||||
<v-badge
|
icon="mdi-help"
|
||||||
v-if="exerciseStore.exercisePageVisible"
|
to="/help"
|
||||||
:content="
|
/>
|
||||||
exerciseStore.exercises.reduce((tot, exercise) => {
|
|
||||||
if (exercise.available && !exercise.solved) {
|
|
||||||
return tot + 1;
|
|
||||||
} else {
|
|
||||||
return tot;
|
|
||||||
}
|
|
||||||
}, 0)
|
|
||||||
"
|
|
||||||
color="error"
|
|
||||||
offset-x="8"
|
|
||||||
offset-y="8"
|
|
||||||
>
|
|
||||||
<v-btn
|
|
||||||
v-bind="props"
|
|
||||||
variant="plain"
|
|
||||||
icon="mdi-book-open-blank-variant"
|
|
||||||
to="/help"
|
|
||||||
/>
|
|
||||||
</v-badge>
|
|
||||||
</template>
|
|
||||||
</v-tooltip>
|
|
||||||
|
|
||||||
<!-- Admin panel -->
|
<v-btn variant="plain" icon="mdi-cog" to="/preferences"/>
|
||||||
<v-tooltip :text="$t('admin.adminpanel')" location="bottom">
|
|
||||||
<template #activator="{ props }">
|
|
||||||
<v-btn
|
|
||||||
v-if="accountStore.adminPanelVisible"
|
|
||||||
v-bind="props"
|
|
||||||
variant="plain"
|
|
||||||
icon="mdi-table-cog"
|
|
||||||
to="/admin"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</v-tooltip>
|
|
||||||
|
|
||||||
<v-tooltip :text="$t('preferences.preferences')" location="bottom">
|
|
||||||
<template #activator="{ props }">
|
|
||||||
<v-btn v-bind="props" variant="plain" icon="mdi-cog" to="/preferences" />
|
|
||||||
</template>
|
|
||||||
</v-tooltip>
|
|
||||||
</template>
|
</template>
|
||||||
@@ -1,27 +1,27 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import cardViewHorizontal from "@/components/basics/cardViewHorizontal.vue";
|
import cardViewHorizontal from '@/components/basics/cardViewHorizontal.vue';
|
||||||
import { BandModel } from "@/data/models/acts/bandModel";
|
import { BandModel } from '@/data/models/acts/bandModel';
|
||||||
import { ConcertModel } from "@/data/models/acts/concertModel";
|
import { ConcertModel } from '@/data/models/acts/concertModel';
|
||||||
import { LocationModel } from "@/data/models/locations/locationModel";
|
import { LocationModel } from '@/data/models/locations/locationModel';
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter()
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
/** Concert to display */
|
/** Concert to display */
|
||||||
concert: {
|
concert: {
|
||||||
type: ConcertModel,
|
type: ConcertModel,
|
||||||
required: true,
|
required: true
|
||||||
},
|
},
|
||||||
|
|
||||||
band: {
|
band: {
|
||||||
type: BandModel,
|
type: BandModel,
|
||||||
required: true,
|
required: true
|
||||||
},
|
},
|
||||||
|
|
||||||
location: {
|
location: {
|
||||||
type: LocationModel,
|
type: LocationModel,
|
||||||
required: true,
|
required: true
|
||||||
},
|
},
|
||||||
|
|
||||||
/** Display text parts as skeleton */
|
/** Display text parts as skeleton */
|
||||||
@@ -30,9 +30,9 @@ defineProps({
|
|||||||
/** Show or hide the button on the right side */
|
/** Show or hide the button on the right side */
|
||||||
showButton: {
|
showButton: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true
|
||||||
},
|
}
|
||||||
});
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -40,13 +40,7 @@ defineProps({
|
|||||||
:title="concert.name"
|
:title="concert.name"
|
||||||
v-if="!loading"
|
v-if="!loading"
|
||||||
:link="showButton && concert.inStock > 0"
|
:link="showButton && concert.inStock > 0"
|
||||||
@click="console.log(concert.date);
|
@click="showButton && concert.inStock > 0 ? router.push('/concerts/booking/' + location.urlName + '/' + concert.date) : () => {}"
|
||||||
showButton && concert.inStock > 0
|
|
||||||
? router.push(
|
|
||||||
'/concerts/booking/' + location.urlName + '/' + concert.date
|
|
||||||
)
|
|
||||||
: () => {}
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<template #prepend>
|
<template #prepend>
|
||||||
<div>
|
<div>
|
||||||
@@ -55,9 +49,7 @@ defineProps({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text-h6">
|
<div class="text-h6">
|
||||||
{{
|
{{ new Date(concert.date).toLocaleString('default', { month: 'long' }) }}
|
||||||
new Date(concert.date).toLocaleString("default", { month: "long" })
|
|
||||||
}}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text-h6">
|
<div class="text-h6">
|
||||||
@@ -79,23 +71,28 @@ defineProps({
|
|||||||
<template #append>
|
<template #append>
|
||||||
<div>
|
<div>
|
||||||
<div class="text-secondary font-weight-medium text-h6 pb-1">
|
<div class="text-secondary font-weight-medium text-h6 pb-1">
|
||||||
{{ $t("misc.from") + " " + concert.price.toFixed(2) + " €" }}
|
{{ $t('misc.from') + ' ' + concert.price.toFixed(2) + ' €' }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="concert.inStock == 0 && showButton" class="text-h6">
|
<div v-if="concert.inStock == 0 && showButton" class="text-h6">
|
||||||
{{ $t("concert.concertSoldOut") }}
|
{{ $t('concert.concertSoldOut') }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="showButton">
|
<div v-else-if="showButton">
|
||||||
<v-btn variant="flat" color="secondary">
|
<v-btn variant="flat" color="secondary">
|
||||||
{{ $t("concert.goToTheConcert") }}
|
{{ $t('concert.goToTheConcert') }}
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</card-view-horizontal>
|
</card-view-horizontal>
|
||||||
|
|
||||||
<card-view-horizontal v-else :loading="loading">
|
<card-view-horizontal
|
||||||
<v-skeleton-loader type="text" />
|
v-else
|
||||||
|
:loading="loading"
|
||||||
|
>
|
||||||
|
<v-skeleton-loader
|
||||||
|
type="text" />
|
||||||
</card-view-horizontal>
|
</card-view-horizontal>
|
||||||
</template>
|
</template>
|
||||||
@@ -2,7 +2,6 @@ export class ExerciseGroupModel {
|
|||||||
id = -1
|
id = -1
|
||||||
nameDe: string = ""
|
nameDe: string = ""
|
||||||
nameEn: string = ""
|
nameEn: string = ""
|
||||||
icon: string = ""
|
|
||||||
groupNr: number = 0
|
groupNr: number = 0
|
||||||
descriptionDe: string = ""
|
descriptionDe: string = ""
|
||||||
descriptionEn: string = ""
|
descriptionEn: string = ""
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import { ExerciseGroupModel } from "./exerciseGroupModel"
|
import { ExerciseGroupModel } from "./exerciseGroupModel"
|
||||||
|
|
||||||
export class ExerciseModel {
|
export class ExerciseModel {
|
||||||
id: number = -1
|
id = -1
|
||||||
uuid: string = ""
|
|
||||||
nameDe: string = ""
|
nameDe: string = ""
|
||||||
nameEn: string = ""
|
nameEn: string = ""
|
||||||
exerciseNr: number = 0
|
exerciseNr: number = 0
|
||||||
@@ -10,5 +9,4 @@ export class ExerciseModel {
|
|||||||
descriptionEn: string = ""
|
descriptionEn: string = ""
|
||||||
solved: boolean = false
|
solved: boolean = false
|
||||||
exerciseGroup: ExerciseGroupModel
|
exerciseGroup: ExerciseGroupModel
|
||||||
available: boolean = true
|
|
||||||
}
|
}
|
||||||
@@ -97,8 +97,7 @@
|
|||||||
"postalCode": "Postleitzahl",
|
"postalCode": "Postleitzahl",
|
||||||
"placeOfResidence": "Wohnort",
|
"placeOfResidence": "Wohnort",
|
||||||
"bankName": "Name der Bank",
|
"bankName": "Name der Bank",
|
||||||
"iban": "IBAN",
|
"iban": "IBAN"
|
||||||
"actions": "Aktionen"
|
|
||||||
},
|
},
|
||||||
"deleteAccount": {
|
"deleteAccount": {
|
||||||
"deleteAccount": "Account löschen",
|
"deleteAccount": "Account löschen",
|
||||||
@@ -131,8 +130,7 @@
|
|||||||
"noOrdersText": "Bisher wurden keine Bestellungen von diesem Account getätigt. Gehe zum Warenkorb und bestelle!",
|
"noOrdersText": "Bisher wurden keine Bestellungen von diesem Account getätigt. Gehe zum Warenkorb und bestelle!",
|
||||||
"ordersDescription": "Übersicht aller getätigten Bestellungen",
|
"ordersDescription": "Übersicht aller getätigten Bestellungen",
|
||||||
"order": "Bestellung | Bestellungen",
|
"order": "Bestellung | Bestellungen",
|
||||||
"notShipped": "noch nicht versendet",
|
"notShipped": "noch nicht versendet"
|
||||||
"orderState": "Bestellstatus"
|
|
||||||
},
|
},
|
||||||
"basket": {
|
"basket": {
|
||||||
"addToBasket": "Zum Warenkorb hinzufügen",
|
"addToBasket": "Zum Warenkorb hinzufügen",
|
||||||
@@ -168,26 +166,12 @@
|
|||||||
"title": "Auf Werkseinstellungen zurücksetzen?",
|
"title": "Auf Werkseinstellungen zurücksetzen?",
|
||||||
"description": "Sollen alle Einstellungen und Daten auf Werkseinstellungen zurückgesetzt werden? Alle Änderungen und Fortschritte gehen verloren!"
|
"description": "Sollen alle Einstellungen und Daten auf Werkseinstellungen zurückgesetzt werden? Alle Änderungen und Fortschritte gehen verloren!"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"exercises": {
|
|
||||||
"available": "{0} von {1} Aufgaben verfügbar",
|
|
||||||
"edit": "Verfügbare Aufgaben bearbeiten",
|
|
||||||
"settings": "Aufgaben-Konfiguration"
|
|
||||||
},
|
|
||||||
"importExport": {
|
|
||||||
"title": "Import/Export Konfiguration",
|
|
||||||
"selectConfigFile": "Konfigurations-Datei auswählen",
|
|
||||||
"download": "Konfiguration exportieren",
|
|
||||||
"upload": "Datei hochladen"
|
|
||||||
},
|
|
||||||
"preferences": "Einstellungen"
|
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"scoreBoard": {
|
"scoreBoard": {
|
||||||
"exerciseGroupNr": "Aufgabengruppe {0}: ",
|
"exerciseGroupNr": "Aufgabengruppe {0}: ",
|
||||||
"exerciseNr": "Aufgabe {0}.{1}: ",
|
"exerciseNr": "Aufgabe {0}.{1}: "
|
||||||
"generatePdf": "PDF generieren",
|
|
||||||
"personalSolutionKey": "Persönlicher Lösungsschlüssel"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bannerMessages": {
|
"bannerMessages": {
|
||||||
@@ -241,7 +225,6 @@
|
|||||||
"cancel": "Abbrechen",
|
"cancel": "Abbrechen",
|
||||||
"more": "Mehr",
|
"more": "Mehr",
|
||||||
"confirm": "Bestätigen",
|
"confirm": "Bestätigen",
|
||||||
"back": "Zurück",
|
|
||||||
"next": "Weiter"
|
"next": "Weiter"
|
||||||
},
|
},
|
||||||
"validation": {
|
"validation": {
|
||||||
@@ -258,7 +241,7 @@
|
|||||||
"firstStartup": {
|
"firstStartup": {
|
||||||
"title": "Ersteinrichtung",
|
"title": "Ersteinrichtung",
|
||||||
"description": "Die Datenbank wird eingerichtet. Bitte warten...",
|
"description": "Die Datenbank wird eingerichtet. Bitte warten...",
|
||||||
"createDatabase": "Datenbank Einrichtung",
|
"createDatabase": "Erstelle Datenbank...",
|
||||||
"complete": "Fertig",
|
"complete": "Fertig",
|
||||||
"finished": "Abgeschlossen",
|
"finished": "Abgeschlossen",
|
||||||
"createExercises": "Erstelle Aufgaben...",
|
"createExercises": "Erstelle Aufgaben...",
|
||||||
@@ -266,7 +249,6 @@
|
|||||||
"database": "Datenbank",
|
"database": "Datenbank",
|
||||||
"exercises": "Aufgaben",
|
"exercises": "Aufgaben",
|
||||||
"userData": "Persönliche Daten",
|
"userData": "Persönliche Daten",
|
||||||
"lookAndFeel": "Look and feel",
|
|
||||||
"enterYourPersonalData": "Bitte gebe nun deinen Namen und deine Matrikelnummer von der Universität ein. Überprüfe die Angaben vor dem Absenden genau! Die Angaben können später nicht ohne Verlust des Bearbeitungsfortschrittes geändert werden!"
|
"enterYourPersonalData": "Bitte gebe nun deinen Namen und deine Matrikelnummer von der Universität ein. Überprüfe die Angaben vor dem Absenden genau! Die Angaben können später nicht ohne Verlust des Bearbeitungsfortschrittes geändert werden!"
|
||||||
},
|
},
|
||||||
"user": "Angaben zur Person",
|
"user": "Angaben zur Person",
|
||||||
@@ -281,25 +263,10 @@
|
|||||||
"empty": {
|
"empty": {
|
||||||
"headline": "So leer hier..."
|
"headline": "So leer hier..."
|
||||||
},
|
},
|
||||||
"searchterm": "Suchbegriff",
|
"searchterm": "Suchbegriff"
|
||||||
"globalsearch": "Globale Suche"
|
}
|
||||||
},
|
|
||||||
"submit": "Absenden",
|
|
||||||
"content": "Inhalt",
|
|
||||||
"source": "Quelle",
|
|
||||||
"softwareVersion": "Software Version",
|
|
||||||
"license": "Lizenz",
|
|
||||||
"developer": "Entwickler",
|
|
||||||
"developedFor": "Entwickelt im Auftrag",
|
|
||||||
"copyright": "Copyright",
|
|
||||||
"githubRepository": "GitHub Repository",
|
|
||||||
"projectPage": "Projektseite"
|
|
||||||
},
|
},
|
||||||
"genre": {
|
"genre": {
|
||||||
"withoutBand": "ohne Band",
|
"withoutBand": "ohne Band"
|
||||||
"popular": "Beliebte Genres"
|
|
||||||
},
|
|
||||||
"admin": {
|
|
||||||
"adminpanel": "Admin Panel"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,8 +97,7 @@
|
|||||||
"postalCode": "Postal code",
|
"postalCode": "Postal code",
|
||||||
"placeOfResidence": "Place of residence",
|
"placeOfResidence": "Place of residence",
|
||||||
"bankName": "Name of bank",
|
"bankName": "Name of bank",
|
||||||
"iban": "IBAN",
|
"iban": "IBAN"
|
||||||
"actions": "Actions"
|
|
||||||
},
|
},
|
||||||
"deleteAccount": {
|
"deleteAccount": {
|
||||||
"deleteAccount": "Delete Account",
|
"deleteAccount": "Delete Account",
|
||||||
@@ -128,11 +127,10 @@
|
|||||||
"takeOrder": "Execute order",
|
"takeOrder": "Execute order",
|
||||||
"noOrders": "No orders found",
|
"noOrders": "No orders found",
|
||||||
"orderedAt": "Ordered at",
|
"orderedAt": "Ordered at",
|
||||||
"noOrdersText": "No orders have been placed with this account yet. Go to your shopping cart and place your order!",
|
"noOrdersText": "Bisher wurden keine Bestellungen von diesem Account getätigt. Gehe zum Warenkorb und bestelle!",
|
||||||
"ordersDescription": "Overview of all placed orders",
|
"ordersDescription": "Overview of all placed orders",
|
||||||
"order": "Order | Orders",
|
"order": "Order | Orders",
|
||||||
"notShipped": "don't shipped",
|
"notShipped": "don't shipped"
|
||||||
"orderState": "Order state"
|
|
||||||
},
|
},
|
||||||
"basket": {
|
"basket": {
|
||||||
"addToBasket": "Add to basket",
|
"addToBasket": "Add to basket",
|
||||||
@@ -168,28 +166,12 @@
|
|||||||
"title": "Factory reset?",
|
"title": "Factory reset?",
|
||||||
"description": "Do you really want to reset everything? Every change will be lost!"
|
"description": "Do you really want to reset everything? Every change will be lost!"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"exercises": {
|
|
||||||
"settings": "Exercise Configuration",
|
|
||||||
"available": "{0} of {1} exercises are available",
|
|
||||||
"uploadExerciseConfig": "Upload exercise config",
|
|
||||||
"edit": "Edit available exercises",
|
|
||||||
"upload": "Upload exercises config"
|
|
||||||
},
|
|
||||||
"importExport": {
|
|
||||||
"title": "Import/Export config",
|
|
||||||
"selectConfigFile": "Select config file",
|
|
||||||
"upload": "Upload file",
|
|
||||||
"download": "Export config"
|
|
||||||
},
|
|
||||||
"preferences": "Preferences"
|
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"scoreBoard": {
|
"scoreBoard": {
|
||||||
"exerciseGroupNr": "Exercise Group {0}: ",
|
"exerciseGroupNr": "Exercise Group {0}: ",
|
||||||
"exerciseNr": "Exercise {0}.{1}: ",
|
"exerciseNr": "Exercise {0}.{1}: "
|
||||||
"generatePdf": "Generate PDF",
|
|
||||||
"personalSolutionKey": "Personal solution key"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bannerMessages": {
|
"bannerMessages": {
|
||||||
@@ -243,7 +225,6 @@
|
|||||||
"cancel": "Cancel",
|
"cancel": "Cancel",
|
||||||
"more": "More",
|
"more": "More",
|
||||||
"confirm": "Confirm",
|
"confirm": "Confirm",
|
||||||
"back": "Back",
|
|
||||||
"next": "Next"
|
"next": "Next"
|
||||||
},
|
},
|
||||||
"validation": {
|
"validation": {
|
||||||
@@ -260,13 +241,14 @@
|
|||||||
"firstStartup": {
|
"firstStartup": {
|
||||||
"title": "First startup",
|
"title": "First startup",
|
||||||
"description": "Creating database. Please wait...",
|
"description": "Creating database. Please wait...",
|
||||||
"createDatabase": "Create Database",
|
"createDatabase": "Create Database...",
|
||||||
"complete": "Complete",
|
"complete": "Complete",
|
||||||
|
"createExercises": "Create Exercises...",
|
||||||
|
"finished": "Finished",
|
||||||
"connectToServer": "Server",
|
"connectToServer": "Server",
|
||||||
"database": "Database",
|
"database": "Database",
|
||||||
"exercises": "Exercises",
|
"exercises": "Exercises",
|
||||||
"userData": "User data",
|
"userData": "User data",
|
||||||
"lookAndFeel": "Look and feel",
|
|
||||||
"enterYourPersonalData": "Please enter your name and your Matrikel number from your university. Check it twice! You can't change it later without loosing your exercise progress!"
|
"enterYourPersonalData": "Please enter your name and your Matrikel number from your university. Check it twice! You can't change it later without loosing your exercise progress!"
|
||||||
},
|
},
|
||||||
"user": "About person",
|
"user": "About person",
|
||||||
@@ -281,25 +263,10 @@
|
|||||||
"empty": {
|
"empty": {
|
||||||
"headline": "So empty here..."
|
"headline": "So empty here..."
|
||||||
},
|
},
|
||||||
"searchterm": "Search term",
|
"searchterm": "Search term"
|
||||||
"globalsearch": "Global Search"
|
}
|
||||||
},
|
|
||||||
"submit": "Submit",
|
|
||||||
"content": "Content",
|
|
||||||
"source": "Source",
|
|
||||||
"softwareVersion": "Software Version",
|
|
||||||
"license": "License",
|
|
||||||
"developer": "Developer",
|
|
||||||
"developedFor": "Developed for",
|
|
||||||
"copyright": "Copyright",
|
|
||||||
"githubRepository": "GitHub Repository",
|
|
||||||
"projectPage": "Project page"
|
|
||||||
},
|
},
|
||||||
"genre": {
|
"genre": {
|
||||||
"withoutBand": "without Band",
|
"withoutBand": "without Band"
|
||||||
"popular": "Popular Genres"
|
|
||||||
},
|
|
||||||
"admin": {
|
|
||||||
"adminpanel": "Admin Panel"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ const headers = [
|
|||||||
{ title: feedbackStore.i18n.t('account.userData.houseNumber'), value: "houseNumber" },
|
{ title: feedbackStore.i18n.t('account.userData.houseNumber'), value: "houseNumber" },
|
||||||
{ title: feedbackStore.i18n.t('account.userData.postalCode'), value: "postalCode" },
|
{ title: feedbackStore.i18n.t('account.userData.postalCode'), value: "postalCode" },
|
||||||
{ title: feedbackStore.i18n.t('account.userData.placeOfResidence'), value: "city" },
|
{ title: feedbackStore.i18n.t('account.userData.placeOfResidence'), value: "city" },
|
||||||
{ title: feedbackStore.i18n.t('account.userData.actions'), value: "actions", width: 130 }
|
{ title: "Aktionen", value: "actions", width: 130 }
|
||||||
]
|
]
|
||||||
|
|
||||||
accountStore.refreshAccount()
|
accountStore.refreshAccount()
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ const feedbackStore = useFeedbackStore()
|
|||||||
const headers = [
|
const headers = [
|
||||||
{ title: feedbackStore.i18n.t('account.userData.bankName'), value: "bankName" },
|
{ title: feedbackStore.i18n.t('account.userData.bankName'), value: "bankName" },
|
||||||
{ title: feedbackStore.i18n.t('account.userData.iban'), value: "iban" },
|
{ title: feedbackStore.i18n.t('account.userData.iban'), value: "iban" },
|
||||||
{ title: feedbackStore.i18n.t('account.userData.actions'), value: "actions", width: 130 }
|
{ title: "Aktionen", value: "actions", width: 130 }
|
||||||
]
|
]
|
||||||
|
|
||||||
accountStore.refreshAccount()
|
accountStore.refreshAccount()
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ concertStore.getConcerts()
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #item.price="{ item }">
|
<template #item.price="{ item }">
|
||||||
{{ item.price.toFixed(2) + '€' }}
|
{{ item.price.toFixed(2) }} €
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #item.image="{ item }">
|
<template #item.image="{ item }">
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ const test = ref()
|
|||||||
</v-row>
|
</v-row>
|
||||||
</v-container>
|
</v-container>
|
||||||
|
|
||||||
<v-btn type="submit">{{ $t('misc.submit') }}</v-btn>
|
<v-btn type="submit">Submit</v-btn>
|
||||||
</v-form>
|
</v-form>
|
||||||
|
|
||||||
<template #actions>
|
<template #actions>
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ filesStore.getStaticFolders()
|
|||||||
v-if="filesStore.selectedFile != undefined && filesStore.selectedFile.name.endsWith('js')"
|
v-if="filesStore.selectedFile != undefined && filesStore.selectedFile.name.endsWith('js')"
|
||||||
:model-value="filesStore.selectedFile.content"
|
:model-value="filesStore.selectedFile.content"
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
:label="$t('misc.content')"
|
label="Content"
|
||||||
height="300"
|
height="300"
|
||||||
rows="30"
|
rows="30"
|
||||||
/>
|
/>
|
||||||
@@ -104,7 +104,7 @@ filesStore.getStaticFolders()
|
|||||||
prepend-icon="mdi-web"
|
prepend-icon="mdi-web"
|
||||||
v-if="filesStore.selectedFile.copyright.url.length > 0"
|
v-if="filesStore.selectedFile.copyright.url.length > 0"
|
||||||
>
|
>
|
||||||
<a :href="filesStore.selectedFile.copyright.url" target="_blank" >{{ $t('misc.source') }}</a>
|
<a :href="filesStore.selectedFile.copyright.url" target="_blank" >Quelle</a>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
</template>
|
</template>
|
||||||
</v-list>
|
</v-list>
|
||||||
|
|||||||
@@ -2,14 +2,12 @@
|
|||||||
import dataLayout from '@/layouts/dataLayout.vue';
|
import dataLayout from '@/layouts/dataLayout.vue';
|
||||||
import genreEditDialog from './genreEditDialog.vue';
|
import genreEditDialog from './genreEditDialog.vue';
|
||||||
import { useGenreStore } from '@/stores/genre.store';
|
import { useGenreStore } from '@/stores/genre.store';
|
||||||
import { useFeedbackStore } from '@/stores/feedback.store';
|
|
||||||
|
|
||||||
const genreStore = useGenreStore()
|
const genreStore = useGenreStore()
|
||||||
const feedbackStore = useFeedbackStore()
|
|
||||||
|
|
||||||
const headers = [
|
const headers = [
|
||||||
{ title: feedbackStore.i18n.t('band.genre'), value: "name" },
|
{ title: "Name", value: "name" },
|
||||||
{ title: feedbackStore.i18n.t('band.name'), value: "bands" },
|
{ title: "Bands", value: "bands" },
|
||||||
{ title: "", value: "edit", width: 130 }
|
{ title: "", value: "edit", width: 130 }
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -3,19 +3,17 @@ import dataLayout from '@/layouts/dataLayout.vue';
|
|||||||
import { useOrderStore } from '@/stores/order.store';
|
import { useOrderStore } from '@/stores/order.store';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import OrderDetailDialog from './orderDetailDialog.vue';
|
import OrderDetailDialog from './orderDetailDialog.vue';
|
||||||
import { useFeedbackStore } from '@/stores/feedback.store';
|
|
||||||
|
|
||||||
const orderStore = useOrderStore()
|
const orderStore = useOrderStore()
|
||||||
const feedbackStore = useFeedbackStore()
|
|
||||||
|
|
||||||
const headers = [
|
const headers = [
|
||||||
{ title: feedbackStore.i18n.t('account.userData.username'), value: "account.username" },
|
{ title: "Account", value: "account.username" },
|
||||||
{ title: feedbackStore.i18n.t('account.userData.firstName'), value: "account" },
|
{ title: "Name", value: "account" },
|
||||||
{ title: feedbackStore.i18n.t('order.orderedAt'), value: "orderedAt" },
|
{ title: "Bestellt am", value: "orderedAt" },
|
||||||
{ title: feedbackStore.i18n.t('account.userData.address'), value: "street" },
|
{ title: "Adresse", value: "street" },
|
||||||
{ title: feedbackStore.i18n.t('account.userData.placeOfResidence'), value: "city" },
|
{ title: "Stadt", value: "city" },
|
||||||
{ title: feedbackStore.i18n.t('order.orderState'), value: "shipped" },
|
{ title: "Versendet", value: "shipped" },
|
||||||
{ title: "", value: "edit", width: 130 }
|
{ title: "Aktionen", value: "edit", width: 130 }
|
||||||
]
|
]
|
||||||
|
|
||||||
orderStore.getAllOrders()
|
orderStore.getAllOrders()
|
||||||
|
|||||||
@@ -7,13 +7,9 @@ import concertSection from './concertSection.vue';
|
|||||||
import heroImage from '@/components/pageParts/heroImage.vue';
|
import heroImage from '@/components/pageParts/heroImage.vue';
|
||||||
import { useBandStore } from '@/stores/band.store';
|
import { useBandStore } from '@/stores/band.store';
|
||||||
import { onMounted, watch } from 'vue';
|
import { onMounted, watch } from 'vue';
|
||||||
import { useConcertStore } from '@/stores/concert.store';
|
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const bandStore = useBandStore()
|
const bandStore = useBandStore()
|
||||||
const concertStore = useConcertStore()
|
|
||||||
|
|
||||||
concertStore.getConcerts()
|
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
bandStore.getBand(String(router.currentRoute.value.params.name).replaceAll('-', ' '))
|
bandStore.getBand(String(router.currentRoute.value.params.name).replaceAll('-', ' '))
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ watch(() => router.currentRoute.value.query, () => {
|
|||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
<v-row
|
<v-row
|
||||||
v-else-if="bandStore.filteredBands.length > 0"
|
v-else-if="bandStore.bands.length > 0"
|
||||||
v-for="band in bandStore.filteredBands"
|
v-for="band in bandStore.bands"
|
||||||
>
|
>
|
||||||
<v-col>
|
<v-col>
|
||||||
<band-list-item
|
<band-list-item
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ watch(() => router.currentRoute.value.params.date, () => {
|
|||||||
<circular-progress-indeterminate />
|
<circular-progress-indeterminate />
|
||||||
|
|
||||||
<div class="pt-5 text-h3">
|
<div class="pt-5 text-h3">
|
||||||
{{ $t('misc.loading') }}
|
{{ $t('misc.loading') }}...
|
||||||
</div>
|
</div>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,17 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useConcertStore } from "@/stores/concert.store";
|
import { useConcertStore } from '@/stores/concert.store';
|
||||||
import concertListItem from "@/components/pageParts/concertListItem.vue";
|
import concertListItem from '@/components/pageParts/concertListItem.vue';
|
||||||
import cardViewHorizontal from "@/components/basics/cardViewHorizontal.vue";
|
import cardViewHorizontal from '@/components/basics/cardViewHorizontal.vue';
|
||||||
import sectionDivider from "@/components/basics/sectionDivider.vue";
|
import sectionDivider from '@/components/basics/sectionDivider.vue';
|
||||||
import concertFilterbar from "./concertFilterbar.vue";
|
import concertFilterbar from './concertFilterbar.vue';
|
||||||
|
|
||||||
const concertStore = useConcertStore();
|
const concertStore = useConcertStore()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div v-if="concertStore.fetchInProgress">
|
<div
|
||||||
|
v-if="concertStore.fetchInProgress"
|
||||||
|
>
|
||||||
<section-divider :loading="true" />
|
<section-divider :loading="true" />
|
||||||
<v-row v-for="i in 3">
|
<v-row v-for="i in 3">
|
||||||
<v-col>
|
<v-col>
|
||||||
@@ -24,21 +26,13 @@ const concertStore = useConcertStore();
|
|||||||
>
|
>
|
||||||
<div v-if="concert.offered">
|
<div v-if="concert.offered">
|
||||||
<v-row
|
<v-row
|
||||||
v-if="
|
v-if="index == 0 ||
|
||||||
index == 0 ||
|
new Date(concertStore.concerts[index - 1].date).getMonth() !=
|
||||||
new Date(concertStore.concerts[index - 1].date).getMonth() !=
|
new Date(concertStore.concerts[index].date).getMonth()"
|
||||||
new Date(concertStore.concerts[index].date).getMonth()
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<v-col>
|
<v-col>
|
||||||
<section-divider
|
<section-divider
|
||||||
:title="
|
:title="new Date(concert.date).toLocaleString('default', { month: 'long' }) + ' ' + new Date(concert.date).getFullYear()"
|
||||||
new Date(concert.date).toLocaleString('default', {
|
|
||||||
month: 'long',
|
|
||||||
}) +
|
|
||||||
' ' +
|
|
||||||
new Date(concert.date).getFullYear()
|
|
||||||
"
|
|
||||||
/>
|
/>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ const showOrderingDialog = ref()
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<v-card-text class="text-right text-h5" v-if="basketStore.itemsInBasket.length > 0">
|
<v-card-text class="text-right text-h5" v-if="basketStore.itemsInBasket.length > 0">
|
||||||
{{ $t('misc.totalPrice') }}: {{ (basketStore.getTotalPrice).toFixed(2) + '€' }}
|
{{ $t('misc.totalPrice') }}: {{ (basketStore.getTotalPrice).toFixed(2) }} €
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -44,19 +44,19 @@ function removeFromBasket(basketItem: BasketItemModel) {
|
|||||||
|
|
||||||
<!-- Quantity -->
|
<!-- Quantity -->
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
{{ basketItem.seats.length + 'x' }}
|
{{ basketItem.seats.length }}x
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- Price per event -->
|
<!-- Price per event -->
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
<div v-if="basketItem.seats">
|
<div v-if="basketItem.seats">
|
||||||
{{ basketItem.price.toFixed(2) + '€' }}
|
{{ basketItem.price.toFixed(2) }} €
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- Total price -->
|
<!-- Total price -->
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
{{ (calcPrice(basketItem.concert.price, basketItem.seats.length)).toFixed(2) + '€' }}
|
{{ (calcPrice(basketItem.concert.price, basketItem.seats.length)).toFixed(2) }} €
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
|
|||||||
@@ -1,34 +1,39 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useExerciseStore } from "@/stores/exercise.store";
|
import { useExerciseStore } from '@/stores/exercise.store';
|
||||||
import outlinedButton from "@/components/basics/outlinedButton.vue";
|
import outlinedButton from '@/components/basics/outlinedButton.vue';
|
||||||
import { generateResultsPdf } from "@/scripts/pdfScripts";
|
import { generateResultsPdf } from '@/scripts/pdfScripts';
|
||||||
import { usePreferencesStore } from "@/stores/preferences.store";
|
import { usePreferencesStore } from '@/stores/preferences.store';
|
||||||
import cardView from "@/components/basics/cardView.vue";
|
import cardView from '@/components/basics/cardView.vue';
|
||||||
import { LanguageEnum } from "@/data/enums/languageEnum";
|
import { LanguageEnum } from '@/data/enums/languageEnum';
|
||||||
import { ExerciseModel } from "@/data/models/exercises/exerciseModel";
|
|
||||||
import { getExerciseDotColor } from "@/scripts/colorScripts";
|
|
||||||
import { getExerciseDescriptionLanguage, getExerciseNameLanguage } from "@/scripts/languageScripts";
|
|
||||||
|
|
||||||
const exerciseStore = useExerciseStore();
|
const exerciseStore = useExerciseStore()
|
||||||
const preferencesStore = usePreferencesStore();
|
const preferencesStore = usePreferencesStore()
|
||||||
|
|
||||||
// Mark this exercise as solved if page was opened
|
exerciseStore.solveExercise(1, 1)
|
||||||
exerciseStore.solveExercise(1, 1);
|
|
||||||
|
function getDotColor(exerciseGroupNr: number) {
|
||||||
|
switch(exerciseGroupNr) {
|
||||||
|
case 0: return "purple"
|
||||||
|
case 1: return "orange"
|
||||||
|
case 2: return "blue"
|
||||||
|
case 3: return "pink"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function generateExerciseKey() {
|
function generateExerciseKey() {
|
||||||
try {
|
try {
|
||||||
let code = "";
|
let code = ""
|
||||||
|
|
||||||
for (let i = 0; i < 13; i++) {
|
for (let i = 0; i < 13; i++) {
|
||||||
if (exerciseStore.exercises[i].solved) {
|
if (exerciseStore.exercises[i].solved) {
|
||||||
code += "3";
|
code += "3"
|
||||||
} else {
|
} else {
|
||||||
code += "0";
|
code += "0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (Number(code) + Number(preferencesStore.registrationNumber)) * 237;
|
return (Number(code) + Number(preferencesStore.registrationNumber)) * 237
|
||||||
} catch (e) {}
|
} catch(e) {}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -41,12 +46,9 @@ function generateExerciseKey() {
|
|||||||
<outlined-button
|
<outlined-button
|
||||||
prepend-icon="mdi-file-pdf-box"
|
prepend-icon="mdi-file-pdf-box"
|
||||||
@click="generateResultsPdf()"
|
@click="generateResultsPdf()"
|
||||||
:disabled="
|
:disabled="preferencesStore.studentName.length < 3 || preferencesStore.registrationNumber.length < 7"
|
||||||
preferencesStore.studentName.length < 3 ||
|
|
||||||
preferencesStore.registrationNumber.length < 7
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
{{ $t("help.scoreBoard.generatePdf") }}
|
PDF generieren
|
||||||
</outlined-button>
|
</outlined-button>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
@@ -54,7 +56,7 @@ function generateExerciseKey() {
|
|||||||
<v-row>
|
<v-row>
|
||||||
<v-col class="text-h5 text-center">
|
<v-col class="text-h5 text-center">
|
||||||
<div>
|
<div>
|
||||||
{{ $t("help.scoreBoard.personalSolutionKey") + ":" }}
|
Persönlicher Lösungsschlüssel:
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{{ generateExerciseKey() }}
|
{{ generateExerciseKey() }}
|
||||||
@@ -69,55 +71,46 @@ function generateExerciseKey() {
|
|||||||
icon="mdi-checkbox-marked-circle-auto-outline"
|
icon="mdi-checkbox-marked-circle-auto-outline"
|
||||||
>
|
>
|
||||||
<template #borderless>
|
<template #borderless>
|
||||||
<v-timeline side="end" class="px-5" align="start">
|
<v-timeline
|
||||||
|
side="end"
|
||||||
|
class="px-5"
|
||||||
|
align="start"
|
||||||
|
>
|
||||||
<template v-for="exercise of exerciseStore.exercises">
|
<template v-for="exercise of exerciseStore.exercises">
|
||||||
<!-- Add exercise group description item -->
|
<v-timeline-item v-if="exercise.exerciseNr == 1"
|
||||||
<v-timeline-item
|
dot-color="grey"
|
||||||
v-if="exercise.exerciseNr == 1"
|
|
||||||
:dot-color="
|
|
||||||
getExerciseDotColor(exercise.exerciseGroup.groupNr)
|
|
||||||
"
|
|
||||||
:icon="exercise.exerciseGroup.icon"
|
|
||||||
fill-dot
|
fill-dot
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
:class="`pt-1 text-h5 font-weight-bold text-${getExerciseDotColor(
|
:class="`pt-1 text-h5 font-weight-bold text-${getDotColor(exercise.exerciseGroup.groupNr)}`"
|
||||||
exercise.exerciseGroup.groupNr
|
|
||||||
)}`"
|
|
||||||
>
|
>
|
||||||
{{
|
{{
|
||||||
preferencesStore.language == LanguageEnum.GERMAN
|
(preferencesStore.language == LanguageEnum.GERMAN
|
||||||
? exercise.exerciseGroup.nameDe
|
? exercise.exerciseGroup.nameDe
|
||||||
: exercise.exerciseGroup.nameEn
|
: exercise.exerciseGroup.nameEn)
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
{{
|
{{
|
||||||
preferencesStore.language == LanguageEnum.GERMAN
|
(preferencesStore.language == LanguageEnum.GERMAN
|
||||||
? exercise.exerciseGroup.descriptionDe
|
? exercise.exerciseGroup.descriptionDe
|
||||||
: exercise.exerciseGroup.descriptionEn
|
: exercise.exerciseGroup.descriptionEn)
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
</v-timeline-item>
|
</v-timeline-item>
|
||||||
|
|
||||||
<!-- Exercise item -->
|
|
||||||
<v-timeline-item
|
<v-timeline-item
|
||||||
v-if="exercise.available"
|
:dot-color="getDotColor(exercise.exerciseGroup.groupNr)"
|
||||||
:dot-color="exercise.solved ? 'green' : 'primary'"
|
|
||||||
:icon="exercise.solved ? 'mdi-check' : 'mdi-pencil'"
|
:icon="exercise.solved ? 'mdi-check' : 'mdi-pencil'"
|
||||||
>
|
>
|
||||||
<!-- Right side -->
|
<!-- Right side -->
|
||||||
<card-view
|
<card-view
|
||||||
:title="
|
:title="$t('help.scoreBoard.exerciseNr', [exercise.exerciseGroup.groupNr, exercise.exerciseNr]) +
|
||||||
$t('help.scoreBoard.exerciseNr', [
|
(preferencesStore.language == LanguageEnum.GERMAN ? exercise.nameDe : exercise.nameEn)"
|
||||||
exercise.exerciseGroup.groupNr,
|
|
||||||
exercise.exerciseNr,
|
|
||||||
]) + getExerciseNameLanguage(exercise)
|
|
||||||
"
|
|
||||||
:color="exercise.solved ? 'green' : 'primary'"
|
:color="exercise.solved ? 'green' : 'primary'"
|
||||||
>
|
>
|
||||||
{{ getExerciseDescriptionLanguage(exercise) }}
|
{{ preferencesStore.language == LanguageEnum.GERMAN ? exercise.descriptionDe : exercise.descriptionEn }}
|
||||||
</card-view>
|
</card-view>
|
||||||
</v-timeline-item>
|
</v-timeline-item>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,48 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import CardView from "@/components/basics/cardView.vue";
|
|
||||||
import CardViewOneLine from "@/components/basics/cardViewOneLine.vue";
|
|
||||||
import SectionDivider from "@/components/basics/sectionDivider.vue";
|
|
||||||
import { GenreApiModel } from "@/data/models/acts/genreApiModel";
|
|
||||||
import { useGenreStore } from "@/stores/genre.store";
|
|
||||||
import { ref, watch } from "vue";
|
|
||||||
import { useRouter } from "vue-router";
|
|
||||||
|
|
||||||
const genreStore = useGenreStore();
|
|
||||||
const genresByNumberOfBands = ref<Array<GenreApiModel>>([]);
|
|
||||||
const router = useRouter();
|
|
||||||
|
|
||||||
genreStore.getGenres();
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => genreStore.genres,
|
|
||||||
() => {
|
|
||||||
genresByNumberOfBands.value = genreStore.genres;
|
|
||||||
|
|
||||||
genresByNumberOfBands.value.sort((a, b) => {
|
|
||||||
return b.bands.length - a.bands.length;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<v-row>
|
|
||||||
<v-col>
|
|
||||||
<section-divider :title="$t('genre.popular')" />
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
|
|
||||||
<v-row>
|
|
||||||
<v-col v-if="genreStore.fetchInProgress" v-for="n in 4" cols="6" md="">
|
|
||||||
<v-skeleton-loader :loading="true" type="card" />
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col v-else v-for="genre in genresByNumberOfBands" cols="6" md="3">
|
|
||||||
<card-view
|
|
||||||
@click="router.push({ path: '/bands', query: { genreName: genre.name }})"
|
|
||||||
:title="genre.name"
|
|
||||||
:subtitle="genre.bands.length + ' ' + $t('band.band', genre.bands.length)"
|
|
||||||
/>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</template>
|
|
||||||
@@ -1,25 +1,24 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useConcertStore } from "@/stores/concert.store";
|
import { useConcertStore } from '@/stores/concert.store';
|
||||||
import { useLocationStore } from "@/stores/location.store";
|
import { useLocationStore } from '@/stores/location.store';
|
||||||
import bandSection from "./bandsSection.vue";
|
import bandSection from './bandsSection.vue';
|
||||||
import UpcomingConcertsSection from "./upcomingConcertsSection.vue";
|
import UpcomingConcertsSection from './upcomingConcertsSection.vue';
|
||||||
import TopLocationsSection from "./topLocationsSection.vue";
|
import TopLocationsSection from './topLocationsSection.vue';
|
||||||
import { usePreferencesStore } from "@/stores/preferences.store";
|
import { usePreferencesStore } from '@/stores/preferences.store';
|
||||||
import welcomeDialog from "./welcomeDialog/dialog.vue";
|
import welcomeDialog from './welcomeDialog.vue';
|
||||||
import { ref } from "vue";
|
import { ref } from 'vue';
|
||||||
import genresSection from "./genresSection.vue";
|
|
||||||
|
|
||||||
const concertStore = useConcertStore();
|
const concertStore = useConcertStore()
|
||||||
const locationStore = useLocationStore();
|
const locationStore = useLocationStore()
|
||||||
const preferencesStore = usePreferencesStore();
|
const preferencesStore = usePreferencesStore()
|
||||||
const showWelcomeDialog = ref(false);
|
const showWelcomeDialog = ref(false)
|
||||||
|
|
||||||
concertStore.getUpcomingConcerts();
|
concertStore.getUpcomingConcerts()
|
||||||
locationStore.getTopLocations();
|
locationStore.getTopLocations()
|
||||||
|
|
||||||
// First startup
|
// First startup
|
||||||
if (preferencesStore.firstStartup) {
|
if (preferencesStore.firstStartup) {
|
||||||
showWelcomeDialog.value = true;
|
showWelcomeDialog.value = true
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -35,8 +34,6 @@ if (preferencesStore.firstStartup) {
|
|||||||
<v-col cols="10">
|
<v-col cols="10">
|
||||||
<upcoming-concerts-section />
|
<upcoming-concerts-section />
|
||||||
|
|
||||||
<genres-section />
|
|
||||||
|
|
||||||
<top-locations-section />
|
<top-locations-section />
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
|
|||||||
@@ -1,36 +1,43 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import actionDialog from '@/components/basics/actionDialog.vue';
|
import actionDialog from '@/components/basics/actionDialog.vue';
|
||||||
import outlinedButton from '@/components/basics/outlinedButton.vue';
|
import outlinedButton from '@/components/basics/outlinedButton.vue';
|
||||||
|
import ServerStateText from '@/components/pageParts/serverStateText.vue';
|
||||||
|
import { getRegisterNumberRules, getStringRules } from '@/scripts/validationRules';
|
||||||
import { useFeedbackStore } from '@/stores/feedback.store';
|
import { useFeedbackStore } from '@/stores/feedback.store';
|
||||||
import { usePreferencesStore } from '@/stores/preferences.store';
|
import { usePreferencesStore } from '@/stores/preferences.store';
|
||||||
import { ref, watch } from 'vue';
|
import { ref, watch } from 'vue';
|
||||||
import step1 from './step1.vue';
|
|
||||||
import step2 from './step2.vue';
|
|
||||||
import step3 from './step3.vue';
|
|
||||||
import step4 from './step4.vue';
|
|
||||||
|
|
||||||
const preferencesStore = usePreferencesStore()
|
const preferencesStore = usePreferencesStore()
|
||||||
const feedbackStore = useFeedbackStore()
|
const feedbackStore = useFeedbackStore()
|
||||||
const showDialog = defineModel()
|
const showDialog = defineModel()
|
||||||
const currentStep = ref(1)
|
const currentStep = ref(0)
|
||||||
const databaseCreated = ref(false)
|
|
||||||
|
|
||||||
const steps = [
|
const steps = [
|
||||||
feedbackStore.i18n.t('misc.firstStartup.connectToServer'),
|
feedbackStore.i18n.t('misc.firstStartup.connectToServer'),
|
||||||
feedbackStore.i18n.t('misc.firstStartup.lookAndFeel'),
|
|
||||||
feedbackStore.i18n.t('misc.firstStartup.database'),
|
feedbackStore.i18n.t('misc.firstStartup.database'),
|
||||||
|
feedbackStore.i18n.t('misc.firstStartup.exercises'),
|
||||||
feedbackStore.i18n.t('misc.firstStartup.userData'),
|
feedbackStore.i18n.t('misc.firstStartup.userData'),
|
||||||
]
|
]
|
||||||
|
|
||||||
preferencesStore.getServerState()
|
preferencesStore.getServerState()
|
||||||
|
|
||||||
|
|
||||||
watch(() => currentStep.value, async () => {
|
watch(() => currentStep.value, () => {
|
||||||
if (currentStep.value == 3 && !databaseCreated.value) {
|
switch(currentStep.value) {
|
||||||
await preferencesStore.resetDb();
|
case 2: {
|
||||||
await preferencesStore.resetExerciseProg();
|
preferencesStore.resetDb();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
databaseCreated.value = true;
|
case 3: {
|
||||||
|
preferencesStore.resetExerciseProg();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 4: {
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
@@ -70,31 +77,83 @@ watch(() => currentStep.value, async () => {
|
|||||||
<!-- Step 1: Check connection to backend server -->
|
<!-- Step 1: Check connection to backend server -->
|
||||||
<v-stepper-window-item
|
<v-stepper-window-item
|
||||||
:value="1"
|
:value="1"
|
||||||
|
class="text-h4 text-center"
|
||||||
>
|
>
|
||||||
<step1 />
|
<div>
|
||||||
|
{{ $t('preferences.serverState') }}:
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<server-state-text />
|
||||||
</v-stepper-window-item>
|
</v-stepper-window-item>
|
||||||
|
|
||||||
|
<!-- Step 2: Reset the database -->
|
||||||
<!-- Step 2: Select theme and language -->
|
|
||||||
<v-stepper-window-item
|
<v-stepper-window-item
|
||||||
:value="2"
|
:value="2"
|
||||||
|
|
||||||
>
|
>
|
||||||
<step2 />
|
<div v-if="preferencesStore.fetchInProgress" class="text-center text-h4 pb-4">
|
||||||
|
<div class="pb-4">
|
||||||
|
{{ $t('misc.firstStartup.createDatabase') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<v-progress-linear indeterminate />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-else class="text-center text-h4 pb-4 text-green">
|
||||||
|
<v-icon icon="mdi-check" /> {{ $t('misc.firstStartup.finished') }}
|
||||||
|
</div>
|
||||||
</v-stepper-window-item>
|
</v-stepper-window-item>
|
||||||
|
|
||||||
<!-- Step 3: Reset the database -->
|
<!-- Step 3: Create exercises -->
|
||||||
<v-stepper-window-item
|
<v-stepper-window-item
|
||||||
:value="3"
|
:value="3"
|
||||||
>
|
>
|
||||||
<step3 />
|
<div v-if="preferencesStore.fetchInProgress" class="text-center text-h4 pb-4">
|
||||||
|
<div class="pb-4">
|
||||||
|
{{ $t('misc.firstStartup.createExercises') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<v-progress-linear indeterminate />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-else class="text-center text-h4 pb-4 text-green">
|
||||||
|
<v-icon icon="mdi-check" /> {{ $t('misc.firstStartup.finished') }}
|
||||||
|
</div>
|
||||||
</v-stepper-window-item>
|
</v-stepper-window-item>
|
||||||
|
|
||||||
<!-- Step 4: Personal data -->
|
<!-- Step 4: Personal data -->
|
||||||
<v-stepper-window-item
|
<v-stepper-window-item
|
||||||
:value="4"
|
:value="4"
|
||||||
>
|
>
|
||||||
<step4 />
|
<v-container class="px-0 py-2">
|
||||||
|
<v-row>
|
||||||
|
<v-col>
|
||||||
|
<v-alert color="warning" icon="mdi-alert">
|
||||||
|
{{ $t('misc.firstStartup.enterYourPersonalData') }}
|
||||||
|
</v-alert>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
<v-row>
|
||||||
|
<v-col>
|
||||||
|
<v-text-field
|
||||||
|
variant="outlined"
|
||||||
|
:label="$t('misc.yourFullName')"
|
||||||
|
v-model="preferencesStore.studentName"
|
||||||
|
:rules="getStringRules(4)"
|
||||||
|
/>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
|
||||||
|
<v-row>
|
||||||
|
<v-col>
|
||||||
|
<v-text-field
|
||||||
|
variant="outlined"
|
||||||
|
:label="$t('misc.registrationNumber')"
|
||||||
|
v-model="preferencesStore.registrationNumber"
|
||||||
|
:rules="getRegisterNumberRules()"
|
||||||
|
/>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-container>
|
||||||
</v-stepper-window-item>
|
</v-stepper-window-item>
|
||||||
</v-stepper-window>
|
</v-stepper-window>
|
||||||
|
|
||||||
@@ -102,25 +161,16 @@ watch(() => currentStep.value, async () => {
|
|||||||
<!-- Next/Previous buttons -->
|
<!-- Next/Previous buttons -->
|
||||||
<v-stepper-actions
|
<v-stepper-actions
|
||||||
@click:next="next"
|
@click:next="next"
|
||||||
@click:prev="prev"
|
|
||||||
>
|
>
|
||||||
<template #prev="{ props }">
|
<template #prev="{ props }">
|
||||||
<outlined-button
|
<v-spacer />
|
||||||
@click="props.onClick()"
|
|
||||||
:disabled="currentStep == 1 || preferencesStore.fetchInProgress"
|
|
||||||
color="grey"
|
|
||||||
prepend-icon="mdi-arrow-left"
|
|
||||||
>
|
|
||||||
{{ $t('misc.actions.back') }}
|
|
||||||
</outlined-button>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #next="{ props }">
|
<template #next="{ props }">
|
||||||
<outlined-button
|
<outlined-button
|
||||||
v-if="currentStep < steps.length"
|
v-if="currentStep < 4"
|
||||||
@click="props.onClick()"
|
@click="props.onClick()"
|
||||||
:disabled="preferencesStore.fetchInProgress"
|
:disabled="preferencesStore.fetchInProgress"
|
||||||
append-icon="mdi-arrow-right"
|
|
||||||
>
|
>
|
||||||
{{ $t('misc.actions.next') }}
|
{{ $t('misc.actions.next') }}
|
||||||
</outlined-button>
|
</outlined-button>
|
||||||
@@ -130,7 +180,7 @@ watch(() => currentStep.value, async () => {
|
|||||||
@click="showDialog = false; preferencesStore.firstStartup = false"
|
@click="showDialog = false; preferencesStore.firstStartup = false"
|
||||||
:disabled="preferencesStore.studentName.length < 5 ||
|
:disabled="preferencesStore.studentName.length < 5 ||
|
||||||
preferencesStore.registrationNumber.length < 8"
|
preferencesStore.registrationNumber.length < 8"
|
||||||
append-icon="mdi-check"
|
prepend-icon="mdi-check"
|
||||||
color="success"
|
color="success"
|
||||||
>
|
>
|
||||||
{{ $t('misc.firstStartup.complete') }}
|
{{ $t('misc.firstStartup.complete') }}
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import ServerStateText from '@/components/pageParts/serverStateText.vue';
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<v-container class="text-h4 text-center">
|
|
||||||
<v-row>
|
|
||||||
<v-col>
|
|
||||||
<v-icon icon="mdi-server" />
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
|
|
||||||
<v-row>
|
|
||||||
<v-col>
|
|
||||||
<div>
|
|
||||||
{{ $t('preferences.serverState') + ':' }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<server-state-text />
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</v-container>
|
|
||||||
</template>
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import { ThemeEnum } from '@/data/enums/themeEnums';
|
|
||||||
import { usePreferencesStore } from '@/stores/preferences.store';
|
|
||||||
|
|
||||||
const preferencesStore = usePreferencesStore()
|
|
||||||
|
|
||||||
const themeEnums = Object.values(ThemeEnum)
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<v-container width="600" class="text-h4 text-center">
|
|
||||||
<v-row>
|
|
||||||
<v-col>
|
|
||||||
<v-icon icon="mdi-palette" />
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
|
|
||||||
<v-row>
|
|
||||||
<v-col>
|
|
||||||
{{ $t('misc.firstStartup.lookAndFeel') }}
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
|
|
||||||
<v-row>
|
|
||||||
<v-col>
|
|
||||||
<v-select
|
|
||||||
v-model="preferencesStore.theme"
|
|
||||||
:items="themeEnums"
|
|
||||||
:label="$t('preferences.selectedTheme')"
|
|
||||||
variant="outlined"
|
|
||||||
hide-details
|
|
||||||
/>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
|
|
||||||
<v-row>
|
|
||||||
<v-col>
|
|
||||||
<v-select
|
|
||||||
v-model="preferencesStore.language"
|
|
||||||
:items="$i18n.availableLocales"
|
|
||||||
:label="$t('preferences.language')"
|
|
||||||
variant="outlined"
|
|
||||||
hide-details
|
|
||||||
/>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</v-container>
|
|
||||||
</template>
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import { usePreferencesStore } from '@/stores/preferences.store';
|
|
||||||
|
|
||||||
const preferencesStore = usePreferencesStore()
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<v-container width="600" class="text-h4 text-center">
|
|
||||||
<v-row>
|
|
||||||
<v-col>
|
|
||||||
<v-icon icon="mdi-database" />
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
|
|
||||||
<v-row>
|
|
||||||
<v-col>
|
|
||||||
{{ $t('misc.firstStartup.createDatabase') }}
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
|
|
||||||
<v-row>
|
|
||||||
<v-col v-if="preferencesStore.fetchInProgress">
|
|
||||||
<v-progress-linear indeterminate />
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col v-else class="text-green">
|
|
||||||
<v-icon icon="mdi-check" /> {{ $t('misc.firstStartup.finished') }}
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</v-container>
|
|
||||||
</template>
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import { getRegisterNumberRules, getStringRules } from '@/scripts/validationRules';
|
|
||||||
import { usePreferencesStore } from '@/stores/preferences.store';
|
|
||||||
|
|
||||||
const preferencesStore = usePreferencesStore()
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<v-container class="px-0 py-2" width="600">
|
|
||||||
<v-row>
|
|
||||||
<v-col class="text-h4 text-center">
|
|
||||||
<v-icon icon="mdi-account" />
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
|
|
||||||
<v-row>
|
|
||||||
<v-col class="text-h4 text-center">
|
|
||||||
{{ $t('misc.firstStartup.userData') }}
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
|
|
||||||
<v-row>
|
|
||||||
<v-col>
|
|
||||||
<v-alert color="warning" icon="mdi-alert">
|
|
||||||
{{ $t('misc.firstStartup.enterYourPersonalData') }}
|
|
||||||
</v-alert>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
|
|
||||||
<v-row>
|
|
||||||
<v-col>
|
|
||||||
<v-text-field
|
|
||||||
variant="outlined"
|
|
||||||
:label="$t('misc.yourFullName')"
|
|
||||||
v-model="preferencesStore.studentName"
|
|
||||||
:rules="getStringRules(4)"
|
|
||||||
hide-details
|
|
||||||
/>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
|
|
||||||
<v-row>
|
|
||||||
<v-col>
|
|
||||||
<v-text-field
|
|
||||||
variant="outlined"
|
|
||||||
:label="$t('misc.registrationNumber')"
|
|
||||||
v-model="preferencesStore.registrationNumber"
|
|
||||||
:rules="getRegisterNumberRules()"
|
|
||||||
hide-details
|
|
||||||
/>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</v-container>
|
|
||||||
</template>
|
|
||||||
@@ -1,55 +1,41 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import cardView from "@/components/basics/cardView.vue";
|
import cardView from '@/components/basics/cardView.vue';
|
||||||
import packageJson from "./../../../../package.json";
|
import packageJson from './../../../../package.json'
|
||||||
|
|
||||||
function openExternal(url: string) {
|
|
||||||
window.open(url, "_blank");
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<card-view :title="$t('preferences.aboutProject')" icon="mdi-information">
|
<card-view
|
||||||
|
:title="$t('preferences.aboutProject')"
|
||||||
|
icon="mdi-information"
|
||||||
|
>
|
||||||
<template #borderless>
|
<template #borderless>
|
||||||
<v-list>
|
<v-list>
|
||||||
<v-list-item
|
<v-list-item
|
||||||
:title="$t('misc.softwareVersion')"
|
title="Software Version"
|
||||||
:subtitle="packageJson.version"
|
:subtitle="packageJson.version"
|
||||||
prepend-icon="mdi-counter"
|
prepend-icon="mdi-counter"
|
||||||
/>
|
/>
|
||||||
<v-list-item
|
<v-list-item
|
||||||
:title="$t('misc.license')"
|
title="Lizenz"
|
||||||
subtitle="MIT"
|
subtitle="MIT"
|
||||||
prepend-icon="mdi-license"
|
prepend-icon="mdi-license"
|
||||||
/>
|
/>
|
||||||
<v-list-item
|
<v-list-item
|
||||||
:title="$t('misc.developer')"
|
title="Entwickler"
|
||||||
subtitle="Tobias Zoghaib"
|
subtitle="Tobias Zoghaib"
|
||||||
prepend-icon="mdi-account"
|
prepend-icon="mdi-account"
|
||||||
/>
|
/>
|
||||||
<v-list-item
|
<v-list-item
|
||||||
:title="$t('misc.developedFor')"
|
title="Entwickelt im Auftrag"
|
||||||
subtitle="Uni Hannover, Institut für IT-Sicherheit, Fachgebiet Usable Security and Privacy"
|
subtitle="Uni Hannover, Institut für IT-Sicherheit, Fachgebiet Usable Security and Privacy"
|
||||||
prepend-icon="mdi-school"
|
prepend-icon="mdi-school"
|
||||||
/>
|
/>
|
||||||
<v-list-item
|
<v-list-item
|
||||||
:title="$t('misc.copyright')"
|
title="Copyright"
|
||||||
subtitle="2024-2025"
|
subtitle="2024"
|
||||||
prepend-icon="mdi-copyright"
|
prepend-icon="mdi-copyright"
|
||||||
/>
|
/>
|
||||||
<v-list-item
|
|
||||||
:title="$t('misc.githubRepository')"
|
|
||||||
prepend-icon="mdi-web"
|
|
||||||
@click="openExternal('https://github.com/TobiZog/eventmaster')"
|
|
||||||
/>
|
|
||||||
<v-list-item
|
|
||||||
:title="$t('misc.projectPage')"
|
|
||||||
prepend-icon="mdi-web"
|
|
||||||
@click="
|
|
||||||
openExternal(
|
|
||||||
'https://www.itsec.uni-hannover.de/de/usec/forschung/eventmaster-learning-web-attacks'
|
|
||||||
)
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
</v-list>
|
</v-list>
|
||||||
</template>
|
</template>
|
||||||
</card-view>
|
</card-view>
|
||||||
|
|||||||
@@ -1,71 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import actionDialog from "@/components/basics/actionDialog.vue";
|
|
||||||
import OutlinedButton from "@/components/basics/outlinedButton.vue";
|
|
||||||
import {
|
|
||||||
getExerciseGroupNameLanguage,
|
|
||||||
getExerciseNameLanguage,
|
|
||||||
} from "@/scripts/languageScripts";
|
|
||||||
import { useExerciseStore } from "@/stores/exercise.store";
|
|
||||||
import { usePreferencesStore } from "@/stores/preferences.store";
|
|
||||||
import { ModelRef } from "vue";
|
|
||||||
|
|
||||||
const showDialog: ModelRef<boolean> = defineModel();
|
|
||||||
const exerciseStore = useExerciseStore();
|
|
||||||
const preferencesStore = usePreferencesStore();
|
|
||||||
|
|
||||||
function saveConfig() {
|
|
||||||
preferencesStore.notAvailableExercises = []
|
|
||||||
|
|
||||||
for (let exercise of exerciseStore.exercises) {
|
|
||||||
if (!exercise.available) {
|
|
||||||
preferencesStore.notAvailableExercises.push(exercise.uuid)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
showDialog.value = false
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<action-dialog
|
|
||||||
v-model="showDialog"
|
|
||||||
:title="$t('preferences.exercises.edit')"
|
|
||||||
icon="mdi-pencil"
|
|
||||||
width="800"
|
|
||||||
persistent
|
|
||||||
>
|
|
||||||
<v-container>
|
|
||||||
<v-list>
|
|
||||||
<div v-for="exercise in exerciseStore.exercises">
|
|
||||||
<div
|
|
||||||
v-if="exercise.exerciseNr == 1"
|
|
||||||
>
|
|
||||||
<v-divider v-if="exercise.exerciseGroup.groupNr != 0"></v-divider>
|
|
||||||
<v-list-item
|
|
||||||
type="subheader"
|
|
||||||
:title="getExerciseGroupNameLanguage(exercise.exerciseGroup)"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<v-list-item>
|
|
||||||
<v-checkbox
|
|
||||||
:label="getExerciseNameLanguage(exercise)"
|
|
||||||
v-model="exercise.available"
|
|
||||||
hide-details
|
|
||||||
density="compact"
|
|
||||||
/>
|
|
||||||
</v-list-item>
|
|
||||||
</div>
|
|
||||||
</v-list>
|
|
||||||
</v-container>
|
|
||||||
|
|
||||||
<template #actions>
|
|
||||||
<outlined-button color="warning" prepend-icon="mdi-close" @click="showDialog = false">
|
|
||||||
{{ $t('misc.actions.cancel') }}
|
|
||||||
</outlined-button>
|
|
||||||
<outlined-button color="success" prepend-icon="mdi-content-save" @click="saveConfig()">
|
|
||||||
{{ $t("misc.actions.save") }}
|
|
||||||
</outlined-button>
|
|
||||||
</template>
|
|
||||||
</action-dialog>
|
|
||||||
</template>
|
|
||||||
@@ -1,75 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import cardView from "@/components/basics/cardView.vue";
|
|
||||||
import OutlinedButton from "@/components/basics/outlinedButton.vue";
|
|
||||||
import { ExerciseGroupModel } from "@/data/models/exercises/exerciseGroupModel";
|
|
||||||
import { ExerciseModel } from "@/data/models/exercises/exerciseModel";
|
|
||||||
import { getExerciseGroupNameLanguage } from "@/scripts/languageScripts";
|
|
||||||
import { useExerciseStore } from "@/stores/exercise.store";
|
|
||||||
import { ref, watch } from "vue";
|
|
||||||
import exerciseDialog from "./exerciseDialog.vue";
|
|
||||||
|
|
||||||
const exerciseStore = useExerciseStore();
|
|
||||||
const exerciseGroups = ref<Array<ExerciseGroupModel>>([]);
|
|
||||||
const showExerciseDialog = ref(false);
|
|
||||||
|
|
||||||
exerciseStore.getAllExercises();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Extract exercise groups from all exercises
|
|
||||||
*/
|
|
||||||
function groupExercises() {
|
|
||||||
exerciseStore.exercises.forEach((exercise) => {
|
|
||||||
if (
|
|
||||||
!exerciseGroups.value.find(
|
|
||||||
(exerciseGroup) => exerciseGroup.id == exercise.exerciseGroup.id
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
exerciseGroups.value.push(exercise.exerciseGroup);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function filterByExerciseGroup(
|
|
||||||
exercises: Array<ExerciseModel>,
|
|
||||||
group: ExerciseGroupModel
|
|
||||||
) {
|
|
||||||
return exercises.filter((exercise) => exercise.exerciseGroup.id == group.id);
|
|
||||||
}
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => exerciseStore.exercises,
|
|
||||||
() => groupExercises()
|
|
||||||
);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<card-view
|
|
||||||
:title="$t('preferences.exercises.settings')"
|
|
||||||
icon="mdi-book-open-blank-variant"
|
|
||||||
>
|
|
||||||
<template #borderless>
|
|
||||||
<v-list>
|
|
||||||
<v-list-item
|
|
||||||
v-for="group in exerciseGroups"
|
|
||||||
:title="getExerciseGroupNameLanguage(group)"
|
|
||||||
:subtitle="
|
|
||||||
$t('preferences.exercises.available', [
|
|
||||||
filterByExerciseGroup(exerciseStore.exercises, group).filter((exercise) => exercise.available)
|
|
||||||
.length,
|
|
||||||
filterByExerciseGroup(exerciseStore.exercises, group).length,
|
|
||||||
])
|
|
||||||
"
|
|
||||||
:prepend-icon="group.icon"
|
|
||||||
/>
|
|
||||||
</v-list>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template #actions>
|
|
||||||
<outlined-button prepend-icon="mdi-pencil" @click="showExerciseDialog = true">
|
|
||||||
{{ $t("preferences.exercises.edit") }}
|
|
||||||
</outlined-button>
|
|
||||||
</template>
|
|
||||||
</card-view>
|
|
||||||
|
|
||||||
<exercise-dialog v-model="showExerciseDialog" />
|
|
||||||
</template>
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import cardView from '@/components/basics/cardView.vue';
|
|
||||||
import OutlinedButton from "@/components/basics/outlinedButton.vue";
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<card-view
|
|
||||||
:title="$t('preferences.importExport.title')"
|
|
||||||
icon="mdi-swap-horizontal-bold"
|
|
||||||
>
|
|
||||||
<v-row>
|
|
||||||
<v-col>
|
|
||||||
<v-file-input
|
|
||||||
:label="$t('preferences.importExport.selectConfigFile')"
|
|
||||||
variant="outlined"
|
|
||||||
accept=".json"
|
|
||||||
hide-details
|
|
||||||
/>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
|
|
||||||
<template #actions>
|
|
||||||
<outlined-button prepend-icon="mdi-export">
|
|
||||||
{{ $t("preferences.importExport.download") }}
|
|
||||||
</outlined-button>
|
|
||||||
|
|
||||||
<outlined-button prepend-icon="mdi-upload" color="green">
|
|
||||||
{{ $t("preferences.importExport.upload") }}
|
|
||||||
</outlined-button>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
</card-view>
|
|
||||||
</template>
|
|
||||||
@@ -2,29 +2,16 @@
|
|||||||
import pageSetup from './pageSetupSection.vue';
|
import pageSetup from './pageSetupSection.vue';
|
||||||
import systemSetup from './systemSetupSection.vue';
|
import systemSetup from './systemSetupSection.vue';
|
||||||
import aboutSection from './aboutSection.vue';
|
import aboutSection from './aboutSection.vue';
|
||||||
import exerciseSection from './exerciseConfig/exerciseSection.vue';
|
|
||||||
import importExportSection from './importExportSection.vue';
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<v-container max-width="800">
|
<v-container max-width="800">
|
||||||
<!-- <v-row>
|
|
||||||
<v-col>
|
|
||||||
<import-export-section />
|
|
||||||
</v-col>
|
|
||||||
</v-row> -->
|
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col>
|
<v-col>
|
||||||
<page-setup />
|
<page-setup />
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
<v-row>
|
|
||||||
<v-col>
|
|
||||||
<exercise-section />
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
|
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col>
|
<v-col>
|
||||||
<system-setup />
|
<system-setup />
|
||||||
|
|||||||
@@ -1,24 +1,27 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import cardView from "@/components/basics/cardView.vue";
|
import cardView from '@/components/basics/cardView.vue';
|
||||||
import outlinedButton from "@/components/basics/outlinedButton.vue";
|
import outlinedButton from '@/components/basics/outlinedButton.vue';
|
||||||
import confirmDialog from "@/components/basics/confirmDialog.vue";
|
import confirmDialog from '@/components/basics/confirmDialog.vue';
|
||||||
import { ServerStateEnum } from "@/data/enums/serverStateEnum";
|
import { ServerStateEnum } from '@/data/enums/serverStateEnum';
|
||||||
import { usePreferencesStore } from "@/stores/preferences.store";
|
import { usePreferencesStore } from '@/stores/preferences.store';
|
||||||
import ServerStateText from "@/components/pageParts/serverStateText.vue";
|
import ServerStateText from '@/components/pageParts/serverStateText.vue';
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
const preferenceStore = usePreferencesStore();
|
const preferenceStore = usePreferencesStore()
|
||||||
const router = useRouter();
|
const router = useRouter()
|
||||||
|
|
||||||
preferenceStore.getServerState();
|
preferenceStore.getServerState()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<card-view :title="$t('preferences.systemSetup')" icon="mdi-engine">
|
<card-view
|
||||||
|
:title="$t('preferences.systemSetup')"
|
||||||
|
icon="mdi-engine"
|
||||||
|
>
|
||||||
<template #borderless>
|
<template #borderless>
|
||||||
<v-list>
|
<v-list>
|
||||||
<v-list-item class="text-h6 text-center">
|
<v-list-item class="text-h6 text-center">
|
||||||
{{ $t("preferences.serverState") + ":" }} <server-state-text />
|
{{ $t('preferences.serverState') }}: <server-state-text />
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
|
|
||||||
<v-list-item class="text-center">
|
<v-list-item class="text-center">
|
||||||
@@ -26,12 +29,9 @@ preferenceStore.getServerState();
|
|||||||
@click="preferenceStore.showDeleteDbDialog = true"
|
@click="preferenceStore.showDeleteDbDialog = true"
|
||||||
prepend-icon="mdi-database-refresh"
|
prepend-icon="mdi-database-refresh"
|
||||||
color="warning"
|
color="warning"
|
||||||
:disabled="
|
:disabled="preferenceStore.serverState != ServerStateEnum.ONLINE || preferenceStore.fetchInProgress"
|
||||||
preferenceStore.serverState != ServerStateEnum.ONLINE ||
|
|
||||||
preferenceStore.fetchInProgress
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
{{ $t("preferences.resetDatabase.resetDatabase") }}
|
{{ $t('preferences.resetDatabase.resetDatabase') }}
|
||||||
</outlined-button>
|
</outlined-button>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
|
|
||||||
@@ -40,12 +40,9 @@ preferenceStore.getServerState();
|
|||||||
@click="preferenceStore.showDeleteExerciseDialog = true"
|
@click="preferenceStore.showDeleteExerciseDialog = true"
|
||||||
prepend-icon="mdi-progress-close"
|
prepend-icon="mdi-progress-close"
|
||||||
color="warning"
|
color="warning"
|
||||||
:disabled="
|
:disabled="preferenceStore.serverState != ServerStateEnum.ONLINE || preferenceStore.fetchInProgress"
|
||||||
preferenceStore.serverState != ServerStateEnum.ONLINE ||
|
|
||||||
preferenceStore.fetchInProgress
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
{{ $t("preferences.resetExerciseProgress.resetExerciseProgress") }}
|
{{ $t('preferences.resetExerciseProgress.resetExerciseProgress') }}
|
||||||
</outlined-button>
|
</outlined-button>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
|
|
||||||
@@ -54,12 +51,9 @@ preferenceStore.getServerState();
|
|||||||
@click="preferenceStore.showFactoryResetDialog = true"
|
@click="preferenceStore.showFactoryResetDialog = true"
|
||||||
prepend-icon="mdi-factory"
|
prepend-icon="mdi-factory"
|
||||||
color="warning"
|
color="warning"
|
||||||
:disabled="
|
:disabled="preferenceStore.serverState != ServerStateEnum.ONLINE || preferenceStore.fetchInProgress"
|
||||||
preferenceStore.serverState != ServerStateEnum.ONLINE ||
|
|
||||||
preferenceStore.fetchInProgress
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
{{ $t("preferences.factoryReset.factoryReset") }}
|
{{ $t('preferences.factoryReset.factoryReset') }}
|
||||||
</outlined-button>
|
</outlined-button>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
</v-list>
|
</v-list>
|
||||||
@@ -91,12 +85,10 @@ preferenceStore.getServerState();
|
|||||||
:description="$t('preferences.factoryReset.dialog.description')"
|
:description="$t('preferences.factoryReset.dialog.description')"
|
||||||
v-model="preferenceStore.showFactoryResetDialog"
|
v-model="preferenceStore.showFactoryResetDialog"
|
||||||
icon="mdi-factory"
|
icon="mdi-factory"
|
||||||
:onConfirm="
|
:onConfirm="() => {
|
||||||
() => {
|
preferenceStore.resetToFactorySettings()
|
||||||
preferenceStore.resetToFactorySettings();
|
router.push('/')
|
||||||
router.push('/');
|
}"
|
||||||
}
|
|
||||||
"
|
|
||||||
:loading="preferenceStore.fetchInProgress"
|
:loading="preferenceStore.fetchInProgress"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
@@ -20,19 +20,3 @@ export function getSeatColor(surcharge: number, state: number): string {
|
|||||||
case 2: return "orange"
|
case 2: return "orange"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get color of exercise group
|
|
||||||
*
|
|
||||||
* @param exerciseGroupNr Number of exercise group
|
|
||||||
*
|
|
||||||
* @returns Color as string
|
|
||||||
*/
|
|
||||||
export function getExerciseDotColor(exerciseGroupNr: number) {
|
|
||||||
switch(exerciseGroupNr) {
|
|
||||||
case 0: return "purple"
|
|
||||||
case 1: return "orange"
|
|
||||||
case 2: return "blue"
|
|
||||||
case 3: return "pink"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
import { LanguageEnum } from "@/data/enums/languageEnum";
|
|
||||||
import { ExerciseGroupModel } from "@/data/models/exercises/exerciseGroupModel";
|
|
||||||
import { ExerciseModel } from "@/data/models/exercises/exerciseModel";
|
|
||||||
import { usePreferencesStore } from "@/stores/preferences.store";
|
|
||||||
|
|
||||||
export function getExerciseNameLanguage(exercise: ExerciseModel) {
|
|
||||||
let preferencesStore = usePreferencesStore()
|
|
||||||
|
|
||||||
switch (preferencesStore.language) {
|
|
||||||
case LanguageEnum.GERMAN:
|
|
||||||
return exercise.nameDe;
|
|
||||||
case LanguageEnum.ENGLISH:
|
|
||||||
return exercise.nameEn;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getExerciseDescriptionLanguage(exercise: ExerciseModel) {
|
|
||||||
let preferencesStore = usePreferencesStore()
|
|
||||||
|
|
||||||
switch (preferencesStore.language) {
|
|
||||||
case LanguageEnum.GERMAN:
|
|
||||||
return exercise.descriptionDe;
|
|
||||||
case LanguageEnum.ENGLISH:
|
|
||||||
return exercise.descriptionEn;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getExerciseGroupNameLanguage(exerciseGroup: ExerciseGroupModel) {
|
|
||||||
let preferencesStore = usePreferencesStore()
|
|
||||||
|
|
||||||
switch (preferencesStore.language) {
|
|
||||||
case LanguageEnum.GERMAN:
|
|
||||||
return exerciseGroup.nameDe;
|
|
||||||
case LanguageEnum.ENGLISH:
|
|
||||||
return exerciseGroup.nameEn;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -12,9 +12,6 @@ export const useBandStore = defineStore("bandStore", {
|
|||||||
/** All available bands */
|
/** All available bands */
|
||||||
bands: ref<Array<BandApiModel>>([]),
|
bands: ref<Array<BandApiModel>>([]),
|
||||||
|
|
||||||
/** Available bands filtered by parameters */
|
|
||||||
filteredBands: ref<Array<BandApiModel>>([]),
|
|
||||||
|
|
||||||
/** All information about a single band */
|
/** All information about a single band */
|
||||||
band: ref<BandDetailsApiModel>(new BandDetailsApiModel()),
|
band: ref<BandDetailsApiModel>(new BandDetailsApiModel()),
|
||||||
|
|
||||||
@@ -35,9 +32,7 @@ export const useBandStore = defineStore("bandStore", {
|
|||||||
|
|
||||||
await fetchAllBands()
|
await fetchAllBands()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
this.bands = result.data
|
this.bands = result.data.filter((band: BandApiModel) => {
|
||||||
|
|
||||||
this.filteredBands = result.data.filter((band: BandApiModel) => {
|
|
||||||
if (genreStore.genre == null) {
|
if (genreStore.genre == null) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,9 +64,6 @@ export const useConcertStore = defineStore("concertStore", {
|
|||||||
const feedbackStore = useFeedbackStore()
|
const feedbackStore = useFeedbackStore()
|
||||||
this.fetchInProgress = true
|
this.fetchInProgress = true
|
||||||
|
|
||||||
console.log("LOcation & Date:")
|
|
||||||
console.log(this.concerts)
|
|
||||||
|
|
||||||
let id = this.concerts.find((concert: ConcertApiModel) => {
|
let id = this.concerts.find((concert: ConcertApiModel) => {
|
||||||
return (concert.location.urlName == location && concert.date == date)
|
return (concert.location.urlName == location && concert.date == date)
|
||||||
}).id
|
}).id
|
||||||
@@ -78,7 +75,6 @@ export const useConcertStore = defineStore("concertStore", {
|
|||||||
})
|
})
|
||||||
.catch(res => {
|
.catch(res => {
|
||||||
feedbackStore.notFound = true
|
feedbackStore.notFound = true
|
||||||
this.fetchInProgress = false
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { ref } from "vue";
|
|||||||
import { useFeedbackStore } from "./feedback.store";
|
import { useFeedbackStore } from "./feedback.store";
|
||||||
import { BannerStateEnum } from "@/data/enums/bannerStateEnum";
|
import { BannerStateEnum } from "@/data/enums/bannerStateEnum";
|
||||||
import { ExerciseModel } from "@/data/models/exercises/exerciseModel";
|
import { ExerciseModel } from "@/data/models/exercises/exerciseModel";
|
||||||
import { usePreferencesStore } from "./preferences.store";
|
|
||||||
|
|
||||||
export const useExerciseStore = defineStore("exerciseStore", {
|
export const useExerciseStore = defineStore("exerciseStore", {
|
||||||
state: () => ({
|
state: () => ({
|
||||||
@@ -14,45 +13,23 @@ export const useExerciseStore = defineStore("exerciseStore", {
|
|||||||
/** Request to server sent, waiting for data response */
|
/** Request to server sent, waiting for data response */
|
||||||
fetchInProgress: ref(false),
|
fetchInProgress: ref(false),
|
||||||
|
|
||||||
exercisePageVisible: ref(false),
|
helpPageVisible: ref(false)
|
||||||
|
|
||||||
/** All available exercise uuids are stored here */
|
|
||||||
exerciseConfig: ref<Array<string>>(),
|
|
||||||
}),
|
}),
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
/**
|
/**
|
||||||
* Get all exercises and exercise groups from server
|
* Get all exercises and exercise groups from server
|
||||||
*
|
|
||||||
* @param firstLoad True sets all exercises as available, for first load after database was initialised
|
|
||||||
*/
|
*/
|
||||||
async getAllExercises(firstLoad: boolean = false) {
|
async getAllExercises() {
|
||||||
const preferencesStore = usePreferencesStore();
|
this.fetchInProgress = true
|
||||||
this.fetchInProgress = true;
|
|
||||||
|
|
||||||
await fetchAllExerciseGroups().then((result) => {
|
await fetchAllExerciseGroups()
|
||||||
this.exercises = result.data;
|
.then(result => {
|
||||||
|
this.exercises = result.data
|
||||||
|
|
||||||
if (firstLoad) {
|
this.helpPageVisible = this.getExercise(1, 1).solved
|
||||||
preferencesStore.notAvailableExercises = []
|
this.fetchInProgress = false
|
||||||
}
|
})
|
||||||
|
|
||||||
result.data.forEach((exercise) => {
|
|
||||||
if (firstLoad) {
|
|
||||||
exercise.available = true
|
|
||||||
} else {
|
|
||||||
exercise.available =
|
|
||||||
preferencesStore.notAvailableExercises.find(
|
|
||||||
(availableExercise: string) => {
|
|
||||||
return availableExercise == exercise.uuid;
|
|
||||||
}
|
|
||||||
) == undefined;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.exercisePageVisible = this.getExercise(1, 1).solved;
|
|
||||||
this.fetchInProgress = false;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -65,11 +42,8 @@ export const useExerciseStore = defineStore("exerciseStore", {
|
|||||||
*/
|
*/
|
||||||
getExercise(exerciseGroupNr: number, exerciseNr: number): ExerciseModel {
|
getExercise(exerciseGroupNr: number, exerciseNr: number): ExerciseModel {
|
||||||
return this.exercises.find((exercise: ExerciseModel) => {
|
return this.exercises.find((exercise: ExerciseModel) => {
|
||||||
return (
|
return exercise.exerciseNr == exerciseNr && exercise.exerciseGroup.groupNr == exerciseGroupNr
|
||||||
exercise.exerciseNr == exerciseNr &&
|
})
|
||||||
exercise.exerciseGroup.groupNr == exerciseGroupNr
|
|
||||||
);
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -80,89 +54,65 @@ export const useExerciseStore = defineStore("exerciseStore", {
|
|||||||
*/
|
*/
|
||||||
async solveExercise(exerciseGroupNr: number, exerciseNr: number) {
|
async solveExercise(exerciseGroupNr: number, exerciseNr: number) {
|
||||||
// Request all exercises from server
|
// Request all exercises from server
|
||||||
await this.getAllExercises();
|
await this.getAllExercises()
|
||||||
|
|
||||||
const feedbackStore = useFeedbackStore();
|
const feedbackStore = useFeedbackStore()
|
||||||
this.fetchInProgress = true;
|
this.fetchInProgress = true
|
||||||
|
|
||||||
// Change only if the exercise is not solved
|
// Change only if the exercise is not solved
|
||||||
updateExercise(exerciseGroupNr, exerciseNr, true).then((result) => {
|
updateExercise(exerciseGroupNr, exerciseNr, true)
|
||||||
if (result.data.changed) {
|
.then(result => {
|
||||||
let bannerState = BannerStateEnum.ERROR;
|
if (result.data.changed) {
|
||||||
|
|
||||||
switch (exerciseGroupNr) {
|
let bannerState = BannerStateEnum.ERROR
|
||||||
case 0: {
|
|
||||||
switch (exerciseNr) {
|
switch(exerciseGroupNr) {
|
||||||
case 1:
|
case 0: {
|
||||||
bannerState = BannerStateEnum.EXERCISESOLVED01;
|
switch(exerciseNr) {
|
||||||
break;
|
case 1: bannerState = BannerStateEnum.EXERCISESOLVED01; break;
|
||||||
case 2:
|
case 2: bannerState = BannerStateEnum.EXERCISESOLVED02; break;
|
||||||
bannerState = BannerStateEnum.EXERCISESOLVED02;
|
case 3: bannerState = BannerStateEnum.EXERCISESOLVED03; break;
|
||||||
break;
|
}
|
||||||
case 3:
|
|
||||||
bannerState = BannerStateEnum.EXERCISESOLVED03;
|
break;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
case 1: {
|
||||||
}
|
switch(exerciseNr) {
|
||||||
|
case 1: bannerState = BannerStateEnum.EXERCISESOLVED11; break;
|
||||||
|
case 2: bannerState = BannerStateEnum.EXERCISESOLVED12; break;
|
||||||
|
}
|
||||||
|
|
||||||
case 1: {
|
break;
|
||||||
switch (exerciseNr) {
|
|
||||||
case 1:
|
|
||||||
bannerState = BannerStateEnum.EXERCISESOLVED11;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
bannerState = BannerStateEnum.EXERCISESOLVED12;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
case 2: {
|
||||||
}
|
switch(exerciseNr) {
|
||||||
|
case 1: bannerState = BannerStateEnum.EXERCISESOLVED21; break;
|
||||||
|
case 2: bannerState = BannerStateEnum.EXERCISESOLVED22; break;
|
||||||
|
case 3: bannerState = BannerStateEnum.EXERCISESOLVED23; break;
|
||||||
|
case 4: bannerState = BannerStateEnum.EXERCISESOLVED24; break;
|
||||||
|
case 5: bannerState = BannerStateEnum.EXERCISESOLVED25; break;
|
||||||
|
case 6: bannerState = BannerStateEnum.EXERCISESOLVED26; break;
|
||||||
|
}
|
||||||
|
|
||||||
case 2: {
|
break;
|
||||||
switch (exerciseNr) {
|
|
||||||
case 1:
|
|
||||||
bannerState = BannerStateEnum.EXERCISESOLVED21;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
bannerState = BannerStateEnum.EXERCISESOLVED22;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
bannerState = BannerStateEnum.EXERCISESOLVED23;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
bannerState = BannerStateEnum.EXERCISESOLVED24;
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
bannerState = BannerStateEnum.EXERCISESOLVED25;
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
bannerState = BannerStateEnum.EXERCISESOLVED26;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
case 3: {
|
||||||
}
|
switch(exerciseNr) {
|
||||||
|
case 1: bannerState = BannerStateEnum.EXERCISESOLVED31; break;
|
||||||
|
case 2: bannerState = BannerStateEnum.EXERCISESOLVED32; break;
|
||||||
|
}
|
||||||
|
|
||||||
case 3: {
|
break;
|
||||||
switch (exerciseNr) {
|
|
||||||
case 1:
|
|
||||||
bannerState = BannerStateEnum.EXERCISESOLVED31;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
bannerState = BannerStateEnum.EXERCISESOLVED32;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
feedbackStore.addSnackbar(bannerState)
|
||||||
|
this.getAllExercises()
|
||||||
}
|
}
|
||||||
|
})
|
||||||
feedbackStore.addSnackbar(bannerState);
|
}
|
||||||
this.getAllExercises();
|
}
|
||||||
}
|
})
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
@@ -3,11 +3,7 @@ import { useLocalStorage } from "@vueuse/core";
|
|||||||
import { ThemeEnum } from "../data/enums/themeEnums";
|
import { ThemeEnum } from "../data/enums/themeEnums";
|
||||||
import { LanguageEnum } from "../data/enums/languageEnum";
|
import { LanguageEnum } from "../data/enums/languageEnum";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import {
|
import { fetchServerState,resetDatabase, resetExerciseProgress } from "@/data/api/mainApi";
|
||||||
fetchServerState,
|
|
||||||
resetDatabase,
|
|
||||||
resetExerciseProgress,
|
|
||||||
} from "@/data/api/mainApi";
|
|
||||||
import { ServerStateEnum } from "@/data/enums/serverStateEnum";
|
import { ServerStateEnum } from "@/data/enums/serverStateEnum";
|
||||||
import { BannerStateEnum } from "@/data/enums/bannerStateEnum";
|
import { BannerStateEnum } from "@/data/enums/bannerStateEnum";
|
||||||
import { useFeedbackStore } from "./feedback.store";
|
import { useFeedbackStore } from "./feedback.store";
|
||||||
@@ -16,19 +12,13 @@ import { useExerciseStore } from "./exercise.store";
|
|||||||
import { useAccountStore } from "./account.store";
|
import { useAccountStore } from "./account.store";
|
||||||
import { AccountApiModel } from "@/data/models/user/accountApiModel";
|
import { AccountApiModel } from "@/data/models/user/accountApiModel";
|
||||||
|
|
||||||
export const usePreferencesStore = defineStore("preferencesStore", {
|
export const usePreferencesStore = defineStore('preferencesStore', {
|
||||||
state: () => ({
|
state: () => ({
|
||||||
/** Selected theme by user */
|
/** Selected theme by user */
|
||||||
theme: useLocalStorage<ThemeEnum>(
|
theme: useLocalStorage<ThemeEnum>("eventMaster/preferencesStore/theme", ThemeEnum.DARK),
|
||||||
"eventMaster/preferencesStore/theme",
|
|
||||||
ThemeEnum.DARK
|
|
||||||
),
|
|
||||||
|
|
||||||
/** Selected language by user */
|
/** Selected language by user */
|
||||||
language: useLocalStorage<LanguageEnum>(
|
language: useLocalStorage<LanguageEnum>("eventMaster/preferencesStore/language", LanguageEnum.GERMAN),
|
||||||
"eventMaster/preferencesStore/language",
|
|
||||||
LanguageEnum.GERMAN
|
|
||||||
),
|
|
||||||
|
|
||||||
/** Request to server sent, waiting for data response */
|
/** Request to server sent, waiting for data response */
|
||||||
fetchInProgress: ref(false),
|
fetchInProgress: ref(false),
|
||||||
@@ -46,27 +36,13 @@ export const usePreferencesStore = defineStore("preferencesStore", {
|
|||||||
showFactoryResetDialog: ref(false),
|
showFactoryResetDialog: ref(false),
|
||||||
|
|
||||||
/** Marks the first run of the app */
|
/** Marks the first run of the app */
|
||||||
firstStartup: useLocalStorage<Boolean>(
|
firstStartup: useLocalStorage<Boolean>("eventMaster/preferencesStore/firstStartup", true),
|
||||||
"eventMaster/preferencesStore/firstStartup",
|
|
||||||
true
|
|
||||||
),
|
|
||||||
|
|
||||||
/** Full name of student */
|
/** Full name of student */
|
||||||
studentName: useLocalStorage<string>(
|
studentName: useLocalStorage<string>("eventMaster/preferencesStore/studentName", ""),
|
||||||
"eventMaster/preferencesStore/studentName",
|
|
||||||
""
|
|
||||||
),
|
|
||||||
|
|
||||||
/** Matrikel number */
|
/** Matrikel number */
|
||||||
registrationNumber: useLocalStorage<string>(
|
registrationNumber: useLocalStorage<string>("eventMaster/preferencesStore/registrationNumber", "")
|
||||||
"eventMaster/preferencesStore/registrationNumber",
|
|
||||||
""
|
|
||||||
),
|
|
||||||
|
|
||||||
notAvailableExercises: useLocalStorage<Array<string>>(
|
|
||||||
"eventMaster/preferencesStore/notAvailableExercises",
|
|
||||||
[]
|
|
||||||
),
|
|
||||||
}),
|
}),
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
@@ -74,90 +50,92 @@ export const usePreferencesStore = defineStore("preferencesStore", {
|
|||||||
* Request the state of the backend server
|
* Request the state of the backend server
|
||||||
*/
|
*/
|
||||||
async getServerState() {
|
async getServerState() {
|
||||||
this.fetchInProgress = true;
|
this.fetchInProgress = true
|
||||||
|
|
||||||
fetchServerState()
|
fetchServerState()
|
||||||
.then((result) => {
|
.then(result => {
|
||||||
if (result.status == 200) {
|
if (result.status == 200) {
|
||||||
this.serverState = ServerStateEnum.ONLINE;
|
this.serverState = ServerStateEnum.ONLINE
|
||||||
} else {
|
} else {
|
||||||
this.serverState = ServerStateEnum.OFFLINE;
|
this.serverState = ServerStateEnum.OFFLINE
|
||||||
}
|
}
|
||||||
|
|
||||||
this.fetchInProgress = false;
|
this.fetchInProgress = false
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
this.serverState = ServerStateEnum.OFFLINE
|
||||||
|
this.fetchInProgress = false
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
|
||||||
this.serverState = ServerStateEnum.OFFLINE;
|
|
||||||
this.fetchInProgress = false;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resets the database (without exercise tables)
|
* Resets the database (without exercise tables)
|
||||||
*/
|
*/
|
||||||
async resetDb() {
|
async resetDb() {
|
||||||
const feedbackStore = useFeedbackStore();
|
const feedbackStore = useFeedbackStore()
|
||||||
const accountStore = useAccountStore();
|
const accountStore = useAccountStore()
|
||||||
|
|
||||||
this.serverState = ServerStateEnum.PENDING;
|
this.serverState = ServerStateEnum.PENDING
|
||||||
this.fetchInProgress = true;
|
this.fetchInProgress = true
|
||||||
|
|
||||||
// Logout user
|
// Logout user
|
||||||
accountStore.logout();
|
accountStore.logout()
|
||||||
|
|
||||||
await resetDatabase().then((result) => {
|
await resetDatabase()
|
||||||
if (result.status == 200) {
|
.then(result => {
|
||||||
feedbackStore.addSnackbar(BannerStateEnum.DATABASERESETSUCCESSFUL);
|
if (result.status == 200) {
|
||||||
this.serverState = ServerStateEnum.ONLINE;
|
feedbackStore.addSnackbar(BannerStateEnum.DATABASERESETSUCCESSFUL)
|
||||||
}
|
this.serverState = ServerStateEnum.ONLINE
|
||||||
|
}
|
||||||
|
|
||||||
this.fetchInProgress = false;
|
this.fetchInProgress = false
|
||||||
this.showDeleteDbDialog = false;
|
this.showDeleteDbDialog = false
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resets the exercise progress
|
* Resets the exercise progress
|
||||||
*/
|
*/
|
||||||
async resetExerciseProg() {
|
async resetExerciseProg() {
|
||||||
const feedbackStore = useFeedbackStore();
|
const feedbackStore = useFeedbackStore()
|
||||||
const exerciseStore = useExerciseStore();
|
const exerciseStore = useExerciseStore()
|
||||||
|
|
||||||
this.serverState = ServerStateEnum.PENDING;
|
this.serverState = ServerStateEnum.PENDING
|
||||||
this.fetchInProgress = true;
|
this.fetchInProgress = true
|
||||||
|
|
||||||
await resetExerciseProgress().then((result) => {
|
await resetExerciseProgress()
|
||||||
if (result.status == 200) {
|
.then(result => {
|
||||||
feedbackStore.addSnackbar(
|
if (result.status == 200) {
|
||||||
BannerStateEnum.EXERCISEPROGRESSRESETSUCCESSFUL
|
feedbackStore.addSnackbar(BannerStateEnum.EXERCISEPROGRESSRESETSUCCESSFUL)
|
||||||
);
|
this.serverState = ServerStateEnum.ONLINE
|
||||||
this.serverState = ServerStateEnum.ONLINE;
|
|
||||||
|
|
||||||
exerciseStore.getAllExercises(true);
|
exerciseStore.getAllExercises()
|
||||||
}
|
}
|
||||||
|
|
||||||
this.fetchInProgress = false;
|
this.fetchInProgress = false
|
||||||
this.showDeleteExerciseDialog = false;
|
this.showDeleteExerciseDialog = false
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reset all store values to factory state
|
* Reset all store values to factory state
|
||||||
*/
|
*/
|
||||||
resetToFactorySettings() {
|
resetToFactorySettings() {
|
||||||
const basketStore = useBasketStore();
|
const basketStore = useBasketStore()
|
||||||
const accountStore = useAccountStore();
|
const accountStore = useAccountStore()
|
||||||
|
|
||||||
this.firstStartup = true;
|
this.firstStartup = true
|
||||||
this.studentName = "";
|
this.studentName = ""
|
||||||
this.registrationNumber = "";
|
this.registrationNumber = ""
|
||||||
this.theme = "dark";
|
this.theme = "dark"
|
||||||
this.language = LanguageEnum.GERMAN;
|
this.language = LanguageEnum.GERMAN
|
||||||
basketStore.itemsInBasket = [];
|
basketStore.itemsInBasket = []
|
||||||
accountStore.userAccountToken = "";
|
accountStore.userAccountToken = ""
|
||||||
accountStore.userAccount = new AccountApiModel();
|
accountStore.userAccount = new AccountApiModel()
|
||||||
|
|
||||||
this.showFactoryResetDialog = false;
|
|
||||||
},
|
|
||||||
},
|
this.showFactoryResetDialog = false
|
||||||
});
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||