GitLab steht wegen Wartungsarbeiten am Montag, den 10. Mai, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

Fix some serverside rendering calls to browser-only variables. Fix unit tests....

Fix some serverside rendering calls to browser-only variables. Fix unit tests. Add some static styles for the loading circle.
parent e9696d6b
......@@ -15,7 +15,6 @@ install:
- npm install
test:
allow_failure: true
stage: test
only:
- master
......@@ -31,20 +30,11 @@ build:
tags:
- nodejs
script:
- npm run build:PROD
- npm run build:SSR
artifacts:
paths:
- dist
compress:
stage: compress
only:
- master
tags:
- nodejs
script:
- npm run compress
deploy:
stage: deploy
only:
......
......@@ -30,9 +30,11 @@
"src/assets/fonts",
"src/assets/i18n",
"src/assets/icons",
"src/assets/styles",
"src/assets/serverEndpoint.json"
],
"styles": [
"src/test.scss",
"src/styles.scss",
{
"input": "./node_modules/bootstrap/dist/css/bootstrap.css"
......
......@@ -98,6 +98,32 @@
"rxjs": "^6.0.0",
"source-map": "^0.5.6"
}
},
"chalk": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.2.2.tgz",
"integrity": "sha512-LvixLAQ4MYhbf7hgL4o5PeK32gJKvVzDRiSNIApDofQvyhl8adgG2lJVXn4+ekQoK7HL9RF8lqxwerpe0x2pCw==",
"dev": true,
"requires": {
"ansi-styles": "^3.1.0",
"escape-string-regexp": "^1.0.5",
"supports-color": "^4.0.0"
}
},
"has-flag": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz",
"integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=",
"dev": true
},
"supports-color": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz",
"integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=",
"dev": true,
"requires": {
"has-flag": "^2.0.0"
}
}
}
},
......@@ -612,9 +638,9 @@
}
},
"@types/node": {
"version": "10.1.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.1.1.tgz",
"integrity": "sha512-n7wxy8r2tjVcrzZoKJlyZmi1C1VhXGHAGhDEO1iqp7fbsTSsDF3dVA50KFsPg77EXqzNJqbzcna8Mi4m7a1lyw==",
"version": "10.1.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.1.2.tgz",
"integrity": "sha512-bjk1RIeZBCe/WukrFToIVegOf91Pebr8cXYBwLBIsfiGWVQ+ifwWsT59H3RxrWzWrzd1l/Amk1/ioY5Fq3/bpA==",
"dev": true
},
"@types/q": {
......@@ -2776,9 +2802,9 @@
}
},
"caniuse-lite": {
"version": "1.0.30000842",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000842.tgz",
"integrity": "sha512-juspQHLwQRgptEM03HN66SpM/ggZUB+m49NAgJIaIS11aXVNeRB57sEY1X6tEzeK2THGvYWKZZu1wIbh+W7YTA==",
"version": "1.0.30000843",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000843.tgz",
"integrity": "sha512-1ntiW826MhRBmM0CeI7w1cQr16gxwOoM8doJWh3BFalPZoKWdZXs27Bc04xth/3NR1/wNXn9cpP4F92lVenCvg==",
"dev": true
},
"caseless": {
......@@ -2799,31 +2825,13 @@
}
},
"chalk": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.2.2.tgz",
"integrity": "sha512-LvixLAQ4MYhbf7hgL4o5PeK32gJKvVzDRiSNIApDofQvyhl8adgG2lJVXn4+ekQoK7HL9RF8lqxwerpe0x2pCw==",
"dev": true,
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
"integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
"requires": {
"ansi-styles": "^3.1.0",
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^4.0.0"
},
"dependencies": {
"has-flag": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz",
"integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=",
"dev": true
},
"supports-color": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz",
"integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=",
"dev": true,
"requires": {
"has-flag": "^2.0.0"
}
}
"supports-color": "^5.3.0"
}
},
"chardet": {
......@@ -4705,6 +4713,17 @@
"chardet": "^0.4.0",
"iconv-lite": "^0.4.17",
"tmp": "^0.0.33"
},
"dependencies": {
"tmp": {
"version": "0.0.33",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
"integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==",
"dev": true,
"requires": {
"os-tmpdir": "~1.0.2"
}
}
}
},
"extglob": {
......@@ -5115,13 +5134,13 @@
"dev": true
},
"fsevents": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.3.tgz",
"integrity": "sha512-X+57O5YkDTiEQGiw8i7wYc2nQgweIekqkepI8Q3y4wVlurgBt2SuwxTeYUYMZIGpLZH3r/TsMjczCMXE5ZOt7Q==",
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz",
"integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==",
"optional": true,
"requires": {
"nan": "^2.9.2",
"node-pre-gyp": "^0.9.0"
"node-pre-gyp": "^0.10.0"
},
"dependencies": {
"abbrev": {
......@@ -5190,7 +5209,7 @@
}
},
"deep-extend": {
"version": "0.4.2",
"version": "0.5.1",
"bundled": true,
"optional": true
},
......@@ -5346,7 +5365,7 @@
}
},
"node-pre-gyp": {
"version": "0.9.1",
"version": "0.10.0",
"bundled": true,
"optional": true,
"requires": {
......@@ -5442,11 +5461,11 @@
"optional": true
},
"rc": {
"version": "1.2.6",
"version": "1.2.7",
"bundled": true,
"optional": true,
"requires": {
"deep-extend": "~0.4.0",
"deep-extend": "^0.5.1",
"ini": "~1.3.0",
"minimist": "^1.2.0",
"strip-json-comments": "~2.0.1"
......@@ -6514,6 +6533,14 @@
"requires": {
"httpreq": ">=0.4.22",
"underscore": "~1.7.0"
},
"dependencies": {
"underscore": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz",
"integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=",
"dev": true
}
}
},
"httpreq": {
......@@ -7393,19 +7420,20 @@
}
},
"jasmine": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/jasmine/-/jasmine-3.1.0.tgz",
"integrity": "sha1-K9Wf1+xuwOistk4J9Fpo7SrRlSo=",
"version": "2.8.0",
"resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.8.0.tgz",
"integrity": "sha1-awicChFXax8W3xG4AUbZHU6Lij4=",
"dev": true,
"requires": {
"exit": "^0.1.2",
"glob": "^7.0.6",
"jasmine-core": "~3.1.0"
"jasmine-core": "~2.8.0"
},
"dependencies": {
"jasmine-core": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-3.1.0.tgz",
"integrity": "sha1-pHheE11d9lAk38kiSVPfWFvSdmw=",
"version": "2.8.0",
"resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.8.0.tgz",
"integrity": "sha1-vMl5rh+f0FcB5F5S5l06XWPxok4=",
"dev": true
}
}
......@@ -7903,12 +7931,12 @@
}
},
"karma-coverage-istanbul-reporter": {
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-1.4.2.tgz",
"integrity": "sha512-sQHexslLF+QHzaKfK8+onTYMyvSwv+p5cDayVxhpEELGa3z0QuB+l0IMsicIkkBNMOJKQaqueiRoW7iuo7lsog==",
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-2.0.0.tgz",
"integrity": "sha512-f9I5fro1Z3efBK1fhEmhb8xTQKiM5tlBSWTjJmdxR8ULy+oeI7fRpczCEaiWzHya0Zfz1/oBTrswEoZsEYXI6g==",
"dev": true,
"requires": {
"istanbul-api": "^1.1.14",
"istanbul-api": "^1.3.1",
"minimatch": "^3.0.4"
}
},
......@@ -9756,12 +9784,6 @@
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz",
"integrity": "sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE=",
"dev": true
},
"underscore": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz",
"integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=",
"dev": true
}
}
},
......@@ -10628,17 +10650,6 @@
"supports-color": "^5.4.0"
},
"dependencies": {
"chalk": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
"integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
"dev": true,
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
}
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
......@@ -10835,9 +10846,9 @@
},
"dependencies": {
"@types/node": {
"version": "6.0.110",
"resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.110.tgz",
"integrity": "sha512-LiaH3mF+OAqR+9Wo1OTJDbZDtCewAVjTbMhF1ZgUJ3fc8xqOJq6VqbpBh9dJVCVzByGmYIg2fREbuXNX0TKiJA==",
"version": "6.0.111",
"resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.111.tgz",
"integrity": "sha512-DoWK5a544Jcr6C1qBadalyj3gQT5V9B87qFBb+uOOq1Id309Lbe10zwsCGCURZEOBoS/pOsmbDN4FnD4sOwJaw==",
"dev": true
},
"adm-zip": {
......@@ -10894,23 +10905,6 @@
"pinkie-promise": "^2.0.0"
}
},
"jasmine": {
"version": "2.8.0",
"resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.8.0.tgz",
"integrity": "sha1-awicChFXax8W3xG4AUbZHU6Lij4=",
"dev": true,
"requires": {
"exit": "^0.1.2",
"glob": "^7.0.6",
"jasmine-core": "~2.8.0"
}
},
"jasmine-core": {
"version": "2.8.0",
"resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.8.0.tgz",
"integrity": "sha1-vMl5rh+f0FcB5F5S5l06XWPxok4=",
"dev": true
},
"pify": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
......@@ -11710,9 +11704,9 @@
"dev": true
},
"request": {
"version": "2.85.0",
"resolved": "https://registry.npmjs.org/request/-/request-2.85.0.tgz",
"integrity": "sha512-8H7Ehijd4js+s6wuVPLjwORxD4zeuyjYugprdOXlPSqaApmL/QOy+EB/beICHVCHkGMKNh5rvihb5ov+IDw4mg==",
"version": "2.86.0",
"resolved": "https://registry.npmjs.org/request/-/request-2.86.0.tgz",
"integrity": "sha512-BQZih67o9r+Ys94tcIW4S7Uu8pthjrQVxhsZ/weOwHbDfACxvIyvnAbzFQxjy1jMtvFSzv5zf4my6cZsJBbVzw==",
"dev": true,
"requires": {
"aws-sign2": "~0.7.0",
......@@ -11733,7 +11727,6 @@
"performance-now": "^2.1.0",
"qs": "~6.5.1",
"safe-buffer": "^5.1.1",
"stringstream": "~0.0.5",
"tough-cookie": "~2.3.3",
"tunnel-agent": "^0.6.0",
"uuid": "^3.1.0"
......@@ -12897,10 +12890,11 @@
}
},
"stringstream": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
"integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=",
"dev": true
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz",
"integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==",
"dev": true,
"optional": true
},
"strip-ansi": {
"version": "3.0.1",
......@@ -13265,18 +13259,6 @@
"loader-utils": "^1.0.2",
"micromatch": "^3.1.4",
"semver": "^5.0.1"
},
"dependencies": {
"chalk": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
"integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
}
}
}
},
"ts-node": {
......@@ -13293,19 +13275,6 @@
"mkdirp": "^0.5.1",
"source-map-support": "^0.5.3",
"yn": "^2.0.0"
},
"dependencies": {
"chalk": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
"integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
"dev": true,
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
}
}
}
},
"tsickle": {
......@@ -13351,19 +13320,6 @@
"semver": "^5.3.0",
"tslib": "^1.8.0",
"tsutils": "^2.12.1"
},
"dependencies": {
"chalk": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
"integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
"dev": true,
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
}
}
}
},
"tsscmp": {
......@@ -13374,9 +13330,9 @@
"optional": true
},
"tsutils": {
"version": "2.27.0",
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.27.0.tgz",
"integrity": "sha512-JcyX25oM9pFcb3zh60OqG1St8p/uSqC5Bgipdo3ieacB/Ao4dPhm7hAtKT9NrEu23CyYrrgJPV3CqYfo+/+T4w==",
"version": "2.27.1",
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.27.1.tgz",
"integrity": "sha512-AE/7uzp32MmaHvNNFES85hhUDHFdFZp6OAiZcd6y4ZKKIg6orJTm8keYWBhIhrJQH3a4LzNKat7ZPXZt5aTf6w==",
"dev": true,
"requires": {
"tslib": "^1.8.1"
......@@ -13506,9 +13462,9 @@
"dev": true
},
"underscore": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz",
"integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=",
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz",
"integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=",
"dev": true
},
"union": {
......@@ -13621,15 +13577,15 @@
}
},
"untildify": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/untildify/-/untildify-3.0.2.tgz",
"integrity": "sha1-fx8wIFWz/qDz6B3HjrNnZstl4/E=",
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/untildify/-/untildify-3.0.3.tgz",
"integrity": "sha512-iSk/J8efr8uPT/Z4eSUywnqyrQU7DSdMfdqK4iWEaUVVmcP5JcnpRqmVMwcwcnmI1ATFNgC5V90u09tBynNFKA==",
"dev": true
},
"upath": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/upath/-/upath-1.0.5.tgz",
"integrity": "sha512-qbKn90aDQ0YEwvXoLqj0oiuUYroLX2lVHZ+b+xwjozFasAOC4GneDq5+OaIG5Zj+jFmbz/uO+f7a9qxjktJQww=="
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz",
"integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw=="
},
"upper-case": {
"version": "1.1.3",
......@@ -14209,17 +14165,6 @@
"integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
"dev": true
},
"chalk": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
"integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
"dev": true,
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
}
},
"cliui": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz",
......@@ -14929,17 +14874,6 @@
"lodash": "^4.14.0"
}
},
"chalk": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
"integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
"dev": true,
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
}
},
"cross-spawn": {
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
......
......@@ -12,7 +12,7 @@
"start:SSR": "node dist/server",
"start:DEV": "ng serve --host 0.0.0.0 --port 4200 --disable-host-check --aot",
"build:DEV": "ng serve --host 0.0.0.0 --port 4200 --disable-host-check --aot --prod",
"build:SSR": "npm run build:PROD && npm run build:SERVER && npm run webpack:SERVER",
"build:SSR": "npm run build:PROD && npm run purify && npm run build:SERVER && npm run webpack:SERVER",
"build:SERVER": "ng run frontend:server",
"build:PROD": "ng build --prod",
"build:PROD-STATS": "ng build --prod --stats-json",
......@@ -22,10 +22,11 @@
"lint": "ng lint",
"pree2e": "webdriver-manager update --standalone false --gecko false",
"e2e": "ng e2e --no-webdriver-update",
"precompress": "node purifycss.js",
"purify": "node purifycss.js",
"compress": "gzip dist/browser/** -r",
"http-startup": "http-server dist/browser/ -p 4711 --gzip",
"prod-test": "npm run build:PROD && npm run compress && npm run http-startup"
"prod-test": "npm run build:PROD && npm run purify && npm run compress && npm run http-startup",
"prod-test:SSR": "npm run build:SSR && npm run start:SSR"
},
"private": true,
"dependencies": {
......@@ -72,13 +73,11 @@
"arsnova-click-v2-types": "git+https://git.thm.de/arsnova/arsnova-click-v2-types.git",
"codelyzer": "^4.3.0",
"http-server": "^0.11.1",
"istanbul-instrumenter-loader": "^3.0.1",
"jasmine": "^3.1.0",
"jasmine-core": "~3.1.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~2.0.2",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~1.4.2",
"karma-coverage-istanbul-reporter": "~2.0.0",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^1.1.0",
"karma-mocha-reporter": "^2.2.5",
......
......@@ -5,6 +5,7 @@ import 'reflect-metadata';
import { enableProdMode } from '@angular/core';
import * as express from 'express';
import * as compress from 'compression';
import { join } from 'path';
// Express Engine
......@@ -17,10 +18,11 @@ enableProdMode();
// Express server
const app = express();
const PORT = process.env.PORT || 4000;
const DIST_FOLDER = join(process.cwd(), 'dist');
app.use(compress());
// * NOTE :: leave this as require() since this file is built Dynamically from webpack
const { RootServerModuleNgFactory, LAZY_MODULE_MAP } = require('./dist/server/main');
......
......@@ -92,7 +92,9 @@ export class HeaderComponent implements OnInit {
ngOnInit() {
this.router.events.subscribe((url: any) => {
this.inHomeRoute = (location.pathname === '/home' || location.pathname === '/');
if (isPlatformBrowser(this.platformId)) {
this.inHomeRoute = (location.pathname === '/home' || location.pathname === '/');
}
});
}
......
......@@ -23,6 +23,7 @@ import {WebsocketMockService} from '../../service/websocket.mock.service';
import {ConnectionMockService} from '../../service/connection.mock.service';
import {ActiveQuestionGroupMockService} from '../../service/active-question-group.mock.service';
import {TrackingMockService} from '../../service/tracking.mock.service';
import {HeaderLabelService} from '../../service/header-label.service';
describe('LivePreviewComponent', () => {
let component: LivePreviewComponent;
......@@ -55,6 +56,7 @@ describe('LivePreviewComponent', () => {
FooterBarService,
SharedService,
SettingsService,
HeaderLabelService,
{provide: TrackingService, useClass: TrackingMockService},
],
declarations: [LivePreviewComponent]
......
......@@ -16,12 +16,11 @@ import {WebsocketService} from '../../../service/websocket.service';
import {HeaderLabelService} from '../../../service/header-label.service';
import {ActiveQuestionGroupService} from '../../../service/active-question-group.service';
import {TrackingService} from '../../../service/tracking.service';
import {Angulartics2Module} from 'angulartics2';
import {ArsnovaClickAngulartics2Piwik} from '../../../shared/tracking/ArsnovaClickAngulartics2Piwik';
import {WebsocketMockService} from '../../../service/websocket.mock.service';
import {ConnectionMockService} from '../../../service/connection.mock.service';
import {ActiveQuestionGroupMockService} from '../../../service/active-question-group.mock.service';
import {TrackingMockService} from '../../../service/tracking.mock.service';
import {FooterModule} from '../../../footer/footer.module';
describe('QuizManagerComponent', () => {
let component: QuizManagerComponent;
......@@ -32,6 +31,7 @@ describe('QuizManagerComponent', () => {
imports: [
RouterTestingModule,
HttpClientModule,
FooterModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
......
......@@ -4,7 +4,7 @@ describe('RootModule', () => {
let RootModuleModule: RootModule;
beforeEach(() => {
RootModuleModule = new RootModule(null, null);
RootModuleModule = new RootModule();
});
it('should create an instance', () => {
......
......@@ -5,16 +5,16 @@
<div class="container-fluid" style="height: 90vh;">
<div class="row flex-sm-nowrap h-100">
<div class="footer-bar-wrapper p-0 relative" style="height: 50px;">
<div class="footer-bar-wrapper p-0 relative">
<app-footer-bar [footerElements]="getFooterBarElements()"></app-footer-bar>
<div class="d-none d-md-block">
<router-outlet name="additionalData-md" class="d-none d-md-block"></router-outlet>
</div>
</div>
<div id="content-container" class="container">
<main id="content-container" class="container">
<router-outlet></router-outlet>
</div>
</main>
</div>
</div>
</div>