File

src/app/dashboard/dash-panel-mini.ts

Extends

Compbaser

Implements

AfterViewInit

Metadata

selector dash-panel-mini
styles a { font-size: 1.1em; } li { list-style-type: none; }
templateUrl ./dash-panel-mini.html

Constructor

constructor(yp: YellowPepperService, rp: RedPepperService)

Methods

ngAfterViewInit
ngAfterViewInit()
Returns : void
destroy
destroy()
Returns : void

Properties

clock$
clock$: any
isBrandingDisabled
isBrandingDisabled: boolean
Default value : false
m_userModel$
m_userModel$: any
ngVersion
ngVersion: string
offlineDevMode
offlineDevMode: any
resellerName
resellerName: string
Default value : MediasSignage Inc.
version
version: any
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/>
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""