mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-01 20:02:15 +00:00
feat(console): replace wget with curl, user login prompt, warn dialog (#387)
* remove evil wget, add warn-dialog, login hint * i18n * reference ngsw.js * update clientid * fix warn dialog * lint * Update console/src/assets/i18n/de.json Co-authored-by: Florian Forster <[email protected]> * Update console/src/assets/i18n/en.json Co-authored-by: Florian Forster <[email protected]> Co-authored-by: Florian Forster <[email protected]>
This commit is contained in:
co-authored by
Florian Forster
parent
a5bfd085a1
commit
c621fdee41
@@ -39,11 +39,10 @@ export class UserGrantsDataSource extends DataSource<UserGrant.AsObject> {
|
||||
): void {
|
||||
const offset = pageIndex * pageSize;
|
||||
|
||||
this.loadingSubject.next(true);
|
||||
|
||||
switch (context) {
|
||||
case UserGrantContext.USER:
|
||||
if (data && data.userId) {
|
||||
this.loadingSubject.next(true);
|
||||
const userfilter = new UserGrantSearchQuery();
|
||||
userfilter.setKey(UserGrantSearchKey.USERGRANTSEARCHKEY_USER_ID);
|
||||
userfilter.setValue(data.userId);
|
||||
@@ -59,12 +58,14 @@ export class UserGrantsDataSource extends DataSource<UserGrant.AsObject> {
|
||||
break;
|
||||
case UserGrantContext.OWNED_PROJECT:
|
||||
if (data && data.projectId) {
|
||||
this.loadingSubject.next(true);
|
||||
const promise1 = this.userService.SearchProjectUserGrants(data.projectId, 10, 0, queries);
|
||||
this.loadResponse(promise1);
|
||||
}
|
||||
break;
|
||||
case UserGrantContext.GRANTED_PROJECT:
|
||||
if (data && data.grantId) {
|
||||
this.loadingSubject.next(true);
|
||||
const promise2 = this.userService.SearchProjectGrantUserGrants(data.grantId, 10, 0, queries);
|
||||
this.loadResponse(promise2);
|
||||
}
|
||||
|
||||
@@ -139,7 +139,17 @@ export class UserGrantsComponent implements OnInit, AfterViewInit {
|
||||
deleteGrantSelection(): void {
|
||||
this.userService.BulkRemoveUserGrant(this.selection.selected.map(grant => grant.id)).then(() => {
|
||||
this.toast.showInfo('Grants deleted');
|
||||
this.loadGrantsPage();
|
||||
const data = this.dataSource.grantsSubject.getValue();
|
||||
console.log(data);
|
||||
this.selection.selected.forEach((item) => {
|
||||
console.log(item);
|
||||
const index = data.findIndex(i => i.id === item.id);
|
||||
if (index > -1) {
|
||||
data.splice(index, 1);
|
||||
this.dataSource.grantsSubject.next(data);
|
||||
}
|
||||
});
|
||||
this.selection.clear();
|
||||
}).catch(error => {
|
||||
this.toast.showError(error.message);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user