mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-30 02:52:16 +00:00
* chore(console): remove first and lastName fallback from user * use display name and ensure it's set without required name fields * add user type to user grant and memberships responses * contributor, members * fix avatar display checks --------- Co-authored-by: Livio Spring <[email protected]>
54 lines
1.7 KiB
TypeScript
54 lines
1.7 KiB
TypeScript
import { animate, animateChild, keyframes, query, stagger, style, transition, trigger } from '@angular/animations';
|
|
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
import { BehaviorSubject } from 'rxjs';
|
|
import { Member } from 'src/app/proto/generated/zitadel/member_pb';
|
|
import { Type } from 'src/app/proto/generated/zitadel/user_pb';
|
|
|
|
@Component({
|
|
selector: 'cnsl-contributors',
|
|
templateUrl: './contributors.component.html',
|
|
styleUrls: ['./contributors.component.scss'],
|
|
animations: [
|
|
trigger('cardAnimation', [
|
|
transition('* => *', [query('@animate', stagger('40ms', animateChild()), { optional: true })]),
|
|
]),
|
|
trigger('animate', [
|
|
transition(':enter', [
|
|
animate(
|
|
'.2s ease-in',
|
|
keyframes([
|
|
style({ opacity: 0, offset: 0 }),
|
|
style({ opacity: 0.5, transform: 'scale(1.05)', offset: 0.3 }),
|
|
style({ opacity: 1, transform: 'scale(1)', offset: 1 }),
|
|
]),
|
|
),
|
|
]),
|
|
]),
|
|
],
|
|
})
|
|
export class ContributorsComponent {
|
|
@Input() title: string = '';
|
|
@Input() description: string = '';
|
|
@Input() disabled: boolean = false;
|
|
@Input() totalResult: number = 0;
|
|
@Input() loading: boolean | null = false;
|
|
@Input() membersSubject!: BehaviorSubject<Member.AsObject[]>;
|
|
@Output() addClicked: EventEmitter<void> = new EventEmitter();
|
|
@Output() showDetailClicked: EventEmitter<void> = new EventEmitter();
|
|
@Output() refreshClicked: EventEmitter<void> = new EventEmitter();
|
|
|
|
public UserType: any = Type;
|
|
|
|
public emitAddMember(): void {
|
|
this.addClicked.emit();
|
|
}
|
|
|
|
public emitShowDetail(): void {
|
|
this.showDetailClicked.emit();
|
|
}
|
|
|
|
public emitRefresh(): void {
|
|
this.refreshClicked.emit();
|
|
}
|
|
}
|