Compare commits
3 Commits
6c49f4738a
...
0561940861
| Author | SHA1 | Date | |
|---|---|---|---|
| 0561940861 | |||
| f0f68f3285 | |||
| b4a8b25ae7 |
@ -7,7 +7,7 @@
|
||||
"build": "ng build",
|
||||
"watch": "ng build --watch --configuration development",
|
||||
"test": "ng test",
|
||||
"deploy": "scp -P2222 -r dist/angular/browser/* root@10.255.0.1:/srv/Data/www/ && git tag \"DEPLOY-FRONT---$(date +'%F---%H-%M-%S')\""
|
||||
"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')\""
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
<div class="option">
|
||||
<button class="arrowLeft" (click)="shiftAlignment(+1)">←</button>
|
||||
{{ alignment.display }} {{ offset > 0 ? -offset : '' }}
|
||||
{{ offset > 0 ? -offset : '' }}{{ alignment === Alignment.FIVE && offset > 0 ? 'x' : '' }} {{ alignment.display }}{{ offset > 1 ? alignment.plural : '' }}
|
||||
<button class="arrowRight" (click)="shiftAlignment(-1)">→</button>
|
||||
</div>
|
||||
|
||||
|
||||
@ -15,6 +15,8 @@ import {SeriesService} from '../../series/series.service';
|
||||
})
|
||||
export class ElectroEnergyComponent implements OnInit, OnDestroy {
|
||||
|
||||
protected readonly Alignment = Alignment;
|
||||
|
||||
protected aggregations: AggregationWrapperDto = AggregationWrapperDto.EMPTY;
|
||||
|
||||
protected alignment: Alignment = Alignment.DAY;
|
||||
|
||||
@ -4,21 +4,22 @@ export class 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', Alignment.offsetTitleHour);
|
||||
static readonly HOUR = new Alignment('HOUR', 'Stunde', 'n', Alignment.offsetTitleHour);
|
||||
|
||||
static readonly DAY = new Alignment('DAY', 'Tag', Alignment.offsetTitleDay);
|
||||
static readonly DAY = new Alignment('DAY', 'Tag', 'e', Alignment.offsetTitleDay);
|
||||
|
||||
static readonly WEEK = new Alignment('WEEK', 'Woche', Alignment.offsetTitleWeek);
|
||||
static readonly WEEK = new Alignment('WEEK', 'Woche', 'n', Alignment.offsetTitleWeek);
|
||||
|
||||
static readonly MONTH = new Alignment('MONTH', 'Monat', Alignment.offsetTitleMonth);
|
||||
static readonly MONTH = new Alignment('MONTH', 'Monat', 'e', Alignment.offsetTitleMonth);
|
||||
|
||||
static readonly YEAR = new Alignment('YEAR', 'Jahr', Alignment.offsetTitleYear);
|
||||
static readonly YEAR = new Alignment('YEAR', 'Jahr', 'e', Alignment.offsetTitleYear);
|
||||
|
||||
constructor(
|
||||
readonly name: string,
|
||||
readonly display: string,
|
||||
readonly plural: string,
|
||||
readonly offsetTitle: (offset: number, locale: string) => string
|
||||
) {
|
||||
Alignment.values.push(this);
|
||||
|
||||
@ -1,17 +1,21 @@
|
||||
@import "../../../../colors.less";
|
||||
|
||||
.bar {
|
||||
position: relative;
|
||||
color: white;
|
||||
display: flex;
|
||||
border-radius: 0.5em;
|
||||
|
||||
.part {
|
||||
float: left;
|
||||
white-space: nowrap;
|
||||
font-size: 40%;
|
||||
|
||||
.text {
|
||||
padding-left: 0.25em;
|
||||
padding-left: 0.4em;
|
||||
}
|
||||
}
|
||||
|
||||
.part:first-child {
|
||||
.text:first-child {
|
||||
padding-left: 0.8em;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user