src/app/dashboard/dash-panel-mini.ts
Compbaser
selector | dash-panel-mini |
styles |
a {
font-size: 1.1em;
}
li {
list-style-type: none;
}
|
templateUrl | ./dash-panel-mini.html |
constructor(yp: YellowPepperService, rp: RedPepperService)
|
Defined in src/app/dashboard/dash-panel-mini.ts:29
|
ngAfterViewInit |
ngAfterViewInit()
|
Defined in src/app/dashboard/dash-panel-mini.ts:50
|
Returns :
void
|
destroy |
destroy()
|
Defined in src/app/dashboard/dash-panel-mini.ts:53
|
Returns :
void
|
clock$ |
clock$: |
Defined in src/app/dashboard/dash-panel-mini.ts:23
|
isBrandingDisabled |
isBrandingDisabled: |
Default value : false
|
Defined in src/app/dashboard/dash-panel-mini.ts:27
|
m_userModel$ |
m_userModel$: |
Defined in src/app/dashboard/dash-panel-mini.ts:24
|
ngVersion |
ngVersion: |
Defined in src/app/dashboard/dash-panel-mini.ts:28
|
offlineDevMode |
offlineDevMode: |
Defined in src/app/dashboard/dash-panel-mini.ts:25
|
resellerName |
resellerName: |
Default value : MediasSignage Inc.
|
Defined in src/app/dashboard/dash-panel-mini.ts:29
|
version |
version: |
Defined in src/app/dashboard/dash-panel-mini.ts:26
|
import {AfterViewInit, Component, VERSION} from "@angular/core";
import {Compbaser} from "ng-mslib";
import {YellowPepperService} from "../../services/yellowpepper.service";
import {RedPepperService} from "../../services/redpepper.service";
import {Observable} from "rxjs/Observable";
import * as packageJson from "../../../package.json";
@Component({
selector: 'dash-panel-mini',
styles: [`
a {
font-size: 1.1em;
}
li {
list-style-type: none;
}
`],
templateUrl: './dash-panel-mini.html'
})
export class DashPanelMini extends Compbaser implements AfterViewInit {
clock$;
m_userModel$;
offlineDevMode: any = window['offlineDevMode'];
version = packageJson.version;
isBrandingDisabled: boolean = false;
ngVersion = VERSION.full;
resellerName = 'MediasSignage Inc.';
constructor(private yp: YellowPepperService, private rp: RedPepperService) {
super();
this.clock$ = Observable
.interval(300)
.startWith(1)
.map(() => new Date());
this.m_userModel$ = this.yp.listenUserModel();
this.cancelOnDestroy(
this.yp.isBrandingDisabled()
.subscribe((v) => {
this.isBrandingDisabled = v;
if (!this.isBrandingDisabled)
this.resellerName = this.rp.getUserData().resellerName;
}, (e) => console.error(e))
)
}
ngAfterViewInit() {
}
destroy() {
}
}
<small class="debug">{{me}}</small>
<hr/>
<Logo class="pull-left" *ngIf="isBrandingDisabled" style="padding-left: 5px; padding-top: 5px"></Logo>
<reseller-logo class="pull-left" *ngIf="!isBrandingDisabled" style="padding-left: 5px; padding-top: 5px"></reseller-logo>
<span style="font-size: 16px; padding-top: 7px; padding-left: 4px" class="pull-left">{{resellerName}}</span>
<div class="clearfix"></div>
<hr/>
<h4>{{clock$ | async | date:'medium'}}</h4>
<hr/>
<h3 style="color: green"><i class="fa fa-check-circle"></i> mode: online</h3>
<div *ngIf="isBrandingDisabled">
<hr/>
<h5>Quick help:</h5>
<ul class="user-controls">
<li><a target="_blank" href="http://www.digitalsignage.com"><span style="margin-left:3px;" class="fa fa-link"></span> DigitalSignage.com</a></li>
<li><a target="_blank" href="http://www.digitalsignage.com/_html/signage_video.html"><span style="margin-left:3px;" class="fa fa-link"></span> Videos</a></li>
<li><a target="_blank" href="http://www.digitalsignage.com/_html/webinar_registration.html"><span style="margin-left:3px;" class="fa fa-link"></span> Webinar</a></li>
<li><a target="_blank" href="http://script.digitalsignage.com/forum/index.php"><span style="margin-left:3px;" class="fa fa-link"></span> Forum</a></li>
</ul>
</div>
<hr/>
<h5>User: {{(m_userModel$ | async).getUser()}}</h5>
<h5>Business id: {{(m_userModel$ | async).businessId()}}</h5>
<h5>server : {{(m_userModel$ | async).getPartialDomain()}}</h5>
<h5>app version: {{version}}</h5>
<h5>framework version: {{ngVersion}}</h5>
<hr/>