Compare commits

..

No commits in common. "0561940861da0bea36b09597fd76e86c7ad8dc30" and "6c49f4738a3c64b1e70997c39b559a98d0a7d63a" have entirely different histories.

5 changed files with 12 additions and 19 deletions

View File

@ -7,7 +7,7 @@
"build": "ng build", "build": "ng build",
"watch": "ng build --watch --configuration development", "watch": "ng build --watch --configuration development",
"test": "ng test", "test": "ng test",
"deploy": "ng build && scp -P2222 -r dist/angular/browser/* root@10.255.0.1:/srv/Data/www/ && git tag \"DEPLOY-FRONT---$(date +'%F---%H-%M-%S')\"" "deploy": "scp -P2222 -r dist/angular/browser/* root@10.255.0.1:/srv/Data/www/ && git tag \"DEPLOY-FRONT---$(date +'%F---%H-%M-%S')\""
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {

View File

@ -6,7 +6,7 @@
<div class="option"> <div class="option">
<button class="arrowLeft" (click)="shiftAlignment(+1)">&larr;</button> <button class="arrowLeft" (click)="shiftAlignment(+1)">&larr;</button>
{{ offset > 0 ? -offset : '' }}{{ alignment === Alignment.FIVE && offset > 0 ? 'x' : '' }} {{ alignment.display }}{{ offset > 1 ? alignment.plural : '' }} {{ alignment.display }} {{ offset > 0 ? -offset : '' }}
<button class="arrowRight" (click)="shiftAlignment(-1)">&rarr;</button> <button class="arrowRight" (click)="shiftAlignment(-1)">&rarr;</button>
</div> </div>

View File

@ -15,8 +15,6 @@ import {SeriesService} from '../../series/series.service';
}) })
export class ElectroEnergyComponent implements OnInit, OnDestroy { export class ElectroEnergyComponent implements OnInit, OnDestroy {
protected readonly Alignment = Alignment;
protected aggregations: AggregationWrapperDto = AggregationWrapperDto.EMPTY; protected aggregations: AggregationWrapperDto = AggregationWrapperDto.EMPTY;
protected alignment: Alignment = Alignment.DAY; protected alignment: Alignment = Alignment.DAY;

View File

@ -4,22 +4,21 @@ export class Alignment {
private static readonly values: Alignment[] = []; private static readonly values: Alignment[] = [];
static readonly FIVE = new Alignment('FIVE', '5 Minuten', '', Alignment.offsetTitleFive); static readonly FIVE = new Alignment('FIVE', '5 Minuten', Alignment.offsetTitleFive);
static readonly HOUR = new Alignment('HOUR', 'Stunde', 'n', Alignment.offsetTitleHour); static readonly HOUR = new Alignment('HOUR', 'Stunde', Alignment.offsetTitleHour);
static readonly DAY = new Alignment('DAY', 'Tag', 'e', Alignment.offsetTitleDay); static readonly DAY = new Alignment('DAY', 'Tag', Alignment.offsetTitleDay);
static readonly WEEK = new Alignment('WEEK', 'Woche', 'n', Alignment.offsetTitleWeek); static readonly WEEK = new Alignment('WEEK', 'Woche', Alignment.offsetTitleWeek);
static readonly MONTH = new Alignment('MONTH', 'Monat', 'e', Alignment.offsetTitleMonth); static readonly MONTH = new Alignment('MONTH', 'Monat', Alignment.offsetTitleMonth);
static readonly YEAR = new Alignment('YEAR', 'Jahr', 'e', Alignment.offsetTitleYear); static readonly YEAR = new Alignment('YEAR', 'Jahr', Alignment.offsetTitleYear);
constructor( constructor(
readonly name: string, readonly name: string,
readonly display: string, readonly display: string,
readonly plural: string,
readonly offsetTitle: (offset: number, locale: string) => string readonly offsetTitle: (offset: number, locale: string) => string
) { ) {
Alignment.values.push(this); Alignment.values.push(this);

View File

@ -1,21 +1,17 @@
@import "../../../../colors.less"; @import "../../../../colors.less";
.bar { .bar {
display: flex; position: relative;
color: white;
border-radius: 0.5em; border-radius: 0.5em;
.part { .part {
float: left;
white-space: nowrap; white-space: nowrap;
font-size: 40%; font-size: 40%;
.text { .text {
padding-left: 0.4em; padding-left: 0.25em;
}
}
.part:first-child {
.text:first-child {
padding-left: 0.8em;
} }
} }