mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-30 07:58:51 +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
@@ -18,17 +18,20 @@ export class AccountsCardComponent implements OnInit {
|
||||
public sessions: Session.AsObject[] = [];
|
||||
public loadingUsers: boolean = false;
|
||||
constructor(public authService: AuthenticationService, private router: Router, private userService: GrpcAuthService) {
|
||||
this.userService.listMyUserSessions().then(sessions => {
|
||||
this.sessions = sessions.resultList;
|
||||
const index = this.sessions.findIndex(user => user.loginName === this.user.preferredLoginName);
|
||||
if (index > -1) {
|
||||
this.sessions.splice(index, 1);
|
||||
}
|
||||
this.userService
|
||||
.listMyUserSessions()
|
||||
.then((sessions) => {
|
||||
this.sessions = sessions.resultList;
|
||||
const index = this.sessions.findIndex((user) => user.loginName === this.user.preferredLoginName);
|
||||
if (index > -1) {
|
||||
this.sessions.splice(index, 1);
|
||||
}
|
||||
|
||||
this.loadingUsers = false;
|
||||
}).catch(() => {
|
||||
this.loadingUsers = false;
|
||||
});
|
||||
this.loadingUsers = false;
|
||||
})
|
||||
.catch(() => {
|
||||
this.loadingUsers = false;
|
||||
});
|
||||
}
|
||||
|
||||
public ngOnInit(): void {
|
||||
@@ -46,6 +49,10 @@ export class AccountsCardComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
public close(): void {
|
||||
this.closedCard.emit();
|
||||
}
|
||||
|
||||
public selectAccount(loginHint?: string): void {
|
||||
const configWithPrompt: Partial<AuthConfig> = {
|
||||
customQueryParams: {
|
||||
@@ -71,4 +78,11 @@ export class AccountsCardComponent implements OnInit {
|
||||
this.authService.signout();
|
||||
this.closedCard.emit();
|
||||
}
|
||||
|
||||
public get isOnSystem(): boolean {
|
||||
return (
|
||||
['/system', '/views', '/failed-events', '/system/members', '/system/features'].includes(this.router.url) ||
|
||||
new RegExp('/system/policy/*').test(this.router.url)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user