Merge remote-tracking branch 'origin/develop' into BETTERZON-52

# Conflicts:
#	Frontend/angular.json
#	Frontend/package-lock.json
#	Frontend/package.json
#	Frontend/src/app/app.module.ts
#	Frontend/src/index.html
This commit is contained in:
Patrick Müller 2021-04-08 10:52:52 +02:00
commit e0f1724d95
10 changed files with 30301 additions and 30100 deletions

View File

@ -1,8 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="FacetManager">
<facet type="Python" name="Python">
<configuration sdkName="Python 3.9 (venv)" />
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Python 3.9 (venv) interpreter library" level="application" />
</component>
</module>

20
Crawler/Dockerfile Normal file
View File

@ -0,0 +1,20 @@
# Base image
FROM python
# Create directories and copy files
RUN echo 'Creating directory and copying files'
RUN mkdir /crawler
ADD . /crawler
WORKDIR /crawler
# Install dependencies
RUN echo 'Installing dependencies'
RUN pip install -r requirements.txt
# Expose ports
RUN echo 'Exposing ports'
EXPOSE 22026
# Start API
RUN echo 'Starting API'
CMD ["python3", "api.py"]

16
Crawler/api.py Normal file
View File

@ -0,0 +1,16 @@
from flask import Flask
from flask_restful import Resource, Api
app = Flask(__name__)
api = Api(app)
class CrawlerApi(Resource):
def get(self):
return {'Hallo': 'Betterzon'}
api.add_resource(CrawlerApi, '/')
if __name__ == '__main__':
app.run(host='0.0.0.0', port=22026)

View File

@ -1 +1,4 @@
pymysql
flask
flask-sqlalchemy
flask_restful

View File

@ -25,9 +25,12 @@
],
"styles": [
"./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css",
"src/styles.css"
"src/styles.css",
"./node_modules/cookieconsent/build/cookieconsent.min.css"
],
"scripts": []
"scripts": [
"./node_modules/cookieconsent/build/cookieconsent.min.js"
]
},
"configurations": {
"production": {
@ -90,9 +93,12 @@
],
"styles": [
"./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css",
"src/styles.css"
"src/styles.css",
"./node_modules/cookieconsent/build/cookieconsent.min.css"
],
"scripts": []
"scripts": [
"./node_modules/cookieconsent/build/cookieconsent.min.js"
]
}
},
"lint": {
@ -121,7 +127,6 @@
}
}
}
}
},
}},
"defaultProject": "Betterzon"
}

View File

@ -20,8 +20,10 @@
"@angular/platform-browser-dynamic": "^10.2.3",
"@angular/router": "^10.2.3",
"apexcharts": "^3.22.3",
"cookieconsent": "^3.1.1",
"ng": "0.0.0",
"ng-apexcharts": "^1.5.6",
"ngx-cookieconsent": "^2.2.3",
"rxjs": "~6.6.0",
"tslib": "^2.0.3",
"zone.js": "~0.10.2"
@ -342,24 +344,24 @@
}
},
"node_modules/@angular-devkit/schematics": {
"version": "10.2.3",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-10.2.3.tgz",
"integrity": "sha512-uCNeq5qH4QEiftgOud+EhTVvdriYQVBrYmX4f4BjVHkjnFhm73h30nfAgs6YuStIp8oxSI8jUGE9DAy331xvmA==",
"version": "10.2.1",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-10.2.1.tgz",
"integrity": "sha512-0oMhB1eM7hg5Xf4U7r193zrNTGyxfzl2okBsLJPuVmkb3KCBGQOyHYmU5HjDNadPc5iCFc+Xo2+DSDvXGuLmaA==",
"dependencies": {
"@angular-devkit/core": "10.2.3",
"@angular-devkit/core": "10.2.1",
"ora": "5.0.0",
"rxjs": "6.6.2"
},
"engines": {
"node": ">= 10.13.0",
"npm": "^6.11.0 || ^7.5.6",
"npm": ">= 6.11.0",
"yarn": ">= 1.13.0"
}
},
"node_modules/@angular-devkit/schematics/node_modules/@angular-devkit/core": {
"version": "10.2.3",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-10.2.3.tgz",
"integrity": "sha512-pMM1v9Xjqx6YLOQxQYs0D+03H6XPDZLS8cyEtoQX2iYdh8qlKHZVbJa2WsfzwMoIPtgcXfQAXn113VEgrQPLFA==",
"version": "10.2.1",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-10.2.1.tgz",
"integrity": "sha512-dzlF9Gl7KNt9sPYT2HYq6ySZYwKzkyYR5mrBj3DZOD0OQsoc21LvLkWAHNSL2iYGdHJQS1oJDNs8iRYxYIOY3w==",
"dependencies": {
"ajv": "6.12.4",
"fast-json-stable-stringify": "2.1.0",
@ -369,7 +371,7 @@
},
"engines": {
"node": ">= 10.13.0",
"npm": "^6.11.0 || ^7.5.6",
"npm": ">= 6.11.0",
"yarn": ">= 1.13.0"
}
},
@ -406,6 +408,10 @@
},
"optionalDependencies": {
"parse5": "^5.0.0"
},
"peerDependencies": {
"@angular/common": "^10.0.0 || ^11.0.0-0",
"@angular/core": "^10.0.0 || ^11.0.0-0"
}
},
"node_modules/@angular/cdk/node_modules/parse5": {
@ -415,16 +421,16 @@
"optional": true
},
"node_modules/@angular/cli": {
"version": "10.2.3",
"resolved": "https://registry.npmjs.org/@angular/cli/-/cli-10.2.3.tgz",
"integrity": "sha512-LLt0AUgLpmaoWA1R7tnUxbJDNs37+WogjNCbNLfvf4YHI04PwKx3OXgx0d8IYNtjHEaGmGp9AQRynvQ2qfXkaA==",
"version": "10.2.1",
"resolved": "https://registry.npmjs.org/@angular/cli/-/cli-10.2.1.tgz",
"integrity": "sha512-9u/IVZqESiNX7qsLDW31MPBFUJUqvc+zqq+ekEtjRopq32RQpAGFWfvRZCR6GyJd06gzUWcYeYKkpl1XFNBXUg==",
"hasInstallScript": true,
"dependencies": {
"@angular-devkit/architect": "0.1002.3",
"@angular-devkit/core": "10.2.3",
"@angular-devkit/schematics": "10.2.3",
"@schematics/angular": "10.2.3",
"@schematics/update": "0.1002.3",
"@angular-devkit/architect": "0.1002.1",
"@angular-devkit/core": "10.2.1",
"@angular-devkit/schematics": "10.2.1",
"@schematics/angular": "10.2.1",
"@schematics/update": "0.1002.1",
"@yarnpkg/lockfile": "1.1.0",
"ansi-colors": "4.1.1",
"debug": "4.1.1",
@ -446,28 +452,28 @@
},
"engines": {
"node": ">= 10.13.0",
"npm": "^6.11.0 || ^7.5.6",
"npm": ">= 6.11.0",
"yarn": ">= 1.13.0"
}
},
"node_modules/@angular/cli/node_modules/@angular-devkit/architect": {
"version": "0.1002.3",
"resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1002.3.tgz",
"integrity": "sha512-7ainXRNO1njZ6bBbJXGpMzCh0OYrzuIRe/+zRj0ncV1YfEsJb2yWBuiza0+y2Ljco7hdd4wr+7eJm7cfn+NvAw==",
"version": "0.1002.1",
"resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1002.1.tgz",
"integrity": "sha512-vP27xCe++p3zm+zwSDXDm9/rsM71Q4MYidLLi0MQfo8wxsWS/4mWXycCBoMwDkvW44SPJ4Ds1/F46bb3/xRDvA==",
"dependencies": {
"@angular-devkit/core": "10.2.3",
"@angular-devkit/core": "10.2.1",
"rxjs": "6.6.2"
},
"engines": {
"node": ">= 10.13.0",
"npm": "^6.11.0 || ^7.5.6",
"npm": ">= 6.11.0",
"yarn": ">= 1.13.0"
}
},
"node_modules/@angular/cli/node_modules/@angular-devkit/core": {
"version": "10.2.3",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-10.2.3.tgz",
"integrity": "sha512-pMM1v9Xjqx6YLOQxQYs0D+03H6XPDZLS8cyEtoQX2iYdh8qlKHZVbJa2WsfzwMoIPtgcXfQAXn113VEgrQPLFA==",
"version": "10.2.1",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-10.2.1.tgz",
"integrity": "sha512-dzlF9Gl7KNt9sPYT2HYq6ySZYwKzkyYR5mrBj3DZOD0OQsoc21LvLkWAHNSL2iYGdHJQS1oJDNs8iRYxYIOY3w==",
"dependencies": {
"ajv": "6.12.4",
"fast-json-stable-stringify": "2.1.0",
@ -477,7 +483,7 @@
},
"engines": {
"node": ">= 10.13.0",
"npm": "^6.11.0 || ^7.5.6",
"npm": ">= 6.11.0",
"yarn": ">= 1.13.0"
}
},
@ -794,6 +800,13 @@
"integrity": "sha512-uk6JkRrKHaM9VFMzX7pWC83YNLVgXPB3D8U1yjSOafCdWwrRZgUHGr8MPlSILCr3o2nxgg5SsKdWcWwHuXXUZA==",
"dependencies": {
"tslib": "^2.0.0"
},
"peerDependencies": {
"@angular/animations": "^10.0.0 || ^11.0.0-0",
"@angular/cdk": "10.2.7",
"@angular/common": "^10.0.0 || ^11.0.0-0",
"@angular/core": "^10.0.0 || ^11.0.0-0",
"@angular/forms": "^10.0.0 || ^11.0.0-0"
}
},
"node_modules/@angular/platform-browser": {
@ -2010,24 +2023,24 @@
}
},
"node_modules/@schematics/angular": {
"version": "10.2.3",
"resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-10.2.3.tgz",
"integrity": "sha512-xcnfH5XMmGcs33VHm2cu0+4g3rkfSD+qpiKFjfg7KGC4lLoOKSED4ZnjzIYwcQ6QN4gTpAvlZKxI8zO7NkKv0A==",
"version": "10.2.1",
"resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-10.2.1.tgz",
"integrity": "sha512-hmhZ6zPJshP1ATYc/EzJPwaFas0D+T6eeWEFyHAgIV2GmNdJNyBdKHQtizGRQBpfWvBdI4/krvX+a71VnkU8oA==",
"dependencies": {
"@angular-devkit/core": "10.2.3",
"@angular-devkit/schematics": "10.2.3",
"@angular-devkit/core": "10.2.1",
"@angular-devkit/schematics": "10.2.1",
"jsonc-parser": "2.3.0"
},
"engines": {
"node": ">= 10.13.0",
"npm": "^6.11.0 || ^7.5.6",
"npm": ">= 6.11.0",
"yarn": ">= 1.13.0"
}
},
"node_modules/@schematics/angular/node_modules/@angular-devkit/core": {
"version": "10.2.3",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-10.2.3.tgz",
"integrity": "sha512-pMM1v9Xjqx6YLOQxQYs0D+03H6XPDZLS8cyEtoQX2iYdh8qlKHZVbJa2WsfzwMoIPtgcXfQAXn113VEgrQPLFA==",
"version": "10.2.1",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-10.2.1.tgz",
"integrity": "sha512-dzlF9Gl7KNt9sPYT2HYq6ySZYwKzkyYR5mrBj3DZOD0OQsoc21LvLkWAHNSL2iYGdHJQS1oJDNs8iRYxYIOY3w==",
"dependencies": {
"ajv": "6.12.4",
"fast-json-stable-stringify": "2.1.0",
@ -2037,7 +2050,7 @@
},
"engines": {
"node": ">= 10.13.0",
"npm": "^6.11.0 || ^7.5.6",
"npm": ">= 6.11.0",
"yarn": ">= 1.13.0"
}
},
@ -2058,12 +2071,12 @@
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
},
"node_modules/@schematics/update": {
"version": "0.1002.3",
"resolved": "https://registry.npmjs.org/@schematics/update/-/update-0.1002.3.tgz",
"integrity": "sha512-UnuMgRQtAOp/Pk9rSYW12medajXe9s5mW4a6foixC/B2UCFFlIAVbFBTiFpr69xbalfLlFcFx1MD+8/8njWtbQ==",
"version": "0.1002.1",
"resolved": "https://registry.npmjs.org/@schematics/update/-/update-0.1002.1.tgz",
"integrity": "sha512-RbC01VKb9q7Db5rpbrQLBOVkIzv3TPWMjRUSgg/LlLFEDVO3LPn5nX9bYnb6E0HeIqUW+zAU5Qaz9ob/Py06LA==",
"dependencies": {
"@angular-devkit/core": "10.2.3",
"@angular-devkit/schematics": "10.2.3",
"@angular-devkit/core": "10.2.1",
"@angular-devkit/schematics": "10.2.1",
"@yarnpkg/lockfile": "1.1.0",
"ini": "1.3.6",
"npm-package-arg": "^8.0.0",
@ -2073,14 +2086,14 @@
},
"engines": {
"node": ">= 10.13.0",
"npm": "^6.11.0 || ^7.5.6",
"npm": ">= 6.11.0",
"yarn": ">= 1.13.0"
}
},
"node_modules/@schematics/update/node_modules/@angular-devkit/core": {
"version": "10.2.3",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-10.2.3.tgz",
"integrity": "sha512-pMM1v9Xjqx6YLOQxQYs0D+03H6XPDZLS8cyEtoQX2iYdh8qlKHZVbJa2WsfzwMoIPtgcXfQAXn113VEgrQPLFA==",
"version": "10.2.1",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-10.2.1.tgz",
"integrity": "sha512-dzlF9Gl7KNt9sPYT2HYq6ySZYwKzkyYR5mrBj3DZOD0OQsoc21LvLkWAHNSL2iYGdHJQS1oJDNs8iRYxYIOY3w==",
"dependencies": {
"ajv": "6.12.4",
"fast-json-stable-stringify": "2.1.0",
@ -2090,7 +2103,7 @@
},
"engines": {
"node": ">= 10.13.0",
"npm": "^6.11.0 || ^7.5.6",
"npm": ">= 6.11.0",
"yarn": ">= 1.13.0"
}
},
@ -4068,6 +4081,11 @@
"integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=",
"dev": true
},
"node_modules/cookieconsent": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/cookieconsent/-/cookieconsent-3.1.1.tgz",
"integrity": "sha512-v8JWLJcI7Zs9NWrs8hiVldVtm3EBF70TJI231vxn6YToBGj0c9dvdnYwltydkAnrbBMOM/qX1xLFrnTfm5wTag=="
},
"node_modules/copy-concurrently": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz",
@ -6251,6 +6269,7 @@
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
"dev": true,
"hasInstallScript": true,
"optional": true,
"os": [
"darwin"
@ -9227,6 +9246,16 @@
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
},
"node_modules/ngx-cookieconsent": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/ngx-cookieconsent/-/ngx-cookieconsent-2.2.3.tgz",
"integrity": "sha512-vg7M4XZSTFRAQq20M0YVJdz5OkXIu0t0MSYos0vvu7oblaEivQstA1Mg5bO7OJYp+oFoTEefWhvO2nCiyHn9SQ==",
"peerDependencies": {
"@angular/common": ">=6.0.0",
"@angular/core": ">=6.0.0",
"cookieconsent": ">=3.1.0"
}
},
"node_modules/nice-try": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
@ -13536,6 +13565,11 @@
"safer-buffer": "^2.0.2",
"tweetnacl": "~0.14.0"
},
"bin": {
"sshpk-conv": "bin/sshpk-conv",
"sshpk-sign": "bin/sshpk-sign",
"sshpk-verify": "bin/sshpk-verify"
},
"engines": {
"node": ">=0.10.0"
}
@ -16174,9 +16208,12 @@
}
},
"node_modules/y18n": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz",
"integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ=="
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.2.tgz",
"integrity": "sha512-DnBDwcL54b5xWMM/7RfFg4xs5amYxq2ot49aUfLjQSAracXkGvlZq0txzqr3Pa6Q0ayuCxBcwTzrPUScKY0O8w==",
"engines": {
"node": ">=10"
}
},
"node_modules/yallist": {
"version": "4.0.0",
@ -16499,19 +16536,19 @@
}
},
"@angular-devkit/schematics": {
"version": "10.2.3",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-10.2.3.tgz",
"integrity": "sha512-uCNeq5qH4QEiftgOud+EhTVvdriYQVBrYmX4f4BjVHkjnFhm73h30nfAgs6YuStIp8oxSI8jUGE9DAy331xvmA==",
"version": "10.2.1",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-10.2.1.tgz",
"integrity": "sha512-0oMhB1eM7hg5Xf4U7r193zrNTGyxfzl2okBsLJPuVmkb3KCBGQOyHYmU5HjDNadPc5iCFc+Xo2+DSDvXGuLmaA==",
"requires": {
"@angular-devkit/core": "10.2.3",
"@angular-devkit/core": "10.2.1",
"ora": "5.0.0",
"rxjs": "6.6.2"
},
"dependencies": {
"@angular-devkit/core": {
"version": "10.2.3",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-10.2.3.tgz",
"integrity": "sha512-pMM1v9Xjqx6YLOQxQYs0D+03H6XPDZLS8cyEtoQX2iYdh8qlKHZVbJa2WsfzwMoIPtgcXfQAXn113VEgrQPLFA==",
"version": "10.2.1",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-10.2.1.tgz",
"integrity": "sha512-dzlF9Gl7KNt9sPYT2HYq6ySZYwKzkyYR5mrBj3DZOD0OQsoc21LvLkWAHNSL2iYGdHJQS1oJDNs8iRYxYIOY3w==",
"requires": {
"ajv": "6.12.4",
"fast-json-stable-stringify": "2.1.0",
@ -16561,15 +16598,15 @@
}
},
"@angular/cli": {
"version": "10.2.3",
"resolved": "https://registry.npmjs.org/@angular/cli/-/cli-10.2.3.tgz",
"integrity": "sha512-LLt0AUgLpmaoWA1R7tnUxbJDNs37+WogjNCbNLfvf4YHI04PwKx3OXgx0d8IYNtjHEaGmGp9AQRynvQ2qfXkaA==",
"version": "10.2.1",
"resolved": "https://registry.npmjs.org/@angular/cli/-/cli-10.2.1.tgz",
"integrity": "sha512-9u/IVZqESiNX7qsLDW31MPBFUJUqvc+zqq+ekEtjRopq32RQpAGFWfvRZCR6GyJd06gzUWcYeYKkpl1XFNBXUg==",
"requires": {
"@angular-devkit/architect": "0.1002.3",
"@angular-devkit/core": "10.2.3",
"@angular-devkit/schematics": "10.2.3",
"@schematics/angular": "10.2.3",
"@schematics/update": "0.1002.3",
"@angular-devkit/architect": "0.1002.1",
"@angular-devkit/core": "10.2.1",
"@angular-devkit/schematics": "10.2.1",
"@schematics/angular": "10.2.1",
"@schematics/update": "0.1002.1",
"@yarnpkg/lockfile": "1.1.0",
"ansi-colors": "4.1.1",
"debug": "4.1.1",
@ -16588,18 +16625,18 @@
},
"dependencies": {
"@angular-devkit/architect": {
"version": "0.1002.3",
"resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1002.3.tgz",
"integrity": "sha512-7ainXRNO1njZ6bBbJXGpMzCh0OYrzuIRe/+zRj0ncV1YfEsJb2yWBuiza0+y2Ljco7hdd4wr+7eJm7cfn+NvAw==",
"version": "0.1002.1",
"resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1002.1.tgz",
"integrity": "sha512-vP27xCe++p3zm+zwSDXDm9/rsM71Q4MYidLLi0MQfo8wxsWS/4mWXycCBoMwDkvW44SPJ4Ds1/F46bb3/xRDvA==",
"requires": {
"@angular-devkit/core": "10.2.3",
"@angular-devkit/core": "10.2.1",
"rxjs": "6.6.2"
}
},
"@angular-devkit/core": {
"version": "10.2.3",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-10.2.3.tgz",
"integrity": "sha512-pMM1v9Xjqx6YLOQxQYs0D+03H6XPDZLS8cyEtoQX2iYdh8qlKHZVbJa2WsfzwMoIPtgcXfQAXn113VEgrQPLFA==",
"version": "10.2.1",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-10.2.1.tgz",
"integrity": "sha512-dzlF9Gl7KNt9sPYT2HYq6ySZYwKzkyYR5mrBj3DZOD0OQsoc21LvLkWAHNSL2iYGdHJQS1oJDNs8iRYxYIOY3w==",
"requires": {
"ajv": "6.12.4",
"fast-json-stable-stringify": "2.1.0",
@ -18033,19 +18070,19 @@
}
},
"@schematics/angular": {
"version": "10.2.3",
"resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-10.2.3.tgz",
"integrity": "sha512-xcnfH5XMmGcs33VHm2cu0+4g3rkfSD+qpiKFjfg7KGC4lLoOKSED4ZnjzIYwcQ6QN4gTpAvlZKxI8zO7NkKv0A==",
"version": "10.2.1",
"resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-10.2.1.tgz",
"integrity": "sha512-hmhZ6zPJshP1ATYc/EzJPwaFas0D+T6eeWEFyHAgIV2GmNdJNyBdKHQtizGRQBpfWvBdI4/krvX+a71VnkU8oA==",
"requires": {
"@angular-devkit/core": "10.2.3",
"@angular-devkit/schematics": "10.2.3",
"@angular-devkit/core": "10.2.1",
"@angular-devkit/schematics": "10.2.1",
"jsonc-parser": "2.3.0"
},
"dependencies": {
"@angular-devkit/core": {
"version": "10.2.3",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-10.2.3.tgz",
"integrity": "sha512-pMM1v9Xjqx6YLOQxQYs0D+03H6XPDZLS8cyEtoQX2iYdh8qlKHZVbJa2WsfzwMoIPtgcXfQAXn113VEgrQPLFA==",
"version": "10.2.1",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-10.2.1.tgz",
"integrity": "sha512-dzlF9Gl7KNt9sPYT2HYq6ySZYwKzkyYR5mrBj3DZOD0OQsoc21LvLkWAHNSL2iYGdHJQS1oJDNs8iRYxYIOY3w==",
"requires": {
"ajv": "6.12.4",
"fast-json-stable-stringify": "2.1.0",
@ -18070,12 +18107,12 @@
}
},
"@schematics/update": {
"version": "0.1002.3",
"resolved": "https://registry.npmjs.org/@schematics/update/-/update-0.1002.3.tgz",
"integrity": "sha512-UnuMgRQtAOp/Pk9rSYW12medajXe9s5mW4a6foixC/B2UCFFlIAVbFBTiFpr69xbalfLlFcFx1MD+8/8njWtbQ==",
"version": "0.1002.1",
"resolved": "https://registry.npmjs.org/@schematics/update/-/update-0.1002.1.tgz",
"integrity": "sha512-RbC01VKb9q7Db5rpbrQLBOVkIzv3TPWMjRUSgg/LlLFEDVO3LPn5nX9bYnb6E0HeIqUW+zAU5Qaz9ob/Py06LA==",
"requires": {
"@angular-devkit/core": "10.2.3",
"@angular-devkit/schematics": "10.2.3",
"@angular-devkit/core": "10.2.1",
"@angular-devkit/schematics": "10.2.1",
"@yarnpkg/lockfile": "1.1.0",
"ini": "1.3.6",
"npm-package-arg": "^8.0.0",
@ -18085,9 +18122,9 @@
},
"dependencies": {
"@angular-devkit/core": {
"version": "10.2.3",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-10.2.3.tgz",
"integrity": "sha512-pMM1v9Xjqx6YLOQxQYs0D+03H6XPDZLS8cyEtoQX2iYdh8qlKHZVbJa2WsfzwMoIPtgcXfQAXn113VEgrQPLFA==",
"version": "10.2.1",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-10.2.1.tgz",
"integrity": "sha512-dzlF9Gl7KNt9sPYT2HYq6ySZYwKzkyYR5mrBj3DZOD0OQsoc21LvLkWAHNSL2iYGdHJQS1oJDNs8iRYxYIOY3w==",
"requires": {
"ajv": "6.12.4",
"fast-json-stable-stringify": "2.1.0",
@ -19819,6 +19856,11 @@
"integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=",
"dev": true
},
"cookieconsent": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/cookieconsent/-/cookieconsent-3.1.1.tgz",
"integrity": "sha512-v8JWLJcI7Zs9NWrs8hiVldVtm3EBF70TJI231vxn6YToBGj0c9dvdnYwltydkAnrbBMOM/qX1xLFrnTfm5wTag=="
},
"copy-concurrently": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz",
@ -24125,6 +24167,12 @@
}
}
},
"ngx-cookieconsent": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/ngx-cookieconsent/-/ngx-cookieconsent-2.2.3.tgz",
"integrity": "sha512-vg7M4XZSTFRAQq20M0YVJdz5OkXIu0t0MSYos0vvu7oblaEivQstA1Mg5bO7OJYp+oFoTEefWhvO2nCiyHn9SQ==",
"requires": {}
},
"nice-try": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
@ -30036,9 +30084,9 @@
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="
},
"y18n": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz",
"integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ=="
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.2.tgz",
"integrity": "sha512-DnBDwcL54b5xWMM/7RfFg4xs5amYxq2ot49aUfLjQSAracXkGvlZq0txzqr3Pa6Q0ayuCxBcwTzrPUScKY0O8w=="
},
"yallist": {
"version": "4.0.0",

View File

@ -23,8 +23,10 @@
"@angular/platform-browser-dynamic": "^10.2.3",
"@angular/router": "^10.2.3",
"apexcharts": "^3.22.3",
"cookieconsent": "^3.1.1",
"ng": "0.0.0",
"ng-apexcharts": "^1.5.6",
"ngx-cookieconsent": "^2.2.3",
"rxjs": "~6.6.0",
"tslib": "^2.0.3",
"zone.js": "~0.10.2"

View File

@ -1,10 +1,69 @@
import { Component } from '@angular/core';
import {Component, OnDestroy, OnInit} from '@angular/core';
import {NgcCookieConsentService, NgcInitializeEvent, NgcNoCookieLawEvent, NgcStatusChangeEvent} from 'ngx-cookieconsent';
import {Subscription} from 'rxjs';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
export class AppComponent implements OnInit, OnDestroy {
title = 'Betterzon';
// Cookie popup stuff
// Docs on https://www.npmjs.com/package/ngx-cookieconsent
private popupOpenSubscription: Subscription;
private popupCloseSubscription: Subscription;
private initializeSubscription: Subscription;
private statusChangeSubscription: Subscription;
private revokeChoiceSubscription: Subscription;
private noCookieLawSubscription: Subscription;
constructor(
private ccService: NgcCookieConsentService
) {
}
ngOnInit(): void {
// subscribe to cookieconsent observables to react to main events
this.popupOpenSubscription = this.ccService.popupOpen$.subscribe(
() => {
// you can use this.ccService.getConfig() to do stuff...
});
this.popupCloseSubscription = this.ccService.popupClose$.subscribe(
() => {
// you can use this.ccService.getConfig() to do stuff...
});
this.initializeSubscription = this.ccService.initialize$.subscribe(
(event: NgcInitializeEvent) => {
// you can use this.ccService.getConfig() to do stuff...
});
this.statusChangeSubscription = this.ccService.statusChange$.subscribe(
(event: NgcStatusChangeEvent) => {
// you can use this.ccService.getConfig() to do stuff...
});
this.revokeChoiceSubscription = this.ccService.revokeChoice$.subscribe(
() => {
// you can use this.ccService.getConfig() to do stuff...
});
this.noCookieLawSubscription = this.ccService.noCookieLaw$.subscribe(
(event: NgcNoCookieLawEvent) => {
// you can use this.ccService.getConfig() to do stuff...
});
}
ngOnDestroy(): void {
// unsubscribe to cookieconsent observables to prevent memory leaks
this.popupOpenSubscription.unsubscribe();
this.popupCloseSubscription.unsubscribe();
this.initializeSubscription.unsubscribe();
this.statusChangeSubscription.unsubscribe();
this.revokeChoiceSubscription.unsubscribe();
this.noCookieLawSubscription.unsubscribe();
}
}

View File

@ -17,8 +17,48 @@ import {FormsModule} from '@angular/forms';
import {PageNotFoundPageComponent} from './pages/page-not-found-page/page-not-found-page.component';
import {MatMenuModule} from '@angular/material/menu';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ImprintComponent } from './pages/imprint/imprint.component';
import { PrivacyComponent } from './pages/privacy/privacy.component';
import {ImprintComponent} from './pages/imprint/imprint.component';
import {PrivacyComponent} from './pages/privacy/privacy.component';
import {NgcCookieConsentModule, NgcCookieConsentConfig} from 'ngx-cookieconsent';
// For cookie popup
const cookieConfig: NgcCookieConsentConfig = {
cookie: {
domain: 'betterzon.xyz'
},
palette: {
popup: {
background: '#000'
},
button: {
background: '#f1d600'
}
},
theme: 'edgeless',
type: 'opt-out',
layout: 'my-custom-layout',
layouts: {
'my-custom-layout': '{{messagelink}}{{compliance}}'
},
elements: {
messagelink: `
<span id="cookieconsent:desc" class="cc-message">{{message}}
<a aria-label="learn more about cookies" tabindex="0" class="cc-link" href="{{whatAreCookiesHref}}" target="_blank">{{whatAreCookiesLink}}</a>
<a aria-label="learn more about our privacy policy" tabindex="1" class="cc-link" href="{{privacyPolicyHref}}" target="_blank">{{privacyPolicyLink}}</a>
</span>
`,
},
content: {
// Custom message
// message: 'By using our site, you acknowledge that you have read and understand our ',
whatAreCookiesLink: 'Learn more',
whatAreCookiesHref: 'https://www.cookiesandyou.com/',
privacyPolicyLink: 'Privacy Policy',
privacyPolicyHref: '/datenschutz',
}
};
@NgModule({
declarations: [
@ -42,7 +82,8 @@ import { PrivacyComponent } from './pages/privacy/privacy.component';
NgApexchartsModule,
FormsModule,
MatMenuModule,
BrowserAnimationsModule
BrowserAnimationsModule,
NgcCookieConsentModule.forRoot(cookieConfig)
],
providers: [],
bootstrap: [AppComponent]

View File

@ -1,6 +1,6 @@
<!doctype html>
<html lang="en">
<head>
<head>
<meta charset="utf-8">
<title>Betterzon</title>
<base href="/">
@ -8,8 +8,9 @@
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head>
<body>
<script src="node_modules/cookieconsent/build/cookieconsent.min.js"></script>
</head>
<body>
<app-root></app-root>
</body>
</body>
</html>