mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-22 23:42:16 +00:00
fix: Create Human V1 (#9425)
# Which Problems Are Solved - Correctly load Avatar on first load # How the Problems Are Solved - The Avatar issue was mostly due to how we resolved the current user, I changed this behaviour # Additional Changes - Removed V2 create human code till seperate page is finished - Remove Console Use V2 API feature flag from features page (till new page is added) # Additional Context - Partially fixes #9382 - This will get implemented next week https://github.com/zitadel/zitadel/issues/9382#issuecomment-2681347477
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
import { ConnectedPosition, ConnectionPositionPair } from '@angular/cdk/overlay';
|
||||
import { Component, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild } from '@angular/core';
|
||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { BehaviorSubject, Observable, of, Subject } from 'rxjs';
|
||||
import { Org } from 'src/app/proto/generated/zitadel/org_pb';
|
||||
import { User } from 'src/app/proto/generated/zitadel/user_pb';
|
||||
import { AuthenticationService } from 'src/app/services/authentication.service';
|
||||
import { BreadcrumbService, BreadcrumbType } from 'src/app/services/breadcrumb.service';
|
||||
import { GrpcAuthService } from 'src/app/services/grpc-auth.service';
|
||||
import { ManagementService } from 'src/app/services/mgmt.service';
|
||||
@@ -15,19 +13,14 @@ import { ActionKeysType } from '../action-keys/action-keys.component';
|
||||
templateUrl: './header.component.html',
|
||||
styleUrls: ['./header.component.scss'],
|
||||
})
|
||||
export class HeaderComponent implements OnDestroy {
|
||||
@ViewChild('input', { static: false }) input!: ElementRef;
|
||||
|
||||
export class HeaderComponent {
|
||||
@Input() public isDarkTheme: boolean = true;
|
||||
@Input() public user?: User.AsObject;
|
||||
public showOrgContext: boolean = false;
|
||||
|
||||
public orgs$: Observable<Org.AsObject[]> = of([]);
|
||||
@Input() public org!: Org.AsObject;
|
||||
@Output() public changedActiveOrg: EventEmitter<Org.AsObject> = new EventEmitter();
|
||||
public orgLoading$: BehaviorSubject<any> = new BehaviorSubject(false);
|
||||
public showAccount: boolean = false;
|
||||
private destroy$: Subject<void> = new Subject();
|
||||
public BreadcrumbType: any = BreadcrumbType;
|
||||
public ActionKeysType: any = ActionKeysType;
|
||||
|
||||
@@ -41,24 +34,12 @@ export class HeaderComponent implements OnDestroy {
|
||||
new ConnectionPositionPair({ originX: 'end', originY: 'bottom' }, { overlayX: 'end', overlayY: 'top' }, 0, 10),
|
||||
];
|
||||
constructor(
|
||||
public authenticationService: AuthenticationService,
|
||||
public authService: GrpcAuthService,
|
||||
public mgmtService: ManagementService,
|
||||
public breadcrumbService: BreadcrumbService,
|
||||
public router: Router,
|
||||
) {}
|
||||
|
||||
public ngOnDestroy() {
|
||||
this.destroy$.next();
|
||||
this.destroy$.complete();
|
||||
}
|
||||
|
||||
public closeAccountCard(): void {
|
||||
if (this.showAccount) {
|
||||
this.showAccount = false;
|
||||
}
|
||||
}
|
||||
|
||||
public setActiveOrg(org: Org.AsObject): void {
|
||||
this.org = org;
|
||||
this.authService.setActiveOrg(org);
|
||||
|
||||
Reference in New Issue
Block a user