Merge branch 'master' of git.noarch.de:hardi/opt-cc

pull/58/head
HardiReady 2019-02-25 16:20:51 +01:00
commit 983b1a21f0
144 changed files with 879 additions and 487 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "opt-cc",
"version": "1.9.2",
"version": "1.9.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

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

View File

@ -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",

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"
}
}
}
}

View File

@ -533,6 +533,14 @@
"tslib": "^1.9.0"
}
},
"@angular/flex-layout": {
"version": "6.0.0-beta.18",
"resolved": "https://registry.npmjs.org/@angular/flex-layout/-/flex-layout-6.0.0-beta.18.tgz",
"integrity": "sha512-1Alv3YSIZYp0CTUIESIaSQLoSVyLzuNKPa5bGM/RzOmeSrndm5plVgI9wopGfJUDiwM18R97rq/4XjDvNT/+ig==",
"requires": {
"tslib": "^1.7.1"
}
},
"@angular/forms": {
"version": "6.1.10",
"resolved": "https://registry.npmjs.org/@angular/forms/-/forms-6.1.10.tgz",
@ -4636,13 +4644,11 @@
},
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"optional": true
"bundled": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@ -4655,18 +4661,15 @@
},
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"optional": true
"bundled": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"optional": true
"bundled": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"optional": true
"bundled": true
},
"core-util-is": {
"version": "1.0.2",
@ -4769,8 +4772,7 @@
},
"inherits": {
"version": "2.0.3",
"bundled": true,
"optional": true
"bundled": true
},
"ini": {
"version": "1.3.5",
@ -4780,7 +4782,6 @@
"is-fullwidth-code-point": {
"version": "1.0.0",
"bundled": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@ -4793,20 +4794,17 @@
"minimatch": {
"version": "3.0.4",
"bundled": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "0.0.8",
"bundled": true,
"optional": true
"bundled": true
},
"minipass": {
"version": "2.2.4",
"bundled": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.1",
"yallist": "^3.0.0"
@ -4823,7 +4821,6 @@
"mkdirp": {
"version": "0.5.1",
"bundled": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@ -4896,8 +4893,7 @@
},
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"optional": true
"bundled": true
},
"object-assign": {
"version": "4.1.1",
@ -4907,7 +4903,6 @@
"once": {
"version": "1.4.0",
"bundled": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@ -5013,7 +5008,6 @@
"string-width": {
"version": "1.0.2",
"bundled": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@ -11767,9 +11761,9 @@
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
},
"typescript": {
"version": "2.7.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz",
"integrity": "sha512-p5TCYZDAO0m4G344hD+wx/LATebLWZNkkh2asWUFqSsD2OrDNhbAHuSjobrmsUmdzjJjEeZVU9g1h3O6vpstnw=="
"version": "2.9.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz",
"integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w=="
},
"underscore": {
"version": "1.7.0",

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",
@ -42,6 +43,7 @@
"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": {
@ -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

@ -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

@ -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,153 +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 (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>
<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>

View File

@ -1,39 +1,15 @@
@import "style/load-indicator.scss";
ul {
list-style-type: none;
margin: 0;
padding: 0;
}
li {
mat-sidenav-container, mat-sidenav-content, mat-sidenav {
height: 100vh;
display: inline;
background: #fdfdfd;
}
.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;
mat-sidenav {
background: #222222;
top: 50px;
width: 250px;
}
#scrollTopBtn {
@ -42,39 +18,8 @@ li {
right: 30px;
z-index: 99;
background: rgba(16, 16, 16, 0.8);
}
#scrollTopBtn:hover {
background: #101010;
}
.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;
&:hover {
background: #101010;
}
}

View File

@ -1,19 +1,14 @@
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',
@ -22,21 +17,20 @@ declare function require(url: string);
})
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',
'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,15 @@ export const RouteConfig = {
rankOverviewPath: 'public/ranks',
decorationOverviewPath: 'public/decorations',
};
export const BaseConfig = {
responsive: {
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, MatToolbarModule} from '@angular/material';
import {FlexLayoutModule} from '@angular/flex-layout';
@NgModule({
imports: [
@ -33,8 +34,11 @@ import {HttpGateway} from './services/http-gateway';
HttpModule,
HttpClientModule,
ClipboardModule,
MatSnackBarModule,
MatSelectModule,
MatSidenavModule,
MatToolbarModule,
MatListModule,
MatMenuModule,
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,17 +1,4 @@
: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;
}
@import url('../../style/background-image.scss');
.army-member-view {
width: 90%;

View File

@ -1,9 +1,8 @@
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,7 +10,7 @@ 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 {
@ -35,7 +34,6 @@ export class ArmyMemberComponent implements OnInit {
}
ngOnInit() {
this.subscription = this.route.params
.map(params => params['id'])
.filter(id => id !== undefined)

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

@ -0,0 +1,24 @@
@import url('../style/background-image.scss');
.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

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

View File

@ -0,0 +1,148 @@
<mat-toolbar color="primary">
<div fxHide.gt-sm style="position:absolute;">
<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

@ -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

@ -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

@ -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

@ -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

@ -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

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

View File

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

View File

@ -1,3 +1,5 @@
@import url('../../../style/list-entry.scss');
.rank-list-preview {
height: 54px;
float: left;

View File

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

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-rank-list',
templateUrl: './rank-list.component.html',
styleUrls: ['./rank-list.component.css', '../../../style/select-list.css']
styleUrls: ['./rank-list.component.scss']
})
export class RankListComponent implements OnInit {

View File

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

View File

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

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: 'cc-squad-item',
templateUrl: './squad-item.component.html',
styleUrls: ['./squad-item.component.css', '../../../style/list-entry.css'],
styleUrls: ['./squad-item.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class SquadItemComponent implements OnInit {

View File

@ -1,3 +0,0 @@
.search-bar {
padding-bottom: 20px;
}

View File

@ -0,0 +1,5 @@
@import url('../../../style/select-list.scss');
.search-bar {
padding-bottom: 20px;
}

View File

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

View File

@ -1,3 +1,6 @@
@import url('../../../style/overview.scss');
@import url('../../../style/hide-scrollbar.scss');
.decoration-preview {
background-color: white;
padding: 5px;

View File

@ -11,7 +11,7 @@ import {TranslateService} from '@ngx-translate/core';
@Component({
templateUrl: './award-user.component.html',
styleUrls: ['./award-user.component.css', '../../../style/overview.css', '../../../style/hide-scrollbar.css'],
styleUrls: ['./award-user.component.scss'],
})
export class AwardUserComponent implements OnInit {

View File

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

View File

@ -12,7 +12,7 @@ import {SnackBarService} from '../../../services/user-interface/snack-bar/snack-
@Component({
templateUrl: './edit-user.component.html',
styleUrls: ['./edit-user.component.css', '../../../style/entry-form.css', '../../../style/overview.css'],
styleUrls: ['./edit-user.component.scss'],
})
export class EditUserComponent implements OnInit {

View File

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

View File

@ -6,7 +6,7 @@ import {LoginService} from '../../../services/app-user-service/login-service';
@Component({
selector: 'cc-user-item',
templateUrl: './user-item.component.html',
styleUrls: ['./user-item.component.css', '../../../style/list-entry.css'],
styleUrls: ['./user-item.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class UserItemComponent {

View File

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

View File

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

View File

@ -1,16 +1,4 @@
:host {
display: flow-root;
height: 100%;
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;
}
@import url('../../style/background-image.scss');
h1 {
margin-bottom: 30px;
@ -19,7 +7,12 @@ h1 {
.decoration-overview-container {
position: relative;
z-index: 0;
margin: auto 140px 30px;
@media all and (max-width: 959px) {
margin: auto;
}
}
:host /deep/ .mat-tab-header {

View File

@ -12,7 +12,7 @@ import {Location} from '@angular/common';
@Component({
selector: 'cc-decoration-overview',
templateUrl: './decoration-overview.component.html',
styleUrls: ['./decoration-overview.component.css']
styleUrls: ['./decoration-overview.component.scss']
})
export class DecorationOverviewComponent implements OnInit, OnDestroy {

View File

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

View File

@ -1,17 +1,4 @@
: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;
}
@import url('../../style/background-image.scss');
table {
width: 100%;

View File

@ -10,7 +10,7 @@ import {UserListSheetComponent} from '../user-list-sheet/user-list-sheet.compone
@Component({
selector: 'cc-rank-overview',
templateUrl: './rank-overview.component.html',
styleUrls: ['./rank-overview.component.css']
styleUrls: ['./rank-overview.component.scss']
})
export class RankOverviewComponent implements OnInit, OnDestroy {

View File

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

View File

@ -1,3 +1,5 @@
@import url('../../style/overview.scss');
.overview {
width: 100% !important;
margin-left: 25px !important;

View File

@ -11,7 +11,7 @@ import {SnackBarService} from '../../services/user-interface/snack-bar/snack-bar
@Component({
templateUrl: './req-award.component.html',
styleUrls: ['./req-award.component.css', '../../style/overview.css'],
styleUrls: ['./req-award.component.scss'],
})
export class RequestAwardComponent implements OnInit {

View File

@ -1,3 +1,5 @@
@import url('../../style/overview.scss');
.overview {
margin-left: 25px !important;
}

View File

@ -7,7 +7,7 @@ import {SnackBarService} from '../../services/user-interface/snack-bar/snack-bar
@Component({
templateUrl: './confirm-award.component.html',
styleUrls: ['./confirm-award.component.css', '../../style/overview.css'],
styleUrls: ['./confirm-award.component.scss'],
})
export class ConfirmAwardComponent implements OnInit {

View File

@ -1,3 +1,5 @@
@import url('../../style/overview.scss');
.overview {
margin-left: 25px !important;
}

View File

@ -8,7 +8,7 @@ import {SnackBarService} from '../../services/user-interface/snack-bar/snack-bar
@Component({
templateUrl: './confirm-promotion.component.html',
styleUrls: ['./confirm-promotion.component.css', '../../style/overview.css'],
styleUrls: ['./confirm-promotion.component.scss'],
})
export class ConfirmPromotionComponent implements OnInit {

View File

@ -1,3 +1,5 @@
@import url('../../style/overview.scss');
.overview {
margin-left: 25px !important;
}

View File

@ -11,7 +11,7 @@ import {SnackBarService} from '../../services/user-interface/snack-bar/snack-bar
@Component({
templateUrl: './req-promotion.component.html',
styleUrls: ['./req-promotion.component.css', '../../style/overview.css'],
styleUrls: ['./req-promotion.component.scss'],
})
export class RequestPromotionComponent implements OnInit {

View File

@ -5,7 +5,7 @@ import {SettingsService} from '../services/settings.service';
@Component({
selector: 'cc-request-root',
templateUrl: 'request.component.html',
styleUrls: ['request.component.css']
styleUrls: ['request.component.scss']
})
export class RequestComponent {
constructor(private translate: TranslateService,

View File

@ -1,3 +1,5 @@
@import url('../../style/overview.scss');
.overview {
margin-left: 25px !important;
}

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