mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-13 01:25:11 +00:00
feat: rehauled console (#3525)
* new console * move npm ci to angular build * rel path for assets * local grpc copy * login policy, rm clear views, features rel path * lock Co-authored-by: Livio Amstutz <[email protected]>
This commit is contained in:
co-authored by
Livio Amstutz
parent
00f7dbe875
commit
08ae39ae19
@@ -0,0 +1,42 @@
|
||||
import { Component, forwardRef, Input } from '@angular/core';
|
||||
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
||||
|
||||
export interface SidenavSetting {
|
||||
id: string;
|
||||
i18nKey: string;
|
||||
featureRequired: string[] | false;
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'cnsl-sidenav',
|
||||
templateUrl: './sidenav.component.html',
|
||||
styleUrls: ['./sidenav.component.scss'],
|
||||
providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SidenavComponent), multi: true }],
|
||||
})
|
||||
export class SidenavComponent {
|
||||
@Input() public currentSetting: string | undefined = 'general';
|
||||
@Input() public settingsList: SidenavSetting[] = [];
|
||||
|
||||
constructor() {}
|
||||
|
||||
private onChange: any = () => {};
|
||||
private onTouch: any = () => {};
|
||||
|
||||
set value(setting: string | undefined) {
|
||||
this.currentSetting = setting;
|
||||
this.onChange(setting);
|
||||
this.onTouch(setting);
|
||||
}
|
||||
|
||||
public writeValue(value: any) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public registerOnChange(fn: any) {
|
||||
this.onChange = fn;
|
||||
}
|
||||
|
||||
public registerOnTouched(fn: any) {
|
||||
this.onTouch = fn;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user