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:
Max Peintner
2022-04-28 10:35:02 +00:00
committed by GitHub
co-authored by Livio Amstutz
parent 00f7dbe875
commit 08ae39ae19
668 changed files with 47746 additions and 19117 deletions
@@ -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;
}
}