mirror of
https://gitlab.com/openlp/web-remote.git
synced 2024-12-22 19:32:49 +00:00
Merge branch 'fix_24_hour_setting' into 'master'
Make stage views use the 12 hour time setting Closes #14 See merge request openlp/web-remote!33
This commit is contained in:
commit
145329f65f
@ -11,7 +11,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
<div class="time">{{ time|date:'HH:mm' }}</div>
|
<div class="time">{{ (openlpService.getIsTwelveHourTime()) ? (time|date:'h:mm a') : (time|date:'HH:mm') }}</div>
|
||||||
<div class="transpose">
|
<div class="transpose">
|
||||||
<button mat-icon-button (click)="transposeUp()">
|
<button mat-icon-button (click)="transposeUp()">
|
||||||
<mat-icon>keyboard_arrow_up</mat-icon>
|
<mat-icon>keyboard_arrow_up</mat-icon>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<div class="time">{{ time|date:'HH:mm' }}</div>
|
<div class="time">{{ (openlpService.getIsTwelveHourTime()) ? (time|date:'h:mm a') : (time|date:'HH:mm') }}</div>
|
||||||
<div class="notes" [innerHTML]="notes|nl2br"></div>
|
<div class="notes" [innerHTML]="notes|nl2br"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="close"><button mat-raised-button class="closeButton" routerLink="/">Close</button></div>
|
<div class="close"><button mat-raised-button class="closeButton" routerLink="/">Close</button></div>
|
||||||
|
@ -39,6 +39,7 @@ const httpOptions = {
|
|||||||
export class OpenLPService {
|
export class OpenLPService {
|
||||||
private apiURL: string;
|
private apiURL: string;
|
||||||
public stateChanged$: EventEmitter<State>;
|
public stateChanged$: EventEmitter<State>;
|
||||||
|
private isTwelveHourTime = true;
|
||||||
|
|
||||||
constructor(private http: HttpClient) {
|
constructor(private http: HttpClient) {
|
||||||
const host = window.location.hostname;
|
const host = window.location.hostname;
|
||||||
@ -58,6 +59,7 @@ export class OpenLPService {
|
|||||||
const reader = new FileReader();
|
const reader = new FileReader();
|
||||||
reader.onload = () => {
|
reader.onload = () => {
|
||||||
const state = deserialize(JSON.parse(reader.result as string).results, State);
|
const state = deserialize(JSON.parse(reader.result as string).results, State);
|
||||||
|
this.isTwelveHourTime = state.twelve;
|
||||||
this.stateChanged$.emit(state);
|
this.stateChanged$.emit(state);
|
||||||
};
|
};
|
||||||
reader.readAsText(event.data);
|
reader.readAsText(event.data);
|
||||||
@ -69,6 +71,10 @@ export class OpenLPService {
|
|||||||
httpOptions.headers = httpOptions.headers.set('Authorization', token);
|
httpOptions.headers = httpOptions.headers.set('Authorization', token);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getIsTwelveHourTime(): boolean {
|
||||||
|
return this.isTwelveHourTime;
|
||||||
|
}
|
||||||
|
|
||||||
retrieveSystemInformation(): Observable<SystemInformation> {
|
retrieveSystemInformation(): Observable<SystemInformation> {
|
||||||
return this.http.get<SystemInformation>(`${this.apiURL}/core/system`, httpOptions);
|
return this.http.get<SystemInformation>(`${this.apiURL}/core/system`, httpOptions);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user