Compare commits

...

9 Commits

Author SHA1 Message Date
hardi c0a714d2b0 Release v1.9.8 (#63) 2020-04-23 10:41:03 +02:00
hardi 91d5095890 Release v1.9.7 (#62) 2020-03-08 13:46:55 +01:00
hardi 7851e64fd5 Release v1.9.6 (#61) 2019-10-11 20:25:07 +02:00
hardi 12ca58d43e Release v1.9.5 (#60) 2019-10-01 13:51:03 +02:00
hardi 845593b2ec Release v1.9.4 (#59) 2019-03-03 18:09:20 +01:00
hardi 35e8b14a34 Release v1.9.3 RC2 (#58) 2019-02-27 23:13:23 +01:00
hardi df6abd39aa Release v1.9.3 - navigation rework (#56) 2019-02-25 14:32:29 +01:00
hardi 3d2223f063 Release 1.9.2-RC2 (#55)
* Improve chart labels for flag chart (CC-72)
2019-02-17 20:36:38 +01:00
hardi b6deb56fc0 Release v1.9.2 (#54)
* Fix transport stats value drop on navigation (CC-88)
* Add player transport stats to campaign detail view (CC-83)
* Add additional budget information to db enry (CC-15)
* use sass for war header
* Improve fraction stats and scss usage
* Use stacked bar chart for flag capture visualization (CC-72)
* Update mongoose method usage o drop deprecated use
* Security restrictive npm dependency updates and mongoose settings adjustment
* Migrate load indicator to SASS (CC-87)
* Improve load indicator positioning (CC-87)
* Add OPT branded load indicator (CC-87)
2019-02-17 19:46:24 +01:00
233 changed files with 4495 additions and 5338 deletions

200
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "opt-cc",
"version": "1.8.0",
"version": "1.9.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -10,10 +10,10 @@
"integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
"dev": true,
"requires": {
"co": "4.6.0",
"fast-deep-equal": "1.1.0",
"fast-json-stable-stringify": "2.0.0",
"json-schema-traverse": "0.3.1"
"co": "^4.6.0",
"fast-deep-equal": "^1.0.0",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.3.0"
}
},
"ansi-styles": {
@ -22,7 +22,7 @@
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
"requires": {
"color-convert": "1.9.2"
"color-convert": "^1.9.0"
}
},
"asn1": {
@ -62,7 +62,7 @@
"dev": true,
"optional": true,
"requires": {
"tweetnacl": "0.14.5"
"tweetnacl": "^0.14.3"
}
},
"builtin-modules": {
@ -83,9 +83,9 @@
"integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
"dev": true,
"requires": {
"ansi-styles": "3.2.1",
"escape-string-regexp": "1.0.5",
"supports-color": "5.4.0"
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
},
"dependencies": {
"supports-color": {
@ -94,7 +94,7 @@
"integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==",
"dev": true,
"requires": {
"has-flag": "3.0.0"
"has-flag": "^3.0.0"
}
}
}
@ -126,7 +126,7 @@
"integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=",
"dev": true,
"requires": {
"delayed-stream": "1.0.0"
"delayed-stream": "~1.0.0"
}
},
"commander": {
@ -141,15 +141,15 @@
"integrity": "sha512-6XiIYtYzmGEccNZFkih5JOH92jLA4ulZArAYy5j1uDSdrPLB3KzdE8GW7t2fHPcg9ry2+5LP9IEYzXzxw9lFdA==",
"dev": true,
"requires": {
"chalk": "2.4.1",
"chalk": "^2.4.1",
"commander": "2.6.0",
"date-fns": "1.29.0",
"lodash": "4.17.10",
"read-pkg": "3.0.0",
"date-fns": "^1.23.0",
"lodash": "^4.5.1",
"read-pkg": "^3.0.0",
"rx": "2.3.24",
"spawn-command": "0.0.2-1",
"supports-color": "3.2.3",
"tree-kill": "1.2.0"
"spawn-command": "^0.0.2-1",
"supports-color": "^3.2.3",
"tree-kill": "^1.1.0"
}
},
"core-js": {
@ -170,7 +170,7 @@
"integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
"dev": true,
"requires": {
"assert-plus": "1.0.0"
"assert-plus": "^1.0.0"
}
},
"date-fns": {
@ -192,7 +192,7 @@
"dev": true,
"optional": true,
"requires": {
"jsbn": "0.1.1"
"jsbn": "~0.1.0"
}
},
"error-ex": {
@ -201,7 +201,7 @@
"integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
"dev": true,
"requires": {
"is-arrayish": "0.2.1"
"is-arrayish": "^0.2.1"
}
},
"escape-string-regexp": {
@ -246,9 +246,9 @@
"integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=",
"dev": true,
"requires": {
"asynckit": "0.4.0",
"asynckit": "^0.4.0",
"combined-stream": "1.0.6",
"mime-types": "2.1.18"
"mime-types": "^2.1.12"
}
},
"getpass": {
@ -257,7 +257,7 @@
"integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
"dev": true,
"requires": {
"assert-plus": "1.0.0"
"assert-plus": "^1.0.0"
}
},
"graceful-fs": {
@ -278,8 +278,8 @@
"integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=",
"dev": true,
"requires": {
"ajv": "5.5.2",
"har-schema": "2.0.0"
"ajv": "^5.1.0",
"har-schema": "^2.0.0"
}
},
"has-flag": {
@ -306,9 +306,9 @@
"integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
"dev": true,
"requires": {
"assert-plus": "1.0.0",
"jsprim": "1.4.1",
"sshpk": "1.14.2"
"assert-plus": "^1.0.0",
"jsprim": "^1.2.2",
"sshpk": "^1.7.0"
}
},
"is-arrayish": {
@ -323,7 +323,7 @@
"integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=",
"dev": true,
"requires": {
"builtin-modules": "1.1.1"
"builtin-modules": "^1.0.0"
}
},
"is-typedarray": {
@ -356,11 +356,11 @@
"integrity": "sha1-M4WseQGSEwy+Iw6ALsAskhW7/to=",
"dev": true,
"requires": {
"hoek": "4.2.1",
"isemail": "2.2.1",
"items": "2.1.1",
"moment": "2.22.2",
"topo": "2.0.2"
"hoek": "4.x.x",
"isemail": "2.x.x",
"items": "2.x.x",
"moment": "2.x.x",
"topo": "2.x.x"
}
},
"jsbn": {
@ -412,16 +412,16 @@
"integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=",
"dev": true,
"requires": {
"graceful-fs": "4.1.11",
"parse-json": "4.0.0",
"pify": "3.0.0",
"strip-bom": "3.0.0"
"graceful-fs": "^4.1.2",
"parse-json": "^4.0.0",
"pify": "^3.0.0",
"strip-bom": "^3.0.0"
}
},
"lodash": {
"version": "4.17.10",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
"integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==",
"version": "4.17.11",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==",
"dev": true
},
"mime-db": {
@ -436,7 +436,7 @@
"integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==",
"dev": true,
"requires": {
"mime-db": "1.33.0"
"mime-db": "~1.33.0"
}
},
"minimist": {
@ -457,10 +457,10 @@
"integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==",
"dev": true,
"requires": {
"hosted-git-info": "2.6.1",
"is-builtin-module": "1.0.0",
"semver": "5.5.0",
"validate-npm-package-license": "3.0.3"
"hosted-git-info": "^2.1.4",
"is-builtin-module": "^1.0.0",
"semver": "2 || 3 || 4 || 5",
"validate-npm-package-license": "^3.0.1"
}
},
"oauth-sign": {
@ -475,8 +475,8 @@
"integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
"dev": true,
"requires": {
"error-ex": "1.3.2",
"json-parse-better-errors": "1.0.2"
"error-ex": "^1.3.1",
"json-parse-better-errors": "^1.0.1"
}
},
"path-type": {
@ -485,7 +485,7 @@
"integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
"dev": true,
"requires": {
"pify": "3.0.0"
"pify": "^3.0.0"
}
},
"performance-now": {
@ -518,9 +518,9 @@
"integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=",
"dev": true,
"requires": {
"load-json-file": "4.0.0",
"normalize-package-data": "2.4.0",
"path-type": "3.0.0"
"load-json-file": "^4.0.0",
"normalize-package-data": "^2.3.2",
"path-type": "^3.0.0"
}
},
"request": {
@ -529,26 +529,26 @@
"integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==",
"dev": true,
"requires": {
"aws-sign2": "0.7.0",
"aws4": "1.7.0",
"caseless": "0.12.0",
"combined-stream": "1.0.6",
"extend": "3.0.1",
"forever-agent": "0.6.1",
"form-data": "2.3.2",
"har-validator": "5.0.3",
"http-signature": "1.2.0",
"is-typedarray": "1.0.0",
"isstream": "0.1.2",
"json-stringify-safe": "5.0.1",
"mime-types": "2.1.18",
"oauth-sign": "0.8.2",
"performance-now": "2.1.0",
"qs": "6.5.2",
"safe-buffer": "5.1.2",
"tough-cookie": "2.3.4",
"tunnel-agent": "0.6.0",
"uuid": "3.3.2"
"aws-sign2": "~0.7.0",
"aws4": "^1.6.0",
"caseless": "~0.12.0",
"combined-stream": "~1.0.5",
"extend": "~3.0.1",
"forever-agent": "~0.6.1",
"form-data": "~2.3.1",
"har-validator": "~5.0.3",
"http-signature": "~1.2.0",
"is-typedarray": "~1.0.0",
"isstream": "~0.1.2",
"json-stringify-safe": "~5.0.1",
"mime-types": "~2.1.17",
"oauth-sign": "~0.8.2",
"performance-now": "^2.1.0",
"qs": "~6.5.1",
"safe-buffer": "^5.1.1",
"tough-cookie": "~2.3.3",
"tunnel-agent": "^0.6.0",
"uuid": "^3.1.0"
}
},
"rx": {
@ -587,8 +587,8 @@
"integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==",
"dev": true,
"requires": {
"spdx-expression-parse": "3.0.0",
"spdx-license-ids": "3.0.0"
"spdx-expression-parse": "^3.0.0",
"spdx-license-ids": "^3.0.0"
}
},
"spdx-exceptions": {
@ -603,8 +603,8 @@
"integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==",
"dev": true,
"requires": {
"spdx-exceptions": "2.1.0",
"spdx-license-ids": "3.0.0"
"spdx-exceptions": "^2.1.0",
"spdx-license-ids": "^3.0.0"
}
},
"spdx-license-ids": {
@ -619,15 +619,15 @@
"integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=",
"dev": true,
"requires": {
"asn1": "0.2.3",
"assert-plus": "1.0.0",
"bcrypt-pbkdf": "1.0.2",
"dashdash": "1.14.1",
"ecc-jsbn": "0.1.1",
"getpass": "0.1.7",
"jsbn": "0.1.1",
"safer-buffer": "2.1.2",
"tweetnacl": "0.14.5"
"asn1": "~0.2.3",
"assert-plus": "^1.0.0",
"bcrypt-pbkdf": "^1.0.0",
"dashdash": "^1.12.0",
"ecc-jsbn": "~0.1.1",
"getpass": "^0.1.1",
"jsbn": "~0.1.0",
"safer-buffer": "^2.0.2",
"tweetnacl": "~0.14.0"
}
},
"strip-bom": {
@ -642,7 +642,7 @@
"integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=",
"dev": true,
"requires": {
"has-flag": "1.0.0"
"has-flag": "^1.0.0"
},
"dependencies": {
"has-flag": {
@ -659,7 +659,7 @@
"integrity": "sha1-zVYVdSU5BXwNwEkaYhw7xvvh0YI=",
"dev": true,
"requires": {
"hoek": "4.2.1"
"hoek": "4.x.x"
}
},
"tough-cookie": {
@ -668,7 +668,7 @@
"integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==",
"dev": true,
"requires": {
"punycode": "1.4.1"
"punycode": "^1.4.1"
}
},
"tree-kill": {
@ -683,7 +683,7 @@
"integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
"dev": true,
"requires": {
"safe-buffer": "5.1.2"
"safe-buffer": "^5.0.1"
}
},
"tweetnacl": {
@ -705,8 +705,8 @@
"integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==",
"dev": true,
"requires": {
"spdx-correct": "3.0.0",
"spdx-expression-parse": "3.0.0"
"spdx-correct": "^3.0.0",
"spdx-expression-parse": "^3.0.0"
}
},
"verror": {
@ -715,9 +715,9 @@
"integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
"dev": true,
"requires": {
"assert-plus": "1.0.0",
"assert-plus": "^1.0.0",
"core-util-is": "1.0.2",
"extsprintf": "1.3.0"
"extsprintf": "^1.2.0"
}
},
"wait-on": {
@ -726,11 +726,11 @@
"integrity": "sha512-hDwJ674+7dfiiK/cxtYCwPxlnjXDjto/pCz1PF02sXUhqCqCWsgvxZln0699PReWqXXgkxqkF6DDo5Rj9sjNvw==",
"dev": true,
"requires": {
"core-js": "2.5.7",
"joi": "9.2.0",
"minimist": "1.2.0",
"request": "2.87.0",
"rx": "4.1.0"
"core-js": "^2.4.1",
"joi": "^9.2.0",
"minimist": "^1.2.0",
"request": "^2.78.0",
"rx": "^4.1.0"
},
"dependencies": {
"rx": {

View File

@ -1,6 +1,6 @@
{
"name": "opt-cc",
"version": "1.9.1",
"version": "1.9.7",
"author": "Florian Hartwich <hardi@noarch.de>",
"private": true,
"scripts": {

View File

@ -3,7 +3,6 @@
+ _id: `` (string, required) - log entry id
+ war: `` (string, required) - warId
+ time: `` (string, required) - logging timestamp
+ __v: 0 (number, required) - object version number
# LogPoints (Log)
## Properties
@ -74,18 +73,19 @@
#LogVehicle (Log)
## Properties
+ shooter: `HardiReady` (string, required) - name of player who shot the vehicle
+ additionalShooter: [`[GNC]Paolo`, `Dominik`] (array[string], required) - additional crew members of shooter vehicle
+ additionalShooter: `[GNC]Paolo`, `Dominik` (array[string], required) - additional crew members of shooter vehicle
+ target: `T-100` (string, required) - name of the vehicle
+ fraction: `BLUFOR` (enum, required) - fraction of the shooter
+ Members
+ `BLUFOR`
+ `OPFOR`
+ `NONE`
+ vehicleClass: `LIGHT` (enum, required) - class of shot vehicle
+ vehicleClass: `LIGHT` (enum[string], required) - class of shot vehicle
+ Members
+ `LIGHT`
+ `HEAVY`
+ `AIR`
+ `BOAT`
+ `UNKNOWN`
+ shooterVehicle: `FV-720 Mora` (string, optional) - vehicle in whiock the shooting player sat
+ magazine: `30 mm APFSDS` (string, optional) - magazine name used to execute the kill

View File

@ -6,6 +6,8 @@ A war as used in statistics
+ title: `Battle No.1` (string, required) - the display neme of the war
+ date: `2018-02-24T20:01:25.825Z` (string, required) - war start timestamp
+ endDate: `2018-02-24T22:31:26.855Z` (string, required) - war end timestamp
+ fractionMappingBlufor: `BLUFOR` (enum[string], required) - display name mapping for Blufor fraction
+ fractionMappingOpfor: `OPFOR` (enum[string], required) - display name mapping for Opfor fraction
+ ptBlufor: 11 (number, required) - final points fraction Blufor
+ ptOpfor: 12 (number, required) - final points fraction Opfor
+ playersBlufor: 36 (number, required) - player count of fraction Blufor

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 65 KiB

View File

@ -5,6 +5,11 @@ module.exports = {
database: {
uri: 'mongodb://localhost:27017/',
db: 'cc',
mongooseConfig: {
useNewUrlParser: true,
useCreateIndex: true,
useFindAndModify: false,
},
},
prod: {

View File

@ -10,7 +10,7 @@ const DecorationSchema = new Schema({
},
fraction: {
type: String,
enum: ['BLUFOR', 'OPFOR', 'GLOBAL'],
enum: ['BLUFOR', 'OPFOR', 'ARF', 'SWORD', 'GLOBAL'],
required: true,
},
description: {

View File

@ -3,37 +3,49 @@
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const LogBudgetSchema = new Schema({
war: {
type: mongoose.Schema.Types.ObjectId,
ref: 'War',
required: true,
const LogBudgetSchema = new Schema(
{
war: {
type: mongoose.Schema.Types.ObjectId,
ref: 'War',
required: true,
},
time: {
type: Date,
required: true,
},
fraction: {
type: String,
enum: ['BLUFOR', 'OPFOR'],
required: true,
},
oldBudget: {
type: Number,
get: (v) => Math.round(v),
set: (v) => Math.round(v),
required: true,
},
newBudget: {
type: Number,
get: (v) => Math.round(v),
set: (v) => Math.round(v),
required: true,
},
buy: {
type: Boolean,
required: true,
},
player: {
type: String,
},
item: {
type: String,
},
},
time: {
type: Date,
required: true,
},
fraction: {
type: String,
enum: ['BLUFOR', 'OPFOR'],
required: true,
},
oldBudget: {
type: Number,
get: (v) => Math.round(v),
set: (v) => Math.round(v),
required: true,
},
newBudget: {
type: Number,
get: (v) => Math.round(v),
set: (v) => Math.round(v),
required: true,
},
}, {
collection: 'logBudget',
versionKey: false,
});
{
collection: 'logBudget',
versionKey: false,
});
// optional more indices
LogBudgetSchema.index({war: 1});

View File

@ -30,7 +30,7 @@ const LogVehicleKillSchema = new Schema({
},
vehicleClass: {
type: String,
enum: ['LIGHT', 'HEAVY', 'AIR', 'UNKNOWN'],
enum: ['LIGHT', 'HEAVY', 'AIR', 'BOAT', 'UNKNOWN'],
required: true,
},
magazine: {

View File

@ -42,6 +42,12 @@ const PlayerSchema = new Schema({
set: (v) => Math.round(v),
required: true,
},
vehicleBoat: {
type: Number,
get: (v) => Math.round(v),
set: (v) => Math.round(v),
required: true,
},
death: {
type: Number,
get: (v) => Math.round(v),

View File

@ -14,6 +14,16 @@ const WarSchema = new Schema({
endDate: {
type: Date,
},
fractionMappingBlufor: {
type: String,
enum: ['BLUFOR', 'OPFOR', 'ARF', 'SWORD'],
default: 'BLUFOR',
},
fractionMappingOpfor: {
type: String,
enum: ['BLUFOR', 'OPFOR', 'ARF', 'SWORD'],
default: 'OPFOR',
},
ptBlufor: {
type: Number,
get: (v) => Math.round(v),

186
server/package-lock.json generated
View File

@ -1111,9 +1111,9 @@
"dev": true
},
"bluebird": {
"version": "3.5.0",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz",
"integrity": "sha1-eRQg1/VR7qKJdFOop3ZT+WYG1nw="
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz",
"integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA=="
},
"bmp-js": {
"version": "0.1.0",
@ -1267,9 +1267,9 @@
"dev": true
},
"bson": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/bson/-/bson-1.0.9.tgz",
"integrity": "sha512-IQX9/h7WdMBIW/q/++tGd+emQr0XMdeZ6icnT/74Xk9fnabWn+gZgpE+9V+gujL3hhJOoNrnDVY7tWdzc7NUTg=="
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/bson/-/bson-1.1.0.tgz",
"integrity": "sha512-9Aeai9TacfNtWXOYarkFJRW2CWo+dRon+fuLZYJmvLV3+MiUp0bEI6IAZfXEIg7/Pl/7IWlLaDnhzTsD81etQA=="
},
"buffer": {
"version": "3.6.0",
@ -3984,14 +3984,12 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@ -4006,20 +4004,17 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"core-util-is": {
"version": "1.0.2",
@ -4136,8 +4131,7 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"ini": {
"version": "1.3.5",
@ -4149,7 +4143,6 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@ -4164,7 +4157,6 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@ -4172,14 +4164,12 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"minipass": {
"version": "2.2.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.1",
"yallist": "^3.0.0"
@ -4198,7 +4188,6 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@ -4279,8 +4268,7 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"object-assign": {
"version": "4.1.1",
@ -4292,7 +4280,6 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@ -4414,7 +4401,6 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@ -6312,9 +6298,9 @@
}
},
"kareem": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/kareem/-/kareem-2.2.1.tgz",
"integrity": "sha512-xpDFy8OxkFM+vK6pXy6JmH92ibeEFUuDWzas5M9L7MzVmHW3jzwAHxodCPV/BYkf4A31bVDLyonrMfp9RXb/oA=="
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.0.tgz",
"integrity": "sha512-6hHxsp9e6zQU8nXsP+02HGWXwTkOEw6IROhF2ZA28cYbUk4eJ6QbtZvdqZOdD9YPKghG3apk5eOCvs+tLl3lRg=="
},
"keypress": {
"version": "0.1.0",
@ -6605,9 +6591,9 @@
}
},
"lodash": {
"version": "4.17.10",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
"integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg=="
"version": "4.17.11",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
},
"lodash._basecopy": {
"version": "3.0.1",
@ -6671,7 +6657,8 @@
"lodash.get": {
"version": "4.4.2",
"resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
"integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk="
"integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=",
"dev": true
},
"lodash.isarguments": {
"version": "3.1.0",
@ -6912,6 +6899,12 @@
"timers-ext": "^0.1.5"
}
},
"memory-pager": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",
"integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==",
"optional": true
},
"meow": {
"version": "3.7.0",
"resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
@ -7140,21 +7133,37 @@
}
},
"mongodb": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.1.0.tgz",
"integrity": "sha512-fSDZRq9FomRqeDSM7MpMTLa8sz+STs3nZ7Ib0+xvmaKZ6nquNDN4zGDsVhjto6UozFvHMDYJMAfJwhqUygXs9g==",
"version": "3.1.13",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.1.13.tgz",
"integrity": "sha512-sz2dhvBZQWf3LRNDhbd30KHVzdjZx9IKC0L+kSZ/gzYquCF5zPOgGqRz6sSCqYZtKP2ekB4nfLxhGtzGHnIKxA==",
"requires": {
"mongodb-core": "3.1.0"
"mongodb-core": "3.1.11",
"safe-buffer": "^5.1.2"
},
"dependencies": {
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}
}
},
"mongodb-core": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-3.1.0.tgz",
"integrity": "sha512-qRjG62Fu//CZhkgn0jA/k8jh5MhACIq8cOJUryH6sck87pgt+C222MSD02tsCq5zNo/B6ZFHtNodZ2qpf8E86g==",
"version": "3.1.11",
"resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-3.1.11.tgz",
"integrity": "sha512-rD2US2s5qk/ckbiiGFHeu+yKYDXdJ1G87F6CG3YdaZpzdOm5zpoAZd/EKbPmFO6cQZ+XVXBXBJ660sSI0gc6qg==",
"requires": {
"bson": "~1.0.4",
"bson": "^1.1.0",
"require_optional": "^1.0.1",
"safe-buffer": "^5.1.2",
"saslprep": "^1.0.0"
},
"dependencies": {
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}
}
},
"mongodb-memory-server": {
@ -7177,28 +7186,33 @@
}
},
"mongoose": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.2.0.tgz",
"integrity": "sha512-PCChMFJHO8C+M2JYqLhOzpiDD54VoW7XbS0V9V/R6PRJOZ4GNmT4KQzyFDaXZTNRpeQpSPlz5x5Szk/kpdYY9g==",
"version": "5.4.13",
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.4.13.tgz",
"integrity": "sha512-4dgmFbtNECbW3ZMS6ha2pebinUzZo789scdccdyyajbmaunBPqZJqp6eO6pThIqDsgSOkRi4IrzkZm8kmhtZMA==",
"requires": {
"async": "2.6.1",
"bson": "~1.0.5",
"kareem": "2.2.1",
"lodash.get": "4.4.2",
"mongodb": "3.1.0",
"mongodb-core": "3.1.0",
"bson": "~1.1.0",
"kareem": "2.3.0",
"mongodb": "3.1.13",
"mongodb-core": "3.1.11",
"mongoose-legacy-pluralize": "1.0.2",
"mpath": "0.4.1",
"mquery": "3.0.0",
"ms": "2.0.0",
"mpath": "0.5.1",
"mquery": "3.2.0",
"ms": "2.1.1",
"regexp-clone": "0.0.1",
"safe-buffer": "5.1.2",
"sliced": "1.0.1"
},
"dependencies": {
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
},
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}
}
},
@ -7235,38 +7249,26 @@
}
},
"mpath": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/mpath/-/mpath-0.4.1.tgz",
"integrity": "sha512-NNY/MpBkALb9jJmjpBlIi6GRoLveLUM0pJzgbp9vY9F7IQEb/HREC/nxrixechcQwd1NevOhJnWWV8QQQRE+OA=="
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/mpath/-/mpath-0.5.1.tgz",
"integrity": "sha512-H8OVQ+QEz82sch4wbODFOz+3YQ61FYz/z3eJ5pIdbMEaUzDqA268Wd+Vt4Paw9TJfvDgVKaayC0gBzMIw2jhsg=="
},
"mquery": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/mquery/-/mquery-3.0.0.tgz",
"integrity": "sha512-WL1Lk8v4l8VFSSwN3yCzY9TXw+fKVYKn6f+w86TRzOLSE8k1yTgGaLBPUByJQi8VcLbOdnUneFV/y3Kv874pnQ==",
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.0.tgz",
"integrity": "sha512-qPJcdK/yqcbQiKoemAt62Y0BAc0fTEKo1IThodBD+O5meQRJT/2HSe5QpBNwaa4CjskoGrYWsEyjkqgiE0qjhg==",
"requires": {
"bluebird": "3.5.0",
"debug": "2.6.9",
"bluebird": "3.5.1",
"debug": "3.1.0",
"regexp-clone": "0.0.1",
"sliced": "0.0.5"
"safe-buffer": "5.1.2",
"sliced": "1.0.1"
},
"dependencies": {
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"requires": {
"ms": "2.0.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"sliced": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/sliced/-/sliced-0.0.5.tgz",
"integrity": "sha1-XtwETKTrb3gW1Qui/GPiXY/kcH8="
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}
}
},
@ -9018,10 +9020,13 @@
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"saslprep": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.0.tgz",
"integrity": "sha512-5lvKUEQ7lAN5/vPl5d3k8FQeDbEamu9kizfATfLLWV5h6Mkh1xcieR1FSsJkcSRUk49lF2tAW8gzXWVwtwZVhw==",
"optional": true
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.2.tgz",
"integrity": "sha512-4cDsYuAjXssUSjxHKRe4DTZC0agDwsCqcMqtJAQPzC74nJ7LfAJflAtC1Zed5hMzEQKj82d3tuzqdGNRsLJ4Gw==",
"optional": true,
"requires": {
"sparse-bitfield": "^3.0.3"
}
},
"sax": {
"version": "1.2.4",
@ -9520,6 +9525,15 @@
"resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz",
"integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw=="
},
"sparse-bitfield": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
"integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=",
"optional": true,
"requires": {
"memory-pager": "^1.0.2"
}
},
"spawn-args": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/spawn-args/-/spawn-args-0.2.0.tgz",

View File

@ -31,9 +31,9 @@
"imagemin-pngquant": "^5.0.0",
"jimp": "^0.6.0",
"jsonwebtoken": "^7.4.3",
"lodash": "^4.17.4",
"lodash": "^4.17.11",
"mkdirp": "^0.5.1",
"mongoose": "^5.0.3",
"mongoose": "^5.4.13",
"morgan": "^1.9.1",
"multer": "^1.3.0",
"node-html-parser": "^1.1.10",

View File

@ -104,16 +104,16 @@ campaigns.route('/:id')
WarModel.find({campaign: req.params.id}, (err, wars) => {
wars.forEach((item) => {
// delete linked appearances
PlayerModel.find({warId: item._id}).remove().exec();
LogKillModel.find({war: item._id}).remove().exec();
LogVehicleKillModel.find({war: item._id}).remove().exec();
LogRespawnModel.find({war: item._id}).remove().exec();
LogReviveModel.find({war: item._id}).remove().exec();
LogFlagModel.find({war: item._id}).remove().exec();
LogBudgetModel.find({war: item._id}).remove().exec();
LogTransportModel.find({war: item._id}).remove().exec();
LogPointsModel.find({war: item._id}).remove().exec();
LogPlayerCountModel.find({war: item._id}).remove().exec();
PlayerModel.find({warId: item._id}).deleteMany();
LogKillModel.find({war: item._id}).deleteMany();
LogVehicleKillModel.find({war: item._id}).deleteMany();
LogRespawnModel.find({war: item._id}).deleteMany();
LogReviveModel.find({war: item._id}).deleteMany();
LogFlagModel.find({war: item._id}).deleteMany();
LogBudgetModel.find({war: item._id}).deleteMany();
LogTransportModel.find({war: item._id}).deleteMany();
LogPointsModel.find({war: item._id}).deleteMany();
LogPlayerCountModel.find({war: item._id}).deleteMany();
// check if logfiles exist and delete from fs
const warDir = resourceLocation + item.id;

View File

@ -37,7 +37,11 @@ decorationRouter.route('/')
.get((req, res, next) => {
const filter = {};
if (req.query.fractFilter) {
filter.fraction = req.query.fractFilter.toUpperCase();
filter.fraction = {
'$in': req.query.fractFilter
.toUpperCase()
.split(','),
};
}
if (req.query.q) {
filter.name = {$regex: req.query.q, $options: 'i'};
@ -170,7 +174,7 @@ decorationRouter.route('/:id')
}
// deleted all awardings linked to this decoration
AwardingsModel.find({decorationId: id}).remove().exec();
AwardingsModel.find({decorationId: id}).deleteMany();
// delete graphic
fs.unlink(resourceLocation.concat(id).concat('.png'),

View File

@ -43,7 +43,7 @@ logsRouter.route('/:warId')
const sort = {sort: {time: 1}};
const pointsObjects = LogPointsModel.find(filter, {}, sort);
const budgetObjects = LogBudgetModel.find(filter, {}, sort);
const budgetObjects = LogBudgetModel.find(filter, {player: 0, item: 0, buy: 0}, sort);
const respawnObjects = LogRespawnModel.find(filter, {}, sort);
const reviveObjects = LogReviveModel.find(filter, {}, sort);
const killObjects = LogKillModel.find(filter, {}, sort);

View File

@ -26,92 +26,100 @@ campaignPlayer.route('/ranking/:campaignId')
const warIds = wars.map((obj) => {
return obj._id;
});
PlayerModel.find({warId: {'$in': warIds}}, (err, items) => {
if (err) return next(err);
if (!items || items.length === 0) {
const err = new Error('No players for given campaignId');
err.status = codes.notfound;
return next(err);
}
const rankingItems = [];
// check only first player to have valid steamUUID - then decide if tracked by name or by ID
const usesUUID = isSteamUUID(items[0].steamUUID);
new Set(items.map(usesUUID ? (x) => x.steamUUID : (x) => x.name))
.forEach((player) => {
const playerInstances = items.filter(
usesUUID ? (p) => p.steamUUID === player : (p) => p.name === player);
const resItem = {
name: usesUUID ? playerInstances[playerInstances.length - 1].name : player,
kill: 0,
vehicleLight: 0,
vehicleHeavy: 0,
vehicleAir: 0,
death: 0,
friendlyFire: 0,
revive: 0,
respawn: 0,
flagTouch: 0,
travelDistance: 0,
driverDistance: 0,
};
for (let i = 0; i < playerInstances.length; i++) {
const player = playerInstances[i];
resItem.kill += player.kill;
resItem.death += player.death;
resItem.friendlyFire += player.friendlyFire;
resItem.vehicleLight += player.vehicleLight;
resItem.vehicleHeavy += player.vehicleHeavy;
resItem.vehicleAir += player.vehicleAir;
resItem.revive += player.revive;
resItem.respawn += player.respawn;
resItem.flagTouch += player.flagTouch;
if (player.travelDistance) {
resItem.travelDistance += Math.round(player.travelDistance / 1000); // meters -> km
}
if (player.driverDistance) {
resItem.driverDistance += Math.round(player.driverDistance / 1000); // meters -> km
}
}
resItem.warCount = playerInstances.length;
resItem.fraction = playerInstances[playerInstances.length - 1].fraction;
rankingItems.push(resItem);
});
const getSortedField = (fieldName) => {
let num = 1;
const filteredSortResult = rankingItems.map((item) => {
return {
name: item.name,
fraction: item.fraction,
[fieldName]: item[fieldName],
};
})
.sort((a, b) => b[fieldName] - a[fieldName]);
const res = JSON.parse(JSON.stringify(filteredSortResult));
for (const entity of res) {
entity.num = num++;
WarModel.findOne({campaign: req.params.campaignId}, {}, {sort: {'date': -1}}, (err, latestWar) => {
PlayerModel.find({warId: {'$in': warIds}}, (err, items) => {
if (err) return next(err);
if (!items || items.length === 0) {
const err = new Error('No players for given campaignId');
err.status = codes.notfound;
return next(err);
}
return res;
};
res.locals.items = {
kill: getSortedField('kill'),
death: getSortedField('death'),
friendlyFire: getSortedField('friendlyFire'),
vehicleLight: getSortedField('vehicleLight'),
vehicleHeavy: getSortedField('vehicleHeavy'),
vehicleAir: getSortedField('vehicleAir'),
revive: getSortedField('revive'),
respawn: getSortedField('respawn'),
flagTouch: getSortedField('flagTouch'),
travelDistance: getSortedField('travelDistance'),
driverDistance: getSortedField('driverDistance'),
warCount: getSortedField('warCount'),
};
next();
const rankingItems = [];
// check only first player to have valid steamUUID - then decide if tracked by name or by ID
const usesUUID = isSteamUUID(items[0].steamUUID);
new Set(items.map(usesUUID ? (x) => x.steamUUID : (x) => x.name))
.forEach((player) => {
const playerInstances = items.filter(
usesUUID ? (p) => p.steamUUID === player : (p) => p.name === player);
const resItem = {
name: usesUUID ? playerInstances[playerInstances.length - 1].name : player,
kill: 0,
vehicleLight: 0,
vehicleHeavy: 0,
vehicleAir: 0,
death: 0,
friendlyFire: 0,
revive: 0,
respawn: 0,
flagTouch: 0,
travelDistance: 0,
driverDistance: 0,
};
for (let i = 0; i < playerInstances.length; i++) {
const player = playerInstances[i];
resItem.kill += player.kill;
resItem.death += player.death;
resItem.friendlyFire += player.friendlyFire;
resItem.vehicleLight += player.vehicleLight;
resItem.vehicleHeavy += player.vehicleHeavy;
resItem.vehicleAir += player.vehicleAir;
resItem.revive += player.revive;
resItem.respawn += player.respawn;
resItem.flagTouch += player.flagTouch;
if (player.travelDistance) {
resItem.travelDistance += Math.round(player.travelDistance / 1000); // meters -> km
}
if (player.driverDistance) {
resItem.driverDistance += Math.round(player.driverDistance / 1000); // meters -> km
}
}
resItem.warCount = playerInstances.length;
const latestPlayerFraction = playerInstances[playerInstances.length - 1].fraction;
resItem.fraction =
(latestPlayerFraction === 'OPFOR') ?
latestWar.fractionMappingOpfor :
latestWar.fractionMappingBlufor;
rankingItems.push(resItem);
});
const getSortedField = (fieldName) => {
let num = 1;
const filteredSortResult = rankingItems.map((item) => {
return {
name: item.name,
fraction: item.fraction,
[fieldName]: item[fieldName],
};
})
.sort((a, b) => b[fieldName] - a[fieldName]);
const res = JSON.parse(JSON.stringify(filteredSortResult));
for (const entity of res) {
entity.num = num++;
}
return res;
};
res.locals.items = {
kill: getSortedField('kill'),
death: getSortedField('death'),
friendlyFire: getSortedField('friendlyFire'),
vehicleLight: getSortedField('vehicleLight'),
vehicleHeavy: getSortedField('vehicleHeavy'),
vehicleAir: getSortedField('vehicleAir'),
revive: getSortedField('revive'),
respawn: getSortedField('respawn'),
flagTouch: getSortedField('flagTouch'),
travelDistance: getSortedField('travelDistance'),
driverDistance: getSortedField('driverDistance'),
warCount: getSortedField('warCount'),
};
next();
});
});
});
})

View File

@ -168,7 +168,6 @@ users.route('/:id')
res.locals.items = item;
} else {
err.status = codes.wrongrequest;
console.log(err);
err.message += ' in fields: ' + Object.getOwnPropertyNames(err.errors);
}
@ -191,7 +190,7 @@ users.route('/:id')
}
// deleted all awardings linked to this user
AwardingModel.find({userId: req.params.id}).remove().exec();
AwardingModel.find({userId: req.params.id}).deleteOne();
// check if signature exists and delete compressed and uncompressed file
const fileMinified = resourceLocation + req.params.id + '.png';

View File

@ -172,6 +172,11 @@ wars.route('/:id')
return next(err);
}
// TODO: temp solution for CC-93 - add boat kills to light vehicle kills until FE available
items.forEach((player) => {
player.vehicleLight = player.vehicleLight + player.vehicleBoat;
});
const responseObj = item.toObject();
responseObj.players = items;
res.locals.items = responseObj;

View File

@ -19,8 +19,7 @@ const {exec} = require('child_process');
// cluster mode
const cluster = require('cluster');
const envWorkerNum = process.env.NODE_WORKER_COUNT;
const cpuCount = require('os').cpus().length;
const numWorkers = (envWorkerNum) ? envWorkerNum : cpuCount;
const numWorkers = (envWorkerNum) ? envWorkerNum : 2;
// own modules
const config = require('./config/config');
@ -115,78 +114,81 @@ errorResponseWare(app);
if (process.env.NODE_ENV === config.test.unit.env || process.env.NODE_ENV === config.test.dredd.env) {
const MongodbMemoryServer = require('mongodb-memory-server').default;
const mongoServer = new MongodbMemoryServer();
mongoose.Promise = Promise;
mongoServer.getConnectionString().then((mongoUri) => {
mongoose.connect(mongoUri, {useNewUrlParser: true});
mongoServer.getConnectionString()
.then((mongoUri) => {
mongoose.connect(mongoUri, config.database.mongooseConfig);
mongoose.connection.on('error', (e) => {
if (e.message.code === 'ETIMEDOUT') {
error(e);
mongoose.connect(mongoUri);
}
error(e);
});
mongoose.connection.on('error', (e) => {
if (e.message.code === 'ETIMEDOUT') {
error(e);
mongoose.connect(mongoUri);
}
error(e);
});
if (process.env.NODE_ENV === config.test.dredd.env) {
const mongoPortAndDB = mongoUri.replace('mongodb://localhost:', '').split('/');
exec(
__dirname + '/apib/dredd/populate-data.sh'
.concat(' -p ').concat(mongoPortAndDB[0])
.concat(' -d ').concat(mongoPortAndDB[1]), (err, stdout, stderr) => {
if (err) {
error(err.message);
} else {
logger('\x1b[32m%s\x1b[0m', stderr);
}
});
}
if (process.env.NODE_ENV === config.test.dredd.env) {
const mongoPortAndDB = mongoUri.replace('mongodb://localhost:', '').split('/');
exec(
__dirname + '/apib/dredd/populate-data.sh'
.concat(' -p ').concat(mongoPortAndDB[0])
.concat(' -d ').concat(mongoPortAndDB[1]), (err, stdout, stderr) => {
if (err) {
error(err.message);
} else {
logger('\x1b[32m%s\x1b[0m', stderr);
}
});
}
mongoose.connection.once('open', () => {
logger(`MongoDB successfully connected to ${mongoUri}`);
app.listen(config.test.port);
logger('Listening on port ' + config.test.port);
});
});
mongoose.connection.once('open', () => {
logger(`MongoDB successfully connected to ${mongoUri}`);
app.listen(config.test.port);
logger('Listening on port ' + config.test.port);
});
});
} else {
mongoose.connect(config.database.uri + config.database.db, {useNewUrlParser: true}).then((db) => {
let cronWorkerPID;
if (cluster.isMaster) {
// Fork workers
for (let i = 0; i < numWorkers; i++) {
if (i === 0) {
const spawnedWorker = cluster.fork({START_CRON: true});
cronWorkerPID = spawnedWorker.process.pid;
} else {
cluster.fork();
}
}
logger(`Master ${process.pid} is running. Forking ${numWorkers} workers`);
mongoose.connect(config.database.uri + config.database.db, config.database.mongooseConfig)
.then((db) => {
let cronWorkerPID;
if (cluster.isMaster) {
// Fork workers
for (let i = 0; i < numWorkers; i++) {
if (i === 0) {
const spawnedWorker = cluster.fork({START_CRON: true});
cronWorkerPID = spawnedWorker.process.pid;
} else {
cluster.fork();
}
}
logger(`Master ${process.pid} is running. Forking ${numWorkers} workers`);
// Check if worker id is died
cluster.on('exit', (worker, code, signal) => {
logger(`worker ${worker.process.pid} died`);
if (worker.process.pid === cronWorkerPID) {
const spawnedWorker = cluster.fork({START_CRON: true});
cronWorkerPID = spawnedWorker.process.pid;
} else {
cluster.fork();
}
});
} else {
app.listen(config.port, (err) => {
if (err) {
error(`Error on startup ${err}`);
} else {
logger(`Worker ${process.pid} started. Listening on port ${config.port}`);
if (process.env.START_CRON) {
logger(`Attaching cronJobs to cluster worker ${process.pid}`);
signatureCronJob.start();
backupCronJob.start();
}
}
});
}
});
// Check if worker id is died
cluster.on('exit', (worker, code, signal) => {
logger(`worker ${worker.process.pid} died`);
if (worker.process.pid === cronWorkerPID) {
const spawnedWorker = cluster.fork({START_CRON: true});
cronWorkerPID = spawnedWorker.process.pid;
} else {
cluster.fork();
}
});
} else {
app.listen(config.port, (err) => {
if (err) {
error(`Error on startup ${err}`);
} else {
logger(`Worker ${process.pid} started. Listening on port ${config.port}`);
if (process.env.START_CRON) {
logger(`Attaching cronJobs to cluster worker ${process.pid}`);
signatureCronJob.start();
backupCronJob.start();
}
}
});
}
});
}
module.exports = app;

View File

@ -15,7 +15,7 @@ chai.use(chaiHttp);
// Our parent block
describe('Awardings', () => {
beforeEach((done) => { // Before each test we empty the database
AwardingModel.remove({}, (err) => {
AwardingModel.deleteMany({}, (err) => {
done();
});
});

View File

@ -15,7 +15,7 @@ chai.use(chaiHttp);
// Our parent block
describe('Command', () => {
beforeEach((done) => { // Before each test we empty the database
AwardingModel.remove({}, (err) => {
AwardingModel.deleteMany({}, (err) => {
done();
});
});

View File

@ -15,7 +15,7 @@ chai.use(chaiHttp);
// Our parent block
describe('Decorations', () => {
beforeEach((done) => { // Before each test we empty the database
DecorationModel.remove({}, (err) => {
DecorationModel.deleteMany({}, (err) => {
done();
});
});

View File

@ -15,7 +15,7 @@ chai.use(chaiHttp);
// Our parent block
describe('Ranks', () => {
beforeEach((done) => { // Before each test we empty the database
RankModel.remove({}, (err) => {
RankModel.deleteMany({}, (err) => {
done();
});
});

View File

@ -15,7 +15,7 @@ chai.use(chaiHttp);
// Our parent block
describe('Squads', () => {
beforeEach((done) => { // Before each test we empty the database
SquadModel.remove({}, (err) => {
SquadModel.deleteMany({}, (err) => {
done();
});
});

View File

@ -15,7 +15,7 @@ chai.use(chaiHttp);
// Our parent block
describe('Users', () => {
beforeEach((done) => { // Before each test we empty the database
UserModel.remove({}, (err) => {
UserModel.deleteMany({}, (err) => {
done();
});
});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -1,813 +0,0 @@
info face="DejaVu Sans" size=19 bold=0 italic=0 charset="" unicode=0 stretchH=100 smooth=1 aa=1 padding=1,1,1,1 spacing=-2,-2
common lineHeight=23 base=18 scaleW=512 scaleH=512 pages=1 packed=0
page id=0 file="DEVAJU_SANS_19.png"
chars count=193
char id=0 x=298 y=0 width=13 height=20 xoffset=-1 yoffset=3 xadvance=11 page=0 chnl=0
char id=10 x=0 y=0 width=22 height=22 xoffset=-1 yoffset=-1 xadvance=19 page=0 chnl=0
char id=32 x=0 y=0 width=0 height=0 xoffset=-1 yoffset=17 xadvance=6 page=0 chnl=0
char id=33 x=500 y=42 width=4 height=16 xoffset=2 yoffset=3 xadvance=8 page=0 chnl=0
char id=34 x=67 y=75 width=7 height=7 xoffset=1 yoffset=3 xadvance=9 page=0 chnl=0
char id=35 x=40 y=59 width=15 height=16 xoffset=0 yoffset=3 xadvance=15 page=0 chnl=0
char id=36 x=287 y=0 width=11 height=20 xoffset=1 yoffset=2 xadvance=13 page=0 chnl=0
char id=37 x=22 y=59 width=18 height=16 xoffset=0 yoffset=3 xadvance=18 page=0 chnl=0
char id=38 x=55 y=59 width=15 height=16 xoffset=0 yoffset=3 xadvance=14 page=0 chnl=0
char id=39 x=507 y=59 width=4 height=7 xoffset=1 yoffset=3 xadvance=6 page=0 chnl=0
char id=40 x=240 y=0 width=7 height=20 xoffset=1 yoffset=2 xadvance=8 page=0 chnl=0
char id=41 x=247 y=0 width=7 height=20 xoffset=0 yoffset=2 xadvance=7 page=0 chnl=0
char id=42 x=489 y=59 width=11 height=11 xoffset=-1 yoffset=3 xadvance=9 page=0 chnl=0
char id=43 x=199 y=59 width=14 height=14 xoffset=1 yoffset=5 xadvance=16 page=0 chnl=0
char id=44 x=74 y=75 width=5 height=7 xoffset=0 yoffset=14 xadvance=6 page=0 chnl=0
char id=45 x=119 y=75 width=7 height=4 xoffset=0 yoffset=10 xadvance=7 page=0 chnl=0
char id=46 x=115 y=75 width=4 height=5 xoffset=1 yoffset=14 xadvance=6 page=0 chnl=0
char id=47 x=51 y=22 width=9 height=18 xoffset=-1 yoffset=3 xadvance=6 page=0 chnl=0
char id=48 x=0 y=59 width=12 height=16 xoffset=0 yoffset=3 xadvance=12 page=0 chnl=0
char id=49 x=396 y=42 width=11 height=16 xoffset=1 yoffset=3 xadvance=13 page=0 chnl=0
char id=50 x=407 y=42 width=11 height=16 xoffset=0 yoffset=3 xadvance=12 page=0 chnl=0
char id=51 x=418 y=42 width=11 height=16 xoffset=0 yoffset=3 xadvance=12 page=0 chnl=0
char id=52 x=429 y=42 width=13 height=16 xoffset=-1 yoffset=3 xadvance=12 page=0 chnl=0
char id=53 x=442 y=42 width=11 height=16 xoffset=0 yoffset=3 xadvance=12 page=0 chnl=0
char id=54 x=453 y=42 width=12 height=16 xoffset=0 yoffset=3 xadvance=12 page=0 chnl=0
char id=55 x=465 y=42 width=11 height=16 xoffset=1 yoffset=3 xadvance=13 page=0 chnl=0
char id=56 x=476 y=42 width=12 height=16 xoffset=0 yoffset=3 xadvance=12 page=0 chnl=0
char id=57 x=488 y=42 width=12 height=16 xoffset=0 yoffset=3 xadvance=12 page=0 chnl=0
char id=58 x=430 y=59 width=4 height=12 xoffset=1 yoffset=7 xadvance=6 page=0 chnl=0
char id=59 x=152 y=59 width=5 height=15 xoffset=0 yoffset=6 xadvance=6 page=0 chnl=0
char id=60 x=171 y=59 width=14 height=14 xoffset=1 yoffset=5 xadvance=16 page=0 chnl=0
char id=61 x=30 y=75 width=14 height=8 xoffset=1 yoffset=8 xadvance=16 page=0 chnl=0
char id=62 x=185 y=59 width=14 height=14 xoffset=1 yoffset=5 xadvance=16 page=0 chnl=0
char id=63 x=12 y=59 width=10 height=16 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=0
char id=64 x=268 y=0 width=19 height=20 xoffset=0 yoffset=2 xadvance=19 page=0 chnl=0
char id=65 x=78 y=42 width=15 height=16 xoffset=-1 yoffset=3 xadvance=13 page=0 chnl=0
char id=66 x=93 y=42 width=12 height=16 xoffset=1 yoffset=3 xadvance=13 page=0 chnl=0
char id=67 x=105 y=42 width=13 height=16 xoffset=0 yoffset=3 xadvance=13 page=0 chnl=0
char id=68 x=118 y=42 width=14 height=16 xoffset=1 yoffset=3 xadvance=15 page=0 chnl=0
char id=69 x=132 y=42 width=11 height=16 xoffset=1 yoffset=3 xadvance=12 page=0 chnl=0
char id=70 x=143 y=42 width=10 height=16 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0
char id=71 x=153 y=42 width=14 height=16 xoffset=0 yoffset=3 xadvance=15 page=0 chnl=0
char id=72 x=167 y=42 width=13 height=16 xoffset=1 yoffset=3 xadvance=15 page=0 chnl=0
char id=73 x=504 y=22 width=4 height=16 xoffset=1 yoffset=3 xadvance=6 page=0 chnl=0
char id=74 x=233 y=0 width=7 height=20 xoffset=-2 yoffset=3 xadvance=6 page=0 chnl=0
char id=75 x=180 y=42 width=13 height=16 xoffset=1 yoffset=3 xadvance=13 page=0 chnl=0
char id=76 x=193 y=42 width=11 height=16 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0
char id=77 x=204 y=42 width=15 height=16 xoffset=1 yoffset=3 xadvance=17 page=0 chnl=0
char id=78 x=219 y=42 width=13 height=16 xoffset=1 yoffset=3 xadvance=15 page=0 chnl=0
char id=79 x=232 y=42 width=15 height=16 xoffset=0 yoffset=3 xadvance=15 page=0 chnl=0
char id=80 x=247 y=42 width=11 height=16 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0
char id=81 x=11 y=22 width=15 height=19 xoffset=0 yoffset=3 xadvance=15 page=0 chnl=0
char id=82 x=258 y=42 width=13 height=16 xoffset=1 yoffset=3 xadvance=13 page=0 chnl=0
char id=83 x=271 y=42 width=12 height=16 xoffset=0 yoffset=3 xadvance=12 page=0 chnl=0
char id=84 x=283 y=42 width=14 height=16 xoffset=-1 yoffset=3 xadvance=12 page=0 chnl=0
char id=85 x=297 y=42 width=13 height=16 xoffset=1 yoffset=3 xadvance=14 page=0 chnl=0
char id=86 x=310 y=42 width=15 height=16 xoffset=-1 yoffset=3 xadvance=13 page=0 chnl=0
char id=87 x=325 y=42 width=21 height=16 xoffset=-1 yoffset=3 xadvance=19 page=0 chnl=0
char id=88 x=346 y=42 width=15 height=16 xoffset=-1 yoffset=3 xadvance=13 page=0 chnl=0
char id=89 x=361 y=42 width=14 height=16 xoffset=-1 yoffset=3 xadvance=12 page=0 chnl=0
char id=90 x=375 y=42 width=13 height=16 xoffset=0 yoffset=3 xadvance=13 page=0 chnl=0
char id=91 x=254 y=0 width=7 height=20 xoffset=1 yoffset=2 xadvance=8 page=0 chnl=0
char id=92 x=60 y=22 width=9 height=18 xoffset=-1 yoffset=3 xadvance=6 page=0 chnl=0
char id=93 x=261 y=0 width=7 height=20 xoffset=0 yoffset=2 xadvance=7 page=0 chnl=0
char id=94 x=16 y=75 width=14 height=8 xoffset=1 yoffset=2 xadvance=16 page=0 chnl=0
char id=95 x=126 y=75 width=12 height=4 xoffset=-1 yoffset=20 xadvance=10 page=0 chnl=0
char id=96 x=100 y=75 width=8 height=6 xoffset=0 yoffset=1 xadvance=10 page=0 chnl=0
char id=97 x=255 y=59 width=11 height=13 xoffset=0 yoffset=6 xadvance=12 page=0 chnl=0
char id=98 x=308 y=22 width=11 height=17 xoffset=1 yoffset=2 xadvance=12 page=0 chnl=0
char id=99 x=266 y=59 width=10 height=13 xoffset=0 yoffset=6 xadvance=10 page=0 chnl=0
char id=100 x=319 y=22 width=11 height=17 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=0
char id=101 x=276 y=59 width=12 height=13 xoffset=0 yoffset=6 xadvance=12 page=0 chnl=0
char id=102 x=330 y=22 width=9 height=17 xoffset=0 yoffset=2 xadvance=7 page=0 chnl=0
char id=103 x=339 y=22 width=11 height=17 xoffset=0 yoffset=6 xadvance=12 page=0 chnl=0
char id=104 x=350 y=22 width=11 height=17 xoffset=1 yoffset=2 xadvance=12 page=0 chnl=0
char id=105 x=361 y=22 width=4 height=17 xoffset=1 yoffset=2 xadvance=6 page=0 chnl=0
char id=106 x=39 y=0 width=6 height=21 xoffset=-1 yoffset=2 xadvance=6 page=0 chnl=0
char id=107 x=365 y=22 width=12 height=17 xoffset=1 yoffset=2 xadvance=11 page=0 chnl=0
char id=108 x=377 y=22 width=4 height=17 xoffset=1 yoffset=2 xadvance=6 page=0 chnl=0
char id=109 x=288 y=59 width=18 height=13 xoffset=1 yoffset=6 xadvance=19 page=0 chnl=0
char id=110 x=306 y=59 width=11 height=13 xoffset=1 yoffset=6 xadvance=12 page=0 chnl=0
char id=111 x=317 y=59 width=12 height=13 xoffset=0 yoffset=6 xadvance=12 page=0 chnl=0
char id=112 x=381 y=22 width=11 height=17 xoffset=1 yoffset=6 xadvance=12 page=0 chnl=0
char id=113 x=392 y=22 width=11 height=17 xoffset=0 yoffset=6 xadvance=12 page=0 chnl=0
char id=114 x=329 y=59 width=8 height=13 xoffset=1 yoffset=6 xadvance=9 page=0 chnl=0
char id=115 x=337 y=59 width=10 height=13 xoffset=0 yoffset=6 xadvance=10 page=0 chnl=0
char id=116 x=388 y=42 width=8 height=16 xoffset=0 yoffset=3 xadvance=8 page=0 chnl=0
char id=117 x=347 y=59 width=11 height=13 xoffset=1 yoffset=6 xadvance=13 page=0 chnl=0
char id=118 x=358 y=59 width=13 height=13 xoffset=-1 yoffset=6 xadvance=11 page=0 chnl=0
char id=119 x=371 y=59 width=17 height=13 xoffset=-1 yoffset=6 xadvance=16 page=0 chnl=0
char id=120 x=388 y=59 width=13 height=13 xoffset=-1 yoffset=6 xadvance=11 page=0 chnl=0
char id=121 x=403 y=22 width=13 height=17 xoffset=0 yoffset=6 xadvance=11 page=0 chnl=0
char id=122 x=401 y=59 width=10 height=13 xoffset=0 yoffset=6 xadvance=10 page=0 chnl=0
char id=123 x=45 y=0 width=10 height=21 xoffset=1 yoffset=2 xadvance=12 page=0 chnl=0
char id=124 x=22 y=0 width=4 height=22 xoffset=1 yoffset=2 xadvance=6 page=0 chnl=0
char id=125 x=55 y=0 width=10 height=21 xoffset=1 yoffset=2 xadvance=12 page=0 chnl=0
char id=126 x=79 y=75 width=14 height=7 xoffset=1 yoffset=8 xadvance=16 page=0 chnl=0
char id=160 x=0 y=0 width=0 height=0 xoffset=-1 yoffset=17 xadvance=6 page=0 chnl=0
char id=161 x=504 y=42 width=4 height=16 xoffset=2 yoffset=3 xadvance=8 page=0 chnl=0
char id=162 x=501 y=0 width=10 height=19 xoffset=1 yoffset=3 xadvance=12 page=0 chnl=0
char id=163 x=70 y=59 width=11 height=16 xoffset=0 yoffset=3 xadvance=12 page=0 chnl=0
char id=164 x=213 y=59 width=14 height=14 xoffset=-1 yoffset=5 xadvance=12 page=0 chnl=0
char id=165 x=81 y=59 width=14 height=16 xoffset=-1 yoffset=3 xadvance=12 page=0 chnl=0
char id=166 x=26 y=22 width=4 height=19 xoffset=1 yoffset=3 xadvance=6 page=0 chnl=0
char id=167 x=30 y=22 width=10 height=19 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=0
char id=168 x=138 y=75 width=8 height=4 xoffset=1 yoffset=2 xadvance=10 page=0 chnl=0
char id=169 x=416 y=22 width=16 height=17 xoffset=2 yoffset=2 xadvance=20 page=0 chnl=0
char id=170 x=434 y=59 width=9 height=12 xoffset=-1 yoffset=3 xadvance=8 page=0 chnl=0
char id=171 x=443 y=59 width=11 height=12 xoffset=0 yoffset=6 xadvance=11 page=0 chnl=0
char id=172 x=44 y=75 width=15 height=8 xoffset=1 yoffset=8 xadvance=17 page=0 chnl=0
char id=173 x=119 y=75 width=7 height=4 xoffset=0 yoffset=10 xadvance=7 page=0 chnl=0
char id=174 x=432 y=22 width=16 height=17 xoffset=2 yoffset=2 xadvance=20 page=0 chnl=0
char id=175 x=146 y=75 width=8 height=4 xoffset=1 yoffset=2 xadvance=10 page=0 chnl=0
char id=176 x=59 y=75 width=8 height=8 xoffset=1 yoffset=3 xadvance=10 page=0 chnl=0
char id=177 x=227 y=59 width=14 height=14 xoffset=1 yoffset=5 xadvance=16 page=0 chnl=0
char id=178 x=500 y=59 width=7 height=10 xoffset=0 yoffset=3 xadvance=7 page=0 chnl=0
char id=179 x=0 y=75 width=8 height=10 xoffset=-1 yoffset=3 xadvance=7 page=0 chnl=0
char id=180 x=108 y=75 width=7 height=6 xoffset=2 yoffset=1 xadvance=10 page=0 chnl=0
char id=181 x=448 y=22 width=12 height=17 xoffset=1 yoffset=6 xadvance=13 page=0 chnl=0
char id=182 x=40 y=22 width=11 height=19 xoffset=0 yoffset=3 xadvance=12 page=0 chnl=0
char id=183 x=115 y=75 width=4 height=5 xoffset=1 yoffset=8 xadvance=6 page=0 chnl=0
char id=184 x=93 y=75 width=7 height=7 xoffset=1 yoffset=17 xadvance=10 page=0 chnl=0
char id=185 x=8 y=75 width=8 height=10 xoffset=-1 yoffset=3 xadvance=7 page=0 chnl=0
char id=186 x=454 y=59 width=10 height=12 xoffset=-1 yoffset=3 xadvance=9 page=0 chnl=0
char id=187 x=464 y=59 width=11 height=12 xoffset=1 yoffset=6 xadvance=12 page=0 chnl=0
char id=188 x=69 y=22 width=20 height=18 xoffset=-1 yoffset=2 xadvance=18 page=0 chnl=0
char id=189 x=89 y=22 width=19 height=18 xoffset=-1 yoffset=2 xadvance=18 page=0 chnl=0
char id=190 x=108 y=22 width=21 height=18 xoffset=-1 yoffset=2 xadvance=19 page=0 chnl=0
char id=191 x=95 y=59 width=10 height=16 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=0
char id=192 x=311 y=0 width=15 height=20 xoffset=-1 yoffset=-1 xadvance=13 page=0 chnl=0
char id=193 x=326 y=0 width=15 height=20 xoffset=-1 yoffset=-1 xadvance=13 page=0 chnl=0
char id=194 x=341 y=0 width=15 height=20 xoffset=-1 yoffset=-1 xadvance=13 page=0 chnl=0
char id=195 x=65 y=0 width=16 height=21 xoffset=-2 yoffset=-2 xadvance=12 page=0 chnl=0
char id=196 x=356 y=0 width=16 height=20 xoffset=-1 yoffset=-1 xadvance=14 page=0 chnl=0
char id=197 x=81 y=0 width=15 height=21 xoffset=-1 yoffset=-2 xadvance=13 page=0 chnl=0
char id=198 x=105 y=59 width=20 height=16 xoffset=-2 yoffset=3 xadvance=18 page=0 chnl=0
char id=199 x=372 y=0 width=13 height=20 xoffset=0 yoffset=3 xadvance=13 page=0 chnl=0
char id=200 x=385 y=0 width=11 height=20 xoffset=1 yoffset=-1 xadvance=12 page=0 chnl=0
char id=201 x=396 y=0 width=11 height=20 xoffset=1 yoffset=-1 xadvance=12 page=0 chnl=0
char id=202 x=407 y=0 width=11 height=20 xoffset=1 yoffset=-1 xadvance=12 page=0 chnl=0
char id=203 x=418 y=0 width=11 height=20 xoffset=1 yoffset=-1 xadvance=12 page=0 chnl=0
char id=204 x=429 y=0 width=7 height=20 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=0
char id=205 x=436 y=0 width=7 height=20 xoffset=0 yoffset=-1 xadvance=6 page=0 chnl=0
char id=206 x=443 y=0 width=8 height=20 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=0
char id=207 x=451 y=0 width=8 height=20 xoffset=0 yoffset=-1 xadvance=7 page=0 chnl=0
char id=208 x=125 y=59 width=16 height=16 xoffset=0 yoffset=3 xadvance=16 page=0 chnl=0
char id=209 x=96 y=0 width=13 height=21 xoffset=1 yoffset=-2 xadvance=15 page=0 chnl=0
char id=210 x=109 y=0 width=15 height=21 xoffset=0 yoffset=-2 xadvance=15 page=0 chnl=0
char id=211 x=124 y=0 width=15 height=21 xoffset=0 yoffset=-2 xadvance=15 page=0 chnl=0
char id=212 x=139 y=0 width=15 height=21 xoffset=0 yoffset=-2 xadvance=15 page=0 chnl=0
char id=213 x=154 y=0 width=15 height=21 xoffset=0 yoffset=-2 xadvance=15 page=0 chnl=0
char id=214 x=459 y=0 width=15 height=20 xoffset=0 yoffset=-1 xadvance=15 page=0 chnl=0
char id=215 x=241 y=59 width=14 height=14 xoffset=1 yoffset=5 xadvance=16 page=0 chnl=0
char id=216 x=129 y=22 width=16 height=18 xoffset=-1 yoffset=2 xadvance=15 page=0 chnl=0
char id=217 x=169 y=0 width=13 height=21 xoffset=1 yoffset=-2 xadvance=14 page=0 chnl=0
char id=218 x=182 y=0 width=13 height=21 xoffset=1 yoffset=-2 xadvance=14 page=0 chnl=0
char id=219 x=195 y=0 width=13 height=21 xoffset=1 yoffset=-2 xadvance=14 page=0 chnl=0
char id=220 x=474 y=0 width=13 height=20 xoffset=1 yoffset=-1 xadvance=14 page=0 chnl=0
char id=221 x=487 y=0 width=14 height=20 xoffset=-1 yoffset=-1 xadvance=12 page=0 chnl=0
char id=222 x=141 y=59 width=11 height=16 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=0
char id=223 x=460 y=22 width=12 height=17 xoffset=1 yoffset=2 xadvance=13 page=0 chnl=0
char id=224 x=145 y=22 width=11 height=18 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=0
char id=225 x=156 y=22 width=11 height=18 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=0
char id=226 x=167 y=22 width=11 height=18 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=0
char id=227 x=472 y=22 width=11 height=17 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=0
char id=228 x=483 y=22 width=11 height=17 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=0
char id=229 x=0 y=22 width=11 height=20 xoffset=0 yoffset=-1 xadvance=12 page=0 chnl=0
char id=230 x=411 y=59 width=19 height=13 xoffset=0 yoffset=6 xadvance=19 page=0 chnl=0
char id=231 x=494 y=22 width=10 height=17 xoffset=0 yoffset=6 xadvance=10 page=0 chnl=0
char id=232 x=178 y=22 width=12 height=18 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=0
char id=233 x=190 y=22 width=12 height=18 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=0
char id=234 x=202 y=22 width=12 height=18 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=0
char id=235 x=0 y=42 width=12 height=17 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=0
char id=236 x=214 y=22 width=8 height=18 xoffset=-2 yoffset=1 xadvance=6 page=0 chnl=0
char id=237 x=222 y=22 width=8 height=18 xoffset=0 yoffset=1 xadvance=6 page=0 chnl=0
char id=238 x=230 y=22 width=9 height=18 xoffset=-2 yoffset=1 xadvance=6 page=0 chnl=0
char id=239 x=12 y=42 width=8 height=17 xoffset=-1 yoffset=2 xadvance=6 page=0 chnl=0
char id=240 x=20 y=42 width=12 height=17 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=0
char id=241 x=32 y=42 width=11 height=17 xoffset=1 yoffset=2 xadvance=12 page=0 chnl=0
char id=242 x=239 y=22 width=12 height=18 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=0
char id=243 x=251 y=22 width=12 height=18 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=0
char id=244 x=263 y=22 width=12 height=18 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=0
char id=245 x=43 y=42 width=12 height=17 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=0
char id=246 x=55 y=42 width=12 height=17 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=0
char id=247 x=475 y=59 width=14 height=12 xoffset=1 yoffset=6 xadvance=16 page=0 chnl=0
char id=248 x=157 y=59 width=14 height=15 xoffset=-1 yoffset=5 xadvance=12 page=0 chnl=0
char id=249 x=275 y=22 width=11 height=18 xoffset=1 yoffset=1 xadvance=13 page=0 chnl=0
char id=250 x=286 y=22 width=11 height=18 xoffset=1 yoffset=1 xadvance=13 page=0 chnl=0
char id=251 x=297 y=22 width=11 height=18 xoffset=1 yoffset=1 xadvance=13 page=0 chnl=0
char id=252 x=67 y=42 width=11 height=17 xoffset=1 yoffset=2 xadvance=13 page=0 chnl=0
char id=253 x=26 y=0 width=13 height=22 xoffset=0 yoffset=1 xadvance=11 page=0 chnl=0
char id=254 x=208 y=0 width=11 height=21 xoffset=1 yoffset=2 xadvance=12 page=0 chnl=0
char id=255 x=219 y=0 width=14 height=21 xoffset=-1 yoffset=2 xadvance=12 page=0 chnl=0
kernings count=615
kerning first=65 second=171 amount=-1
kerning first=194 second=87 amount=-1
kerning first=86 second=58 amount=-2
kerning first=89 second=229 amount=-3
kerning first=196 second=65 amount=1
kerning first=45 second=66 amount=-1
kerning first=221 second=67 amount=-1
kerning first=45 second=71 amount=1
kerning first=187 second=88 amount=-1
kerning first=45 second=74 amount=1
kerning first=221 second=79 amount=-1
kerning first=45 second=81 amount=1
kerning first=65 second=84 amount=-1
kerning first=76 second=85 amount=-1
kerning first=45 second=86 amount=-1
kerning first=66 second=87 amount=-1
kerning first=45 second=88 amount=-1
kerning first=82 second=89 amount=-1
kerning first=65 second=192 amount=1
kerning first=84 second=97 amount=-3
kerning first=221 second=101 amount=-3
kerning first=65 second=102 amount=-1
kerning first=70 second=105 amount=-1
kerning first=89 second=250 amount=-2
kerning first=89 second=117 amount=-2
kerning first=192 second=119 amount=-1
kerning first=243 second=120 amount=-1
kerning first=82 second=253 amount=-1
kerning first=84 second=121 amount=-3
kerning first=76 second=217 amount=-1
kerning first=84 second=187 amount=-1
kerning first=192 second=193 amount=1
kerning first=65 second=194 amount=1
kerning first=221 second=196 amount=-1
kerning first=171 second=198 amount=1
kerning first=89 second=252 amount=-2
kerning first=75 second=210 amount=-1
kerning first=76 second=211 amount=-1
kerning first=75 second=212 amount=-1
kerning first=89 second=225 amount=-3
kerning first=84 second=228 amount=-2
kerning first=75 second=45 amount=-2
kerning first=84 second=231 amount=-3
kerning first=75 second=233 amount=-1
kerning first=87 second=234 amount=-1
kerning first=120 second=235 amount=-1
kerning first=80 second=244 amount=-1
kerning first=87 second=245 amount=-1
kerning first=120 second=246 amount=-1
kerning first=86 second=249 amount=-1
kerning first=192 second=253 amount=-1
kerning first=82 second=67 amount=-1
kerning first=221 second=213 amount=-1
kerning first=120 second=245 amount=-1
kerning first=87 second=111 amount=-1
kerning first=84 second=196 amount=-1
kerning first=195 second=65 amount=1
kerning first=89 second=210 amount=-1
kerning first=65 second=119 amount=-1
kerning first=192 second=121 amount=-1
kerning first=75 second=84 amount=-1
kerning first=79 second=46 amount=-1
kerning first=82 second=249 amount=-1
kerning first=80 second=101 amount=-1
kerning first=76 second=213 amount=-1
kerning first=221 second=243 amount=-3
kerning first=80 second=243 amount=-1
kerning first=70 second=225 amount=-2
kerning first=107 second=111 amount=-1
kerning first=75 second=235 amount=-1
kerning first=86 second=45 amount=-1
kerning first=87 second=242 amount=-1
kerning first=120 second=111 amount=-1
kerning first=107 second=249 amount=-1
kerning first=86 second=225 amount=-1
kerning first=193 second=84 amount=-1
kerning first=196 second=118 amount=-1
kerning first=75 second=250 amount=-1
kerning first=221 second=214 amount=-1
kerning first=195 second=119 amount=-1
kerning first=70 second=246 amount=-1
kerning first=87 second=194 amount=-1
kerning first=192 second=194 amount=1
kerning first=89 second=233 amount=-3
kerning first=120 second=244 amount=-1
kerning first=84 second=244 amount=-2
kerning first=76 second=121 amount=-2
kerning first=84 second=225 amount=-3
kerning first=76 second=219 amount=-1
kerning first=211 second=221 amount=-1
kerning first=195 second=192 amount=1
kerning first=107 second=253 amount=-1
kerning first=86 second=235 amount=-1
kerning first=86 second=250 amount=-1
kerning first=80 second=97 amount=-1
kerning first=221 second=97 amount=-3
kerning first=196 second=253 amount=-1
kerning first=82 second=234 amount=-1
kerning first=221 second=199 amount=-1
kerning first=196 second=171 amount=-1
kerning first=70 second=250 amount=-1
kerning first=86 second=227 amount=-1
kerning first=82 second=192 amount=-1
kerning first=187 second=192 amount=-1
kerning first=107 second=245 amount=-1
kerning first=193 second=65 amount=1
kerning first=84 second=117 amount=-3
kerning first=221 second=224 amount=-3
kerning first=80 second=224 amount=-1
kerning first=65 second=121 amount=-1
kerning first=89 second=235 amount=-3
kerning first=71 second=84 amount=-1
kerning first=45 second=87 amount=-1
kerning first=87 second=58 amount=-1
kerning first=89 second=212 amount=-1
kerning first=84 second=171 amount=-2
kerning first=187 second=195 amount=-1
kerning first=195 second=196 amount=1
kerning first=121 second=46 amount=-3
kerning first=89 second=199 amount=-1
kerning first=213 second=45 amount=1
kerning first=107 second=255 amount=-1
kerning first=45 second=89 amount=-2
kerning first=79 second=88 amount=-1
kerning first=187 second=84 amount=-2
kerning first=82 second=84 amount=-1
kerning first=187 second=193 amount=-1
kerning first=195 second=86 amount=-1
kerning first=196 second=193 amount=1
kerning first=65 second=221 amount=-1
kerning first=75 second=214 amount=-1
kerning first=84 second=246 amount=-2
kerning first=222 second=46 amount=-1
kerning first=195 second=121 amount=-1
kerning first=193 second=195 amount=1
kerning first=45 second=79 amount=1
kerning first=80 second=193 amount=-1
kerning first=253 second=58 amount=-1
kerning first=221 second=193 amount=-1
kerning first=171 second=89 amount=-1
kerning first=82 second=255 amount=-1
kerning first=86 second=229 amount=-1
kerning first=87 second=244 amount=-1
kerning first=194 second=192 amount=1
kerning first=193 second=193 amount=1
kerning first=89 second=79 amount=-1
kerning first=193 second=253 amount=-1
kerning first=210 second=45 amount=1
kerning first=192 second=171 amount=-1
kerning first=87 second=171 amount=-1
kerning first=45 second=210 amount=1
kerning first=195 second=194 amount=1
kerning first=88 second=67 amount=-1
kerning first=194 second=89 amount=-1
kerning first=87 second=246 amount=-1
kerning first=70 second=117 amount=-1
kerning first=82 second=232 amount=-1
kerning first=214 second=221 amount=-1
kerning first=82 second=86 amount=-1
kerning first=187 second=86 amount=-2
kerning first=221 second=105 amount=-1
kerning first=82 second=46 amount=-1
kerning first=75 second=252 amount=-1
kerning first=89 second=187 amount=-1
kerning first=211 second=88 amount=-1
kerning first=196 second=194 amount=1
kerning first=86 second=101 amount=-1
kerning first=70 second=233 amount=-1
kerning first=221 second=226 amount=-3
kerning first=80 second=65 amount=-1
kerning first=221 second=65 amount=-1
kerning first=80 second=226 amount=-1
kerning first=87 second=196 amount=-1
kerning first=192 second=196 amount=1
kerning first=102 second=46 amount=-1
kerning first=89 second=101 amount=-3
kerning first=70 second=234 amount=-1
kerning first=80 second=229 amount=-1
kerning first=214 second=88 amount=-1
kerning first=86 second=244 amount=-1
kerning first=221 second=251 amount=-2
kerning first=86 second=252 amount=-1
kerning first=214 second=45 amount=1
kerning first=76 second=84 amount=-3
kerning first=84 second=67 amount=-1
kerning first=75 second=101 amount=-1
kerning first=75 second=79 amount=-1
kerning first=84 second=111 amount=-3
kerning first=88 second=213 amount=-1
kerning first=84 second=58 amount=-2
kerning first=221 second=228 amount=-3
kerning first=80 second=228 amount=-1
kerning first=66 second=89 amount=-1
kerning first=75 second=121 amount=-1
kerning first=88 second=235 amount=-1
kerning first=82 second=242 amount=-1
kerning first=221 second=252 amount=-2
kerning first=194 second=121 amount=-1
kerning first=82 second=196 amount=-1
kerning first=187 second=196 amount=-1
kerning first=84 second=45 amount=-2
kerning first=89 second=192 amount=-1
kerning first=84 second=233 amount=-3
kerning first=89 second=195 amount=-1
kerning first=194 second=195 amount=1
kerning first=87 second=227 amount=-1
kerning first=107 second=242 amount=-1
kerning first=195 second=84 amount=-1
kerning first=84 second=253 amount=-3
kerning first=75 second=221 amount=-1
kerning first=88 second=232 amount=-1
kerning first=86 second=224 amount=-1
kerning first=196 second=89 amount=-1
kerning first=84 second=114 amount=-3
kerning first=87 second=117 amount=-1
kerning first=75 second=245 amount=-1
kerning first=120 second=234 amount=-1
kerning first=107 second=117 amount=-1
kerning first=193 second=89 amount=-1
kerning first=213 second=221 amount=-1
kerning first=76 second=87 amount=-2
kerning first=107 second=243 amount=-1
kerning first=82 second=243 amount=-1
kerning first=45 second=221 amount=-2
kerning first=221 second=249 amount=-2
kerning first=193 second=192 amount=1
kerning first=84 second=193 amount=-1
kerning first=84 second=250 amount=-3
kerning first=84 second=234 amount=-3
kerning first=45 second=211 amount=1
kerning first=192 second=221 amount=-1
kerning first=82 second=199 amount=-1
kerning first=89 second=214 amount=-1
kerning first=76 second=221 amount=-3
kerning first=75 second=244 amount=-1
kerning first=89 second=58 amount=-3
kerning first=75 second=220 amount=-1
kerning first=82 second=117 amount=-1
kerning first=192 second=87 amount=-1
kerning first=70 second=196 amount=-2
kerning first=211 second=45 amount=1
kerning first=87 second=229 amount=-1
kerning first=70 second=114 amount=-1
kerning first=107 second=251 amount=-1
kerning first=87 second=233 amount=-1
kerning first=89 second=194 amount=-1
kerning first=194 second=194 amount=1
kerning first=86 second=245 amount=-1
kerning first=193 second=119 amount=-1
kerning first=194 second=102 amount=-1
kerning first=82 second=111 amount=-1
kerning first=196 second=192 amount=1
kerning first=221 second=245 amount=-3
kerning first=193 second=196 amount=1
kerning first=89 second=224 amount=-3
kerning first=193 second=86 amount=-1
kerning first=208 second=221 amount=-1
kerning first=82 second=246 amount=-1
kerning first=221 second=235 amount=-3
kerning first=80 second=235 amount=-1
kerning first=195 second=87 amount=-1
kerning first=221 second=212 amount=-1
kerning first=255 second=58 amount=-1
kerning first=75 second=171 amount=-1
kerning first=86 second=195 amount=-1
kerning first=89 second=234 amount=-3
kerning first=81 second=45 amount=1
kerning first=192 second=65 amount=1
kerning first=221 second=45 amount=-2
kerning first=213 second=89 amount=-1
kerning first=70 second=227 amount=-2
kerning first=89 second=244 amount=-3
kerning first=86 second=255 amount=-1
kerning first=86 second=65 amount=-1
kerning first=221 second=225 amount=-3
kerning first=80 second=225 amount=-1
kerning first=75 second=85 amount=-1
kerning first=82 second=193 amount=-1
kerning first=76 second=253 amount=-2
kerning first=194 second=171 amount=-1
kerning first=89 second=171 amount=-2
kerning first=194 second=86 amount=-1
kerning first=86 second=251 amount=-1
kerning first=84 second=194 amount=-1
kerning first=210 second=46 amount=-1
kerning first=196 second=255 amount=-1
kerning first=70 second=111 amount=-1
kerning first=120 second=233 amount=-1
kerning first=84 second=115 amount=-3
kerning first=114 second=45 amount=-1
kerning first=194 second=221 amount=-1
kerning first=45 second=118 amount=-1
kerning first=89 second=196 amount=-1
kerning first=221 second=232 amount=-3
kerning first=114 second=171 amount=-1
kerning first=65 second=87 amount=-1
kerning first=88 second=199 amount=-1
kerning first=245 second=120 amount=-1
kerning first=75 second=251 amount=-1
kerning first=192 second=102 amount=-1
kerning first=70 second=101 amount=-1
kerning first=70 second=121 amount=-2
kerning first=196 second=119 amount=-1
kerning first=196 second=86 amount=-1
kerning first=89 second=105 amount=-1
kerning first=75 second=218 amount=-1
kerning first=80 second=46 amount=-3
kerning first=221 second=46 amount=-4
kerning first=70 second=58 amount=-1
kerning first=89 second=45 amount=-2
kerning first=212 second=46 amount=-1
kerning first=84 second=227 amount=-2
kerning first=70 second=194 amount=-2
kerning first=80 second=192 amount=-1
kerning first=221 second=192 amount=-1
kerning first=89 second=211 amount=-1
kerning first=45 second=214 amount=1
kerning first=107 second=246 amount=-1
kerning first=66 second=86 amount=-1
kerning first=87 second=250 amount=-1
kerning first=210 second=89 amount=-1
kerning first=76 second=220 amount=-1
kerning first=89 second=65 amount=-1
kerning first=194 second=65 amount=1
kerning first=222 second=58 amount=-1
kerning first=82 second=252 amount=-1
kerning first=193 second=121 amount=-1
kerning first=192 second=195 amount=1
kerning first=87 second=195 amount=-1
kerning first=84 second=199 amount=-1
kerning first=87 second=97 amount=-1
kerning first=187 second=66 amount=-1
kerning first=171 second=86 amount=-1
kerning first=82 second=45 amount=-1
kerning first=118 second=45 amount=-1
kerning first=89 second=251 amount=-2
kerning first=75 second=67 amount=-1
kerning first=86 second=232 amount=-1
kerning first=84 second=101 amount=-3
kerning first=120 second=101 amount=-1
kerning first=192 second=118 amount=-1
kerning first=107 second=250 amount=-1
kerning first=196 second=84 amount=-1
kerning first=65 second=193 amount=1
kerning first=75 second=111 amount=-1
kerning first=70 second=245 amount=-1
kerning first=70 second=224 amount=-2
kerning first=80 second=196 amount=-1
kerning first=89 second=228 amount=-3
kerning first=86 second=234 amount=-1
kerning first=75 second=211 amount=-1
kerning first=86 second=253 amount=-1
kerning first=84 second=99 amount=-3
kerning first=107 second=252 amount=-1
kerning first=195 second=193 amount=1
kerning first=196 second=196 amount=1
kerning first=86 second=46 amount=-2
kerning first=102 second=58 amount=-1
kerning first=82 second=87 amount=-1
kerning first=187 second=87 amount=-1
kerning first=75 second=253 amount=-1
kerning first=120 second=243 amount=-1
kerning first=187 second=89 amount=-2
kerning first=221 second=242 amount=-3
kerning first=80 second=242 amount=-1
kerning first=45 second=84 amount=-2
kerning first=76 second=214 amount=-1
kerning first=221 second=233 amount=-3
kerning first=221 second=195 amount=-1
kerning first=171 second=221 amount=-1
kerning first=66 second=221 amount=-1
kerning first=196 second=121 amount=-1
kerning first=82 second=250 amount=-1
kerning first=82 second=233 amount=-1
kerning first=196 second=102 amount=-1
kerning first=76 second=212 amount=-1
kerning first=221 second=117 amount=-2
kerning first=79 second=89 amount=-1
kerning first=70 second=226 amount=-2
kerning first=76 second=218 amount=-1
kerning first=195 second=253 amount=-1
kerning first=84 second=243 amount=-3
kerning first=88 second=79 amount=-1
kerning first=89 second=111 amount=-3
kerning first=84 second=224 amount=-2
kerning first=87 second=193 amount=-1
kerning first=75 second=255 amount=-1
kerning first=89 second=249 amount=-2
kerning first=89 second=67 amount=-1
kerning first=89 second=227 amount=-3
kerning first=193 second=255 amount=-1
kerning first=246 second=120 amount=-1
kerning first=75 second=234 amount=-1
kerning first=192 second=84 amount=-1
kerning first=87 second=101 amount=-1
kerning first=107 second=233 amount=-1
kerning first=84 second=195 amount=-1
kerning first=87 second=243 amount=-1
kerning first=213 second=46 amount=-1
kerning first=75 second=249 amount=-1
kerning first=221 second=58 amount=-3
kerning first=119 second=46 amount=-2
kerning first=79 second=45 amount=1
kerning first=194 second=253 amount=-1
kerning first=86 second=171 amount=-2
kerning first=68 second=89 amount=-1
kerning first=80 second=194 amount=-1
kerning first=221 second=194 amount=-1
kerning first=242 second=120 amount=-1
kerning first=195 second=255 amount=-1
kerning first=84 second=226 amount=-2
kerning first=210 second=88 amount=-1
kerning first=89 second=245 amount=-3
kerning first=70 second=65 amount=-2
kerning first=70 second=97 amount=-2
kerning first=70 second=228 amount=-2
kerning first=107 second=235 amount=-1
kerning first=221 second=229 amount=-3
kerning first=80 second=233 amount=-1
kerning first=66 second=171 amount=-1
kerning first=86 second=194 amount=-1
kerning first=87 second=114 amount=-1
kerning first=213 second=88 amount=-1
kerning first=221 second=234 amount=-3
kerning first=80 second=234 amount=-1
kerning first=84 second=105 amount=-1
kerning first=70 second=251 amount=-1
kerning first=194 second=255 amount=-1
kerning first=82 second=235 amount=-1
kerning first=194 second=118 amount=-1
kerning first=120 second=242 amount=-1
kerning first=87 second=224 amount=-1
kerning first=221 second=171 amount=-2
kerning first=70 second=195 amount=-2
kerning first=195 second=171 amount=-1
kerning first=114 second=46 amount=-2
kerning first=255 second=46 amount=-3
kerning first=76 second=210 amount=-1
kerning first=86 second=192 amount=-1
kerning first=84 second=65 amount=-1
kerning first=70 second=193 amount=-2
kerning first=70 second=253 amount=-2
kerning first=87 second=45 amount=-1
kerning first=194 second=84 amount=-1
kerning first=195 second=118 amount=-1
kerning first=75 second=89 amount=-1
kerning first=89 second=232 amount=-3
kerning first=71 second=89 amount=-1
kerning first=212 second=89 amount=-1
kerning first=65 second=118 amount=-1
kerning first=84 second=251 amount=-3
kerning first=87 second=226 amount=-1
kerning first=196 second=221 amount=-1
kerning first=119 second=58 amount=-1
kerning first=212 second=88 amount=-1
kerning first=89 second=46 amount=-4
kerning first=210 second=221 amount=-1
kerning first=86 second=242 amount=-1
kerning first=195 second=89 amount=-1
kerning first=193 second=102 amount=-1
kerning first=75 second=217 amount=-1
kerning first=221 second=211 amount=-1
kerning first=221 second=246 amount=-3
kerning first=65 second=86 amount=-1
kerning first=75 second=232 amount=-1
kerning first=194 second=119 amount=-1
kerning first=80 second=246 amount=-1
kerning first=102 second=171 amount=-1
kerning first=86 second=121 amount=-1
kerning first=75 second=242 amount=-1
kerning first=70 second=243 amount=-1
kerning first=193 second=87 amount=-1
kerning first=86 second=111 amount=-1
kerning first=82 second=121 amount=-1
kerning first=84 second=46 amount=-2
kerning first=88 second=233 amount=-1
kerning first=192 second=86 amount=-1
kerning first=88 second=234 amount=-1
kerning first=75 second=199 amount=-1
kerning first=45 second=213 amount=1
kerning first=68 second=221 amount=-1
kerning first=70 second=255 amount=-2
kerning first=221 second=250 amount=-2
kerning first=86 second=243 amount=-1
kerning first=65 second=196 amount=1
kerning first=87 second=65 amount=-1
kerning first=88 second=212 amount=-1
kerning first=194 second=196 amount=1
kerning first=87 second=252 amount=-1
kerning first=70 second=235 amount=-1
kerning first=107 second=121 amount=-1
kerning first=114 second=120 amount=-1
kerning first=75 second=219 amount=-1
kerning first=196 second=87 amount=-1
kerning first=102 second=45 amount=-1
kerning first=82 second=101 amount=-1
kerning first=221 second=227 amount=-3
kerning first=80 second=227 amount=-1
kerning first=75 second=243 amount=-1
kerning first=88 second=210 amount=-1
kerning first=87 second=249 amount=-1
kerning first=89 second=242 amount=-3
kerning first=70 second=232 amount=-1
kerning first=214 second=89 amount=-1
kerning first=221 second=210 amount=-1
kerning first=82 second=244 amount=-1
kerning first=211 second=89 amount=-1
kerning first=86 second=246 amount=-1
kerning first=82 second=58 amount=-1
kerning first=70 second=46 amount=-3
kerning first=211 second=46 amount=-1
kerning first=195 second=221 amount=-1
kerning first=80 second=245 amount=-1
kerning first=107 second=101 amount=-1
kerning first=193 second=221 amount=-1
kerning first=82 second=195 amount=-1
kerning first=65 second=65 amount=1
kerning first=89 second=243 amount=-3
kerning first=80 second=111 amount=-1
kerning first=86 second=117 amount=-1
kerning first=221 second=111 amount=-3
kerning first=84 second=235 amount=-3
kerning first=84 second=255 amount=-3
kerning first=84 second=229 amount=-2
kerning first=70 second=192 amount=-2
kerning first=88 second=171 amount=-1
kerning first=82 second=171 amount=-1
kerning first=193 second=171 amount=-1
kerning first=82 second=194 amount=-1
kerning first=187 second=194 amount=-1
kerning first=45 second=212 amount=1
kerning first=65 second=253 amount=-1
kerning first=82 second=245 amount=-1
kerning first=76 second=86 amount=-2
kerning first=86 second=228 amount=-1
kerning first=86 second=196 amount=-1
kerning first=86 second=233 amount=-1
kerning first=84 second=249 amount=-3
kerning first=88 second=45 amount=-1
kerning first=79 second=221 amount=-1
kerning first=88 second=211 amount=-1
kerning first=89 second=97 amount=-3
kerning first=87 second=228 amount=-1
kerning first=192 second=255 amount=-1
kerning first=171 second=84 amount=-1
kerning first=84 second=245 amount=-2
kerning first=89 second=213 amount=-1
kerning first=86 second=187 amount=-1
kerning first=75 second=117 amount=-1
kerning first=76 second=79 amount=-1
kerning first=65 second=89 amount=-1
kerning first=70 second=229 amount=-2
kerning first=253 second=46 amount=-3
kerning first=86 second=97 amount=-1
kerning first=80 second=232 amount=-1
kerning first=107 second=234 amount=-1
kerning first=70 second=244 amount=-1
kerning first=84 second=192 amount=-1
kerning first=107 second=244 amount=-1
kerning first=86 second=226 amount=-1
kerning first=70 second=249 amount=-1
kerning first=75 second=246 amount=-1
kerning first=70 second=252 amount=-1
kerning first=193 second=118 amount=-1
kerning first=87 second=232 amount=-1
kerning first=118 second=46 amount=-1
kerning first=244 second=120 amount=-1
kerning first=84 second=119 amount=-3
kerning first=89 second=193 amount=-1
kerning first=121 second=58 amount=-1
kerning first=194 second=193 amount=1
kerning first=74 second=45 amount=-1
kerning first=87 second=46 amount=-2
kerning first=70 second=242 amount=-1
kerning first=87 second=225 amount=-1
kerning first=71 second=221 amount=-1
kerning first=75 second=87 amount=-1
kerning first=212 second=221 amount=-1
kerning first=65 second=255 amount=-1
kerning first=111 second=120 amount=-1
kerning first=87 second=192 amount=-1
kerning first=192 second=192 amount=1
kerning first=75 second=213 amount=-1
kerning first=88 second=101 amount=-1
kerning first=88 second=214 amount=-1
kerning first=187 second=221 amount=-2
kerning first=82 second=221 amount=-1
kerning first=82 second=65 amount=-1
kerning first=187 second=65 amount=-1
kerning first=195 second=195 amount=1
kerning first=80 second=195 amount=-1
kerning first=208 second=89 amount=-1
kerning first=214 second=46 amount=-1
kerning first=212 second=45 amount=1
kerning first=87 second=251 amount=-1
kerning first=84 second=252 amount=-3
kerning first=76 second=255 amount=-2
kerning first=118 second=58 amount=-1
kerning first=193 second=194 amount=1
kerning first=76 second=89 amount=-3
kerning first=87 second=235 amount=-1
kerning first=82 second=251 amount=-1
kerning first=86 second=193 amount=-1
kerning first=221 second=187 amount=-1
kerning first=195 second=102 amount=-1
kerning first=120 second=232 amount=-1
kerning first=107 second=232 amount=-1
kerning first=84 second=232 amount=-3
kerning first=89 second=246 amount=-3
kerning first=221 second=244 amount=-3
kerning first=196 second=195 amount=1
kerning first=192 second=89 amount=-1
kerning first=84 second=242 amount=-2
kerning first=65 second=195 amount=1
kerning first=89 second=226 amount=-3

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

View File

@ -8,11 +8,18 @@ const VehicleClasses = Object.freeze({
LIGHT: 'Leicht',
HEAVY: 'Schwer',
AIR: 'Flug',
BOAT: 'Boot',
UNKNOWN: 'Unbekannt',
});
const playerNameRegex = /(^|,\s)(.*?)\s\(/g;
const budgetPlayerNameRegex = /\d*\.\s(.*)\s\(ver\)kaufte/;
const budgetItemNameRegex = /\(ver\)kaufte\s(.*)\"$/;
const budgetRespawnNameRegex = /Respawn\svon\s(.*)\"$/;
const vehicleNameEndRegex = /\s\(\w+:/;
const sideRegex = /(side:\s(.*?)\))/;
@ -66,7 +73,9 @@ const parseWarLog = (lineArray, war) => {
'Qilin (Unbewaffnet)', 'Qilin (Bewaffnet)', 'Ifrit',
'Tempest-Transporter', 'Tempest-Transporter (abgedeckt)', 'Tempest Sanitätsfahrzeug',
'Remote Designator [CSAT]', 'UBF Saif',
'Quad Bike', 'HuntIR',
'Quad Bike', 'HuntIR', 'Offroad',
// boats
'RHIB', 'Kampfboot', 'SDV',
];
const addPlayerIfNotExists = (inputPlayer, steamUUID) => {
@ -74,6 +83,10 @@ const parseWarLog = (lineArray, war) => {
if (player && player.name && player.fraction && !playerArrayContains(stats.players, player)) {
player['warId'] = war._id;
player['steamUUID'] = steamUUID;
player['vehicleLight'] = 0;
player['vehicleHeavy'] = 0;
player['vehicleAir'] = 0;
player['vehicleBoat'] = 0;
stats.players.push(player);
}
};
@ -178,7 +191,7 @@ const parseWarLog = (lineArray, war) => {
const playerName = line.substring(line.lastIndexOf('Respawn von ') + 12, line.lastIndexOf('"'));
stats.respawn.push(getRespawnEntry(budg, playerName, war._id, war.date));
}
stats.budget.push(getBudgetEntry(budg, war._id, war.date));
stats.budget.push(getBudgetEntry(line, budg, war._id, war.date));
}
} else if (line.includes('(Fahne)') && !line.includes('Dominator')) {
/**
@ -329,21 +342,27 @@ const parseWarLog = (lineArray, war) => {
stats.players[i]['kill'] = stats.kills.filter(
(kill) => kill.shooter === playerName && !kill.friendlyFire).length;
// TODO: use vehicle class description from enum
stats.players[i]['vehicleLight'] = stats.vehicles.filter(
(vehicle) => (vehicle.shooter === playerName ||
(vehicle.additionalShooter && vehicle.additionalShooter.indexOf(playerName)) > -1) && vehicle.vehicleClass ===
'LIGHT' && VEHICLE_BLACKLIST.indexOf(vehicle.target) < 0).length;
stats.players[i]['vehicleHeavy'] = stats.vehicles.filter(
(vehicle) => (vehicle.shooter === playerName ||
(vehicle.additionalShooter && vehicle.additionalShooter.indexOf(playerName)) > -1) && vehicle.vehicleClass ===
'HEAVY' && VEHICLE_BLACKLIST.indexOf(vehicle.target) < 0).length;
stats.players[i]['vehicleAir'] = stats.vehicles.filter(
(vehicle) => (vehicle.shooter === playerName ||
(vehicle.additionalShooter && vehicle.additionalShooter.indexOf(playerName)) > -1) && vehicle.vehicleClass ===
'AIR' && VEHICLE_BLACKLIST.indexOf(vehicle.target) < 0).length;
stats.vehicles
.filter((vehicle) => VEHICLE_BLACKLIST.indexOf(vehicle.target) < 0)
.forEach((vehicle) => {
if (vehicle.shooter === playerName ||
(vehicle.additionalShooter && vehicle.additionalShooter.indexOf(playerName)) > -1) {
switch (vehicle.vehicleClass) {
case 'LIGHT':
stats.players[i].vehicleLight++;
break;
case 'HEAVY':
stats.players[i].vehicleHeavy++;
break;
case 'AIR':
stats.players[i].vehicleAir++;
break;
case 'BOAT':
stats.players[i].vehicleBoat++;
break;
}
}
});
stats.players[i]['friendlyFire'] = stats.kills.filter(
(kill) => kill.shooter === playerName && kill.friendlyFire).length;
@ -405,14 +424,37 @@ const getPointsEntry = (pt, line, warId, warDate) => {
};
};
const getBudgetEntry = (budg, warId, warDate) => {
return {
const getBudgetEntry = (line, budg, warId, warDate) => {
const timestamp = getFullTimeDate(warDate, budg[5]);
const oldBudget = transformMoneyString(budg[9]);
const newBudget = transformMoneyString(budg[12]);
const fraction = budg[7] === 'NATO' ? 'BLUFOR' : 'OPFOR';
const budgetEntry = {
war: warId,
time: getFullTimeDate(warDate, budg[5]),
fraction: budg[7] === 'NATO' ? 'BLUFOR' : 'OPFOR',
oldBudget: transformMoneyString(budg[9]),
newBudget: transformMoneyString(budg[12]),
time: timestamp,
fraction: fraction,
oldBudget: oldBudget,
newBudget: newBudget,
buy: oldBudget <= newBudget,
};
const budgetRespawnMatch = budgetRespawnNameRegex.exec(line);
if (budgetRespawnMatch && budgetRespawnMatch.length > 1) {
budgetEntry.player = budgetRespawnMatch[1];
budgetEntry.item = 'Respawn';
} else {
const itemNameMatch = budgetItemNameRegex.exec(line);
const playerNameMatch = budgetPlayerNameRegex.exec(line);
if (playerNameMatch && playerNameMatch.length > 1) {
budgetEntry.player = playerNameMatch[1];
}
if (itemNameMatch && itemNameMatch.length > 1) {
budgetEntry.item = itemNameMatch[1];
}
}
return budgetEntry;
};
const getPlayerInfoFromString = (inputString) => {

View File

@ -50,16 +50,16 @@ let createSignature = (userId, res, next) => {
.then((image) => {
loadedImage = image;
}).then(() => {
return jimp.loadFont(__dirname + '/font/DEVAJU_SANS_19.fnt');
return jimp.loadFont(jimp.FONT_SANS_16_BLACK);
})
.then((font) => {
loadedImage.print(font, 128, 8, user.username);
loadedImage.print(font, 118, 22, user.username);
})
.then(() => {
return jimp.loadFont(__dirname + '/font/DEJAVU_SANS_13.fnt');
})
.then((font) => {
loadedImage.print(font, 128, 35, user.squadId.name);
loadedImage.print(font, 118, 49, user.squadId.name);
return font;
})
.then((font) => {
@ -75,22 +75,22 @@ let createSignature = (userId, res, next) => {
if (result) {
if (user.squadId.fraction === 'BLUFOR') {
rankW = 25;
rankH = 60;
rankX = 36;
rankY = 34;
rankW = 33;
rankH = 80;
rankX = 38;
rankY = 20;
} else {
rankW = 37;
rankH = 58;
rankX = 30;
rankY = 34;
rankW = 38;
rankH = 60;
rankX = 35;
rankY = 36;
}
jimp.read(resourceDir + 'rank/' + result._id + fileExt)
.then((rankImage) => {
rankImage.resize(rankW, rankH);
loadedImage
.print(font, 128, 55, result.name)
.print(font, 118, 69, result.name)
.composite(rankImage, rankX, rankY);
})
.then(() => {
@ -123,10 +123,10 @@ let addDecorationsAndSave = (userId, loadedImage, res, next) => {
const medalH = 40;
const ribbonW = 53;
const ribbonH = 15;
let medalPx = 630;
let medalPy = 5;
let ribbonPx = 598;
let ribbonPy = 95;
let medalPx = 690;
let medalPy = 9;
let ribbonPx = 658;
let ribbonPy = 107;
AwardingModel.find({
'userId': userId,
@ -146,21 +146,22 @@ let addDecorationsAndSave = (userId, loadedImage, res, next) => {
if (award.decorationId.isMedal) {
decorationImage.resize(medalW, medalH);
loadedImage.composite(decorationImage, medalPx, medalPy);
if (medalPy === 5) {
if (medalPy === 9) {
medalPx = medalPx - 1 - medalW;
} else {
medalPx = medalPx + 1 + medalW;
}
if (medalPx <= 300) {
medalPx = medalPx + 1 + medalW;
medalPy = medalPy + 3 + medalH;
}
} else {
decorationImage.resize(ribbonW, ribbonH);
loadedImage.composite(decorationImage, ribbonPx, ribbonPy);
ribbonPx = ribbonPx - 2 - ribbonW;
if (ribbonPx <= 154) {
if (ribbonPx <= 200) {
ribbonPy = ribbonPy - 3 - ribbonH;
ribbonPx = 598;
ribbonPx = 657;
}
}
callback();

View File

@ -21,9 +21,10 @@
"src/favicon.ico"
],
"styles": [
"src/styles.css",
"src/styles.scss",
"node_modules/jquery-ui-bundle/jquery-ui.css",
"node_modules/bootstrap/dist/css/bootstrap.min.css"
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css",
],
"scripts": [
"node_modules/jquery/dist/jquery.js",
@ -146,4 +147,4 @@
"prefix": "app"
}
}
}
}

3862
static/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -22,6 +22,7 @@
"@angular/compiler": "^6.1.10",
"@angular/compiler-cli": "^6.1.10",
"@angular/core": "^6.1.10",
"@angular/flex-layout": "^6.0.0-beta.18",
"@angular/forms": "^6.1.10",
"@angular/http": "^6.1.10",
"@angular/material": "^6.1.10",
@ -39,13 +40,14 @@
"jquery-ui-bundle": "^1.11.4",
"ngx-clipboard": "^11.1.1",
"ngx-cookie-service": "^1.0.10",
"ngx-infinite-scroll": "^0.5.2",
"ngx-infinite-scroll": "^7.0.1",
"rxjs-compat": "^6.2.1",
"ts-helpers": "^1.1.2",
"typescript": "^2.9.2",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.8.3",
"@angular-devkit/build-angular": "^0.13.1",
"@types/jasmine": "2.5.38",
"@types/node": "^6.0.89",
"codelyzer": "^4.4.2",
@ -58,7 +60,6 @@
"protractor": "^5.4.1",
"protractor-jasmine2-screenshot-reporter": "^0.3.2",
"ts-node": "1.2.1",
"tslint": "^5.10.0",
"typescript": "^2.7.2"
"tslint": "^5.10.0"
}
}

View File

@ -0,0 +1 @@
@import url('../style/overview.scss');

View File

@ -3,7 +3,7 @@ import {Component} from '@angular/core';
@Component({
selector: 'cc-admin-component',
templateUrl: './admin.component.html',
styleUrls: ['./admin.component.css', '../style/overview.css']
styleUrls: ['./admin.component.scss']
})
export class AdminComponent {
constructor() {

View File

@ -23,7 +23,7 @@
[(ngModel)]="appUserSquadId">
<option [value]="null">{{'user.submit.field.squad.not.assigned' | translate}}</option>
<option *ngFor="let squad of squads" [ngValue]="squad._id">
{{squad.fraction == 'BLUFOR'? fraction.BLUFOR : fraction.OPFOR}}: {{squad.name}}
{{squad.fraction == 'BLUFOR'? fraction.ARF : fraction.SWORD}}: {{squad.name}}
</option>
</select>
<show-error displayName="{{'user.submit.field.squad' | translate}}" controlPath="squad"></show-error>

View File

@ -0,0 +1,2 @@
@import url('../../style/entry-form.scss');
@import url('../../style/overview.scss');

View File

@ -11,7 +11,7 @@ import {AppUserService} from '../../services/app-user-service/app-user.service';
@Component({
templateUrl: './edit-app-user.component.html',
styleUrls: ['./edit-app-user.component.css', '../../style/entry-form.css', '../../style/overview.css'],
styleUrls: ['./edit-app-user.component.scss'],
})
export class EditAppUserComponent implements OnInit {

View File

@ -6,8 +6,8 @@
<a>{{appUser.username}}</a>
</span>
<br>
<small *ngIf="appUser.squad && appUser.squad.fraction == 'OPFOR'">{{fraction.OPFOR}} - {{appUser.squad.name}}</small>
<small *ngIf="appUser.squad && appUser.squad.fraction == 'BLUFOR'">{{fraction.BLUFOR}} - {{appUser.squad.name}}</small>
<small *ngIf="appUser.squad && appUser.squad.fraction == 'OPFOR'">{{fraction.SWORD}} - {{appUser.squad.name}}</small>
<small *ngIf="appUser.squad && appUser.squad.fraction == 'BLUFOR'">{{fraction.ARF}} - {{appUser.squad.name}}</small>
<small *ngIf="!appUser.squad">{{'users.list.item.label.no.squad' | translate}}</small>
</div>

View File

@ -1,3 +1,5 @@
@import url('../../style/list-entry.scss');
.icon-award {
width: 27px;
height: 42px;

View File

@ -5,7 +5,7 @@ import {Fraction} from '../../utils/fraction.enum';
@Component({
selector: 'cc-app-user-item',
templateUrl: './app-user-item.component.html',
styleUrls: ['./app-user-item.component.css', '../../style/list-entry.css'],
styleUrls: ['./app-user-item.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class AppUserItemComponent {

View File

@ -0,0 +1 @@
@import url('../../style/select-list.scss');

View File

@ -14,7 +14,7 @@ import {SquadService} from '../../services/army-management/squad.service';
@Component({
selector: 'cc-app-user-list',
templateUrl: './app-user-list.component.html',
styleUrls: ['./app-user-list.component.css', '../../style/select-list.css']
styleUrls: ['./app-user-list.component.scss']
})
export class AppUserListComponent {

View File

@ -1,78 +0,0 @@
ul {
list-style-type: none;
margin: 0;
padding: 0;
}
li {
display: inline;
}
.content {
padding-left: 15px;
padding-right: 15px;
}
.scrollable-menu {
height: auto;
max-height: 200px;
overflow-x: hidden;
}
.navbar-brand mat-icon {
color: #dadada;
width: 135px;
height: 40px;
stroke: #dadada;
}
.version-label {
position: absolute;
top: 27px;
left: 115px;
font-size: 12px;
color: #bebebe;
}
#scrollTopBtn {
position: fixed;
bottom: 20px;
right: 30px;
z-index: 99;
background: rgba(16, 16, 16, 0.8);
}
#scrollTopBtn:hover {
background: rgba(16, 16, 16);
}
.unprocessed {
-webkit-animation-name: color-blink; /* Safari 4.0 - 8.0 */
-webkit-animation-duration: 4s; /* Safari 4.0 - 8.0 */
animation-name: color-blink;
animation-duration: 4s;
animation-iteration-count: infinite;
}
.unprocessed-child {
background-color: orange;
}
/* Safari 4.0 - 8.0 */
@-webkit-keyframes color-blink {
from {
background-color: #222222;
}
to {
background-color: orange;
}
}
@keyframes color-blink {
from {
background-color: #222222;
}
to {
background-color: orange;
}
}

View File

@ -1,149 +1,41 @@
<div class="container">
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#" style="padding-top: 2px">
<mat-icon svgIcon="opt-logo"></mat-icon>
</a>
<span class="version-label">{{version}}</span>
</div>
<div class="collapse navbar-collapse" id="mynavbar">
<ul class="nav navbar-nav">
<li routerLinkActive="active">
<a href="https://www.opt4.net/dashboard" class="link">{{'navigation.top.board' | translate}}</a>
</li>
<li routerLinkActive="active">
<a routerLink='{{config.overviewPath}}' class="link">{{'navigation.top.overview' | translate}}</a>
</li>
<li routerLinkActive="active">
<a [routerLink]="[config.publicPath.concat('/').concat(config.rankPath)]" class="link">{{'navigation.top.ranks' | translate}}</a>
</li>
<li routerLinkActive="active">
<a [routerLink]="[config.publicPath.concat('/').concat(config.decorationPath)]" class="link">{{'navigation.top.decorations' | translate}}</a>
</li>
<li routerLinkActive="active">
<a routerLink='{{config.statsPath}}' class="link">{{'navigation.top.statistics' | translate}}</a>
</li>
<li *ngIf="loginService.hasPermission(2)"
class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
aria-expanded="false">
{{'navigation.top.management' | translate}}
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li routerLinkActive="active">
<a routerLink='{{config.manageUserPath}}' class="link">{{'navigation.top.management.users' | translate}}</a>
</li>
<li routerLinkActive="active">
<a routerLink='{{config.manageSquadPath}}' class="link">{{'navigation.top.management.squads' | translate}}</a>
</li>
<li routerLinkActive="active">
<a routerLink='{{config.manageDecorationPath}}' class="link">{{'navigation.top.management.decorations' | translate}}</a>
</li>
<li routerLinkActive="active">
<a routerLink='{{config.manageRankPath}}' class="link">{{'navigation.top.management.ranks' | translate}}</a>
</li>
</ul>
</li>
<li *ngIf="loginService.hasPermission(1) && !loginService.hasPermission(2) && loginService.hasSquad()"
class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
aria-expanded="false">
{{'navigation.top.request' | translate}}
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li>
<a routerLink="{{config.request}}/{{config.sqlDashboardPath}}">{{'navigation.top.request.open' | translate}}</a>
</li>
<li>
<a routerLink="{{config.request}}/{{config.requestPromotionPath}}">{{'navigation.top.request.promotion' | translate}}</a>
</li>
<li>
<a routerLink="{{config.request}}/{{config.requestAwardPath}}">{{'navigation.top.request.award' | translate}}</a>
</li>
</ul>
</li>
<li *ngIf="loginService.hasPermission(2) && loginService.hasSquad()" class="dropdown">
<a href="#"
[ngClass]="{'unprocessed': promotionService.hasUnprocessedPromotion || awardingService.hasUnprocessedAwards}"
class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
aria-expanded="false">
{{'navigation.top.request.manage' | translate}}
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li>
<a [ngClass]="{'unprocessed-child': promotionService.hasUnprocessedPromotion}"
routerLink="{{config.request}}/{{config.confirmPromotionPath}}">{{'navigation.top.request.promotion' | translate}}</a>
</li>
<li>
<a [ngClass]="{'unprocessed-child': awardingService.hasUnprocessedAwards}"
routerLink="{{config.request}}/{{config.confirmAwardPath}}">{{'navigation.top.request.award' | translate}}</a>
</li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav pull-right">
<li *ngIf="loginService.hasPermission(4)"
class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
aria-expanded="false">
{{'navigation.top.admin' | translate}}
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li routerLinkActive="active">
<a routerLink='{{config.adminPanelAppUsersPath}}' class="link">{{'navigation.top.management.users' | translate}}</a>
</li>
</ul>
</li>
<li *ngIf="loginService.isLoggedIn()" class="link" style="cursor: pointer">
<a (click)="logout()">{{'navigation.top.logout' | translate}}</a>
</li>
<li *ngIf="!loginService.isLoggedIn()" routerLinkActive="active">
<a routerLink='{{config.loginPath}}' class="link">{{'navigation.top.login' | translate}}</a>
</li>
<li class="dropdown" *ngIf="features.localization">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<span class="text-uppercase">{{language}}</span>
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li *ngFor="let lang of languages" style="cursor: pointer">
<a (click)="setLanguage(lang)"><mat-icon svgIcon="flag-{{lang}}"></mat-icon></a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
</div>
<div>
<router-outlet></router-outlet>
<mat-sidenav-container>
<mat-sidenav-content>
<app-header (sidenavToggle)="sidenav.toggle()"
(userLogout)="logout()"
[currentUrl]="currentUrl">
</app-header>
</mat-sidenav-content>
<mat-sidenav #sidenav role="navigation">
<app-sidenav-list (sidenavClose)="sidenav.close()"
(userLogout)="logout()"
[currentUrl]="currentUrl">
</app-sidenav-list>
</mat-sidenav>
</mat-sidenav-container>
<div id="left">
<router-outlet name="left"></router-outlet>
<div class="app-content-container" (click)="sidenav.close()">
<router-outlet></router-outlet>
<div id="left">
<router-outlet name="left"></router-outlet>
</div>
<div id="right">
<router-outlet name="right"></router-outlet>
</div>
</div>
<div id="right">
<router-outlet name="right"></router-outlet>
<div *ngIf="loading" class="load-indicator">
<div class="opt-loader"></div>
<mat-icon svgIcon="opt-logo-core" class="opt-logo-core"></mat-icon>
</div>
<button mat-icon-button
mat-mini-fab
id="scrollTopBtn"
*ngIf="scrollTopVisible"
matTooltip="{{'navigation.button.scroll.top' | translate}}"
(click)="scrollToTop()">
<mat-icon svgIcon="arrow-up"></mat-icon>
</button>
</div>
<span *ngIf="loading" class="load-indicator load-arrow glyphicon-refresh-animate"></span>
<button mat-icon-button
mat-mini-fab
id="scrollTopBtn"
*ngIf="scrollTopVisible"
matTooltip="{{'navigation.button.scroll.top' | translate}}"
(click)="scrollToTop()">
<mat-icon svgIcon="arrow-up"></mat-icon>
</button>

View File

@ -0,0 +1,41 @@
@import "style/load-indicator.scss";
mat-sidenav-container, mat-sidenav-content, mat-sidenav {
height: calc(100vh - 50px);
min-height: fit-content;
display: inline;
}
mat-sidenav {
background: #222222;
top: 50px;
width: 250px;
}
.app-content-container {
overflow-x: auto;
position: relative;
min-height: calc(100vh - 50px)
}
#scrollTopBtn {
position: fixed;
bottom: 20px;
right: 30px;
z-index: 99;
background: rgba(16, 16, 16, 0.8);
&:hover {
background: #101010;
}
@media all and (max-width: 959px) {
bottom: 0;
left: 0;
width: 100vw;
border-radius: 3px 3px 0 0;
background: #101010;
min-height: 34px;
height: 3vw;
}
}

View File

@ -1,42 +1,36 @@
import {Component, HostListener, Inject, OnInit} from '@angular/core';
import {Component, Inject, OnInit} from '@angular/core';
import {NavigationEnd, NavigationStart, Router} from '@angular/router';
import {LoginService} from './services/app-user-service/login-service';
import {PromotionService} from './services/army-management/promotion.service';
import {AwardingService} from './services/army-management/awarding.service';
import {RouteConfig} from './app.config';
import {DOCUMENT} from '@angular/common';
import {DomSanitizer} from '@angular/platform-browser';
import {MatIconRegistry} from '@angular/material';
import {SpinnerService} from './services/user-interface/spinner/spinner.service';
import {TranslateService} from '@ngx-translate/core';
import {SettingsService} from './services/settings.service';
import {environment} from '../environments/environment';
import {SnackBarService} from './services/user-interface/snack-bar/snack-bar.service';
import {Observable} from 'rxjs';
import {LoginService} from './services/app-user-service/login-service';
import {RouteConfig} from './app.config';
declare function require(url: string);
@Component({
selector: 'app-root',
templateUrl: 'app.component.html',
styleUrls: ['app.component.css', 'style/load-indicator.css']
styleUrls: ['app.component.scss']
})
export class AppComponent implements OnInit {
readonly features = environment.features;
config = RouteConfig;
loading = false;
scrollTopVisible = false;
scrollBtnVisibleVal = 100;
currentUrl = '';
// a map of svgIcon names and associated svg file names
// to load from assets/icon folder
svgIcons = {
'opt-logo': 'general/opt-logo',
'loading-arrows': 'general/loading-arrows',
'opt-logo-core': 'general/opt-logo-core',
'menu': 'baseline-menu-24px',
'add': 'outline-add_box-24px',
'add-user': 'twotone-person_add-24px',
'award': 'award',
@ -73,21 +67,11 @@ export class AppComponent implements OnInit {
'flag-en': 'locale/en',
};
language;
languages = ['de', 'en'];
version = 'v'.concat(require('./../../../package.json').version);
constructor(public loginService: LoginService,
private promotionService: PromotionService,
private awardingService: AwardingService,
private router: Router,
constructor(private router: Router,
private loginService: LoginService,
private iconRegistry: MatIconRegistry,
private sanitizer: DomSanitizer,
private spinnerService: SpinnerService,
private translate: TranslateService,
private settingsService: SettingsService,
private snackBarService: SnackBarService,
@Inject(DOCUMENT) private document) {
this.initMaterialSvgIcons();
@ -101,10 +85,10 @@ export class AppComponent implements OnInit {
}
if (event instanceof NavigationEnd) {
this.spinnerService.deactivate();
const currentUrl = this.router.url;
this.currentUrl = this.router.url;
// scroll to top on route from army overview to user detail and back
if (currentUrl.includes('/overview') || currentUrl.includes('/public')) {
if (this.currentUrl.includes('/overview') || this.currentUrl.includes('/public')) {
this.scrollToTop();
}
}
@ -112,15 +96,10 @@ export class AppComponent implements OnInit {
}
ngOnInit() {
this.settingsService.getLanguage().subscribe((language) => {
this.language = language;
this.translate.setDefaultLang(language)
Observable.fromEvent(this.document, 'scroll').subscribe(e => {
this.scrollTopVisible = document.body.scrollTop > this.scrollBtnVisibleVal
|| document.documentElement.scrollTop > this.scrollBtnVisibleVal;
});
if (this.loginService.hasPermission(2)) {
const fraction = this.loginService.getCurrentUser().squad.fraction;
this.promotionService.checkUnconfirmedPromotions(fraction);
this.awardingService.checkUnprocessedAwards(fraction);
}
}
toggleSpinner(active) {
@ -134,12 +113,6 @@ export class AppComponent implements OnInit {
});
}
@HostListener('window:scroll', [])
onWindowScroll() {
this.scrollTopVisible = document.body.scrollTop > this.scrollBtnVisibleVal
|| document.documentElement.scrollTop > this.scrollBtnVisibleVal;
}
logout() {
this.loginService.logout();
setTimeout(() => {
@ -147,16 +120,10 @@ export class AppComponent implements OnInit {
}, 500);
}
scrollToTop() {
this.document.body.scrollTop = 0; // For Safari
this.document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
}
setLanguage(language: string) {
if (language) {
this.language = language;
this.settingsService.setLanguage(language);
}
}
}

View File

@ -1,7 +1,5 @@
export class AppConfig {
public readonly apiUrl = '/api';
public readonly apiAppUserPath = this.apiUrl + '/account/';
public readonly apiAuthenticationPath = this.apiUrl + '/authenticate';
public readonly apiAwardPath = this.apiUrl + '/awardings';
@ -43,3 +41,16 @@ export const RouteConfig = {
rankOverviewPath: 'public/ranks',
decorationOverviewPath: 'public/decorations',
};
export const BaseConfig = {
responsive: {
breakpointSmallPx: 599,
breakpointPx: 959,
},
i18n: {
availableLanguages: [
'de',
'en'
]
}
};

View File

@ -20,9 +20,10 @@ import {CookieService} from 'ngx-cookie-service';
import {SnackBarService} from './services/user-interface/snack-bar/snack-bar.service';
import {HttpClientModule} from '@angular/common/http';
import {SpinnerService} from './services/user-interface/spinner/spinner.service';
import {MatSelectModule, MatSnackBarModule} from '@angular/material';
import {SettingsService} from './services/settings.service';
import {HttpGateway} from './services/http-gateway';
import {MatListModule, MatMenuModule, MatSidenavModule, MatTableModule, MatToolbarModule} from '@angular/material';
import {FlexLayoutModule} from '@angular/flex-layout';
@NgModule({
imports: [
@ -33,8 +34,12 @@ import {HttpGateway} from './services/http-gateway';
HttpModule,
HttpClientModule,
ClipboardModule,
MatSnackBarModule,
MatSelectModule,
MatSidenavModule,
MatToolbarModule,
MatListModule,
MatMenuModule,
MatTableModule,
FlexLayoutModule,
],
providers: [

View File

@ -4,6 +4,8 @@ import {LoginComponent, LoginGuardAdmin, LoginGuardHL, LoginGuardMT} from './log
import {armyRoutes, armyRoutingComponents} from './army/army.routing';
import {SignupComponent} from './login/signup.component';
import {RouteConfig} from './app.config';
import {NavigationHeaderComponent} from './common/navigation/navigation-header.component';
import {SidenavListComponent} from './common/navigation/sidenav-list.component';
export const appRoutes: Routes = [
{
@ -58,6 +60,7 @@ export const appRoutes: Routes = [
export const appRouting = RouterModule.forRoot(appRoutes);
export const routingComponents = [...armyRoutingComponents, LoginComponent, SignupComponent, NotFoundComponent];
export const routingComponents = [...armyRoutingComponents, LoginComponent, SignupComponent, NotFoundComponent,
NavigationHeaderComponent, SidenavListComponent];
export const routingProviders = [LoginGuardHL, LoginGuardMT, LoginGuardAdmin];

View File

@ -1,60 +0,0 @@
:host {
display: flow-root;
height: 100%;
min-height: 100vh;
width: 100%;
margin-top: -23px;
padding-top: 23px;
padding-bottom: 23px;
background-image: url('../../../assets/bg.jpg');
background-size: cover;
background-attachment: fixed;
background-position: top;
background-repeat: no-repeat;
}
.army-member-view {
width: 90%;
height: 100vh;
padding: 5px;
margin: auto;
}
.army-member-view-container {
width: 90%;
min-width: 870px;
margin: auto
}
.return-button {
position: absolute;
padding-left: 5px;
}
.table {
overflow-wrap: break-word;
table-layout: fixed;
}
.table-container {
margin-top: 10px;
padding: 5px;
overflow-x: auto;
}
.table-head {
background: #222222;
color: white;
}
tbody {
background: rgba(255, 255, 255, 0.88);
}
.cell-outline {
outline: 1px solid #D4D4D4;
}
tr.cell-outline:hover {
background-color: #ffffff;
}

View File

@ -8,7 +8,7 @@
</div>
<h3 class="text-center" style="font-weight: 600"
[style.color]="user.squadId?.fraction === 'BLUFOR' ? fraction.COLOR_BLUFOR : fraction.COLOR_OPFOR">
[style.color]="user.squadId?.fraction === 'BLUFOR' ? fraction.COLOR_ARF : fraction.COLOR_SWORD">
{{'public.army.member.headline' | translate:{name: user.username} }}
</h3>
@ -25,40 +25,35 @@
</span>
</div>
<div class="pull-left" style="margin-top:20px;">
<div class="table-container" style="min-width: 500px">
<table class="table">
<thead>
<tr class="table-head">
<th class="col-sm-1" style="border-radius: 10px 0 0 0;"></th>
<th class="col-sm-2">{{'public.army.member.awards.title' | translate}}</th>
<th class="col-sm-2">{{'public.army.member.awards.reason' | translate}}</th>
<th class="col-sm-1 text-right" style="border-radius: 0 10px 0 0;">
{{'public.army.member.awards.date' | translate}}
</th>
</tr>
</thead>
<tbody *ngFor="let award of awards">
<tr *ngIf="award.confirmed === 1" class="cell-outline">
<td class="text-center" *ngIf="award.decorationId.isMedal">
<img height="90px" src="resource/decoration/{{award.decorationId._id}}.png">
</td>
<td class="text-center" *ngIf="!award.decorationId.isMedal">
<img width="100px" src="resource/decoration/{{award.decorationId._id}}.png">
</td>
<td style="font-weight: bold">
{{award.decorationId.name}}
</td>
<td>
{{award.reason}}
</td>
<td class="text-right">
<span class="small text-nowrap">{{award.date | date: 'dd.MM.yyyy'}}</span>
</td>
</tr>
</tbody>
</table>
</div>
<div class="pull-left" class="table-container">
<mat-table [dataSource]="awards" class="mat-elevation-z8">
<ng-container matColumnDef="award-graphics">
<mat-header-cell *matHeaderCellDef></mat-header-cell>
<mat-cell *matCellDef="let element">
<img src="resource/decoration/{{element.decorationId._id}}.png">
</mat-cell>
</ng-container>
<ng-container matColumnDef="title">
<mat-header-cell *matHeaderCellDef>{{'public.army.member.awards.title' | translate}}</mat-header-cell>
<mat-cell *matCellDef="let element">{{element.decorationId.name}}</mat-cell>
</ng-container>
<ng-container matColumnDef="reason">
<mat-header-cell *matHeaderCellDef>{{'public.army.member.awards.reason' | translate}}</mat-header-cell>
<mat-cell *matCellDef="let element">{{element.reason}}</mat-cell>
</ng-container>
<ng-container matColumnDef="date">
<mat-header-cell *matHeaderCellDef>{{'public.army.member.awards.date' | translate}}</mat-header-cell>
<mat-cell *matCellDef="let element">
<span class="small text-nowrap">{{element.date | date: 'dd.MM.yyyy'}}</span>
</mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
</mat-table>
</div>
</div>
</div>

View File

@ -0,0 +1,55 @@
@import url('../../style/background-image.scss');
.army-member-view {
width: 90%;
min-height: 100vh;
padding: 5px;
margin: auto;
}
.army-member-view-container {
width: 90%;
min-width: 870px;
margin: auto
}
.return-button {
position: absolute;
padding-left: 5px;
}
div.table-container {
margin-top:20px;
padding: 5px;
overflow-x: auto;
min-width: 500px;
}
.table-head {
background: #222222;
color: white;
}
mat-table.mat-table {
background: rgba(255, 255, 255, 0.70);
.mat-column-award-graphics {
flex: 0 0 15%;
}
.mat-column-title {
flex: 0 0 25%;
}
.mat-column-reason {
flex: 0 0 52%;
}
.mat-column-date {
flex: 0 0 8%;
}
}
mat-row.mat-row {
@extend mat-table.mat-table;
}

View File

@ -1,9 +1,7 @@
import {Component, Inject, OnDestroy, OnInit} from '@angular/core';
import {Component, OnInit} from '@angular/core';
import {Award, User} from '../../models/model-interfaces';
import {ActivatedRoute, Router} from '@angular/router';
import {UserService} from '../../services/army-management/user.service';
import {Subscription} from 'rxjs/Subscription';
import {RouteConfig} from '../../app.config';
import {AwardingService} from '../../services/army-management/awarding.service';
import {Fraction} from '../../utils/fraction.enum';
import {Location} from '@angular/common';
@ -11,12 +9,10 @@ import {Location} from '@angular/common';
@Component({
selector: 'army-member',
templateUrl: './army-member.component.html',
styleUrls: ['./army-member.component.css']
styleUrls: ['./army-member.component.scss']
})
export class ArmyMemberComponent implements OnInit {
subscription: Subscription;
user: User = {};
awards: Award[] = [];
@ -27,6 +23,8 @@ export class ArmyMemberComponent implements OnInit {
readonly fraction = Fraction;
readonly displayedColumns = ['award-graphics', 'title', 'reason', 'date'];
constructor(private router: Router,
private route: ActivatedRoute,
private userService: UserService,
@ -35,18 +33,17 @@ export class ArmyMemberComponent implements OnInit {
}
ngOnInit() {
this.subscription = this.route.params
.map(params => params['id'])
.filter(id => id !== undefined)
.flatMap(id => this.userService.getUser(id))
.subscribe(user => {
this.user = user;
this.signatureUrl = window.location.origin + '/resource/signature/' + user._id + '.png';
this.awardingService.getUserAwardings(user._id).subscribe((awards => {
this.awards = awards;
}));
});
this.route.params
.map(params => params['id'])
.filter(id => id !== undefined)
.flatMap(id => this.userService.getUser(id))
.subscribe(user => {
this.user = user;
this.signatureUrl = window.location.origin + '/resource/signature/' + user._id + '.png';
this.awardingService.getUserAwardings(user._id).subscribe((awards => {
this.awards = awards;
}));
});
};
backToOverview() {

View File

@ -7,7 +7,7 @@
</div>
<div class=" middle-row">
<div class="name-cell">
<div [style.color]="squadFraction === 'BLUFOR' ? fraction.COLOR_BLUFOR : fraction.COLOR_OPFOR"
<div [style.color]="squadFraction === 'BLUFOR' ? fraction.COLOR_ARF : fraction.COLOR_SWORD"
*ngFor="let member of squad.members">
<span class="member-link"
(click)="select(member._id)">

View File

@ -3,6 +3,21 @@
padding: 6px 0;
}
@media all and (max-width: 599px) {
.squad-layout {
padding: 1vh 1vw;
}
img {
right: 3vw;
max-width: 27%;
}
div.name-cell {
margin-left: 2vw;
}
}
.squad-layout > div {
clear: both;
}
@ -24,7 +39,7 @@
}
.squad-member-count {
float:left;
float: left;
color: whitesmoke;
margin-left: 42px
}
@ -46,7 +61,10 @@
img {
position: absolute;
margin-top: 8px;
margin-left: 25px;
margin-left: 2%;
@media all and (max-width: 959px) {
margin-left: 0;
}
}
.title {
@ -57,7 +75,7 @@ img {
.name-cell {
display: inherit;
margin-left: 200px;
margin-left: 38%;
}

View File

@ -5,7 +5,7 @@ import {Fraction} from '../../utils/fraction.enum';
@Component({
selector: 'cc-army-squad',
templateUrl: './army-squad.component.html',
styleUrls: ['./army-squad.component.css']
styleUrls: ['./army-squad.component.scss']
})
export class ArmySquadComponent {

View File

@ -1,37 +0,0 @@
:host {
display: flow-root;
height: 100%;
min-height: 100vh;
width: 100%;
margin-top: -23px;
padding-top: 23px;
padding-bottom: 23px;
background-image: url('../../assets/bg.jpg');
background-size: cover;
background-attachment: fixed;
background-position: top;
background-repeat: no-repeat;
}
.army-column {
width: 45%;
}
h1 {
text-align: center;
}
.army-head {
font-weight: bolder;
text-align: center
}
.member-count {
margin-top: 15px;
padding: 8px;
text-align: center;
font-weight: bold;
color: whitesmoke;
background: #222222;
border-radius: 12px;
}

View File

@ -1,8 +1,14 @@
<div style="width: 1100px; margin:auto; position: relative;">
<div class="army-content-container">
<h1>{{'public.army.headline' | translate}}</h1>
<div class="pull-left army-column">
<h3 class="army-head" [style.color]="fraction.COLOR_BLUFOR">{{fraction.BLUFOR}}</h3>
<div class="pull-left army-column" *ngIf="!isSmallLayout || singleViewSelected === fraction.BLUFOR">
<h3 class="army-head" [style.color]="fraction.COLOR_ARF">
{{fraction.ARF}}
<button mat-icon-button class="switch-btn-blufor"
(click)="singleViewSwitch(fraction.OPFOR)">
<mat-icon svgIcon="chevron-right"></mat-icon>
</button>
</h3>
<cc-army-squad *ngFor="let squad of army[0].squads"
[squad]="squad"
squadFraction="BLUFOR"
@ -11,8 +17,14 @@
<div class="member-count">{{'public.army.members' | translate}} {{army[0].memberCount}}</div>
</div>
<div class="pull-right army-column">
<h3 class="army-head" [style.color]="fraction.COLOR_OPFOR">{{fraction.OPFOR}}</h3>
<div class="pull-right army-column" *ngIf="!isSmallLayout || singleViewSelected === fraction.OPFOR">
<h3 class="army-head" [style.color]="fraction.COLOR_SWORD">
<button mat-icon-button class="switch-btn-opfor"
(click)="singleViewSwitch(fraction.BLUFOR)">
<mat-icon svgIcon="chevron-right"></mat-icon>
</button>
{{fraction.SWORD}}
</h3>
<cc-army-squad *ngFor="let squad of army[1].squads"
[squad]="squad"
squadFraction="OPFOR"

View File

@ -0,0 +1,86 @@
@import url('../style/background-image.scss');
.army-content-container {
width: 90%;
max-width: 1100px;
margin: auto;
position: relative;
}
@media all and (max-width: 599px) {
h1 {
font-size: 26px;
margin: 0.5em 0;
}
.army-content-container {
width: 100%;
}
div.army-column {
width: 100%!important;
h3 {
background: #222;
font-size: 18px;
margin: 0.2em 0;
padding: 1.5vh 0;
button {
position: absolute;
margin-top: -10px;
display: inline-block;
&.switch-btn-blufor {
right: 5vw;
}
&.switch-btn-opfor {
transform: rotate(180deg);
left: 5vw;
}
mat-icon {
width: 2.5em;
height: 2.5em;
}
}
}
}
}
@media all and (max-width: 959px) {
div.army-column {
width: 49%;
}
.army-content-container {
width: 98%;
}
}
.army-column {
width: 45%;
}
h1 {
text-align: center;
}
h3 button {
display: none;
}
.army-head {
font-weight: bolder;
text-align: center
}
.member-count {
margin-top: 15px;
padding: 8px;
text-align: center;
font-weight: bold;
color: whitesmoke;
background: #222222;
border-radius: 12px;
}

View File

@ -3,18 +3,24 @@ import {Army} from '../models/model-interfaces';
import {ArmyService} from '../services/army-service/army.service';
import {ActivatedRoute, Router} from '@angular/router';
import {Fraction} from '../utils/fraction.enum';
import {BaseConfig} from '../app.config';
import {Observable} from 'rxjs';
@Component({
selector: 'cc-army',
templateUrl: './army.component.html',
styleUrls: ['./army.component.css']
styleUrls: ['./army.component.scss']
})
export class ArmyComponent implements OnInit {
readonly fraction = Fraction;
army: Army[] = [{}, {}];
readonly fraction = Fraction;
singleViewSelected = this.fraction.BLUFOR;
isSmallLayout;
constructor(private router: Router,
private route: ActivatedRoute,
@ -25,9 +31,18 @@ export class ArmyComponent implements OnInit {
this.armyService.getArmies().subscribe(army => {
this.army = army;
});
this.isSmallLayout = (window.innerWidth <= BaseConfig.responsive.breakpointSmallPx);
Observable.fromEvent(window, 'resize').subscribe(event => {
this.isSmallLayout = event.target['innerWidth'] <= BaseConfig.responsive.breakpointSmallPx;
});
};
select(memberId) {
this.router.navigate(['member', memberId], {relativeTo: this.route});
}
singleViewSwitch(switchFraction: Fraction) {
this.singleViewSelected = switchFraction;
}
}

View File

@ -0,0 +1,148 @@
<mat-toolbar color="primary">
<div fxHide.gt-sm>
<button mat-icon-button (click)="onToggleSidenav()">
<mat-icon svgIcon="menu"></mat-icon>
</button>
</div>
<div class="brand-logo">
<a href="#">
<mat-icon svgIcon="opt-logo"></mat-icon>
</a>
<span class="version-label">v{{version}}</span>
</div>
<div fxHide.lt-md>
<ul fxLayout="row" class="navigation-items">
<li routerLinkActive="active">
<a href="https://www.opt4.net/dashboard" class="link">{{'navigation.top.board' | translate}}</a>
</li>
<li routerLinkActive="active">
<a routerLink='{{config.overviewPath}}' class="link">{{'navigation.top.overview' | translate}}</a>
</li>
<li routerLinkActive="active">
<a [routerLink]="[config.publicPath.concat('/').concat(config.rankPath)]"
class="link">{{'navigation.top.ranks' | translate}}</a>
</li>
<li routerLinkActive="active">
<a [routerLink]="[config.publicPath.concat('/').concat(config.decorationPath)]"
class="link">{{'navigation.top.decorations' | translate}}</a>
</li>
<li routerLinkActive="active">
<a routerLink='{{config.statsPath}}' class="link">{{'navigation.top.statistics' | translate}}</a>
</li>
<li *ngIf="loginService.hasPermission(2)"
[ngClass]="{'active': currentUrl.includes('/manage/')}">
<mat-list-item [matMenuTriggerFor]="menuManagement">
<a matline>
{{'navigation.top.management' | translate}}
<span class="caret"></span>
</a>
</mat-list-item>
<mat-menu #menuManagement="matMenu">
<button routerLink='{{config.manageUserPath}}'
routerLinkActive="active" mat-menu-item>
{{'navigation.top.management.users' | translate}}
</button>
<button routerLink='{{config.manageSquadPath}}'
routerLinkActive="active" mat-menu-item>
{{'navigation.top.management.squads' | translate}}
</button>
<button routerLink='{{config.manageDecorationPath}}'
routerLinkActive="active" mat-menu-item>
{{'navigation.top.management.decorations' | translate}}
</button>
<button routerLink='{{config.manageRankPath}}'
routerLinkActive="active" mat-menu-item>
{{'navigation.top.management.ranks' | translate}}
</button>
</mat-menu>
</li>
<li *ngIf="loginService.hasPermission(1) && !loginService.hasPermission(2) && loginService.hasSquad()"
[ngClass]="{'active': currentUrl.includes('/request/')}">
<mat-list-item [matMenuTriggerFor]="menuSqlRequest">
<a matline>
{{'navigation.top.request' | translate}}
<span class="caret"></span>
</a>
</mat-list-item>
<mat-menu #menuSqlRequest="matMenu">
<button routerLink="{{config.request}}/{{config.sqlDashboardPath}}"
routerLinkActive="active" mat-menu-item>
{{'navigation.top.request.open' | translate}}
</button>
<button routerLink="{{config.request}}/{{config.requestPromotionPath}}"
routerLinkActive="active" mat-menu-item>
{{'navigation.top.request.promotion' | translate}}
</button>
<button routerLink="{{config.request}}/{{config.requestAwardPath}}"
routerLinkActive="active" mat-menu-item>
{{'navigation.top.request.award' | translate}}
</button>
</mat-menu>
</li>
<li *ngIf="loginService.hasPermission(2) && loginService.hasSquad()"
[ngClass]="{'active': currentUrl.includes('/request/')}">
<mat-list-item [matMenuTriggerFor]="menuRequests">
<a [ngClass]="{'unprocessed': promotionService.hasUnprocessedPromotion || awardingService.hasUnprocessedAwards}"
matline>
{{'navigation.top.request.manage' | translate}}
<span class="caret"></span>
</a>
</mat-list-item>
<mat-menu #menuRequests="matMenu">
<button [ngClass]="{'unprocessed-child': promotionService.hasUnprocessedPromotion}"
routerLinkActive="active"
routerLink="{{config.request}}/{{config.confirmPromotionPath}}" mat-menu-item>
{{'navigation.top.request.promotion' | translate}}
</button>
<button [ngClass]="{'unprocessed-child': awardingService.hasUnprocessedAwards}"
routerLinkActive="active"
routerLink="{{config.request}}/{{config.confirmAwardPath}}" mat-menu-item>
{{'navigation.top.request.award' | translate}}
</button>
</mat-menu>
</li>
</ul>
</div>
<div fxFlex fxLayout fxLayoutAlign="end" fxHide.lt-md>
<ul fxLayout fxLayoutGap="15px" class="navigation-items">
<li *ngIf="loginService.hasPermission(4)"
[ngClass]="{'active': currentUrl.includes('/admin-panel/')}">
<mat-list-item [matMenuTriggerFor]="menuAdmin">
<a matline>
{{'navigation.top.admin' | translate}}
<span class="caret"></span>
</a>
</mat-list-item>
<mat-menu #menuAdmin="matMenu">
<button routerLinkActive="active" routerLink='{{config.adminPanelAppUsersPath}}' mat-menu-item>
{{'navigation.top.management.users' | translate}}
</button>
</mat-menu>
</li>
<li *ngIf="loginService.isLoggedIn()" class="link" style="cursor: pointer">
<a (click)="doUserLogout()">{{'navigation.top.logout' | translate}}</a>
</li>
<li *ngIf="!loginService.isLoggedIn()" routerLinkActive="active">
<a routerLink='{{config.loginPath}}' class="link">{{'navigation.top.login' | translate}}</a>
</li>
<li *ngIf="features.localization">
<mat-list-item [matMenuTriggerFor]="menuLanguage">
<a class="text-uppercase" matline>
{{language}}
<span class="caret"></span>
</a>
</mat-list-item>
<mat-menu #menuLanguage="matMenu">
<button mat-menu-item (click)="setLanguage(availableLanguages[0])">
<mat-icon svgIcon="flag-{{availableLanguages[0]}}"></mat-icon>
<span class="text-uppercase">{{availableLanguages[0]}}</span>
</button>
<button mat-menu-item (click)="setLanguage(availableLanguages[1])">
<mat-icon svgIcon="flag-{{availableLanguages[1]}}"></mat-icon>
<span class="text-uppercase">{{availableLanguages[1]}}</span>
</button>
</mat-menu>
</li>
</ul>
</div>
</mat-toolbar>

View File

@ -0,0 +1,73 @@
@import url('../../style/blink-indicator.scss');
mat-toolbar {
height: 2.5em;
min-height: 50px;
&.mat-toolbar.mat-primary {
background: #222222;
}
.navigation-items {
list-style-type: none;
padding: 0;
margin: 0;
}
li {
height: 50px;
line-height: 46px;
padding: 0 10px;
cursor: pointer;
mat-list-item {
cursor: pointer;
}
a {
font-size: 16px;
text-decoration: none;
color: #9d9d9d;
padding: 16px 5px;
}
&:hover {
a {
color: white;
}
}
&.active {
@extend li:hover;
background: #000000;
}
}
.brand-logo {
padding-top: 6px;
margin-right: -10px;
mat-icon {
color: #dadada;
width: 135px;
height: 40px;
stroke: #dadada;
}
.version-label {
position: relative;
left: -42px;
font-size: 12px;
color: #bebebe;
}
@media all and (max-width: 959px) {
margin: auto;
}
}
}
button.active {
background: #dadada;
}

View File

@ -0,0 +1,68 @@
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
import {BaseConfig, RouteConfig} from '../../app.config';
import {environment} from '../../../environments/environment';
import {LoginService} from '../../services/app-user-service/login-service';
import {PromotionService} from '../../services/army-management/promotion.service';
import {AwardingService} from '../../services/army-management/awarding.service';
import {SettingsService} from '../../services/settings.service';
import {TranslateService} from '@ngx-translate/core';
declare function require(url: string);
@Component({
selector: 'app-header',
templateUrl: 'navigation-header.component.html',
styleUrls: ['navigation-header.component.scss']
})
export class NavigationHeaderComponent implements OnInit {
@Output() sidenavToggle = new EventEmitter();
@Output() userLogout = new EventEmitter();
@Input() currentUrl;
readonly features = environment.features;
readonly availableLanguages = BaseConfig.i18n.availableLanguages;
readonly version = require('./../../../../../package.json').version;
readonly config = RouteConfig;
language;
constructor(public loginService: LoginService,
private promotionService: PromotionService,
private awardingService: AwardingService,
private translate: TranslateService,
private settingsService: SettingsService) {
}
ngOnInit() {
this.settingsService.getLanguage().subscribe((language) => {
this.language = language;
this.translate.setDefaultLang(language)
});
if (this.loginService.hasPermission(2)) {
const fraction = this.loginService.getCurrentUser().squad.fraction;
this.promotionService.checkUnconfirmedPromotions(fraction);
this.awardingService.checkUnprocessedAwards(fraction);
}
}
public onToggleSidenav() {
this.sidenavToggle.emit();
};
public doUserLogout() {
this.userLogout.emit()
};
setLanguage(language: string) {
if (language) {
this.language = language;
this.settingsService.setLanguage(language);
}
}
}

View File

@ -0,0 +1,133 @@
<mat-nav-list>
<a mat-list-item routerLinkActive="active" routerLink='{{config.overviewPath}}' (click)="onSidenavClose()">
<span class="nav-caption">{{'navigation.top.overview' | translate}}</span>
</a>
<a mat-list-item routerLinkActive="active" [routerLink]="[config.publicPath.concat('/').concat(config.rankPath)]"
(click)="onSidenavClose()">
<span class="nav-caption">{{'navigation.top.ranks' | translate}}</span>
</a>
<a mat-list-item
routerLinkActive="active" [routerLink]="[config.publicPath.concat('/').concat(config.decorationPath)]"
(click)="onSidenavClose()">
<span class="nav-caption">{{'navigation.top.decorations' | translate}}</span>
</a>
<a mat-list-item routerLinkActive="active" routerLink='{{config.statsPath}}' (click)="onSidenavClose()">
<span class="nav-caption">{{'navigation.top.statistics' | translate}}</span>
</a>
<mat-list-item *ngIf="loginService.hasPermission(2)"
[ngClass]="{'active': currentUrl.includes('/manage/')}"
[matMenuTriggerFor]="menuManagement">
<a matline>
<span class="nav-caption">{{'navigation.top.management' | translate}}</span>
<span class="caret"></span>
</a>
</mat-list-item>
<mat-menu #menuManagement="matMenu">
<button routerLink='{{config.manageUserPath}}' routerLinkActive="active" mat-menu-item (click)="onSidenavClose()">
{{'navigation.top.management.users' | translate}}
</button>
<button routerLink='{{config.manageSquadPath}}' routerLinkActive="active" mat-menu-item (click)="onSidenavClose()">
{{'navigation.top.management.squads' | translate}}
</button>
<button routerLink='{{config.manageDecorationPath}}' routerLinkActive="active"
mat-menu-item (click)="onSidenavClose()">
{{'navigation.top.management.decorations' | translate}}
</button>
<button routerLink='{{config.manageRankPath}}' routerLinkActive="active" mat-menu-item (click)="onSidenavClose()">
{{'navigation.top.management.ranks' | translate}}
</button>
</mat-menu>
<mat-list-item *ngIf="loginService.hasPermission(1) && !loginService.hasPermission(2) && loginService.hasSquad()"
[ngClass]="{'active': currentUrl.includes('/request/')}"
[matMenuTriggerFor]="menuSqlRequest">
<a matline>
<span class="nav-caption">{{'navigation.top.request' | translate}}</span>
<span class="caret"></span>
</a>
</mat-list-item>
<mat-menu #menuSqlRequest="matMenu">
<button routerLink="{{config.request}}/{{config.sqlDashboardPath}}" routerLinkActive="active"
mat-menu-item (click)="onSidenavClose()">
{{'navigation.top.request.open' | translate}}
</button>
<button routerLink="{{config.request}}/{{config.requestPromotionPath}}" routerLinkActive="active"
mat-menu-item (click)="onSidenavClose()">
{{'navigation.top.request.promotion' | translate}}
</button>
<button routerLink="{{config.request}}/{{config.requestAwardPath}}" routerLinkActive="active"
mat-menu-item (click)="onSidenavClose()">
{{'navigation.top.request.award' | translate}}
</button>
</mat-menu>
<mat-list-item *ngIf="loginService.hasPermission(2) && loginService.hasSquad()"
[ngClass]="{'unprocessed': promotionService.hasUnprocessedPromotion || awardingService.hasUnprocessedAwards, 'active': currentUrl.includes('/request/')}"
[matMenuTriggerFor]="menuRequests">
<a matline>
<span class="nav-caption">{{'navigation.top.request.manage' | translate}}</span>
<span class="caret"></span>
</a>
</mat-list-item>
<mat-menu #menuRequests="matMenu">
<button [ngClass]="{'unprocessed-child': promotionService.hasUnprocessedPromotion}"
routerLink="{{config.request}}/{{config.confirmPromotionPath}}" routerLinkActive="active"
mat-menu-item (click)="onSidenavClose()">
{{'navigation.top.request.promotion' | translate}}
</button>
<button [ngClass]="{'unprocessed-child': awardingService.hasUnprocessedAwards}"
routerLink="{{config.request}}/{{config.confirmAwardPath}}" routerLinkActive="active"
mat-menu-item (click)="onSidenavClose()">
{{'navigation.top.request.award' | translate}}
</button>
</mat-menu>
<mat-divider></mat-divider>
<mat-list-item *ngIf="loginService.hasPermission(4)"
[ngClass]="{'active': currentUrl.includes('/admin-panel/')}"
[matMenuTriggerFor]="menuAdmin">
<a matline>
<span class="nav-caption">{{'navigation.top.admin' | translate}}</span>
<span class="caret"></span>
</a>
</mat-list-item>
<mat-menu #menuAdmin="matMenu">
<button routerLink='{{config.adminPanelAppUsersPath}}' routerLinkActive="active"
mat-menu-item (click)="onSidenavClose()">
{{'navigation.top.management.users' | translate}}
</button>
</mat-menu>
<mat-list-item *ngIf="features.localization" [matMenuTriggerFor]="menuLanguage">
<a class="text-uppercase" matline>
<span class="nav-caption">{{language}}</span>
<span class="caret"></span>
</a>
</mat-list-item>
<mat-menu #menuLanguage="matMenu">
<button mat-menu-item (click)="setLanguage(availableLanguages[0])">
<mat-icon svgIcon="flag-{{availableLanguages[0]}}"></mat-icon>
<span class="text-uppercase">{{availableLanguages[0]}}</span>
</button>
<button mat-menu-item (click)="setLanguage(availableLanguages[1])">
<mat-icon svgIcon="flag-{{availableLanguages[1]}}"></mat-icon>
<span class="text-uppercase">{{availableLanguages[1]}}</span>
</button>
</mat-menu>
<a mat-list-item *ngIf="loginService.isLoggedIn()"
(click)="doUserLogout(); onSidenavClose()">
<span class="nav-caption">{{'navigation.top.logout' | translate}}</span>
</a>
<a mat-list-item *ngIf="!loginService.isLoggedIn()"
routerLinkActive="active" routerLink='{{config.loginPath}}' (click)="onSidenavClose()">
<span class="nav-caption">{{'navigation.top.login' | translate}}</span>
</a>
<a mat-list-item href="https://www.opt4.net/dashboard">
<span class="nav-caption">{{'navigation.top.board' | translate}}</span>
</a>
</mat-nav-list>

View File

@ -0,0 +1,29 @@
@import url('../../style/blink-indicator.scss');
mat-list-item.mat-list-item, a.mat-list-item {
font-size: 16px;
text-decoration: none;
color: #9d9d9d;
&.active {
background: #000000;
}
&:hover, &.active {
color: #ffffff;
}
}
.nav-caption {
display: inline-block;
padding-left: 6px;
}
mat-divider {
margin: 15% 0;
border-color: #9d9d9d;
}
button.active {
background: #dadada;
}

View File

@ -0,0 +1,59 @@
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
import {BaseConfig, RouteConfig} from '../../app.config';
import {LoginService} from '../../services/app-user-service/login-service';
import {PromotionService} from '../../services/army-management/promotion.service';
import {AwardingService} from '../../services/army-management/awarding.service';
import {environment} from '../../../environments/environment';
import {TranslateService} from '@ngx-translate/core';
import {SettingsService} from '../../services/settings.service';
@Component({
selector: 'app-sidenav-list',
templateUrl: './sidenav-list.component.html',
styleUrls: ['./sidenav-list.component.scss']
})
export class SidenavListComponent implements OnInit {
@Output() sidenavClose = new EventEmitter();
@Output() userLogout = new EventEmitter();
@Input() currentUrl;
readonly features = environment.features;
readonly availableLanguages = BaseConfig.i18n.availableLanguages;
config = RouteConfig;
language;
constructor(public loginService: LoginService,
public promotionService: PromotionService,
public awardingService: AwardingService,
private translate: TranslateService,
private settingsService: SettingsService) {
}
ngOnInit() {
this.settingsService.getLanguage().subscribe((language) => {
this.language = language;
this.translate.setDefaultLang(language)
});
}
public onSidenavClose() {
this.sidenavClose.emit();
};
public doUserLogout() {
this.userLogout.emit()
};
setLanguage(language: string) {
if (language) {
this.language = language;
this.settingsService.setLanguage(language);
}
}
}

View File

@ -1,16 +1,9 @@
import {Component, OnInit} from '@angular/core';
import {Component} from '@angular/core';
@Component({
selector: 'app-not-found',
templateUrl: 'not-found.component.html',
styleUrls: ['not-found.component.css']
styleUrls: ['not-found.component.scss']
})
export class NotFoundComponent implements OnInit {
constructor() {
}
ngOnInit() {
}
export class NotFoundComponent {
}

View File

@ -4,7 +4,7 @@ import {Fraction} from '../../../utils/fraction.enum';
@Component({
selector: 'cc-list-filter',
templateUrl: './list-filter.component.html',
styleUrls: ['./list-filter.component.css']
styleUrls: ['./list-filter.component.scss']
})
export class ListFilterComponent {

View File

@ -5,7 +5,7 @@ import {ActivatedRoute} from '@angular/router';
@Component({
selector: 'cc-list-search',
templateUrl: './search-field.component.html',
styleUrls: ['./search-field.component.css']
styleUrls: ['./search-field.component.scss']
})
export class SearchFieldComponent implements OnInit {

View File

@ -1,65 +0,0 @@
.form-signin {
max-width: 330px;
padding: 15px;
margin: 0 auto;
}
.form-signin > .row {
width: 400px;
}
.form-signin-heading {
text-align: center;
}
.form-signin .form-signin-heading, .form-signin .checkbox, #inputEmail {
margin-bottom: 10px;
}
.form-signin .checkbox {
font-weight: normal;
}
.form-signin .form-control {
position: relative;
font-size: 16px;
height: auto;
padding: 10px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.form-signin .form-control:focus {
z-index: 2;
}
.form-signin input[type="text"] {
margin-bottom: 5px;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
.form-signin input[type="password"] {
margin-bottom: 10px;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
button {
width: 100%;
}
/* Loading Animation */
.glyphicon-refresh-animate {
animation: spin 0.9s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}

View File

@ -1,6 +1,6 @@
<form class="form-signin" (ngSubmit)="login(userName.value, password.value)">
<div class="row">
<h2 class="form-signin-heading">{{'login.headline' | translate}}</h2>
<h2>{{'login.headline' | translate}}</h2>
<label for="inputEmail" class="sr-only">{{'login.username' | translate}}</label>
<input #userName id="inputEmail" class="form-control"
@ -11,12 +11,10 @@
<input #password type="password" id="inputPassword" class="form-control"
placeholder="{{'login.password' | translate}}" required="">
<div class="form-group">
<button mat-stroked-button type="submit">
<span *ngIf="!loading">{{'login.submit' | translate}}</span>
<span *ngIf="loading" class="glyphicon glyphicon-refresh glyphicon-refresh-animate"></span>
</button>
</div>
<button mat-stroked-button type="submit">
<span *ngIf="!loading">{{'login.submit' | translate}}</span>
<span *ngIf="loading" class="glyphicon glyphicon-refresh glyphicon-refresh-animate"></span>
</button>
</div>
</form>

View File

@ -0,0 +1,44 @@
.form-signin {
width: 100%;
padding: 15px;
margin: 0 auto;
& > .row {
max-width: 400px;
margin: auto;
& > h2 {
text-align: center
}
input.form-control {
margin-bottom: 10px;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
font-size: 16px;
height: auto;
padding: 10px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
button {
width: 100%;
}
}
}
/* Loading Animation */
.glyphicon-refresh-animate {
animation: spin 0.9s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}

View File

@ -8,7 +8,7 @@ import {SnackBarService} from '../services/user-interface/snack-bar/snack-bar.se
@Component({
moduleId: module.id,
templateUrl: 'login.component.html',
styleUrls: ['login.component.css']
styleUrls: ['login.component.scss']
})
export class LoginComponent implements OnInit {

View File

@ -1,26 +1,27 @@
<form class="form-signin" (ngSubmit)="signup(userName.value, password.value, secret.value)">
<div class="row" style="position: absolute;width: 500px;left: 40%;">
<h2 style="text-align: center;" class="form-signin-heading">{{'signup.headline' | translate}}</h2>
<div class="row">
<h2>{{'signup.headline' | translate}}</h2>
<p [innerHtml]="'signup.description' | translate"></p>
<label for="inputEmail" class="sr-only">{{'signup.username' | translate}}</label>
<input #userName id="inputEmail" class="form-control" placeholder="{{'signup.username' | translate}}" required="" autofocus="">
<input #userName id="inputEmail" class="form-control" placeholder="{{'signup.username' | translate}}" required=""
autofocus="">
<label for="inputPassword" class="sr-only">{{'signup.password' | translate}}</label>
<input #password type="password" id="inputPassword" class="form-control" placeholder="{{'signup.password' | translate}}" required="">
<input #password type="password" id="inputPassword" class="form-control"
placeholder="{{'signup.password' | translate}}" required="">
<label for="inputSecret" class="sr-only">{{'signup.secret' | translate}}</label>
<input #secret type="text" id="inputSecret" class="form-control" placeholder="{{'signup.secret.placeholder' | translate}}"
<input #secret type="text" id="inputSecret" class="form-control"
placeholder="{{'signup.secret.placeholder' | translate}}"
required="">
<div class="form-group">
<button type="submit" class="btn btn-lg btn-block btn-primary">
<span *ngIf="!loading">{{'signup.submit' | translate}}</span>
<span *ngIf="loading" class="glyphicon glyphicon-refresh glyphicon-refresh-animate"></span>
</button>
</div>
<button mat-stroked-button type="submit">
<span *ngIf="!loading">{{'signup.submit' | translate}}</span>
<span *ngIf="loading" class="glyphicon glyphicon-refresh glyphicon-refresh-animate"></span>
</button>
</div>
</form>

View File

@ -8,7 +8,7 @@ import {SnackBarService} from '../services/user-interface/snack-bar/snack-bar.se
@Component({
moduleId: module.id,
templateUrl: './signup.component.html',
styleUrls: ['./login.component.css']
styleUrls: ['./login.component.scss']
})
export class SignupComponent implements OnInit {

View File

@ -6,6 +6,8 @@
<a>{{decoration.name}}</a>
</span>
<br>
<small *ngIf="decoration.fraction == 'ARF'">{{fraction.ARF}}</small>
<small *ngIf="decoration.fraction == 'SWORD'">{{fraction.SWORD}}</small>
<small *ngIf="decoration.fraction == 'OPFOR'">{{fraction.OPFOR}}</small>
<small *ngIf="decoration.fraction == 'BLUFOR'">{{fraction.BLUFOR}}</small>
<small *ngIf="decoration.fraction == 'GLOBAL'">{{'decorations.list.filter.global' | translate}}</small>

View File

@ -0,0 +1 @@
@import url('../../../style/list-entry.scss');

View File

@ -5,7 +5,7 @@ import {Fraction} from '../../../utils/fraction.enum';
@Component({
selector: 'decoration-item',
templateUrl: './decoration-item.component.html',
styleUrls: ['./decoration-item.component.css', '../../../style/list-entry.css'],
styleUrls: ['./decoration-item.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class DecorationItemComponent implements OnInit {

View File

@ -1,6 +1,8 @@
<div class="select-list">
<cc-list-filter
[filterButtons]="[{label: fraction.BLUFOR, value: 'BLUFOR'},
[filterButtons]="[{label: fraction.ARF, value: 'ARF'},
{label: fraction.SWORD, value: 'SWORD'},
{label: fraction.BLUFOR, value: 'BLUFOR'},
{label: fraction.OPFOR, value: 'OPFOR'},
{label: 'decorations.list.filter.global', value: 'GLOBAL'}]"
[addButton]="{svgIcon: 'add', tooltip: 'decorations.list.button.add'}"

View File

@ -0,0 +1 @@
@import url('../../../style/select-list.scss');

View File

@ -13,7 +13,7 @@ import {TranslateService} from '@ngx-translate/core';
@Component({
selector: 'cc-decoration-list',
templateUrl: './decoration-list.component.html',
styleUrls: ['./decoration-list.component.css', '../../../style/select-list.css']
styleUrls: ['./decoration-list.component.scss']
})
export class DecorationListComponent implements OnInit {

View File

@ -17,6 +17,8 @@
<select id="fraction" name="fraction" class="form-control btn dropdown-toggle"
required
[(ngModel)]="decoration.fraction">
<option value="{{fraction.ARF}}">{{fraction.ARF}}</option>
<option value="{{fraction.SWORD}}">{{fraction.SWORD}}</option>
<option value="OPFOR">{{fraction.OPFOR}}</option>
<option value="BLUFOR">{{fraction.BLUFOR}}</option>
<option value="GLOBAL">{{'decorations.submit.field.fraction.global' | translate}}</option>

View File

@ -0,0 +1,2 @@
@import url('../../../style/entry-form.scss');
@import url('../../../style/overview.scss');

View File

@ -10,7 +10,7 @@ import {TranslateService} from '@ngx-translate/core';
@Component({
templateUrl: './edit-decoration.component.html',
styleUrls: ['./edit-decoration.component.css', '../../../style/entry-form.css', '../../../style/overview.css']
styleUrls: ['./edit-decoration.component.scss']
})
export class EditDecorationComponent implements OnInit, OnDestroy {

View File

@ -17,8 +17,8 @@
<select id="fraction" name="fraction" class="form-control btn dropdown-toggle"
required
[(ngModel)]="rank.fraction">
<option value="OPFOR">{{fraction.OPFOR}}</option>
<option value="BLUFOR">{{fraction.BLUFOR}}</option>
<option value="OPFOR">{{fraction.SWORD}}</option>
<option value="BLUFOR">{{fraction.ARF}}</option>
</select>
<show-error displayName="{{'ranks.submit.field.fraction' | translate}}" controlPath="fraction"></show-error>
</div>

View File

@ -0,0 +1,2 @@
@import url('../../../style/entry-form.scss');
@import url('../../../style/overview.scss');

Some files were not shown because too many files have changed in this diff Show More