mirror of
https://github.com/zitadel/zitadel.git
synced 2025-05-03 02:20:49 +00:00

* instance routing * instance naming * org list * rm isonsystem * breadcrumb type * routing * instance members * fragment refresh org * settings pages * settings list, sidenav grouping, i18n * org-settings, policy changes * lint * grid * rename grid * fallback to general * cleanup * general settings, remove cards * sidenav for settings, label policy * i18n * header, nav backbuild * general, project nav rehaul * login text background adapt * org nav anim * org, instance settings, fix policy layout, roles * i18n, active route for project * lint
34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
import { Component } from '@angular/core';
|
|
import { ActivatedRoute, Params } from '@angular/router';
|
|
import { TranslateService } from '@ngx-translate/core';
|
|
import { take } from 'rxjs/operators';
|
|
import { Type } from 'src/app/proto/generated/zitadel/user_pb';
|
|
import { Breadcrumb, BreadcrumbService, BreadcrumbType } from 'src/app/services/breadcrumb.service';
|
|
|
|
@Component({
|
|
selector: 'cnsl-user-list',
|
|
templateUrl: './user-list.component.html',
|
|
styleUrls: ['./user-list.component.scss'],
|
|
})
|
|
export class UserListComponent {
|
|
public Type: any = Type;
|
|
public type: Type = Type.TYPE_HUMAN;
|
|
|
|
constructor(public translate: TranslateService, activatedRoute: ActivatedRoute, breadcrumbService: BreadcrumbService) {
|
|
activatedRoute.queryParams.pipe(take(1)).subscribe((params: Params) => {
|
|
const { type } = params;
|
|
if (type && type === 'human') {
|
|
this.type = Type.TYPE_HUMAN;
|
|
} else if (type && type === 'machine') {
|
|
this.type = Type.TYPE_MACHINE;
|
|
}
|
|
});
|
|
|
|
const bread: Breadcrumb = {
|
|
type: BreadcrumbType.ORG,
|
|
routerLink: ['/org'],
|
|
};
|
|
breadcrumbService.setBreadcrumb([bread]);
|
|
}
|
|
}
|