branding/shared/lazy/edit-branding-router-outlet/edit-branding-router-outlet.component.ts
OnDestroy
selector | c8y-edit-branding-router-outlet |
standalone | true |
imports |
RouterOutlet
CoreModule
|
templateUrl | ./edit-branding-router-outlet.component.html |
Properties |
Methods |
|
constructor(activatedRoute: ActivatedRoute, store: StoreBrandingService, router: Router, alert: AlertService, applyBrandingService: ApplyBrandingLocallyService, appState: AppStateService)
|
|||||||||||||||||||||
Parameters :
|
cancel |
cancel()
|
Returns :
void
|
Async markAsActive |
markAsActive()
|
Returns :
any
|
ngOnDestroy |
ngOnDestroy()
|
Returns :
void
|
Async onBrandingVarChanges | ||||||
onBrandingVarChanges(value: string)
|
||||||
Parameters :
Returns :
any
|
Async openPreview |
openPreview()
|
Returns :
any
|
routeActivated | ||||
routeActivated(event)
|
||||
Parameters :
Returns :
void
|
Async saveBranding |
saveBranding()
|
Returns :
any
|
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>