merge develop

This commit is contained in:
rchrist 2019-04-10 15:16:33 +02:00
commit 2d024fc884
81 changed files with 2233 additions and 514 deletions

13
.gitignore vendored
View File

@ -7,6 +7,7 @@
.idea/**/usage.statistics.xml .idea/**/usage.statistics.xml
.idea/**/dictionaries .idea/**/dictionaries
.idea/**/shelf .idea/**/shelf
done.txt
# Generated files # Generated files
.idea/**/contentModel.xml .idea/**/contentModel.xml
@ -20,11 +21,11 @@
.idea/**/uiDesigner.xml .idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml .idea/**/dbnavigator.xml
labswp_2019_sose_geocaching.iml labswp_2019_sose_geocaching.iml
.idea/modules/labswp_2019_sose_geocaching_main.iml
.idea/modules/labswp_2019_sose_geocaching_test.iml
# public folder # public folder
src/main/resources/public src/main/resources/public/
.idea/
# Gradle # Gradle
@ -35,9 +36,9 @@ src/main/resources/public
# When using Gradle or Maven with auto-import, you should exclude module files, # When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using # since they will be recreated, and may cause churn. Uncomment if using
# auto-import. # auto-import.
# .idea/modules.xml .idea/modules.xml
# .idea/*.iml .idea/*.iml
# .idea/modules .idea/modules
# CMake # CMake
cmake-build-*/ cmake-build-*/

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CheckStyle-IDEA">
<option name="configuration">
<map>
<entry key="checkstyle-version" value="8.16" />
<entry key="copy-libs" value="false" />
<entry key="location-0" value="BUNDLED:(bundled):Sun Checks" />
<entry key="location-1" value="BUNDLED:(bundled):Google Checks" />
<entry key="scan-before-checkin" value="false" />
<entry key="scanscope" value="JavaOnly" />
<entry key="suppress-errors" value="false" />
</map>
</option>
</component>
</project>

11
.idea/compiler.xml generated
View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel>
<module name="de.hhn.labsw.BuGaGeocaching.main" target="1.8" />
<module name="de.hhn.labsw.BuGaGeocaching.test" target="1.8" />
<module name="de.hhn.labsw.labswp_2019_sose_geocaching.main" target="1.8" />
<module name="de.hhn.labsw.labswp_2019_sose_geocaching.test" target="1.8" />
</bytecodeTargetLevel>
</component>
</project>

4
.idea/encodings.xml generated
View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
</project>

9
.idea/misc.xml generated
View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

6
.idea/vcs.xml generated
View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@ -17,6 +17,7 @@ repositories {
} }
dependencies { dependencies {
//Java Spring
implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-web'
runtimeOnly 'org.springframework.boot:spring-boot-devtools' runtimeOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'mysql:mysql-connector-java' runtimeOnly 'mysql:mysql-connector-java'
@ -27,6 +28,28 @@ dependencies {
//MariaDB //MariaDB
implementation 'org.mariadb.jdbc:mariadb-java-client' implementation 'org.mariadb.jdbc:mariadb-java-client'
//Thymeleaf
compile("org.springframework.boot:spring-boot-starter-thymeleaf")
//JSON Parser
implementation 'com.google.code.gson:gson:2.8.5'
//compile 'org.springframework.boot:spring-boot-starter-tomcat'
//compile 'org.springframework.boot:spring-boot-starter-security'
//compile 'org.springframework.boot:spring-boot-starter-actuator'
//compile 'org.springframework.boot:spring-boot-starter-aop'
//ompile group: 'org.springframework.boot', name: 'spring-boot-starter-mail', version: '1.2.0.RELEASE'
compile group: 'org.springframework.security', name: 'spring-security-core', version: '5.1.4.RELEASE'
//compile group: 'at.favre.lib', name: 'bcrypt', version: '{latest-version}'
//JWT
compile 'io.jsonwebtoken:jjwt-api:0.10.5'
runtime 'io.jsonwebtoken:jjwt-impl:0.10.5',
'io.jsonwebtoken:jjwt-jackson:0.10.5'
} }
node { node {
@ -41,7 +64,5 @@ tasks.withType(NpmTask) {
} }
} }
npm_run_build.dependsOn npm_install
assemble.dependsOn npm_install
assemble.dependsOn npm_run_build assemble.dependsOn npm_run_build

View File

@ -14,7 +14,7 @@ module.exports = {
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
extends: [ extends: [
'plugin:vue/essential', 'plugin:vue/essential',
'@vue/prettier' // '@vue/prettier'
], ],
// required to lint *.vue files // required to lint *.vue files

View File

@ -255,9 +255,9 @@
} }
}, },
"@babel/helpers": { "@babel/helpers": {
"version": "7.4.0", "version": "7.4.2",
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.4.0.tgz", "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.4.2.tgz",
"integrity": "sha512-2Lfcn74A2WSFUbYJ76ilYE1GnegCKUHTfXxp25EL2zPZHjV7OcDncqNjl295mUH0VnB65mNriXW4J5ROvxsgGg==", "integrity": "sha512-gQR1eQeroDzFBikhrCccm5Gs2xBjZ57DNjGbqTaHo911IpmSxflOQWMAHPw/TXk8L3isv7s9lYzUkexOeTQUYg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/template": "^7.4.0", "@babel/template": "^7.4.0",
@ -277,9 +277,9 @@
} }
}, },
"@babel/parser": { "@babel/parser": {
"version": "7.4.0", "version": "7.4.2",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.0.tgz", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.2.tgz",
"integrity": "sha512-ZmMhJfU/+SXXvy9ALjDZopa3T3EixQtQai89JRC48eM9OUwrxJjYjuM/0wmdl2AekytlzMVhPY8cYdLb13kpKQ==", "integrity": "sha512-9fJTDipQFvlfSVdD/JBtkiY0br9BtfvW2R8wo6CX/Ej2eMuV0gWPk1M67Mt3eggQvBqYW1FCEk8BN7WvGm/g5g==",
"dev": true "dev": true
}, },
"@babel/plugin-proposal-async-generator-functions": { "@babel/plugin-proposal-async-generator-functions": {
@ -668,9 +668,9 @@
} }
}, },
"@babel/plugin-transform-named-capturing-groups-regex": { "@babel/plugin-transform-named-capturing-groups-regex": {
"version": "7.3.0", "version": "7.4.2",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.3.0.tgz", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.4.2.tgz",
"integrity": "sha512-NxIoNVhk9ZxS+9lSoAQ/LM0V2UEvARLttEHUrRDGKFaAxOYQcrkN/nLRE+BbbicCAvZPl7wMP0X60HsHE5DtQw==", "integrity": "sha512-NsAuliSwkL3WO2dzWTOL1oZJHm0TM8ZY8ZSxk2ANyKkt5SQlToGA4pzctmq1BEjoacurdwZ3xp2dCQWJkME0gQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"regexp-tree": "^0.1.0" "regexp-tree": "^0.1.0"
@ -907,9 +907,9 @@
"dev": true "dev": true
}, },
"@quasar/app": { "@quasar/app": {
"version": "1.0.0-beta.12", "version": "1.0.0-beta.13",
"resolved": "https://registry.npmjs.org/@quasar/app/-/app-1.0.0-beta.12.tgz", "resolved": "https://registry.npmjs.org/@quasar/app/-/app-1.0.0-beta.13.tgz",
"integrity": "sha512-lQSqW+LuBG9jmglGj82fZ/9J6Dm0nz+dbSna6rOiy4zkt1FjmQ3PCRrImyd+WIsbKUntlTcKJ4+uN6fOlblcvg==", "integrity": "sha512-BMF/U/5xE7EntvVWVeQ0ud2k9z5xo4TGast5/Wv/g2+X4/VBIYUFPlDMNJh93okZ6QnRaNycU5xORo+dUiF8Cg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@quasar/babel-preset-app": "1.0.2", "@quasar/babel-preset-app": "1.0.2",
@ -949,7 +949,7 @@
"minimist": "1.2.0", "minimist": "1.2.0",
"ms": "2.1.1", "ms": "2.1.1",
"node-loader": "0.6.0", "node-loader": "0.6.0",
"opn": "5.4.0", "opn": "5.5.0",
"optimize-css-assets-webpack-plugin": "5.0.1", "optimize-css-assets-webpack-plugin": "5.0.1",
"ouch": "2.0.0", "ouch": "2.0.0",
"postcss-loader": "3.0.0", "postcss-loader": "3.0.0",
@ -962,12 +962,12 @@
"stylus-loader": "3.0.2", "stylus-loader": "3.0.2",
"terser-webpack-plugin": "1.2.3", "terser-webpack-plugin": "1.2.3",
"url-loader": "1.1.2", "url-loader": "1.1.2",
"vue": "2.6.9", "vue": "2.6.10",
"vue-loader": "15.7.0", "vue-loader": "15.7.0",
"vue-router": "3.0.2", "vue-router": "3.0.2",
"vue-server-renderer": "2.6.9", "vue-server-renderer": "2.6.10",
"vue-style-loader": "4.1.2", "vue-style-loader": "4.1.2",
"vue-template-compiler": "2.6.9", "vue-template-compiler": "2.6.10",
"vuex": "3.1.0", "vuex": "3.1.0",
"webpack": "4.29.6", "webpack": "4.29.6",
"webpack-bundle-analyzer": "3.1.0", "webpack-bundle-analyzer": "3.1.0",
@ -1002,9 +1002,9 @@
} }
}, },
"@quasar/extras": { "@quasar/extras": {
"version": "1.1.0", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/@quasar/extras/-/extras-1.1.0.tgz", "resolved": "https://registry.npmjs.org/@quasar/extras/-/extras-1.1.1.tgz",
"integrity": "sha512-594TNuQrQLwzSwhlZMkMn5AIAcNk8zPrsCkdHT021dswMv+IHATGyKJaTH4KuLKLWse+oPRoB0NddLNf9PXiuw==" "integrity": "sha512-n9aQ9N9GBaRF15v3Rm5QDoeLOHFzjQ874f+54TthWmaQvx/8DV6fG/bwLgA6AjLUIZJs3ogm4J1KqWO+4zSg1g=="
}, },
"@types/q": { "@types/q": {
"version": "1.5.2", "version": "1.5.2",
@ -1313,7 +1313,6 @@
"version": "6.8.1", "version": "6.8.1",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.8.1.tgz", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.8.1.tgz",
"integrity": "sha512-eqxCp82P+JfqL683wwsL73XmFs1eG6qjw+RD3YHx+Jll1r0jNd4dh8QG9NYAeNGA/hnZjeEDgtTskgJULbxpWQ==", "integrity": "sha512-eqxCp82P+JfqL683wwsL73XmFs1eG6qjw+RD3YHx+Jll1r0jNd4dh8QG9NYAeNGA/hnZjeEDgtTskgJULbxpWQ==",
"dev": true,
"requires": { "requires": {
"fast-deep-equal": "^2.0.1", "fast-deep-equal": "^2.0.1",
"fast-json-stable-stringify": "^2.0.0", "fast-json-stable-stringify": "^2.0.0",
@ -1974,12 +1973,12 @@
} }
}, },
"browserslist": { "browserslist": {
"version": "4.5.1", "version": "4.5.2",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.5.1.tgz", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.5.2.tgz",
"integrity": "sha512-/pPw5IAUyqaQXGuD5vS8tcbudyPZ241jk1W5pQBsGDfcjNQt7p8qxZhgMNuygDShte1PibLFexecWUPgmVLfrg==", "integrity": "sha512-zmJVLiKLrzko0iszd/V4SsjTaomFeoVzQGYYOYgRgsbh7WNh95RgDB0CmBdFWYs/3MyFSt69NypjL/h3iaddKQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"caniuse-lite": "^1.0.30000949", "caniuse-lite": "^1.0.30000951",
"electron-to-chromium": "^1.3.116", "electron-to-chromium": "^1.3.116",
"node-releases": "^1.1.11" "node-releases": "^1.1.11"
} }
@ -2123,9 +2122,9 @@
} }
}, },
"caniuse-lite": { "caniuse-lite": {
"version": "1.0.30000950", "version": "1.0.30000953",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000950.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000953.tgz",
"integrity": "sha512-Cs+4U9T0okW2ftBsCIHuEYXXkki7mjXmjCh4c6PzYShk04qDEr76/iC7KwhLoWoY65wcra1XOsRD+S7BptEb5A==", "integrity": "sha512-2stdF/q5MZTDhQ6uC65HWbSgI9UMKbc7+HKvlwH5JBIslKoD/J9dvabP4J4Uiifu3NljbHj3iMpfYflLSNt09A==",
"dev": true "dev": true
}, },
"chalk": { "chalk": {
@ -2646,15 +2645,14 @@
"dev": true "dev": true
}, },
"cosmiconfig": { "cosmiconfig": {
"version": "5.1.0", "version": "5.2.0",
"resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.1.0.tgz", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.0.tgz",
"integrity": "sha512-kCNPvthka8gvLtzAxQXvWo4FxqRB+ftRZyPZNuab5ngvM9Y7yw7hbEysglptLgpkGX9nAOKTBVkHUAe8xtYR6Q==", "integrity": "sha512-nxt+Nfc3JAqf4WIWd0jXLjTJZmsPLrA9DDc4nRw2KFJQJK7DNooqSXrNI7tzLG50CF8axczly5UV929tBmh/7g==",
"dev": true, "dev": true,
"requires": { "requires": {
"import-fresh": "^2.0.0", "import-fresh": "^2.0.0",
"is-directory": "^0.3.1", "is-directory": "^0.3.1",
"js-yaml": "^3.9.0", "js-yaml": "^3.13.0",
"lodash.get": "^4.4.2",
"parse-json": "^4.0.0" "parse-json": "^4.0.0"
} }
}, },
@ -3253,9 +3251,9 @@
"dev": true "dev": true
}, },
"electron-to-chromium": { "electron-to-chromium": {
"version": "1.3.116", "version": "1.3.119",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.116.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.119.tgz",
"integrity": "sha512-NKwKAXzur5vFCZYBHpdWjTMO8QptNLNP80nItkSIgUOapPAo9Uia+RvkCaZJtO7fhQaVElSvBPWEc2ku6cKsPA==", "integrity": "sha512-3mtqcAWa4HgG+Djh/oNXlPH0cOH6MmtwxN1nHSaReb9P0Vn51qYPqYwLeoSuAX9loU1wrOBhFbiX3CkeIxPfgg==",
"dev": true "dev": true
}, },
"elementtree": { "elementtree": {
@ -3870,8 +3868,7 @@
"fast-deep-equal": { "fast-deep-equal": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
"integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk="
"dev": true
}, },
"fast-diff": { "fast-diff": {
"version": "1.2.0", "version": "1.2.0",
@ -3913,8 +3910,7 @@
"fast-json-stable-stringify": { "fast-json-stable-stringify": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
"dev": true
}, },
"fast-levenshtein": { "fast-levenshtein": {
"version": "2.0.6", "version": "2.0.6",
@ -5254,9 +5250,9 @@
} }
}, },
"ieee754": { "ieee754": {
"version": "1.1.12", "version": "1.1.13",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz",
"integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==", "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==",
"dev": true "dev": true
}, },
"iferr": { "iferr": {
@ -5779,9 +5775,9 @@
"dev": true "dev": true
}, },
"js-yaml": { "js-yaml": {
"version": "3.12.2", "version": "3.13.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.2.tgz", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.0.tgz",
"integrity": "sha512-QHn/Lh/7HhZ/Twc7vJYQTkjuCa0kaCcDcjK5Zlk2rvnUpy7DxMJ23+Jc2dcyvltwQVg1nygAVlB2oRDFHoRS5Q==", "integrity": "sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"argparse": "^1.0.7", "argparse": "^1.0.7",
@ -5803,8 +5799,7 @@
"json-schema-traverse": { "json-schema-traverse": {
"version": "0.4.1", "version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
"dev": true
}, },
"json-stable-stringify": { "json-stable-stringify": {
"version": "1.0.1", "version": "1.0.1",
@ -6017,12 +6012,6 @@
"integrity": "sha1-gwWOkDtRy7dZ0JzPVG3qPqOcRxg=", "integrity": "sha1-gwWOkDtRy7dZ0JzPVG3qPqOcRxg=",
"dev": true "dev": true
}, },
"lodash.get": {
"version": "4.4.2",
"resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
"integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=",
"dev": true
},
"lodash.kebabcase": { "lodash.kebabcase": {
"version": "4.1.1", "version": "4.1.1",
"resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz",
@ -6434,9 +6423,9 @@
"dev": true "dev": true
}, },
"nan": { "nan": {
"version": "2.13.1", "version": "2.13.2",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.13.1.tgz", "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz",
"integrity": "sha512-I6YB/YEuDeUZMmhscXKxGgZlFnhsn5y0hgOZBadkzfTRrZBtJDZeg6eQf7PYMIEclwmorTKK8GztsyOUSVBREA==", "integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==",
"dev": true, "dev": true,
"optional": true "optional": true
}, },
@ -6747,9 +6736,9 @@
"dev": true "dev": true
}, },
"opn": { "opn": {
"version": "5.4.0", "version": "5.5.0",
"resolved": "https://registry.npmjs.org/opn/-/opn-5.4.0.tgz", "resolved": "https://registry.npmjs.org/opn/-/opn-5.5.0.tgz",
"integrity": "sha512-YF9MNdVy/0qvJvDtunAOzFw9iasOQHpVthTCvGzxt61Il64AYSGdK+rYwld7NAfk9qJ7dt+hymBNSc9LNYS+Sw==", "integrity": "sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==",
"dev": true, "dev": true,
"requires": { "requires": {
"is-wsl": "^1.1.0" "is-wsl": "^1.1.0"
@ -7717,8 +7706,7 @@
"punycode": { "punycode": {
"version": "2.1.1", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
"dev": true
}, },
"q": { "q": {
"version": "1.5.1", "version": "1.5.1",
@ -7733,9 +7721,9 @@
"dev": true "dev": true
}, },
"quasar": { "quasar": {
"version": "1.0.0-beta.11", "version": "1.0.0-beta.13",
"resolved": "https://registry.npmjs.org/quasar/-/quasar-1.0.0-beta.11.tgz", "resolved": "https://registry.npmjs.org/quasar/-/quasar-1.0.0-beta.13.tgz",
"integrity": "sha512-g6VBCNa9fwNCyrWfxi8GwpXL6qNtyynweVKT+wqMZajjvE6fQ/EwETWF2zsla1Rv9NYsTCnW6o//bQn1vcqJbw==" "integrity": "sha512-9sDSUYRVzQu2WezUy329K9yBCGaoXFkeVYp9NnvKtzs7b/Wk76GrV4kwkBqVvFZDdOYuI4OFFdjPdKdDDMAILw=="
}, },
"querystring": { "querystring": {
"version": "0.2.0", "version": "0.2.0",
@ -7750,9 +7738,9 @@
"dev": true "dev": true
}, },
"querystringify": { "querystringify": {
"version": "2.1.0", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.0.tgz", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.1.tgz",
"integrity": "sha512-sluvZZ1YiTLD5jsqZcDmFyV2EwToyXZBfpoVOmktMmW+VEnhgakFHnasVph65fOjGPTWN0Nw3+XQaSeMayr0kg==", "integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==",
"dev": true "dev": true
}, },
"randombytes": { "randombytes": {
@ -9401,7 +9389,6 @@
"version": "4.2.2", "version": "4.2.2",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
"integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
"dev": true,
"requires": { "requires": {
"punycode": "^2.1.0" "punycode": "^2.1.0"
} }
@ -9530,9 +9517,9 @@
} }
}, },
"vue": { "vue": {
"version": "2.6.9", "version": "2.6.10",
"resolved": "https://registry.npmjs.org/vue/-/vue-2.6.9.tgz", "resolved": "https://registry.npmjs.org/vue/-/vue-2.6.10.tgz",
"integrity": "sha512-t1+tvH8hybPM86oNne3ZozCD02zj/VoZIiojOBPJLjwBn7hxYU5e1gBObFpq8ts1NEn1VhPf/hVXBDAJ3X5ljg==", "integrity": "sha512-ImThpeNU9HbdZL3utgMCq0oiMzAkt1mcgy3/E6zWC/G6AaQoeuFdsl9nDhTDU3X1R6FK7nsIUuRACVcjI+A2GQ==",
"dev": true "dev": true
}, },
"vue-eslint-parser": { "vue-eslint-parser": {
@ -9588,9 +9575,9 @@
"dev": true "dev": true
}, },
"vue-server-renderer": { "vue-server-renderer": {
"version": "2.6.9", "version": "2.6.10",
"resolved": "https://registry.npmjs.org/vue-server-renderer/-/vue-server-renderer-2.6.9.tgz", "resolved": "https://registry.npmjs.org/vue-server-renderer/-/vue-server-renderer-2.6.10.tgz",
"integrity": "sha512-UAwI9R+H9oh6YIG9xmS4uU1X8MD9bBzDLGIhqB8UHX9tJPrWQTrBijfXfnytDpefIisfz3qLa27qFOKuX4vnsw==", "integrity": "sha512-UYoCEutBpKzL2fKCwx8zlRtRtwxbPZXKTqbl2iIF4yRZUNO/ovrHyDAJDljft0kd+K0tZhN53XRHkgvCZoIhug==",
"dev": true, "dev": true,
"requires": { "requires": {
"chalk": "^1.1.3", "chalk": "^1.1.3",
@ -9647,9 +9634,9 @@
} }
}, },
"vue-template-compiler": { "vue-template-compiler": {
"version": "2.6.9", "version": "2.6.10",
"resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.6.9.tgz", "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.6.10.tgz",
"integrity": "sha512-QgO0LSCdeH6zUMSgtqel+yDWsZWQPXiWBdFg9qzOhWfQL8vZ+ywinAzE04rm1XrWc+3SU0YAdWISlEgs/i8WWA==", "integrity": "sha512-jVZkw4/I/HT5ZMvRnhv78okGusqe0+qH2A0Em0Cp8aq78+NK9TII263CDVz2QXZsIT+yyV/gZc/j/vlwa+Epyg==",
"dev": true, "dev": true,
"requires": { "requires": {
"de-indent": "^1.0.2", "de-indent": "^1.0.2",

View File

@ -13,12 +13,13 @@
"build": "quasar build" "build": "quasar build"
}, },
"dependencies": { "dependencies": {
"@quasar/extras": "^1.0.0", "@quasar/extras": "^1.1.1",
"ajv": "6.8.1",
"axios": "^0.18.0", "axios": "^0.18.0",
"quasar": "^1.0.0-beta.0" "quasar": "^1.0.0-beta.13"
}, },
"devDependencies": { "devDependencies": {
"@quasar/app": "^1.0.0-beta.0", "@quasar/app": "^1.0.0-beta.13",
"@vue/eslint-config-prettier": "^4.0.0", "@vue/eslint-config-prettier": "^4.0.0",
"babel-eslint": "^10.0.1", "babel-eslint": "^10.0.1",
"eslint": "^5.10.0", "eslint": "^5.10.0",

View File

@ -37,11 +37,40 @@ module.exports = function (ctx) {
'QList', 'QList',
'QItem', 'QItem',
'QItemSection', 'QItemSection',
'QItemLabel' 'QItemLabel',
'QTable',
'QTh',
'QTr',
'QTd',
'QCard',
'QCardSection',
'QCardActions',
'QCheckbox',
'QSeparator',
'QImg',
'QTabs',
'QTab',
'QRouteTab',
'QTabPanels',
'QTabPanel',
'QInput',
'QFab',
'QFabAction',
'QDialog',
'QFooter',
'QPageSticky',
'QAvatar',
'QSpinnerPuff',
'QExpansionItem',
'QParallax',
'QEditor',
'QSelect',
'QField',
], ],
directives: [ directives: [
'Ripple' 'Ripple',
'ClosePopup'
], ],
// Quasar plugins // Quasar plugins
@ -63,7 +92,7 @@ module.exports = function (ctx) {
// analyze: true, // analyze: true,
// extractCSS: false, // extractCSS: false,
//distDir: 'springwebdir/{ctx.modeName}', //distDir: 'springwebdir/{ctx.modeName}',
distDir: '../src/main/resources/public', distDir: '../src/main/resources/public/',
extendWebpack (cfg) { extendWebpack (cfg) {
cfg.module.rules.push({ cfg.module.rules.push({
enforce: 'pre', enforce: 'pre',
@ -76,8 +105,8 @@ module.exports = function (ctx) {
devServer: { devServer: {
// https: true, // https: true,
// port: 8080, port: 8081,
open: true // opens browser window automatically open: false // opens browser window automatically
}, },
// animations: 'all' --- includes all animations // animations: 'all' --- includes all animations

View File

@ -1,121 +1,131 @@
<template> <template>
<q-layout view="lHh Lpr lFf"> <q-layout view="hhh Lpr lFf">
<q-header elevated class="glossy"> <q-header id="qheader" class="bg-white text-grey-14" elevated>
<q-toolbar> <q-toolbar class="q-pa-md">
<q-img src="statics/buga_logo.svg" style="max-width: 40px;" class="q-mr-sm"/>
<q-toolbar-title>
BuGa Geocaching
</q-toolbar-title>
<q-btn <q-btn
flat flat
dense dense
round ripple
@click="leftDrawerOpen = !leftDrawerOpen" @click="leftDrawerOpen = !leftDrawerOpen"
aria-label="Menu" aria-label="Menu"
> >
<q-icon name="menu" /> <q-icon name="menu"/>
</q-btn> </q-btn>
<!--<div>Quasar v{{ $q.version }}</div>-->
<q-toolbar-title>
Quasar App
</q-toolbar-title>
<div>Quasar v{{ $q.version }}</div>
</q-toolbar> </q-toolbar>
</q-header> </q-header>
<q-drawer v-model="leftDrawerOpen" bordered content-class="bg-grey-2"> <q-drawer
v-model="leftDrawerOpen"
bordered
show-if-above
content-class="">
<q-list> <q-list>
<q-item-label header>Essential Links</q-item-label> <q-item-label header>BuGa Geocaching</q-item-label>
<q-item <q-item
clickable clickable
class="text-primary"
v-ripple
tag="a" tag="a"
target="_blank" to="/"
href="http://v1.quasar-framework.org"
> >
<q-item-section avatar> <q-item-section avatar>
<q-icon name="school" /> <q-icon name="directions"/>
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-item-label>Docs</q-item-label> <q-item-label>Startseite</q-item-label>
<q-item-label caption>v1.quasar-framework.org</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item <q-item
clickable clickable
class="text-primary"
v-ripple
tag="a" tag="a"
target="_blank" to="/Overview"
href="https://github.com/quasarframework/"
> >
<q-item-section avatar> <q-item-section avatar>
<q-icon name="code" /> <q-icon name="map"/>
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-item-label>Github</q-item-label> <q-item-label>Caches</q-item-label>
<q-item-label caption>github.com/quasarframework</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item <q-item
clickable clickable
disable
class="text-primary"
v-ripple
tag="a" tag="a"
target="_blank" to="/"
href="http://chat.quasar-framework.org"
> >
<q-item-section avatar> <q-item-section avatar>
<q-icon name="chat" /> <q-icon name="list"/>
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-item-label>Discord Chat Channel</q-item-label> <q-item-label>Rangliste</q-item-label>
<q-item-label caption>chat.quasar-framework.org</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item <q-item
clickable clickable
disable
class="text-primary"
v-ripple
tag="a" tag="a"
target="_blank" to="/Login"
href="https://forum.quasar-framework.org"
> >
<q-item-section avatar> <q-item-section avatar>
<q-icon name="record_voice_over" /> <q-icon name="perm_identity"/>
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-item-label>Forum</q-item-label> <q-item-label>Profil</q-item-label>
<q-item-label caption>forum.quasar-framework.org</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item <q-item
clickable clickable
class="text-primary"
v-ripple
tag="a" tag="a"
target="_blank" to="/Login"
href="https://twitter.com/quasarframework"
> >
<q-item-section avatar> <q-item-section avatar>
<q-icon name="rss_feed" /> <q-icon name="logout"/>
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-item-label>Twitter</q-item-label> <q-item-label>Login</q-item-label>
<q-item-label caption>@quasarframework</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
</q-list> </q-list>
</q-drawer> </q-drawer>
<q-page-container> <q-page-container>
<router-view /> <router-view/>
</q-page-container> </q-page-container>
</q-layout> </q-layout>
</template> </template>
<script> <script>
import { openURL } from "quasar"; import {openURL} from "quasar";
export default { export default {
name: "MyLayout", name: "MyLayout",
data() { data() {
return { return {
leftDrawerOpen: this.$q.platform.is.desktop leftDrawerOpen: this.$q.platform.is.desktop,
}; //menuButtonVisible: !this.$q.platform.is.desktop,
}, //leftDrawerOpen: true,
methods: { //miniState: true
openURL };
} },
}; methods: {
openURL
}
};
</script> </script>
<style></style> <style></style>

View File

@ -0,0 +1,189 @@
<template>
<div>
<!-- <div :is="stationComponent" @q-tb="scrollToBottomState" :stationObject="tempStation">STATION</div>-->
<!-- <div v-show="!stationComponent">-->
<form>
<div class="q-pa-md q-gutter-y-md">
<p class="text-h5">{{ isNewCache ? "Neuen Cache erstellen" : "Cache bearbeiten"}}</p>
<q-input class="col" dense stack-label filled v-model="tempCache.name" label="Name" @change="cacheToStore"/>
<q-input
v-model="tempCache.description"
dense
stack-label
filled
autogrow
type="textarea"
label="Beschreibung"
@change="cacheToStore"
/>
<q-input class="col" dense stack-label filled v-model="tempCache.rankingPoints" label="Punktewert"
@change="cacheToStore"/>
<q-input
disable
v-model="tempCache.reward"
dense
stack-label
filled
autogrow
type="textarea"
label="Belohnung"
@change="cacheToStore"
/>
<p class="text-h6">Stationen</p>
<q-list bordered separator class="rounded-borders">
<q-item v-for="(station, index) in cache.stationen" :key="index">
<q-item-section avatar>
<q-avatar color="primary" text-color="white">
{{ index + 1 }}
</q-avatar>
</q-item-section>
<q-item-section top>
<q-item-label lines="1">
<span class="text-grey-8">ID: {{ station.id ? station.id : "keine" }}</span>
</q-item-label>
<q-item-label lines="1" class="q-mt-xs text-body2">
<span class="cursor-pointer">{{ station.description }}</span>
</q-item-label>
<q-item-label caption lines="1">
Code: {{ station.code }}
</q-item-label>
</q-item-section>
<q-item-section side>
<div class="text-grey-8 q-gutter-xs">
<q-btn @click="deleteStation(index)" class="" color="" flat dense round icon="delete"/>
<q-btn @click="editStation(index)" class="" color="" flat dense round icon="edit"/>
</div>
</q-item-section>
</q-item>
</q-list>
<div class="row reverse">
<q-btn @click="addStation" unelevated color="primary" label="Station hinzufügen" icon-right="add"/>
</div>
<div class="row q-mt-xl">
<q-btn @click="saveCache" class="full-width" unelevated stack color="positive" label="Cache speichern"
icon="save_alt"/>
</div>
</div>
</form>
<!-- </div>-->
</div>
</template>
<script>
// import station from './StationEdit'
import {mapGetters} from 'vuex';
export default {
name: "Cache",
data() {
return {
// stationComponent: null,
scrolldown: false,
isNewCache: this.$route.params.id === undefined,
tempCache: {},
}
},
// components: {
// station
// },
beforeCreate: function () {
},
created: function () {
console.log("isNewCache: " + this.isNewCache);
console.log("fetch Caches from Store");
this.tempCache = JSON.parse(JSON.stringify(this.cache));
},
beforeMount: function () {
},
mounted: function () {
console.log("Scrolldown: " + this.scrolldown)
},
updated: function () {
if (this.scrolldown) {
console.log("scroll down...");
window.scrollTo(0, document.body.scrollHeight);
this.scrolldown = false
}
//this.SET_CACHE(this.tempCache);
//this.scrollToBottom();
},
methods: {
// ...mapMutations([
// 'cacheCollector/SET_CACHE',
// 'cacheCollector/ADD_STATION',
// 'cacheCollector/REMOVE_STATION',
// 'cacheCollector/RESET_NEW_CACHE',
// 'cacheCollector/LOAD_REMOTE_CACHE'
// ]),
// swapComponent: function (component) {
// this.stationComponent = component;
// },
cacheToStore() {
// push tempCache to Store
console.log("set Cache");
this.$store.commit('cacheCollector/SET_CACHE', JSON.parse(JSON.stringify(this.tempCache)));
// this.SET_CACHE(JSON.parse(JSON.stringify(this.tempCache)));
},
addStation() {
this.$router.push({ path: '/station' });
//this.swapComponent(station);
// create Station and add it to array tempCache.stationen
},
editStation(index) {
console.log("editStation("+index+")");
const station = this.cache.stationen[index];
console.log(station)
if (station.hasOwnProperty('id') ) {
//this.$router.push({ path: '/station/'+station.id});
} else {
// TODO Stationen bearbeitbar machen bevor sie abgeschickt werden. Am besten Station Objekt als Übergabe Parameter bei Router
this.$store.commit('cacheCollector/SET_TEMPSTATION', station);
this.$router.push({ path: `/station-l/${index}` }); // add parameter
}
},
deleteStation(index) {
// TODO wenn Station id hat, mit Backend abgleichen
this.$store.commit('cacheCollector/REMOVE_STATION', index);
},
saveCache() {
// commit to store, send to api, if success -> reset store
if (this.isNewCache) {
console.log(this.cache);
console.log(JSON.stringify(this.cache));
this.$axios.post('http://localhost:8080/api/createCache', this.cache)
.then((response) => {
console.log("POST api/createCache: " + response.statusText);
this.$store.commit('cacheCollector/RESET_NEW_CACHE');
this.$router.push({ path: '/overview' });
})
.catch((error) => {
});
} else {
// TODO update existing Cache
}
},
},
computed: {
...mapGetters({
cache: 'cacheCollector/GET_CACHE'
}),
// computedCache: {
// set(value) {
// console.log("set cache")
// },
// get() {
// console.log("get cache");
// return this.$store.getters.cacheCollector.GET_CACHE
// }
// }
}
}
</script>
<style scoped>
</style>

View File

@ -5,7 +5,7 @@
</p> </p>
<p class="text-faded">Sorry, nothing here...<strong>(404)</strong></p> <p class="text-faded">Sorry, nothing here...<strong>(404)</strong></p>
<q-btn color="secondary" style="width:200px;" @click="$router.push('/')" <q-btn color="secondary" style="width:200px;" @click="$router.push('/')"
>Go back</q-btn >Zur Startseite</q-btn
> >
</div> </div>
</template> </template>

View File

@ -1,13 +1,49 @@
<template> <template>
<q-page class="flex flex-center"> <div class="q-pa-md">
<img alt="Quasar logo" src="~assets/quasar-logo-full.svg" /> <q-card class="my-card q-mb-md" style="max-width: 600px">
</q-page> <q-parallax
src="https://www.buga2019.de/we-bilder/2.Aktuelles/BUGA-Zwerg/zwerg-im-gras-buga-heilbronn-2019.jpg?m=1550501506"
:height="200"
/>
<q-card-section>
<div class="text-h6">GeoCaching</div>
<div class="text-body2">Willkommen</div>
<q-expansion-item
expand-separator
rounded-borders
class="bg-green-3 text-black shadow-2 full-width q-mt-md"
label="Was ist GeoCaching?"
>
<q-card>
<q-card-section>
GeoCaching ist eine spielerische Führung, eine Schnitzeljagd, über die Bundesgartenschau.
Es gibt mehrere Routen (Caches), von denen man wählen kann. Auf jedem Cache gibt es mehrere Stationen, bei denen Rätsel und Aufgaben gelöst werden müssen, um die nächste zu finden.
Eine Station ist eine QR-Code, bei dessen einscannen das nächste Rätsel freigeschaltet wird.
Findet ein Cacher alle Stationen eines Caches erhält er eine kleine Belohnung und sammelt Punkte für eine Rangliste.
</q-card-section>
</q-card>
</q-expansion-item>
</q-card-section>
</q-card>
<q-card class="my-card" style="max-width: 600px">
<q-parallax
src="https://www.buga2019.de/we-bilder/1.Bundesgartenschau/171205_BUGA-2019_Sommerinsel_LOMA_430px.jpg?m=1550501561"
:height="200"
/>
<q-card-section>
<div class="text-h6">Loslegen</div>
<q-btn color="green-3" text-color="black" class="full-width q-mt-md" label="Zu den Caches" to="/Overview"/>
</q-card-section>
</q-card>
</div>
</template> </template>
<style></style>
<script> <script>
export default { export default {
name: "PageIndex" data () {
}; return {
}
}
}
</script> </script>

View File

@ -0,0 +1,142 @@
<template>
<div class="q-pa-md">
<form class="login" @submit.prevent="login">
<div class="q-pa-md">
<div class="column q-gutter-lg" style="">
<div class="col">
<div class="">
<div class="" style="max-width: 440px">
<q-input outlined filled stack-label v-model="user.username" type="text" label="Benutzername"
autocomplete="username"/>
</div>
</div>
</div>
<div class="col">
<div class="">
<div class="" style="max-width: 440px">
<q-input outlined filled stack-label v-model="user.password" type="password" label="Passwort"
autocomplete="current-password"/>
</div>
</div>
</div>
<div class="col">
<div class="">
<div class="" style="max-width: 440px">
<q-btn
:outline="userAuthenticated"
:disabled="userAuthenticated"
label="Login"
color="primary"
class="full-width"
type="submit"
unelevated
/>
<q-btn
:outline="!userAuthenticated"
:disabled="!userAuthenticated"
label="Logout"
color="red"
class="full-width q-mt-md"
unelevated
@click="logout"
/>
</div>
</div>
</div>
</div>
</div>
</form>
<q-dialog v-model="credentialsDialog" persistent transition-show="scale" transition-hide="scale">
<q-card class="bg-red-9 text-white" style="">
<q-card-section>
<div class="text-h6">Fehler</div>
</q-card-section>
<q-card-section>
Es konnten keine übereinstimmenden Zugangsdaten in der Datenbank gefunden werden.
</q-card-section>
<q-card-actions align="right" class="bg-white text-teal">
<q-btn flat label="OK" color="red-9" v-close-popup/>
</q-card-actions>
</q-card>
</q-dialog>
</div>
</template>
<script>
export default {
data() {
return {
user: {
username: "moximoti",
password: "1234",
//token: "",
// evalAuthentication: false
},
credentialsDialog: false,
};
},
// beforeMount: {
// init: function () {
// this.evalAuthentication();
// console.log("initiated");
// }
// },
created() {
this.evalAuthentication();
console.log("created: initiated");
},
computed: {
userAuthenticated() {
console.log("login: userAuthenticated()")
// console.log(this.$store.getters['auth/IS_AUTHENTICATED']);
// return this.$store.getters['auth/IS_AUTHENTICATED']
return this.$store.state.auth.isAuthenticated;
}
},
methods: {
login: function () {
const data = {
username: this.user.username,
password: this.user.password
};
console.log("GET http://localhost:8080/api/login/ - json: " + JSON.stringify(data));
this.$axios.post('http://localhost:8080/api/login', data)
.then((response) => {
// TODO Catch clause funktioniert nicht mehr wenn Statuscode zurückgegeben wird. -> hier if/else mit HTTP-Codes
console.log("GET/POST http://localhost:8080/api/login/ - response: " + response.data);
localStorage.setItem('userToken', JSON.stringify(response.data));
this.evalAuthentication();
})
.catch((error) => {
console.log("error: " + error);
this.credentialsDialog = true;
})
},
evalAuthentication: function () {
this.$store.commit('auth/SET_AUTHENTICATED');
this.$store.commit('auth/SET_USER');
},
logout: function () {
console.log("logout()");
console.log(JSON.parse(localStorage.getItem('userToken')));
// this.$axios.get('http://localhost:8080/api/logout', {
// params: {
// token: JSON.parse(localStorage.getItem('userToken'))
// }
// })
// .then((response) => {
// console.log("GET/POST http://localhost:8080/api/logout/ - response: " + response.data);
// })
// .catch((error) => {
// });
localStorage.removeItem('userToken');
this.evalAuthentication();
},
},
};
</script>

View File

@ -0,0 +1,171 @@
<template>
<q-page class="column">
<div class="bg-red col col-shrink" style="">
<q-tabs
v-model="tab"
class="bg-grey-2"
inline-label
align="justify"
active-bg-color="bg-grey-1"
active-color="cyan-14"
indicator-color="cyan-14"
switch-indicator
>
<q-tab name="list" label="Liste" icon="list"/>
<q-tab name="map" label="Karte" icon="map"/>
</q-tabs>
<q-separator color="grey-4"/>
</div>
<div class="col flex column">
<q-tab-panels v-model="tab" animated swipeable class="col">
<q-tab-panel name="list" class=" fit">
<q-list>
<q-card class="q-mb-md" v-for="cache in caches" :key="cache.id">
<q-expansion-item
class=""
expand-icon-toggle
expand-separator
icon="location_on"
:label="cache.name"
:caption="cache.rankingPoints+' Punkte / Size '+cache.stationen.length"
>
<q-item>
<q-item-section top avatar class="self-center">
<!--<q-icon rounded color="cyan-14" name="location_on" size="3rem"/>-->
</q-item-section>
<q-item-section>
<q-item-label caption>{{ cache.description }}</q-item-label>
</q-item-section>
<q-item-section side top class="self-center">
</q-item-section>
</q-item>
<q-item class="q-pr-sm reverse q-gutter-x-sm">
<q-btn @click="startCache(cache.id)" unelevated color="positive" stack icon="arrow_forward"
label="Starten" size="sm"/>
<q-btn disable v-if="hasAdminState" @click="editCache(cache.id)" unelevated color="amber" stack
icon="edit" label="Bearbeiten" size="sm"/>
<q-btn v-if="hasAdminState" @click="deleteCache(cache.id)" unelevated color="negative" stack
icon="delete" label="Löschen" size="sm"/>
</q-item>
</q-expansion-item>
</q-card>
</q-list>
<div v-if="hasAdminState" class="row">
<q-btn @click="addCache" unelevated color="primary" stack icon="add" label="Neuer Cache"
class="full-width"/>
</div>
</q-tab-panel>
<q-tab-panel name="map" class="q-pa-none fit">
<!--<div class="full-width full-height absolute-full" style="background: url('statics/osm_mock.png'); background-size: cover">-->
<!--</div>-->
<q-img
src="https://www.buga2019.de/we-bilder/3.Gartenausstellung/Gelaendeplan/190320_Gelaendeplan-quadratisch.jpg"
transition="fade" class="absolute-full">
<template v-slot:loading>
<q-spinner-puff color="cyan-14" size="4em"/>
</template>
</q-img>
</q-tab-panel>
</q-tab-panels>
<q-dialog v-model="dialog" persistent transition-show="scale" transition-hide="scale">
<q-card class="bg-red-9 text-white" style="">
<q-card-section>
<div class="text-h6">Fehler</div>
</q-card-section>
<q-card-section>
{{ dialogMsg }}
</q-card-section>
<q-card-actions align="right" class="bg-white text-teal">
<q-btn flat label="OK" color="red-9" v-close-popup/>
</q-card-actions>
</q-card>
</q-dialog>
</div>
</q-page>
</template>
<style>
/*
.my-list-card-item
padding-left: 8px
*/
</style>
<script>
export default {
data() {
return {
tab: 'list',
caches: [],
dialog: false,
dialogMsg: "",
}
},
mounted: function () {
},
computed: {
// ...mapGetters([
// 'auth/GET_ADMINSTATE'
// ]),
hasAdminState() {
return this.$store.getters['auth/GET_ADMINSTATE'];
}
},
created: function () {
console.log("created(): " + this.caches);
this.fetchAllCaches();
this.$store.commit('auth/SET_AUTHENTICATED');
this.$store.commit('auth/SET_USER');
},
methods: {
fetchAllCaches() {
this.$axios.get('http://localhost:8080/api/allCaches')
.then((response) => {
console.log("Caches: " + this.caches);
this.caches = response.data;
})
},
addCache() {
this.$router.push({path: `/cache`})
},
editCache() {
},
deleteCache(id) {
console.log('delete cache: ' + id)
this.$axios.delete('http://localhost:8080/api/deleteCache', {params: {cacheID: id}})
.then((response) => {
this.fetchAllCaches()
})
},
startCache(cacheID) {
const userToken = JSON.parse(localStorage.getItem('userToken'));
let params = {cacheID: cacheID};
if (userToken != null) {
params.token = userToken;
}
console.log(params);
this.$axios.get('http://localhost:8080/api/startCache', {params})
.then((response) => {
console.log(response.data);
// TODO wenn cache angefangen, dann suche die letzte gefundene Station
let stationID = this.caches.find(x => x.id === cacheID).stationen[0].id;
console.log(stationID);
//this.$router.push({path: `/station/${stationID}`})
this.$router.push({path: `/station/${cacheID}/${stationID}`})
})
}
}
}
</script>

View File

@ -0,0 +1,115 @@
<template>
<div class="q-ma-md">
<p class="text-h5">Neue Station</p>
<q-editor
:toolbar="[
['bold', 'italic', 'strike', 'underline'],
['undo', 'redo']
]"
v-model="station.description" min-height="10rem" />
<!--<q-input-->
<!--v-model="description"-->
<!--filled-->
<!--type="textarea"-->
<!--/>-->
<p class="text-h6 q-mt-md">Location</p>
<q-img transition="fade"
class="q-mb-md "
:ratio="16/9"
src="https://www.buga2019.de/we-bilder/3.Gartenausstellung/Gelaendeplan/190320_Gelaendeplan-quadratisch.jpg"
></q-img>
<div class="row q-col-gutter-md">
<q-input class="col" dense stack-label filled v-model="latlang" @input="separateLatlang" label="Längengrad/Breitengrad" />
<div class="col-shrink">
<q-btn unelevated color="primary" class="full-height" icon="my_location"/>
</div>
</div>
<p class="text-h6 q-mt-md">Lösung</p>
<q-input class="col" dense stack-label filled v-model="station.solution" label="Lösung" />
<!-- <q-input class="col q-mt-md" dense stack-label filled v-model="station.code" label="Code" readonly/>-->
<div class="row reverse q-mt-md q-gutter-x-md">
<q-btn @click="saveStation" unelevated color="primary" label="Speichern" icon-right="add"/>
<q-btn @click="dismiss" unelevated color="negative" label="verwerfen" icon-right="delete"/>
</div>
</div>
</template>
<script>
import {mapGetters} from 'vuex';
export default {
name: "Station",
data() {
return {
description: "Rätsel, Aufgabe und Informationen zur Station.",
latlang: "",
station: {
description: "Beschreibung",
lattitude: "0.000",
longitude: "0.000",
solution: "",
code: ""
},
isNewStation: true,
// stationObject: null,
}
},
// props: [ 'stationObject' ],
created: function() {
this.isNewStation = (this.$route.params.pos === undefined);
console.log("neu: "+this.isNewStation);
console.log("pos: "+this.$route.params.pos);
console.log(this.$route);
console.log(this.station);
if (!this.isNewStation) {
this.station = JSON.parse(JSON.stringify(this.tempStation));
}
console.log(this.station);
},
beforeMount: function() {
},
mounted: function() {
this.concatLatlang();
},
computed: {
...mapGetters({
tempStation: 'cacheCollector/GET_TEMPSTATION'
}),
},
methods: {
separateLatlang() {
//console.log("separateLatlang()");
if (this.latlang.includes(',')) {
this.station.lattitude = this.latlang.substr(0, this.latlang.indexOf(',')).trim();
this.station.longitude = this.latlang.substr(this.latlang.indexOf(',')+1, this.latlang.length).trim();
console.log(this.latlang);
console.log(this.station.lattitude + ", " + this.station.longitude);
}
},
concatLatlang() {
this.latlang = this.station.lattitude+", "+this.station.longitude;
},
saveStation() {
console.log("saveStation(): ");
console.log(this.station);
if (this.isNewStation) {
this.$store.commit('cacheCollector/ADD_STATION', this.station);
} else {
this.$store.commit('cacheCollector/EDIT_STATION', { index: this.$route.params.pos, station: this.station });
this.$store.commit('cacheCollector/SET_TEMPSTATION', null);
}
this.$router.push({ path: `/cache` });
console.log("station saved..");
},
dismiss() {
this.$store.commit('cacheCollector/SET_TEMPSTATION', null);
this.$router.push({ path: `/cache` });
}
}
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,97 @@
<template>
<div>
<q-img transition="fade"
class="q-mb-md "
:ratio="16/9"
src="https://www.buga2019.de/we-bilder/3.Gartenausstellung/Gelaendeplan/190320_Gelaendeplan-quadratisch.jpg"
></q-img>
<div class="q-ma-md">
<p class="text-h4">{{ data.cacheName }}</p>
<p class="text-h5">Station {{ showCacheProgress }}</p>
<!-- <p class="text-h5">Station {{ data.station.position }}</p>-->
<p>{{ data.station.description }}</p>
<!--<q-input-->
<!--v-model="description"-->
<!--filled-->
<!--type="textarea"-->
<!--/>-->
<!--<p class="text-h5 q-mt-md">Location</p>-->
<div class="column q-gutter-y-md">
<q-input v-if="false" disabled stack-label filled v-model="code" label="Lösung"/>
<q-btn v-if="false" disabled unelevated color="primary" label="Lösung abschicken"/>
<q-input stack-label filled v-model="code" label="Code eingeben (wird mit Code scannen ersetzt)"/>
<q-btn unelevated color="primary" label="Code scannen (absenden)"/>
</div>
</div>
</div>
</template>
<script>
export default {
name: "Station",
data() {
return {
code: "",
cache: null,
data: {
cacheId: 22,
cacheName: "Wasserfall Cache",
station: {
id: 22,
description: "Ein kleines winterliches Schlaginstrument. Welche Blume ist damit gemeint?",
longitude: 9.206628,
lattitude: 49.147734,
code: 213812,
solution: "Schneeglöckchen"
}
}
}
},
created: function () {
console.log("StationView: ")
console.log("'id' from url: " + this.$route.params.id)
console.log("'cache' from url: " + this.$route.params.cache)
this.fetchData();
},
beforeMount: function () {
},
mounted: function () {
},
computed: {
showCacheProgress() {
let stationCount = this.cache.stationen.length;
let stationPos = 1 + this.cache.stationen.findIndex(station => station.id === Number(this.$route.params.id));
return `${stationPos} von ${stationCount}`;
}
},
methods: {
fetchData() {
this.$axios.get('http://localhost:8080/api/allCaches')
.then((response) => {
console.log("http://localhost:8080/api/allCaches");
console.log(JSON.stringify(this.data));
console.log(this.data);
console.log(response.data);
const cache = response.data.find(cache => cache.id === Number(this.$route.params.cache));
this.data.cacheId = cache.id;
this.data.cacheName = cache.name;
this.cache = cache;
console.log(JSON.stringify(this.data));
this.$axios.get('http://localhost:8080/api/getAllStations')
.then((response) => {
console.log("http://localhost:8080/api/getAllStations");
console.log(response.data);
const stationView = response.data.find(station => station.id === Number(this.$route.params.id));
console.log(JSON.stringify(stationView));
this.data.station = stationView;
});
});
}
}
}
</script>
<style scoped>
</style>

View File

@ -3,6 +3,41 @@ const routes = [
path: "/", path: "/",
component: () => import("layouts/MyLayout.vue"), component: () => import("layouts/MyLayout.vue"),
children: [{ path: "", component: () => import("pages/Index.vue") }] children: [{ path: "", component: () => import("pages/Index.vue") }]
},
{
path: "/overview/",
component: () => import("layouts/MyLayout.vue"),
children: [{ path: "", component: () => import("pages/Overview.vue") }]
},
{
path: "/cache/",
component: () => import("layouts/MyLayout.vue"),
children: [{ path: "", component: () => import("pages/Cache.vue") }]
},
{
path: "/cache/:id",
component: () => import("layouts/MyLayout.vue"),
children: [{ path: "", component: () => import("pages/Cache.vue") }]
},
{
path: "/station/",
component: () => import("layouts/MyLayout.vue"),
children: [{ path: "", component: () => import("pages/StationEdit.vue") }]
},
{
path: "/station/:cache/:id",
component: () => import("layouts/MyLayout.vue"),
children: [{ path: "", component: () => import("pages/StationView.vue") }]
},
{
path: "/station-l/:pos",
component: () => import("layouts/MyLayout.vue"),
children: [{ path: "", component: () => import("pages/StationEdit.vue") }]
},
{
path: "/login/",
component: () => import("layouts/MyLayout.vue"),
children: [{ path: "", component: () => import("pages/Login.vue") }]
} }
]; ];

View File

@ -0,0 +1,35 @@
<svg xmlns="http://www.w3.org/2000/svg" width="103.187mm" height="99.871mm" viewBox="0 0 292.5 283.1">
<defs>
<style>
.a, .e {
fill: #58c5c7;
}
.a, .b, .c, .g {
opacity: 0.65;
isolation: isolate;
}
.b, .f {
fill: #ec0090;
}
.c, .d {
fill: #5ca038;
}
.g, .h {
fill: #accd6b;
}
</style>
</defs>
<title>buga_logo</title>
<path class="a" d="M272.4,1H256.8V83.4c-.3,6.2-.4,11.7-1.8,17.8-2.2,11.1-10.2,32.9-31.5,33.2h0c30.2-.2,43.3-22.1,46.4-33.2,1.9-6.1,2.1-11.5,2.5-17.8ZM165.6,1V83.4c.4,6.3.6,11.7,2.5,17.8,3,11.1,16.3,33,46.5,33.2-21.4-.2-29.4-22.1-31.6-33.2-1.4-6.1-1.5-11.5-1.8-17.8V1Zm49,133.4Z"/>
<path class="b" d="M29.7,1H15.8V133.5H29.6V1ZM75.1,1H71.8c1.6,0,7.3.3,11.7,2.6C91.9,7.9,97.9,20,97.9,33.1c0,4.1-.7,14.2-6.7,21.9a36.431,36.431,0,0,1-5.1,5.3,20.877,20.877,0,0,1,7.8,3.4c8.2,5.7,12.7,18.1,12.7,31,0,4.5-.7,14.6-6,24-4.7,8.5-10.7,12.8-17.9,14.2-2.2.4-4.6.4-6.9.6h5.1c3.2-.2,6.6-.2,9.8-.6,10.2-1.3,18.7-5.7,25.3-14.2a39.435,39.435,0,0,0,8.5-24c0-12.9-6.4-25.4-17.9-31a38.989,38.989,0,0,0-11-3.4c3.6-2.4,5.7-3.8,7.2-5.3a29.422,29.422,0,0,0,9.4-21.9A31.582,31.582,0,0,0,91.8,3.6C85.5,1.2,76.8,1,75.1,1"/>
<path class="c" d="M223.4,157.9v.5L271.2,282H291Zm-8.6,0L147.2,282H167l47.8-123.5Z"/>
<path class="d" d="M271.2,282,223.4,158V282ZM167,282h47.8V158Z"/>
<path class="e" d="M256.7,83.4V1H223.5V134.4c21.3-.3,29.3-22.1,31.5-33.2,1.3-6.1,1.4-11.6,1.7-17.8m-42.1,51V1H181.2V83.4c.3,6.2.4,11.7,1.8,17.8,2.1,11.1,10.2,33,31.6,33.2"/>
<path class="f" d="M91.3,55c6-7.8,6.7-17.8,6.7-21.9C98,20,92,7.9,83.6,3.6,79,1.2,72.8,1,71.6,1H68V133.5h7.8c2.3-.2,4.7-.2,6.9-.6,7.2-1.3,13.2-5.7,17.9-14.2a50.913,50.913,0,0,0,6-24c0-12.9-4.5-25.3-12.7-31a22.143,22.143,0,0,0-7.7-3.4A31.991,31.991,0,0,0,91.3,55m-39,78.5h6.9V1H29.7V133.5Z"/>
<path class="g" d="M59.1,283.2h0c-8.3-1.1-16-5.5-22.4-12.2l-.1-.1c-1-1.1-2-2.2-3-3.4a3.039,3.039,0,0,1-.5-.7,37.117,37.117,0,0,1-2.3-3.2,14,14,0,0,0-1-1.6c-.5-.9-1.1-1.8-1.6-2.7-.4-.7-.7-1.5-1.1-2.2s-.8-1.6-1.2-2.4a4.875,4.875,0,0,1-.4-1.1c-.6-1.3-1.1-2.5-1.6-3.9,0-.1-.1-.2-.1-.3a73.839,73.839,0,0,1-2.9-10.2,89.8,89.8,0,0,1-1.5-10.4c-.2-2.5-.3-4.9-.3-7.5,0-7.2.8-25.1,10.3-40.5,7.6-12.4,18.5-21.1,29.9-22.6h0c-18.5,1.2-33.8,10.2-44.5,22.6C1.2,196.1,0,214,0,221.2c0,33,25.5,60,59.1,62m68-61.8H108.3c0,2.5-.1,4.9-.3,7.3a89.8,89.8,0,0,1-1.5,10.4,70.079,70.079,0,0,1-2.9,10.2c0,.1-.1.2-.1.3-.5,1.3-1,2.6-1.6,3.9-.1.4-.3.7-.4,1.1l-1.2,2.4c-.4.8-.7,1.5-1.1,2.2-.5.9-1.1,1.8-1.6,2.7a14,14,0,0,1-1,1.6,37.117,37.117,0,0,1-2.3,3.2,3.039,3.039,0,0,0-.5.7c-1,1.2-2,2.3-3,3.4l-.1.1c-6.4,6.7-14.1,11.1-22.4,12.2h0c33.3-1.9,58.7-28.7,58.8-61.7"/>
<path class="h" d="M59.1,283.2V158.1c-11.4,1.5-22.4,10.2-29.9,22.6-9.5,15.5-10.3,33.3-10.3,40.5-.1,33,18,59,40.2,62m49.2-61.8H68v61.7c22.1-2.9,40.2-28.7,40.3-61.7"/>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 MiB

View File

@ -0,0 +1,4 @@
/*
export function someAction (context) {
}
*/

View File

@ -0,0 +1,24 @@
/**
* @return {boolean}
*/
export function GET_ADMINSTATE(state) {
console.log("GET_ADMINSTATE()");
if (state.userAuthenticated !== null) {
console.log(state.userAuthenticated.roles.find(x => x.name === "admin") != null);
return state.userAuthenticated.roles.find(x => x.name === "admin") != null;
} else {
console.log(state.userAuthenticated);
return false;
}
}
// /**
// * @return {boolean}
// */
// export function IS_AUTHENTICATED(state) {
// console.log("IS_AUTHENTICATED()");
// console.log(JSON.parse(localStorage.getItem('userToken')));
// console.log(!(JSON.parse(localStorage.getItem('userToken')) === null));
// console.log(!(localStorage.getItem('userToken') === null));
// return !(localStorage.getItem('userToken') === null);
// }

View File

@ -0,0 +1,12 @@
import state from './state'
import * as getters from './getters'
import * as mutations from './mutations'
import * as actions from './actions'
export default {
namespaced: true,
state,
getters,
mutations,
actions
}

View File

@ -0,0 +1,43 @@
import axios from 'axios'
export const SET_AUTHENTICATED = (state) => {
console.log("SET_AUTHENTICATED()");
console.log(JSON.parse(localStorage.getItem('userToken')));
if (localStorage.getItem('userToken')) {
state.isAuthenticated = true;
} else {
state.isAuthenticated = false;
}
};
export const SET_LOGOUT = (state) => {
console.log("SET_LOGOUT()");
localStorage.removeItem('userToken');
state.userAuthenticated = null;
state.isAuthenticated = false;
console.log(localStorage.getItem('userToken'));
};
export const SET_USER = (state) => {
console.log("SET_USER()");
if (localStorage.getItem('userToken')) {
axios.get('http://localhost:8080/api/getUser', {
params: {
token: JSON.parse(localStorage.getItem('userToken'))
}
})
.then((response) => {
console.log("GET/POST http://localhost:8080/api/getUser - response: ");
console.log(response.data);
state.userAuthenticated = response.data;
state.isAuthenticated = true;
if (state.userAuthenticated.hasOwnProperty('password')) delete state.userAuthenticated.password;
console.log(state.userAuthenticated);
})
.catch((error) => {
console.log("Catch Block: ")
console.log(error)
});
} else {
state.isAuthenticated = false;
state.userAuthenticated = null;
}
};

View File

@ -0,0 +1,19 @@
export default {
isAuthenticated: false,
userAuthenticated: null,
// userAuthenticated: {
// id: 1,
// firstname: "Timo",
// lastname: "Volkmann",
// username: "moximoti",
// rankingPointsSum: 0,
// email: "test@user.com",
// password: "$2a$10$c3Fo5nuUG.nlwXP94qc7qO01/UC1OL2DebEm.5zYlisKJGRhXMnqq",
// roles: [
// {
// id: 0,
// name: "admin"
// }
// ]
// },
}

View File

@ -0,0 +1,4 @@
/*
export function someAction (context) {
}
*/

View File

@ -0,0 +1,8 @@
export const GET_CACHE = (state) => {
console.log("GET_CACHE: retrieve cache from store. ");
return state.newCache;
};
export const GET_TEMPSTATION = (state) => {
console.log("GET_TEMPSTATION: retrieve cache from store. ");
return state.tempStation;
};

View File

@ -0,0 +1,12 @@
import state from './state'
import * as getters from './getters'
import * as mutations from './mutations'
import * as actions from './actions'
export default {
namespaced: true,
state,
getters,
mutations,
actions
}

View File

@ -0,0 +1,56 @@
export const SET_CACHE = (state, cache) => {
console.log("SET_CACHE: save cache to store. ")
state.newCache = cache;
};
export const SET_TEMPSTATION = (state, station) => {
console.log("SET_TEMPSTATION: add new station to cache: "+station);
state.tempStation = station;
};
export const ADD_STATION = (state, station) => {
console.log("ADD_STATION: add new station to cache: "+station);
state.newCache.stationen.push(station);
};
export const EDIT_STATION = (state, indexStation) => {
let index, station;
index = indexStation.index;
station = indexStation.station;
console.log("EDIT_STATION: "+index+" "+station);
state.newCache.stationen[index] = station;
};
export const REMOVE_STATION = (state, index) => {
console.log("REMOVE_STATION: "+index);
state.newCache.stationen.splice(index,1);
};
export const RESET_NEW_CACHE = (state) => {
state.newCache = {
name: "",
description: "",
rankingPoints: 0,
stationen: []
};
console.log("resetted new Cache");
};
export const LOAD_REMOTE_CACHE = (state, id) => {
console.log("LOAD_REMOTE_CACHE: get caches from remote");
this.$axios.get('http://localhost:8080/api/allCaches')
.then((response) => {
const allCaches = JSON.parse(response.data);
console.log("Caches: " + allCaches.length);
if (response.data === undefined || allCaches.length === 0) {
console.log("aborted processing data.");
return;
}
let cacheToSet = null;
for (let cache in allCaches) {
console.log("Cachedata: ");
console.log(cache.id);
console.log(cache.name);
if (cache.id === id) {
cacheToSet = cache;
console.log("found matching ID: setted cache to store.");
break;
}
}
});
};

View File

@ -0,0 +1,44 @@
export default {
newCache: {
name: "",
description: "",
rankingPoints: 0,
stationen: []
},
// newCache: {
// name: "Blumencache",
// description: "Dieser Cache umfasst 4 Stationen mit Rätseln rund um das Thema Blumen",
// rankingPoints: 100,
// stationen: [
// {
// description: "Ein kleines winterliches Schlaginstrument. Welche Blume ist damit gemeint?",
// longitude: 9.206628,
// lattitude: 49.147734,
// code: 213812,
// solution: "Schneeglöckchen"
// },
// {
// description: "Ein blühendes Federvieh. Welche Blume ist damit gemeint?",
// longitude: 9.206806,
// lattitude: 49.147318,
// code: 237823,
// solution: "Gänseblümchen"
// },
// {
// description: "Eine wertvolle Farbe. Welche Blume ist damit gemeint?",
// longitude: 9.207844,
// lattitude: 49.148032,
// code: 899423,
// solution: "Edelweiß"
// },
// {
// description: "Ein Zerkleinerungsgerät in der Brüllöffnung eines Raubtieres. Welche Blume ist damit gemeint?",
// longitude: 9.207649,
// lattitude: 49.150142,
// code: 347923,
// solution: "Löwenzahn"
// }
// ]
// },
tempStation: {},
}

View File

@ -1,25 +1,47 @@
import Vue from "vue"; import Vue from "vue";
import Vuex from "vuex"; import Vuex from "vuex";
import Axios from "axios";
import auth from "./auth"
import cacheCollector from "./cacheCollector"
// import example from './module-example' // import example from './module-example'
Vue.use(Vuex); Vue.use(Vuex, Axios);
/* /*
* If not building with SSR mode, you can * If not building with SSR mode, you can
* directly export the Store instantiation * directly export the Store instantiation
*/ */
export default function(/* { ssrContext } */) { export default function (/* { ssrContext } */) {
const Store = new Vuex.Store({ const Store = new Vuex.Store({
modules: { modules: {
// example auth,
cacheCollector
}, },
// enable strict mode (adds overhead!) // enable strict mode (adds overhead!)
// for dev mode only // for dev mode only
strict: process.env.DEV //strict: process.env.DEV
}); strict: false
})
return Store; /*
} if we want some HMR magic for it, we handle
the hot update like below. Notice we guard this
code with "process.env.DEV" -- so this doesn't
get into our production build (and it shouldn't).
*/
if (process.env.DEV && module.hot) {
module.hot.accept(['./auth'], () => {
const auth = require('./auth').default;
store.hotUpdate({ modules: { auth: newAuth } })
});
module.hot.accept(['./cacheCollector'], () => {
const cacheCollector = require('./cacheCollector').default;
store.hotUpdate({ modules: { cacheCollector: newCacheCollector } })
})
}
return Store
};

View File

@ -745,10 +745,10 @@
resolved "https://registry.yarnpkg.com/@positron/stack-trace/-/stack-trace-1.0.0.tgz#14fcc712a530038ef9be1ce6952315a839f466a8" resolved "https://registry.yarnpkg.com/@positron/stack-trace/-/stack-trace-1.0.0.tgz#14fcc712a530038ef9be1ce6952315a839f466a8"
integrity sha1-FPzHEqUwA475vhzmlSMVqDn0Zqg= integrity sha1-FPzHEqUwA475vhzmlSMVqDn0Zqg=
"@quasar/app@^1.0.0-beta.0": "@quasar/app@^1.0.0-beta.13":
version "1.0.0-beta.12" version "1.0.0-beta.13"
resolved "https://registry.yarnpkg.com/@quasar/app/-/app-1.0.0-beta.12.tgz#fa5e4a0ea662e969d1306dd8d50345d136051212" resolved "https://registry.yarnpkg.com/@quasar/app/-/app-1.0.0-beta.13.tgz#55127104ed2fc3b7bbed2882ecbaf8412a00a3e2"
integrity sha512-lQSqW+LuBG9jmglGj82fZ/9J6Dm0nz+dbSna6rOiy4zkt1FjmQ3PCRrImyd+WIsbKUntlTcKJ4+uN6fOlblcvg== integrity sha512-BMF/U/5xE7EntvVWVeQ0ud2k9z5xo4TGast5/Wv/g2+X4/VBIYUFPlDMNJh93okZ6QnRaNycU5xORo+dUiF8Cg==
dependencies: dependencies:
"@quasar/babel-preset-app" "1.0.2" "@quasar/babel-preset-app" "1.0.2"
"@vue/preload-webpack-plugin" "1.1.0" "@vue/preload-webpack-plugin" "1.1.0"
@ -787,7 +787,7 @@
minimist "1.2.0" minimist "1.2.0"
ms "2.1.1" ms "2.1.1"
node-loader "0.6.0" node-loader "0.6.0"
opn "5.4.0" opn "5.5.0"
optimize-css-assets-webpack-plugin "5.0.1" optimize-css-assets-webpack-plugin "5.0.1"
ouch "2.0.0" ouch "2.0.0"
postcss-loader "3.0.0" postcss-loader "3.0.0"
@ -800,12 +800,12 @@
stylus-loader "3.0.2" stylus-loader "3.0.2"
terser-webpack-plugin "1.2.3" terser-webpack-plugin "1.2.3"
url-loader "1.1.2" url-loader "1.1.2"
vue "2.6.9" vue "2.6.10"
vue-loader "15.7.0" vue-loader "15.7.0"
vue-router "3.0.2" vue-router "3.0.2"
vue-server-renderer "2.6.9" vue-server-renderer "2.6.10"
vue-style-loader "4.1.2" vue-style-loader "4.1.2"
vue-template-compiler "2.6.9" vue-template-compiler "2.6.10"
vuex "3.1.0" vuex "3.1.0"
webpack "4.29.6" webpack "4.29.6"
webpack-bundle-analyzer "3.1.0" webpack-bundle-analyzer "3.1.0"
@ -836,10 +836,10 @@
babel-plugin-dynamic-import-node "2.2.0" babel-plugin-dynamic-import-node "2.2.0"
core-js "2.6.5" core-js "2.6.5"
"@quasar/extras@^1.0.0": "@quasar/extras@^1.1.1":
version "1.1.0" version "1.1.1"
resolved "https://registry.yarnpkg.com/@quasar/extras/-/extras-1.1.0.tgz#acb43f7b2bb8e65851b5ba30bc05147c48854168" resolved "https://registry.yarnpkg.com/@quasar/extras/-/extras-1.1.1.tgz#f514bf5108c5de964949aaa336ba65266a25fd88"
integrity sha512-594TNuQrQLwzSwhlZMkMn5AIAcNk8zPrsCkdHT021dswMv+IHATGyKJaTH4KuLKLWse+oPRoB0NddLNf9PXiuw== integrity sha512-n9aQ9N9GBaRF15v3Rm5QDoeLOHFzjQ874f+54TthWmaQvx/8DV6fG/bwLgA6AjLUIZJs3ogm4J1KqWO+4zSg1g==
"@types/q@^1.5.1": "@types/q@^1.5.1":
version "1.5.2" version "1.5.2"
@ -4925,14 +4925,7 @@ opener@^1.5.1:
resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.1.tgz#6d2f0e77f1a0af0032aca716c2c1fbb8e7e8abed" resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.1.tgz#6d2f0e77f1a0af0032aca716c2c1fbb8e7e8abed"
integrity sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA== integrity sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA==
opn@5.4.0: opn@5.5.0, opn@^5.1.0:
version "5.4.0"
resolved "https://registry.yarnpkg.com/opn/-/opn-5.4.0.tgz#cb545e7aab78562beb11aa3bfabc7042e1761035"
integrity sha512-YF9MNdVy/0qvJvDtunAOzFw9iasOQHpVthTCvGzxt61Il64AYSGdK+rYwld7NAfk9qJ7dt+hymBNSc9LNYS+Sw==
dependencies:
is-wsl "^1.1.0"
opn@^5.1.0:
version "5.5.0" version "5.5.0"
resolved "https://registry.yarnpkg.com/opn/-/opn-5.5.0.tgz#fc7164fab56d235904c51c3b27da6758ca3b9bfc" resolved "https://registry.yarnpkg.com/opn/-/opn-5.5.0.tgz#fc7164fab56d235904c51c3b27da6758ca3b9bfc"
integrity sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA== integrity sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==
@ -5727,10 +5720,10 @@ qs@6.5.2:
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==
quasar@^1.0.0-beta.0: quasar@^1.0.0-beta.13:
version "1.0.0-beta.11" version "1.0.0-beta.13"
resolved "https://registry.yarnpkg.com/quasar/-/quasar-1.0.0-beta.11.tgz#cbccd35e2a41f333492dad2cd15b8ccf5225e918" resolved "https://registry.yarnpkg.com/quasar/-/quasar-1.0.0-beta.13.tgz#81622ece941b93a0186c646f1b343f400c16ebe6"
integrity sha512-g6VBCNa9fwNCyrWfxi8GwpXL6qNtyynweVKT+wqMZajjvE6fQ/EwETWF2zsla1Rv9NYsTCnW6o//bQn1vcqJbw== integrity sha512-9sDSUYRVzQu2WezUy329K9yBCGaoXFkeVYp9NnvKtzs7b/Wk76GrV4kwkBqVvFZDdOYuI4OFFdjPdKdDDMAILw==
querystring-es3@^0.2.0: querystring-es3@^0.2.0:
version "0.2.1" version "0.2.1"
@ -7012,10 +7005,10 @@ vue-router@3.0.2:
resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-3.0.2.tgz#dedc67afe6c4e2bc25682c8b1c2a8c0d7c7e56be" resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-3.0.2.tgz#dedc67afe6c4e2bc25682c8b1c2a8c0d7c7e56be"
integrity sha512-opKtsxjp9eOcFWdp6xLQPLmRGgfM932Tl56U9chYTnoWqKxQ8M20N7AkdEbM5beUh6wICoFGYugAX9vQjyJLFg== integrity sha512-opKtsxjp9eOcFWdp6xLQPLmRGgfM932Tl56U9chYTnoWqKxQ8M20N7AkdEbM5beUh6wICoFGYugAX9vQjyJLFg==
vue-server-renderer@2.6.9: vue-server-renderer@2.6.10:
version "2.6.9" version "2.6.10"
resolved "https://registry.yarnpkg.com/vue-server-renderer/-/vue-server-renderer-2.6.9.tgz#74b970be513887ad255b2132daa1720a16af69ed" resolved "https://registry.yarnpkg.com/vue-server-renderer/-/vue-server-renderer-2.6.10.tgz#cb2558842ead360ae2ec1f3719b75564a805b375"
integrity sha512-UAwI9R+H9oh6YIG9xmS4uU1X8MD9bBzDLGIhqB8UHX9tJPrWQTrBijfXfnytDpefIisfz3qLa27qFOKuX4vnsw== integrity sha512-UYoCEutBpKzL2fKCwx8zlRtRtwxbPZXKTqbl2iIF4yRZUNO/ovrHyDAJDljft0kd+K0tZhN53XRHkgvCZoIhug==
dependencies: dependencies:
chalk "^1.1.3" chalk "^1.1.3"
hash-sum "^1.0.2" hash-sum "^1.0.2"
@ -7034,10 +7027,10 @@ vue-style-loader@4.1.2, vue-style-loader@^4.1.0:
hash-sum "^1.0.2" hash-sum "^1.0.2"
loader-utils "^1.0.2" loader-utils "^1.0.2"
vue-template-compiler@2.6.9: vue-template-compiler@2.6.10:
version "2.6.9" version "2.6.10"
resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.6.9.tgz#26600415ff81a7a241aebc2d4e0abaa0f1a07915" resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.6.10.tgz#323b4f3495f04faa3503337a82f5d6507799c9cc"
integrity sha512-QgO0LSCdeH6zUMSgtqel+yDWsZWQPXiWBdFg9qzOhWfQL8vZ+ywinAzE04rm1XrWc+3SU0YAdWISlEgs/i8WWA== integrity sha512-jVZkw4/I/HT5ZMvRnhv78okGusqe0+qH2A0Em0Cp8aq78+NK9TII263CDVz2QXZsIT+yyV/gZc/j/vlwa+Epyg==
dependencies: dependencies:
de-indent "^1.0.2" de-indent "^1.0.2"
he "^1.1.0" he "^1.1.0"
@ -7047,10 +7040,10 @@ vue-template-es2015-compiler@^1.9.0:
resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz#1ee3bc9a16ecbf5118be334bb15f9c46f82f5825" resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz#1ee3bc9a16ecbf5118be334bb15f9c46f82f5825"
integrity sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw== integrity sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==
vue@2.6.9: vue@2.6.10:
version "2.6.9" version "2.6.10"
resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.9.tgz#415c1cc1a5ed00c8f0acdd0a948139d12b7ea6b3" resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.10.tgz#a72b1a42a4d82a721ea438d1b6bf55e66195c637"
integrity sha512-t1+tvH8hybPM86oNne3ZozCD02zj/VoZIiojOBPJLjwBn7hxYU5e1gBObFpq8ts1NEn1VhPf/hVXBDAJ3X5ljg== integrity sha512-ImThpeNU9HbdZL3utgMCq0oiMzAkt1mcgy3/E6zWC/G6AaQoeuFdsl9nDhTDU3X1R6FK7nsIUuRACVcjI+A2GQ==
vuex@3.1.0: vuex@3.1.0:
version "3.1.0" version "3.1.0"

View File

@ -3,11 +3,19 @@ package hhn.labsw.bugageocaching;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
@SpringBootApplication @SpringBootApplication(exclude = { SecurityAutoConfiguration.class })
public class Application { public class Application{
public static void main(String[] args) { /**@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(Application.class);
}**/
public static void main(String[] args) throws Exception {
SpringApplication.run(Application.class, args); SpringApplication.run(Application.class, args);
} }
} }

View File

@ -0,0 +1,416 @@
package hhn.labsw.bugageocaching.controller;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import hhn.labsw.bugageocaching.entities.*;
import hhn.labsw.bugageocaching.exceptions.IllegalParameterException;
import hhn.labsw.bugageocaching.repositories.*;
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.ExpiredJwtException;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import io.jsonwebtoken.security.Keys;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.crypto.bcrypt.BCrypt;
import org.springframework.web.bind.annotation.*;
import javax.annotation.PostConstruct;
import javax.xml.bind.DatatypeConverter;
import java.security.Key;
import java.security.SecureRandom;
import java.util.*;
import java.util.concurrent.atomic.AtomicLong;
import java.util.logging.Logger;
@RestController
public class Controller {
@Autowired
CacheRepository cacheRepository;
@Autowired
RewardRepository rewardRepository;
@Autowired
StationRepository stationRepository;
@Autowired
BearbeitetRepository bearbeitetRepository;
@Autowired
CacheAccesDefinitionRepository cacheAccesDefinitionRepository;
@Autowired
TeamRepository teamRepository;
@Autowired
UserRepository userRepository;
private AtomicLong counter = new AtomicLong();
byte[] key = new byte[64];
@PostConstruct
public void init() {
new SecureRandom().nextBytes(key);
System.out.println(Arrays.toString(key));
}
@CrossOrigin(origins = "http://localhost:8081") // only for dev purpose
@RequestMapping("/api/allCaches")
@ResponseBody
public ResponseEntity getAllCaches() {
return ResponseEntity.status(200).body(new Gson().toJson(cacheRepository.findAll()));
}
@CrossOrigin(origins = "http://localhost:8081") // only for dev purpose
@RequestMapping("/api/login")
@ResponseBody
public ResponseEntity<Object> login(@RequestBody User user) {
if (user.getUsername() == null || user.getPassword() == null) {
System.out.println(user.getUsername());
System.out.println(user.getPassword());
return ResponseEntity.status(400).body("Username or password cant be null");
}
if (userRepository.findByUsername(user.getUsername()) == null) {
return ResponseEntity.status(404).body("User was not found");
}
SignatureAlgorithm signatureAlgorithm = SignatureAlgorithm.HS256;
if (BCrypt.checkpw(user.getPassword(), userRepository.findByUsername(user.getUsername()).getPassword())) {
String token = Jwts.builder()
.setSubject(user.getUsername())
.claim("admin", userRepository.findByUsername(user.getUsername()).getRoles().stream().anyMatch(x -> x.getId() == 0)) //True if user is admin
.setExpiration(new Date(new Date().getTime() + (1000 * 60 * 60 * 24))) //One day expiration
.signWith(signatureAlgorithm, key)
.compact();
System.out.println(token);
Claims claims = Jwts.parser() //Parse JWT
.setSigningKey(key)
.parseClaimsJws(token).getBody();
System.out.println("ID: " + claims.getId());
System.out.println("Subject: " + claims.getSubject());
System.out.println("Issuer: " + claims.getIssuer());
System.out.println("Admin: " + claims.get("admin"));
System.out.println("Expiration: " + claims.getExpiration());
return ResponseEntity.status(200).body(token);
}
/*if (BCrypt.checkpw(user.getPassword(), userRepository.findByUsername(user.getUsername()).getPassword())) {
String token = user.getUsername() + BCrypt.hashpw(String.valueOf(System.currentTimeMillis() + counter.incrementAndGet()), BCrypt.gensalt());
String hashedToken = BCrypt.hashpw(token, BCrypt.gensalt());
userRepository.findByUsername(user.getUsername()).setToken(hashedToken);
userRepository.save(userRepository.findByUsername(user.getUsername()));
//return ResponseEntity.ok(new Gson().toJson(token));
return ResponseEntity.status(200).body(token);
}*/
return ResponseEntity.status(400).body("Es ist ein Fehler aufgetreten");
}
@CrossOrigin(origins = "http://localhost:8081") // only for dev purpose
@RequestMapping("/api/startCache")
@ResponseBody
public ResponseEntity startCache(@RequestParam(value = "token", defaultValue = "-1") String token,
@RequestParam String cacheID) throws IllegalParameterException {
if (!token.equals("-1")) { // ein angemeldeter user startet den cache(es werden zwei parameter übergeben)
Bearbeitet bearbeitet = new Bearbeitet();
try {
Claims claims = Jwts.parser() //Parse JWT
.setSigningKey(key)
.parseClaimsJws(token).getBody();
User user = userRepository.findByUsername(claims.getSubject());
if (user == null) {
return ResponseEntity.status(404).body("User was not found");
}
bearbeitet.setUser(user);
Optional<Cache> cacheOptional = cacheRepository.findById(Integer.valueOf(cacheID));
if (cacheOptional.isPresent()) {
Cache cache = cacheOptional.get();
if(bearbeitetRepository.findByUserAndCache(user, cache) != null){
Bearbeitet bearbeitet1 = bearbeitetRepository.findByUserAndCache(user, cache);
return ResponseEntity.status(200).body(bearbeitet1);
}
bearbeitet.setCache(cache);
Station startStation = cache.getStationen().get(0);
bearbeitet.setAktuelleStation(startStation);
} else {
return ResponseEntity.status(404).body("Couldnt find Cache " + cacheID);
}
Optional<CacheAccesDefinition> cacheAccesDefinitionOptional =
cacheAccesDefinitionRepository.findById(0); // angefangen
if (cacheAccesDefinitionOptional.isPresent()) {
CacheAccesDefinition cacheAccesDefinition = cacheAccesDefinitionOptional.get();
bearbeitet.setCacheAccesDefinition(cacheAccesDefinition);
} else {
return ResponseEntity.status(404).body("There is no cacheAccesDefinition with the ID " + 0);
}
bearbeitetRepository.save(bearbeitet);
return ResponseEntity.status(201).body(new Gson().toJson(bearbeitet));
} catch (ExpiredJwtException e) {
return ResponseEntity.status(400).body("JWT Token expired");
} catch (Exception e){
return ResponseEntity.status(400).body("JWT Token invalid");
}
} else { // kein angemeldeter User startet den cache(es wird nur der cache als parameter übergeben)
Optional<Cache> cacheOptional = cacheRepository.findById(Integer.valueOf(cacheID));
if (cacheOptional.isPresent()) {
Cache cache = cacheOptional.get();
return ResponseEntity.status(200).body(new Gson().toJson(cache));
} else {
return ResponseEntity.status(404).body("Couldnt find Cache " + cacheID);
}
}
}
//Eigentlich brauchen wir mit JWT keine Logout Methode mehr.
@CrossOrigin(origins = "http://localhost:8081") // only for dev purpose
@RequestMapping("/api/logout")
@ResponseBody
public ResponseEntity logout(@RequestParam String token) {
// System.out.println("logout");
/*User user = userRepository.findByUsername(token.substring(0, token.indexOf("$")));
// System.out.println(token);
// System.out.println(user.getToken());
if (user == null || user.getToken().isEmpty()) {
return ResponseEntity.status(404).body("User was not found");
}
user.setToken(null);
userRepository.save(user);*/
return ResponseEntity.status(200).body("Token was deleted");
}
@CrossOrigin(origins = "http://localhost:8081") // only for dev purpose
@RequestMapping("/api/createCache")
@ResponseBody
public ResponseEntity createCache(@RequestBody Cache cache) {
System.out.println(cache.getName());
System.out.println(cache.getStationen().size());
System.out.println(cache.getStationen().get(0).getId());
// Stationen werden in die Datenbank eingetragen
for (Station station : cache.getStationen()) {
ResponseEntity response = createStation(station);
if (response.getStatusCodeValue() == 400) {
deleteStationen(cache);
return response;
}
}
System.out.println("Stationen eingetragen!");
// Caches werden in die Datenbank eingetragen
if (cache.getDescription().length() == 0 || cache.getName().length() == 0 || cache.getRankingPoints() == 0.0 || cache.getStationen().size() == 0) {
deleteStationen(cache);
return ResponseEntity.status(400).body("cache fields can´t be empty");
}
for (Cache cache1 : cacheRepository.findAll()) {
if (cache1.getName().equals(cache.getName())) {
deleteStationen(cache);
return ResponseEntity.status(400).body("name is already taken");
}
}
if (cache.getRankingPoints() < 0) {
deleteStationen(cache);
return ResponseEntity.status(400).body("Ranking points has to be a positive number");
}
cacheRepository.save(cache);
return ResponseEntity.status(200).body(new Gson().toJson(cache));
}
public ResponseEntity createStation(Station station) {
if (station.getDescription().length() == 0 || station.getLattitude() == 0.0 || station.getLongitude() == 0.0 /*|| station.getSolution().length() == 0*/) {
return ResponseEntity.status(400).body("station fields can´t be empty");
}
if (station.getLattitude() < -90 || station.getLattitude() > 90) {
return ResponseEntity.status(400).body("Lattitude has to be between -90 and 90 Degree");
}
if (station.getLongitude() < -180 || station.getLongitude() > 180) {
return ResponseEntity.status(400).body("Longitude has to be in the range of -180 to 180 degrees");
}
Random r = new Random();
int low = 100000;
int high = 1000000;
int code = 0;
boolean unique = false;
while (!unique) {
code = r.nextInt(high - low) + low;
unique = true;
for (Station station1 : stationRepository.findAll()) {
if (station1.getCode() == code) {
unique = false;
}
}
}
station.setCode(code);
stationRepository.save(station);
return ResponseEntity.status(200).body(new Gson().toJson(station));
}
public void deleteStationen(Cache cache) {
for (Station station : cache.getStationen()) {
try {
stationRepository.delete(station);
} catch (IllegalArgumentException e) { // station is null
// do nothing
}
}
}
@CrossOrigin(origins = "http://localhost:8081") // only for dev purpose
@RequestMapping("/api/checkAdmin")
@ResponseBody
public ResponseEntity checkAdmin(@RequestParam String token) {
try {
Claims claims = Jwts.parser() //Parse JWT
.setSigningKey(key)
.parseClaimsJws(token).getBody();
return ResponseEntity.status(200).body(claims.get("admin"));
}catch (ExpiredJwtException e) {
return ResponseEntity.status(400).body("JWT Token expired");
} catch (Exception e){
return ResponseEntity.status(400).body("JWT Token invalid");
}
/*User user = userRepository.findByUsername(token.substring(0, token.indexOf("$")));
if (user == null) {
return ResponseEntity.status(404).body("User was not found");
}
for (Role role : user.getRoles()) {
if (role.getId() == 0) { // is admin
return ResponseEntity.status(200).body("User is Admin");
}
}
return ResponseEntity.status(401).body("User is no Admin");*/
}
//Bis hier
@CrossOrigin(origins = "http://localhost:8081") // only for dev purpose
@RequestMapping("/api/getAllStations")
@ResponseBody
public ResponseEntity getAllStations() {
return ResponseEntity.status(200).body(new Gson().toJson(stationRepository.findAll()));
}
@CrossOrigin(origins = "http://localhost:8081") // only for dev purpose
@RequestMapping("/api/deleteCache")
@ResponseBody
public ResponseEntity deleteCache(@RequestParam String cacheID) {
Optional<Cache> optionalCache = cacheRepository.findById(Integer.valueOf(cacheID));
if (!optionalCache.isPresent()) {
return ResponseEntity.status(404).body(new Gson().toJson("There is no cache with the ID " + cacheID));
}
Cache cache = optionalCache.get();
for (Bearbeitet bearbeitet : bearbeitetRepository.findAll()) {
if (bearbeitet.getCache().getId() == cache.getId()) {
bearbeitetRepository.delete(bearbeitet);
}
}
cacheRepository.delete(cache);
return ResponseEntity.status(200).body(new Gson().toJson(true));
}
@CrossOrigin(origins = "http://localhost:8081") // only for dev purpose
@RequestMapping("/api/getMyCaches")
@ResponseBody
public ResponseEntity getMyCaches(@RequestParam String token) {
try {
Claims claims = Jwts.parser() //Parse JWT
.setSigningKey(key)
.parseClaimsJws(token).getBody();
User user = userRepository.findByUsername(claims.getSubject());
if (user != null) {
ArrayList<Bearbeitet> bearbeitetList = new ArrayList<>();
for (Bearbeitet bearbeitet : bearbeitetRepository.findAll()) {
if (bearbeitet.getUser().getId() == user.getId()) {
bearbeitetList.add(bearbeitet);
}
}
return ResponseEntity.status(200).body(new Gson().toJson(bearbeitetList));
} else {
return ResponseEntity.status(404).body("User was not found in the database");
}
} catch (ExpiredJwtException e) {
return ResponseEntity.status(400).body("JWT Token expired");
} catch (Exception e){
return ResponseEntity.status(400).body("JWT Token invalid");
}
}
@CrossOrigin(origins = "http://localhost:8081") // only for dev purpose
@RequestMapping("/api/getRankingList")
@ResponseBody
public ResponseEntity getRankingList() {
List<User> sendBackUsers = new LinkedList<>();
List<Object[]> rankingUsers = userRepository.getRankingList();
for (Object[] obj : rankingUsers) {
User u = new User();
u.setId((int) obj[0]);
u.setUsername((String) obj[1]);
u.setRankingPointsSum((int) obj[2]);
sendBackUsers.add(u);
}
return ResponseEntity.status(200).body(new Gson().toJson(sendBackUsers));
}
@CrossOrigin(origins = "http://localhost:8081") // only for dev purpose
@RequestMapping("/api/getUser")
@ResponseBody
public ResponseEntity getUser(@RequestParam String token) {
try {
Claims claims = Jwts.parser() //Parse JWT
.setSigningKey(key)
.parseClaimsJws(token).getBody();
User user = userRepository.findByUsername(claims.getSubject());
if (user != null) {
return ResponseEntity.status(200).body(new Gson().toJson(user));
} else {
return ResponseEntity.status(404).body("User was not found in the database");
}
} catch (ExpiredJwtException e) {
return ResponseEntity.status(400).body("JWT Token expired");
} catch (Exception e){
return ResponseEntity.status(400).body("JWT Token invalid");
}
}
}

View File

@ -0,0 +1,58 @@
package hhn.labsw.bugageocaching.db;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class DBConnector {
/*
* Installation of the web service
*
* The following parameters have to be changed for setting up the web service in another environment.
* DB_HOST = Address of the database. Examples: localhost, 192.168.12.7, mydomain.com
* DB_USER = Username for the database connection
* DB_PASSWORD = Password for the database connection
* DATABASE = Name of the database that shall be used
*
*/
private static final String DB_HOST = "www.se.hs-heilbronn.de:3406/buga19Geocaching";
private static final String DB_USER = "BuGa19GeocachingUser";
private static final String DB_PASSWORD = "GeocachingPw";
/*
* For setting up the Webservice no changes are needed from here!
*/
private static final Logger logger = LoggerFactory.getLogger(DBConnector.class);
public static Connection connect() {
logger.debug("Trying to establish connection to database");
try {
Class.forName("org.mariadb.jdbc.Driver");
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
/*
* Connect to database
*/
Connection connection = null;
try {
connection = DriverManager.getConnection("jdbc:mariadb://" + DB_HOST + "?user=" + DB_USER + "&password=" + DB_PASSWORD);
logger.debug("Connected");
} catch (SQLException e) {
System.out.println(e.getMessage());
e.printStackTrace();
}
return connection;
}
}

View File

@ -0,0 +1,65 @@
package hhn.labsw.bugageocaching.entities;
import javax.persistence.*;
@Entity
@Table
public class Bearbeitet {
@Id
@GeneratedValue
private int id;
@OneToOne
private User user;
@OneToOne
private Cache cache;
@OneToOne
private CacheAccesDefinition cacheAccesDefinition;
@OneToOne
private Station aktuelleStation;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
public Cache getCache() {
return cache;
}
public void setCache(Cache cache) {
this.cache = cache;
}
public CacheAccesDefinition getCacheAccesDefinition() {
return cacheAccesDefinition;
}
public void setCacheAccesDefinition(CacheAccesDefinition cacheAccesDefinition) {
this.cacheAccesDefinition = cacheAccesDefinition;
}
public Station getAktuelleStation() {
return aktuelleStation;
}
public void setAktuelleStation(Station aktuelleStation) {
this.aktuelleStation = aktuelleStation;
}
}

View File

@ -20,6 +20,9 @@ public class Cache {
@OneToMany @OneToMany
private List<Station> stationen = new ArrayList<>(); private List<Station> stationen = new ArrayList<>();
@ManyToOne
private Reward reward;
public Cache() { public Cache() {
} }
@ -59,7 +62,15 @@ public class Cache {
return stationen; return stationen;
} }
public void setStationen(ArrayList<Station> stationen) { public void setStationen(List<Station> stationen) {
this.stationen = stationen; this.stationen = stationen;
} }
public Reward getReward() {
return reward;
}
public void setReward(Reward reward) {
this.reward = reward;
}
} }

View File

@ -0,0 +1,31 @@
package hhn.labsw.bugageocaching.entities;
import javax.persistence.*;
@Entity
@Table
public class CacheAccesDefinition {
@Id
@GeneratedValue
private int id;
private String description;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
}

View File

@ -0,0 +1,39 @@
package hhn.labsw.bugageocaching.entities;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
@Entity
public class Role {
@Id
@GeneratedValue
private int id;
private String name;
public Role() {
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public String toString() {
return name;
}
}

View File

@ -14,6 +14,8 @@ public class Station {
private String description; private String description;
private double longitude; private double longitude;
private double lattitude; private double lattitude;
private int code;
private String solution;
public Station() { public Station() {
} }
@ -50,4 +52,19 @@ public class Station {
this.lattitude = lattitude; this.lattitude = lattitude;
} }
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getSolution() {
return solution;
}
public void setSolution(String solution) {
this.solution = solution;
}
} }

View File

@ -0,0 +1,41 @@
package hhn.labsw.bugageocaching.entities;
import javax.persistence.*;
import java.util.ArrayList;
import java.util.List;
@Entity
@Table
public class Team {
@Id
@GeneratedValue
private int id;
private String name;
private int rankingPoints;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getRankingPoints() {
return rankingPoints;
}
public void setRankingPoints(int rankingPoints) {
this.rankingPoints = rankingPoints;
}
}

View File

@ -0,0 +1,108 @@
package hhn.labsw.bugageocaching.entities;
import javax.persistence.*;
import java.util.Set;
import java.util.List;
@Entity
@Table
public class User {
@Id
@GeneratedValue
private int id;
private String firstname;
private String lastname;
private String username;
private int rankingPointsSum;
private String email;
private String password;
@ManyToMany
private List<Role> roles;
@ManyToOne
private Team team;
@Transient
private String passwordConfirm;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getFirstname() {
return firstname;
}
public void setFirstname(String firstname) {
this.firstname = firstname;
}
public String getLastname() {
return lastname;
}
public void setLastname(String lastname) {
this.lastname = lastname;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public int getRankingPointsSum() {
return rankingPointsSum;
}
public void setRankingPointsSum(int rankingPointsSum) {
this.rankingPointsSum = rankingPointsSum;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public Team getTeam() {
return team;
}
public void setTeam(Team team) {
this.team = team;
}
public List<Role> getRoles() {
return roles;
}
public void setRoles(List<Role> roles) {
this.roles = roles;
}
}

View File

@ -0,0 +1,65 @@
package hhn.labsw.bugageocaching.exceptions;
/**
* Thrown to indicate that a method has been passed an illegal or inappropriate argument.
* This matches the IllegalArgumentException, but is no RuntimeException. This forces the
* developer to catch it.
* <p>
*/
public class IllegalParameterException extends Exception {
/**
* Constructs a new exception with {@code null} as its detail message.
* The cause is not initialized, and may subsequently be initialized by a
* call to {@link #initCause}.
*/
public IllegalParameterException() {
}
/**
* Constructs a new exception with the specified detail message. The
* cause is not initialized, and may subsequently be initialized by
* a call to {@link #initCause}.
*
* @param message the detail message. The detail message is saved for
* later retrieval by the {@link #getMessage()} method.
*/
public IllegalParameterException(final String message) {
super(message);
}
/**
* Constructs a new exception with the specified detail message and
* cause. <p>Note that the detail message associated with
* {@code cause} is <i>not</i> automatically incorporated in
* this exception's detail message.
*
* @param message the detail message (which is saved for later retrieval
* by the {@link #getMessage()} method).
* @param cause the cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A <tt>null</tt> value is
* permitted, and indicates that the cause is nonexistent or
* unknown.)
* @since 1.4
*/
public IllegalParameterException(final String message, final Throwable cause) {
super(message, cause);
}
/**
* Constructs a new exception with the specified cause and a detail
* message of <tt>(cause==null ? null : cause.toString())</tt> (which
* typically contains the class and detail message of <tt>cause</tt>).
* This constructor is useful for exceptions that are little more than
* wrappers for other throwables.
*
* @param cause the cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A <tt>null</tt> value is
* permitted, and indicates that the cause is nonexistent or
* unknown.)
* @since 1.4
*/
public IllegalParameterException(final Throwable cause) {
super(cause);
}
}

View File

@ -0,0 +1,11 @@
package hhn.labsw.bugageocaching.repositories;
import hhn.labsw.bugageocaching.entities.Bearbeitet;
import hhn.labsw.bugageocaching.entities.Cache;
import hhn.labsw.bugageocaching.entities.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.CrudRepository;
public interface BearbeitetRepository extends JpaRepository<Bearbeitet, Integer> {
Bearbeitet findByUserAndCache(User user, Cache cache);
}

View File

@ -0,0 +1,8 @@
package hhn.labsw.bugageocaching.repositories;
import hhn.labsw.bugageocaching.entities.CacheAccesDefinition;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.CrudRepository;
public interface CacheAccesDefinitionRepository extends JpaRepository<CacheAccesDefinition, Integer> {
}

View File

@ -1,7 +1,8 @@
package hhn.labsw.bugageocaching.repositories; package hhn.labsw.bugageocaching.repositories;
import hhn.labsw.bugageocaching.entities.Cache; import hhn.labsw.bugageocaching.entities.Cache;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.CrudRepository; import org.springframework.data.repository.CrudRepository;
public interface CacheRepository extends CrudRepository<Cache, Integer> { public interface CacheRepository extends JpaRepository<Cache, Integer> {
} }

View File

@ -1,7 +1,8 @@
package hhn.labsw.bugageocaching.repositories; package hhn.labsw.bugageocaching.repositories;
import hhn.labsw.bugageocaching.entities.Reward; import hhn.labsw.bugageocaching.entities.Reward;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.CrudRepository; import org.springframework.data.repository.CrudRepository;
public interface RewardRepository extends CrudRepository<Reward, Integer> { public interface RewardRepository extends JpaRepository<Reward, Integer> {
} }

View File

@ -0,0 +1,7 @@
package hhn.labsw.bugageocaching.repositories;
import hhn.labsw.bugageocaching.entities.Role;
import org.springframework.data.jpa.repository.JpaRepository;
public interface RoleRepository extends JpaRepository<Role, Integer> {
}

View File

@ -1,7 +1,8 @@
package hhn.labsw.bugageocaching.repositories; package hhn.labsw.bugageocaching.repositories;
import hhn.labsw.bugageocaching.entities.Station; import hhn.labsw.bugageocaching.entities.Station;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.CrudRepository; import org.springframework.data.repository.CrudRepository;
public interface StationRepository extends CrudRepository<Station, Integer> { public interface StationRepository extends JpaRepository<Station, Integer> {
} }

View File

@ -0,0 +1,8 @@
package hhn.labsw.bugageocaching.repositories;
import hhn.labsw.bugageocaching.entities.Team;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.CrudRepository;
public interface TeamRepository extends JpaRepository<Team, Integer> {
}

View File

@ -0,0 +1,20 @@
package hhn.labsw.bugageocaching.repositories;
import hhn.labsw.bugageocaching.entities.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import java.util.Collection;
import java.util.List;
public interface UserRepository extends CrudRepository<User, Integer> {
User findByUsername(String username);
@Query(value = "SELECT u.id, u.username, u.ranking_points_sum from user u order by ranking_points_sum DESC", nativeQuery = true)
List<Object[]> getRankingList();
}

View File

@ -2,4 +2,5 @@ spring.datasource.url=jdbc:mariadb://seserver.se.hs-heilbronn.de:3406/buga19Geoc
spring.datasource.username=BuGa19GeocachingUser spring.datasource.username=BuGa19GeocachingUser
spring.datasource.password=GeocachingPw spring.datasource.password=GeocachingPw
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
spring.jpa.hibernate.ddl-auto=update spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true

File diff suppressed because one or more lines are too long

View File

@ -1,191 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="67.407623mm"
height="62.908276mm"
viewBox="0 0 238.84591 222.90334"
id="svg3570"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="quasar-logo-full.svg">
<defs
id="defs3572" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.979899"
inkscape:cx="-39.753589"
inkscape:cy="27.706388"
inkscape:document-units="px"
inkscape:current-layer="g4895-4-4"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1920"
inkscape:window-height="1056"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1" />
<metadata
id="metadata3575">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-277.71988,-312.33911)">
<g
id="g4895-4-4"
transform="translate(1419.0442,398.9018)">
<g
transform="translate(-29.620665,-4)"
id="g4579-2-20">
<g
id="g4445-2-0"
transform="translate(12.499948,7.809312)">
<g
inkscape:export-ydpi="44.860481"
inkscape:export-xdpi="44.860481"
inkscape:export-filename="/home/emanuele/Desktop/logo1.png"
transform="translate(-712.85583,-503.26814)"
id="g4561-6-7-0">
<g
transform="translate(16.233481,0)"
style="font-style:normal;font-weight:normal;font-size:50.25774765px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#263238;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="flowRoot4513-6-6-08">
<path
d="m -402.73125,631.46823 q -0.6125,0.0438 -1.3125,0.0875 -0.65625,0 -1.4,0 l -9.31875,0 q -12.81875,0 -12.81875,-8.44375 l 0,-13.475 q 0,-8.26875 12.6,-8.26875 l 9.75625,0 q 12.6,0 12.6,8.26875 l 0,13.475 q 0,5.03125 -4.4625,7.04375 l 3.10625,2.14375 q 1.35625,0.83125 1.35625,1.70625 0,0.875 -0.7,1.3125 -0.65625,0.48125 -1.88125,0.48125 -0.30625,0 -0.7875,-0.13125 -0.4375,-0.0875 -1.05,-0.48125 l -5.6875,-3.71875 z m 5.38125,-21.74375 q 0,-4.76875 -7.9625,-4.76875 l -9.58125,0 q -7.9625,0 -7.9625,4.76875 l 0,13.3875 q 0,4.94375 8.3125,4.94375 l 8.88125,0 q 8.3125,0 8.3125,-4.94375 l 0,-13.3875 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:43.75px;font-family:'Neuropol X';-inkscape-font-specification:'Neuropol X';text-align:start;letter-spacing:5px;word-spacing:0px;text-anchor:start;fill:#263238;fill-opacity:1"
id="path3428" />
<path
d="m -368.0585,631.64323 q -11.2875,0 -11.2875,-6.9125 l 0,-12.73125 q 0,-1.8375 2.31875,-1.8375 2.31875,0 2.31875,1.8375 l 0,12.775 q 0,3.325 6.475,3.325 l 8.3125,0 q 6.475,0 6.475,-3.325 l 0,-12.775 q 0,-1.8375 2.31875,-1.8375 2.3625,0 2.3625,1.8375 l 0,12.73125 q 0,6.9125 -11.2875,6.9125 l -8.00625,0 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:43.75px;font-family:'Neuropol X';-inkscape-font-specification:'Neuropol X';text-align:start;letter-spacing:5px;word-spacing:0px;text-anchor:start;fill:#263238;fill-opacity:1"
id="path3430" />
<path
d="m -327.2833,631.64323 q -9.3625,0 -9.3625,-5.81875 l 0,-2.49375 q 0,-5.775 9.3625,-5.775 l 18.59375,0 0,-0.65625 q 0,-3.0625 -5.38125,-3.0625 l -6.16875,0 q -2.1875,0 -2.1875,-1.70625 0,-1.75 2.1875,-1.75 l 6.16875,0 q 9.93125,0 9.93125,6.51875 l 0,8.575 q 0,6.16875 -9.5375,6.16875 l -13.60625,0 z m 13.34375,-3.4125 q 5.25,0 5.25,-2.8875 l 0,-4.76875 -18.24375,0 q -5.11875,0 -5.11875,2.66875 l 0,2.275 q 0,2.7125 5.11875,2.7125 l 12.99375,0 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:43.75px;font-family:'Neuropol X';-inkscape-font-specification:'Neuropol X';text-align:start;letter-spacing:5px;word-spacing:0px;text-anchor:start;fill:#263238;fill-opacity:1"
id="path3432" />
<path
d="m -262.77031,626.74323 q 0,4.9 -9.975,4.9 l -17.0625,0 q -2.1875,0 -2.1875,-1.70625 0,-1.70625 2.1875,-1.70625 l 17.0625,0 q 5.38125,0 5.38125,-1.4875 l 0,-2.45 q 0,-1.4875 -5.38125,-1.4875 l -9.0125,0 q -9.975,0 -9.975,-4.76875 l 0,-2.05625 q 0,-5.6 10.28125,-5.6 l 5.99375,0 q 2.23125,0 2.23125,1.75 0,0.875 -0.6125,1.3125 -0.56875,0.39375 -1.61875,0.39375 l -5.99375,0 q -5.73125,0 -5.73125,2.14375 l 0,1.925 q 0,1.79375 5.6875,1.79375 l 9.0125,0 q 9.7125,0 9.7125,4.4625 l 0,2.58125 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:43.75px;font-family:'Neuropol X';-inkscape-font-specification:'Neuropol X';text-align:start;letter-spacing:5px;word-spacing:0px;text-anchor:start;fill:#263238;fill-opacity:1"
id="path3434" />
<path
d="m -241.91709,631.64323 q -9.3625,0 -9.3625,-5.81875 l 0,-2.49375 q 0,-5.775 9.3625,-5.775 l 18.59375,0 0,-0.65625 q 0,-3.0625 -5.38125,-3.0625 l -6.16875,0 q -2.1875,0 -2.1875,-1.70625 0,-1.75 2.1875,-1.75 l 6.16875,0 q 9.93125,0 9.93125,6.51875 l 0,8.575 q 0,6.16875 -9.5375,6.16875 l -13.60625,0 z m 13.34375,-3.4125 q 5.25,0 5.25,-2.8875 l 0,-4.76875 -18.24375,0 q -5.11875,0 -5.11875,2.66875 l 0,2.275 q 0,2.7125 5.11875,2.7125 l 12.99375,0 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:43.75px;font-family:'Neuropol X';-inkscape-font-specification:'Neuropol X';text-align:start;letter-spacing:5px;word-spacing:0px;text-anchor:start;fill:#263238;fill-opacity:1"
id="path3436" />
<path
d="m -205.62285,617.33698 q 0,-6.95625 11.2875,-6.95625 l 3.36875,0 q 2.23125,0 2.23125,1.79375 0,1.79375 -2.23125,1.79375 l -3.54375,0 q -6.475,0 -6.475,3.28125 l 0,12.775 q 0,1.8375 -2.31875,1.8375 -2.31875,0 -2.31875,-1.8375 l 0,-12.6875 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:43.75px;font-family:'Neuropol X';-inkscape-font-specification:'Neuropol X';text-align:start;letter-spacing:5px;word-spacing:0px;text-anchor:start;fill:#263238;fill-opacity:1"
id="path3438" />
</g>
</g>
</g>
</g>
<g
id="g5443-0-1-5-1-9"
transform="matrix(0.55595317,0,0,0.55595317,-521.93484,-328.66104)"
inkscape:export-filename="/home/emanuele/Desktop/logo1.png"
inkscape:export-xdpi="44.860481"
inkscape:export-ydpi="44.860481">
<g
inkscape:export-ydpi="3.4165223"
inkscape:export-xdpi="3.4165223"
transform="matrix(0.09527033,0,0,0.09527033,-1695.2716,706.62921)"
id="g8856-6-1-1-9-0-1-9">
<circle
r="1485"
cy="-1361.2571"
cx="8317.3574"
id="circle8858-1-3-7-6-5-3-0"
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:50;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:export-xdpi="10.031387"
inkscape:export-ydpi="10.031387" />
<path
inkscape:export-ydpi="10.031387"
inkscape:export-xdpi="10.031387"
style="opacity:1;fill:#263238;fill-opacity:1;stroke:none;stroke-width:10;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 8560.3823,-1361.3029 a 242.947,242.947 0 0 1 -242.947,242.948 242.947,242.947 0 0 1 -242.947,-242.948 242.947,242.947 0 0 1 242.947,-242.946 242.947,242.947 0 0 1 242.947,242.946 z"
id="path8860-5-4-8-2-9-0-9"
inkscape:connector-curvature="0" />
<path
id="path8862-5-5-9-1-3-6-3"
d="m 9395.8755,-1984.028 a 1245.372,1245.372 0 0 0 -190.8415,-249.4971 l -280.8618,162.1556 c -87.542,-74.7796 -187.0349,-132.0588 -293.2407,-169.9527 -95.8868,97.1766 -172.0602,205.7604 -226.9672,323.8487 312.6411,-21.2772 635.5313,91.8725 935.2898,326.0721 l 176.7612,-102.0532 a 1245.372,1245.372 0 0 0 -120.1398,-290.5734 z"
clip-path="none"
mask="none"
style="fill:#1976d2;fill-opacity:1"
inkscape:connector-curvature="0"
inkscape:transform-center-x="-514.04855"
inkscape:transform-center-y="-444.04649" />
<path
inkscape:transform-center-y="265.80217"
inkscape:transform-center-x="-689.63727"
inkscape:connector-curvature="0"
style="fill:#42a5f5;fill-opacity:1"
mask="none"
clip-path="none"
d="m 9395.9474,-738.70387 a 1245.372,1245.372 0 0 0 120.6501,-290.02213 l -280.8618,-162.1557 c 20.99,-113.2034 20.8488,-228.0063 0.563,-338.9302 -132.1008,-34.4521 -264.2238,-46.1283 -393.9448,-34.635 174.7471,260.1165 238.2017,596.32248 185.2582,973.02076 l 176.7612,102.05309 a 1245.372,1245.372 0 0 0 191.5741,-249.33082 z"
id="path8864-4-8-1-2-4-4-4" />
<path
id="path8866-7-5-5-0-6-4-7"
d="m 8317.501,-115.97954 a 1245.372,1245.372 0 0 0 311.4916,-40.52501 l 0,-324.31131 c 108.5321,-38.42382 207.8837,-95.94755 293.8037,-168.97752 -36.214,-131.6287 -92.1636,-251.88868 -166.9776,-358.48372 -137.894,281.39369 -397.3296,504.44998 -750.0316,646.9487 l 0,204.10623 a 1245.372,1245.372 0 0 0 311.7139,41.24263 z"
clip-path="none"
mask="none"
style="fill:#1976d2;fill-opacity:1"
inkscape:connector-curvature="0"
inkscape:transform-center-x="-117.49007"
inkscape:transform-center-y="639.34029" />
<path
inkscape:transform-center-y="444.04652"
inkscape:transform-center-x="514.04857"
inkscape:connector-curvature="0"
style="fill:#42a5f5;fill-opacity:1"
mask="none"
clip-path="none"
d="m 7238.9827,-738.57936 a 1245.372,1245.372 0 0 0 190.8415,249.49714 l 280.8618,-162.15566 c 87.5421,74.77965 187.0349,132.05879 293.2407,169.95271 95.8868,-97.17659 172.0602,-205.76036 226.9672,-323.8487 -312.6411,21.27714 -635.5313,-91.87254 -935.2898,-326.07203 l -176.7612,102.0531 a 1245.372,1245.372 0 0 0 120.1398,290.57344 z"
id="path8868-6-7-4-7-2-7-3" />
<path
id="path8870-5-3-9-3-5-5-1"
d="m 7238.9108,-1983.9035 a 1245.372,1245.372 0 0 0 -120.6501,290.0221 l 280.8618,162.1557 c -20.99,113.2035 -20.8488,228.0063 -0.563,338.9302 132.1008,34.4521 264.2238,46.1283 393.9448,34.635 -174.7471,-260.1165 -238.2017,-596.3225 -185.2582,-973.0207 l -176.7612,-102.0532 a 1245.372,1245.372 0 0 0 -191.5741,249.3309 z"
clip-path="none"
mask="none"
style="fill:#1976d2;fill-opacity:1"
inkscape:connector-curvature="0"
inkscape:transform-center-x="689.63729"
inkscape:transform-center-y="-265.80221" />
<path
inkscape:transform-center-y="-639.34032"
inkscape:transform-center-x="117.49005"
inkscape:connector-curvature="0"
style="fill:#42a5f5;fill-opacity:1"
mask="none"
clip-path="none"
d="m 8317.3572,-2606.6279 a 1245.372,1245.372 0 0 0 -311.4915,40.525 l -1e-4,324.3113 c -108.5321,38.4239 -207.8837,95.9476 -293.8037,168.9776 36.214,131.6287 92.1637,251.8886 166.9776,358.4837 137.894,-281.3937 397.3296,-504.45 750.0316,-646.9487 l 1e-4,-204.1063 a 1245.372,1245.372 0 0 0 -311.714,-41.2426 z"
id="path8872-6-3-2-1-3-3-7" />
</g>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 13 KiB

View File

@ -1,41 +0,0 @@
<!DOCTYPE html>
<<<<<<< HEAD
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<h1>Hello World</h1>
</body>
<div id=app>2</div> <!--Vue js muss App heißen-->
</html>
=======
<html>
<head><title>labswp_2019_sose_geocaching_frontend</title>
<meta charset=utf-8>
<meta name=description content="BuGa Geocaching SPA">
<meta name=format-detection content="telephone=no">
<meta name=msapplication-tap-highlight content=no>
<meta name=viewport content="user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1,width=device-width">
<link rel=icon href=statics/quasar-logo.png type=image/x-icon>
<link rel=icon type=image/png sizes=32x32 href=statics/icons/favicon-32x32.png>
<link rel=icon type=image/png sizes=16x16 href=statics/icons/favicon-16x16.png>
<link href=js/2d22c0ff.78e9d3d9.js rel=prefetch>
<link href=js/461a5054.17143146.js rel=prefetch>
<link href=js/4b47640d.0b855adf.js rel=prefetch>
<link href=css/app.29c0a2bd.css rel=preload as=style>
<link href=js/app.1b4a01bf.js rel=preload as=script>
<link href=js/runtime.bf83edfa.js rel=preload as=script>
<link href=js/vendor.9feacb96.js rel=preload as=script>
<link href=css/app.29c0a2bd.css rel=stylesheet>
</head>
<body>
<div id=q-app></div>
<script type=text/javascript src=js/app.1b4a01bf.js></script>
<script type=text/javascript src=js/runtime.bf83edfa.js></script>
<script type=text/javascript src=js/vendor.9feacb96.js></script>
</body>
</html>
>>>>>>> frontend/timo

View File

@ -1 +0,0 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["2d22c0ff"],{f241:function(t,a,e){"use strict";e.r(a);var r=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("q-layout",{attrs:{view:"lHh Lpr lFf"}},[e("q-header",{staticClass:"glossy",attrs:{elevated:""}},[e("q-toolbar",[e("q-btn",{attrs:{flat:"",dense:"",round:"","aria-label":"Menu"},on:{click:function(a){t.leftDrawerOpen=!t.leftDrawerOpen}}},[e("q-icon",{attrs:{name:"menu"}})],1),e("q-toolbar-title",[t._v("\n Quasar App\n ")]),e("div",[t._v("Quasar v"+t._s(t.$q.version))])],1)],1),e("q-drawer",{attrs:{bordered:"","content-class":"bg-grey-2"},model:{value:t.leftDrawerOpen,callback:function(a){t.leftDrawerOpen=a},expression:"leftDrawerOpen"}},[e("q-list",[e("q-item-label",{attrs:{header:""}},[t._v("Essential Links")]),e("q-item",{attrs:{clickable:"",tag:"a",target:"_blank",href:"http://v1.quasar-framework.org"}},[e("q-item-section",{attrs:{avatar:""}},[e("q-icon",{attrs:{name:"school"}})],1),e("q-item-section",[e("q-item-label",[t._v("Docs")]),e("q-item-label",{attrs:{caption:""}},[t._v("v1.quasar-framework.org")])],1)],1),e("q-item",{attrs:{clickable:"",tag:"a",target:"_blank",href:"https://github.com/quasarframework/"}},[e("q-item-section",{attrs:{avatar:""}},[e("q-icon",{attrs:{name:"code"}})],1),e("q-item-section",[e("q-item-label",[t._v("Github")]),e("q-item-label",{attrs:{caption:""}},[t._v("github.com/quasarframework")])],1)],1),e("q-item",{attrs:{clickable:"",tag:"a",target:"_blank",href:"http://chat.quasar-framework.org"}},[e("q-item-section",{attrs:{avatar:""}},[e("q-icon",{attrs:{name:"chat"}})],1),e("q-item-section",[e("q-item-label",[t._v("Discord Chat Channel")]),e("q-item-label",{attrs:{caption:""}},[t._v("chat.quasar-framework.org")])],1)],1),e("q-item",{attrs:{clickable:"",tag:"a",target:"_blank",href:"https://forum.quasar-framework.org"}},[e("q-item-section",{attrs:{avatar:""}},[e("q-icon",{attrs:{name:"record_voice_over"}})],1),e("q-item-section",[e("q-item-label",[t._v("Forum")]),e("q-item-label",{attrs:{caption:""}},[t._v("forum.quasar-framework.org")])],1)],1),e("q-item",{attrs:{clickable:"",tag:"a",target:"_blank",href:"https://twitter.com/quasarframework"}},[e("q-item-section",{attrs:{avatar:""}},[e("q-icon",{attrs:{name:"rss_feed"}})],1),e("q-item-section",[e("q-item-label",[t._v("Twitter")]),e("q-item-label",{attrs:{caption:""}},[t._v("@quasarframework")])],1)],1)],1)],1),e("q-page-container",[e("router-view")],1)],1)},o=[],i=e("0967"),n=e("2b0e"),s=function(t,a){var e=window.open;if(!0===i["a"].is.cordova){if(void 0!==cordova&&void 0!==cordova.InAppBrowser&&void 0!==cordova.InAppBrowser.open)e=cordova.InAppBrowser.open;else if(void 0!==navigator&&void 0!==navigator.app)return navigator.app.loadUrl(t,{openExternal:!0})}else if(void 0!==n["a"].prototype.$q.electron)return n["a"].prototype.$q.electron.shell.openExternal(t);var r=e(t,"_blank");if(r)return r.focus(),r;a&&a()},l={name:"MyLayout",data:function(){return{leftDrawerOpen:this.$q.platform.is.desktop}},methods:{openURL:s}},c=l,m=e("2877"),q=Object(m["a"])(c,r,o,!1,null,null,null);a["default"]=q.exports}}]);

View File

@ -1 +0,0 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["461a5054"],{"8b24":function(e,a,t){"use strict";t.r(a);var n=function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("q-page",{staticClass:"flex flex-center"},[n("img",{attrs:{alt:"Quasar logo",src:t("d3d6")}})])},l=[],s={name:"PageIndex"},r=s,c=t("2877"),o=Object(c["a"])(r,n,l,!1,null,null,null);a["default"]=o.exports},d3d6:function(e,a,t){e.exports=t.p+"img/quasar-logo-full.c3e88651.svg"}}]);

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["app"],{0:function(e,n,r){e.exports=r("2f39")},"1b68":function(e,n,r){},"2f39":function(e,n,r){"use strict";r.r(n);var t=r("a34a"),a=r.n(t),o=(r("96cf"),r("c973")),u=r.n(o),c=(r("7d6e"),r("e54f"),r("1b68"),r("7e6d"),r("2b0e")),i=r("b05d"),s=r("4d5a"),p=r("9898"),f=r("f2cc"),l=r("c7a0"),b=r("2ea3"),d=r("65c6"),h=r("6ac5"),v=r("9c40"),w=r("0016"),m=r("497d"),Q=r("6ab5"),x=r("033f"),y=r("e208"),k=r("714f"),g=r("2a19");c["a"].use(i["a"],{config:{},components:{QLayout:s["a"],QHeader:p["a"],QDrawer:f["a"],QPageContainer:l["a"],QPage:b["a"],QToolbar:d["a"],QToolbarTitle:h["a"],QBtn:v["a"],QIcon:w["a"],QList:m["a"],QItem:Q["a"],QItemSection:x["a"],QItemLabel:y["a"]},directives:{Ripple:k["a"]},plugins:{Notify:g["a"]}});var I=function(){var e=this,n=e.$createElement,r=e._self._c||n;return r("div",{attrs:{id:"q-app"}},[r("router-view")],1)},L=[],T={name:"App"},$=T,q=r("2877"),B=Object(q["a"])($,I,L,!1,null,null,null),C=B.exports,J=r("2f62");c["a"].use(J["a"]);var P=function(){var e=new J["a"].Store({modules:{},strict:!1});return e},S=r("8c4f"),V=[{path:"/",component:function(){return r.e("2d22c0ff").then(r.bind(null,"f241"))},children:[{path:"",component:function(){return r.e("461a5054").then(r.bind(null,"8b24"))}}]}];V.push({path:"*",component:function(){return r.e("4b47640d").then(r.bind(null,"e51e"))}});var _=V;c["a"].use(S["a"]);var j=function(){var e=new S["a"]({scrollBehavior:function(){return{x:0,y:0}},routes:_,mode:"hash",base:""});return e},A=function(){var e="function"===typeof P?P():P,n="function"===typeof j?j({store:e}):j;e.$router=n;var r={el:"#q-app",router:n,store:e,render:function(e){return e(C)}};return{app:r,store:e,router:n}},D=r("bc3a"),E=r.n(D),H=function(){var e=u()(a.a.mark(function e(n){var r;return a.a.wrap(function(e){while(1)switch(e.prev=e.next){case 0:r=n.Vue,r.prototype.$axios=E.a;case 2:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),N=A(),O=N.app,R=N.store,z=N.router;function F(){return G.apply(this,arguments)}function G(){return G=u()(a.a.mark(function e(){var n,r;return a.a.wrap(function(e){while(1)switch(e.prev=e.next){case 0:n=[H],r=0;case 2:if(!(r<n.length)){e.next=18;break}return e.prev=3,e.next=6,n[r]({app:O,router:z,store:R,Vue:c["a"],ssrContext:null});case 6:e.next=15;break;case 8:if(e.prev=8,e.t0=e["catch"](3),!e.t0||!e.t0.url){e.next=13;break}return window.location.href=e.t0.url,e.abrupt("return");case 13:return console.error("[Quasar] boot error:",e.t0),e.abrupt("return");case 15:r++,e.next=2;break;case 18:new c["a"](O);case 19:case"end":return e.stop()}},e,null,[[3,8]])})),G.apply(this,arguments)}F()},"7e6d":function(e,n,r){}},[[0,"runtime","vendor"]]]);

View File

@ -1 +0,0 @@
(function(e){function r(r){for(var n,i,a=r[0],c=r[1],f=r[2],l=0,s=[];l<a.length;l++)i=a[l],o[i]&&s.push(o[i][0]),o[i]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);p&&p(r);while(s.length)s.shift()();return u.push.apply(u,f||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++){var c=t[i];0!==o[c]&&(n=!1)}n&&(u.splice(r--,1),e=a(a.s=t[0]))}return e}var n={},o={runtime:0},u=[];function i(e){return a.p+"js/"+({}[e]||e)+"."+{"2d22c0ff":"78e9d3d9","461a5054":"17143146","4b47640d":"0b855adf"}[e]+".js"}function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise(function(r,n){t=o[e]=[r,n]});r.push(t[2]=n);var u,c=document.createElement("script");c.charset="utf-8",c.timeout=120,a.nc&&c.setAttribute("nonce",a.nc),c.src=i(e),u=function(r){c.onerror=c.onload=null,clearTimeout(f);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src,i=new Error("Loading chunk "+e+" failed.\n("+n+": "+u+")");i.type=n,i.request=u,t[1](i)}o[e]=void 0}};var f=setTimeout(function(){u({type:"timeout",target:c})},12e4);c.onerror=c.onload=u,document.head.appendChild(c)}return Promise.all(r)},a.m=e,a.c=n,a.d=function(e,r,t){a.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},a.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,r){if(1&r&&(e=a(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)a.d(t,n,function(r){return e[r]}.bind(null,n));return t},a.n=function(e){var r=e&&e.__esModule?function(){return e["default"]}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="",a.oe=function(e){throw console.error(e),e};var c=window["webpackJsonp"]=window["webpackJsonp"]||[],f=c.push.bind(c);c.push=r,c=c.slice();for(var l=0;l<c.length;l++)r(c[l]);var p=f;t()})([]);

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB