mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-20 06:24:25 +00:00
feat(console): user metadata, rehaul detail pages (#2209)
* service, sidenav, i18n, dialog * detail layout, user detail * metadata dialog from * dialog * features * formarray * metadata component * comp * user metadata refresh * use formarray, control, bulk save * metadata revert, has feature directive * lint * lint * typo * info row user, warn color optim * card cleanup, actions for user detail * project, org, user, app rehaul * lint * scss * digit fix * features and project grid rehaul * info-section layout, org domain info * readd palette scss * add svg email warn * missing translation * rm unused ts * lockoutpolicy * check for lockout feature
This commit is contained in:
@@ -5,56 +5,57 @@ import { Timestamp } from 'google-protobuf/google/protobuf/timestamp_pb';
|
||||
import { RefreshService } from 'src/app/services/refresh.service';
|
||||
|
||||
const rotate = animation([
|
||||
animate(
|
||||
'{{time}} cubic-bezier(0.785, 0.135, 0.15, 0.86)',
|
||||
keyframes([
|
||||
style({
|
||||
transform: 'rotate(0deg)',
|
||||
}),
|
||||
style({
|
||||
transform: 'rotate(360deg)',
|
||||
}),
|
||||
]),
|
||||
),
|
||||
animate(
|
||||
'{{time}} cubic-bezier(0.785, 0.135, 0.15, 0.86)',
|
||||
keyframes([
|
||||
style({
|
||||
transform: 'rotate(0deg)',
|
||||
}),
|
||||
style({
|
||||
transform: 'rotate(360deg)',
|
||||
}),
|
||||
]),
|
||||
),
|
||||
]);
|
||||
@Component({
|
||||
selector: 'app-refresh-table',
|
||||
templateUrl: './refresh-table.component.html',
|
||||
styleUrls: ['./refresh-table.component.scss'],
|
||||
animations: [
|
||||
trigger('rotate', [
|
||||
transition('* => *', [useAnimation(rotate, { params: { time: '1s' } })]),
|
||||
]),
|
||||
],
|
||||
selector: 'app-refresh-table',
|
||||
templateUrl: './refresh-table.component.html',
|
||||
styleUrls: ['./refresh-table.component.scss'],
|
||||
animations: [
|
||||
trigger('rotate', [
|
||||
transition('* => *', [useAnimation(rotate, { params: { time: '1s' } })]),
|
||||
]),
|
||||
],
|
||||
})
|
||||
export class RefreshTableComponent implements OnInit {
|
||||
@Input() public selection: SelectionModel<any> = new SelectionModel<any>(true, []);
|
||||
@Input() public timestamp!: Timestamp.AsObject;
|
||||
@Input() public dataSize: number = 0;
|
||||
@Input() public emitRefreshAfterTimeoutInMs: number = 0;
|
||||
@Input() public loading: boolean = false;
|
||||
@Input() public emitRefreshOnPreviousRoutes: string[] = [];
|
||||
@Output() public refreshed: EventEmitter<void> = new EventEmitter();
|
||||
@Input() public selection: SelectionModel<any> = new SelectionModel<any>(true, []);
|
||||
@Input() public timestamp!: Timestamp.AsObject;
|
||||
@Input() public dataSize: number = 0;
|
||||
@Input() public emitRefreshAfterTimeoutInMs: number = 0;
|
||||
@Input() public loading: boolean = false;
|
||||
@Input() public emitRefreshOnPreviousRoutes: string[] = [];
|
||||
@Output() public refreshed: EventEmitter<void> = new EventEmitter();
|
||||
@Input() public hideRefresh: boolean = false;
|
||||
|
||||
constructor(private refreshService: RefreshService) { }
|
||||
constructor(private refreshService: RefreshService) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
if (this.emitRefreshAfterTimeoutInMs) {
|
||||
setTimeout(() => {
|
||||
this.emitRefresh();
|
||||
}, this.emitRefreshAfterTimeoutInMs);
|
||||
}
|
||||
|
||||
if (this.emitRefreshOnPreviousRoutes.length && this.refreshService.previousUrls
|
||||
.some(url => this.emitRefreshOnPreviousRoutes.includes(url))) {
|
||||
setTimeout(() => {
|
||||
this.emitRefresh();
|
||||
}, 1000);
|
||||
}
|
||||
ngOnInit(): void {
|
||||
if (this.emitRefreshAfterTimeoutInMs) {
|
||||
setTimeout(() => {
|
||||
this.emitRefresh();
|
||||
}, this.emitRefreshAfterTimeoutInMs);
|
||||
}
|
||||
|
||||
emitRefresh(): void {
|
||||
this.selection.clear();
|
||||
return this.refreshed.emit();
|
||||
if (this.emitRefreshOnPreviousRoutes.length && this.refreshService.previousUrls
|
||||
.some(url => this.emitRefreshOnPreviousRoutes.includes(url))) {
|
||||
setTimeout(() => {
|
||||
this.emitRefresh();
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
emitRefresh(): void {
|
||||
this.selection.clear();
|
||||
return this.refreshed.emit();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user