File

branding/shared/lazy/edit-branding-router-outlet/edit-branding-router-outlet.component.ts

Implements

OnDestroy

Metadata

Index

Properties
Methods

Constructor

constructor(activatedRoute: ActivatedRoute, store: StoreBrandingService, router: Router, alert: AlertService, applyBrandingService: ApplyBrandingLocallyService, appState: AppStateService)
Parameters :
Name Type Optional
activatedRoute ActivatedRoute No
store StoreBrandingService No
router Router No
alert AlertService No
applyBrandingService ApplyBrandingLocallyService No
appState AppStateService No

Methods

cancel
cancel()
Returns : void
Async markAsActive
markAsActive()
Returns : any
ngOnDestroy
ngOnDestroy()
Returns : void
Async onBrandingVarChanges
onBrandingVarChanges(value: string)
Parameters :
Name Type Optional
value string No
Returns : any
Async openPreview
openPreview()
Returns : any
routeActivated
routeActivated(event)
Parameters :
Name Optional
event No
Returns : void
Async saveBranding
saveBranding()
Returns : any

Properties

brandingName$
Type : Observable<string>
fallbackBranding$
Type : Observable<BrandingOptionsJson>
formControl
Default value : new FormControl<string>(undefined)
isGlobalBranding$
Type : Observable<boolean>
tabName$
Type : Observable<string>
<c8y-title>{{ brandingName$ | async }}</c8y-title>

<c8y-breadcrumb>
  <c8y-breadcrumb-item
    [icon]="'palette'"
    [label]="'Branding' | translate"
    [path]="'/branding-editor'"
  ></c8y-breadcrumb-item>
  <c8y-breadcrumb-item
    [icon]="'cog'"
    [label]="brandingName$ | async"
  ></c8y-breadcrumb-item>
</c8y-breadcrumb>

<div class="card card--fullpage content-fullpage">
  <div class="card-header separator">
    <div class="card-title">{{ brandingName$ | async }} — {{ tabName$ | async | translate }}</div>
  </div>
  <router-outlet
    class="d-contents"
    (activate)="routeActivated($event)"
  ></router-outlet>

  <div class="card-footer separator">
    <!-- footer content -->
    <button
      class="btn btn-default"
      data-cy="branding-cancel"
      (click)="cancel()"
      translate
    >
      Cancel
    </button>
    <button
      class="btn btn-primary"
      data-cy="branding-save"
      [disabled]="formControl.invalid"
      (click)="saveBranding()"
      translate
    >
      Save
    </button>
    <button
      class="btn btn-default"
      data-cy="branding-save-as"
      [disabled]="formControl.invalid"
      (click)="openPreview()"
      translate
    >
      Open preview
    </button>
    <button
      class="btn btn-default"
      data-cy="branding-set-as-latest"
      (click)="markAsActive()"
      [disabled]="isGlobalBranding$ | async"
      translate
    >
      Set as global
    </button>
  </div>
</div>

results matching ""

    No results matching ""