feat(console): angular 10, iam settings, timestamp to date pipe, org iam indicator, general gui fixes and i18n (#270)

* prettier member dialog, iam indicator

* changes i18n

* fix timestamp conversion, timestamp to date pipe

* rm create, update iam policy

* add iam policy

* add iam section, members component

* add iam contributors

* gen admin protos

* iam member search

* update angular

* update cdk material

* add module for iam members

* add iam roles to member dialog

* home shortcuts

* project view, i18n

* lint
This commit is contained in:
Max Peintner
2020-06-25 12:52:57 +02:00
committed by GitHub
parent d947bb1247
commit 785c8d9763
91 changed files with 7635 additions and 1631 deletions

View File

@@ -1,5 +1,4 @@
import { Component, Input, OnInit } from '@angular/core';
import { Timestamp } from 'google-protobuf/google/protobuf/timestamp_pb';
import { BehaviorSubject, from, Observable, of } from 'rxjs';
import { catchError, scan, take, tap } from 'rxjs/operators';
import { Change, Changes } from 'src/app/proto/generated/management_pb';
@@ -19,6 +18,7 @@ export enum ChangeType {
export class ChangesComponent implements OnInit {
@Input() public changeType: ChangeType = ChangeType.USER;
@Input() public id: string = '';
@Input() public sortDirectionAsc: boolean = true;
public errorMessage: string = '';
// Source data
@@ -74,7 +74,6 @@ export class ChangesComponent implements OnInit {
break;
case ChangeType.ORG: more = this.mgmtUserService.OrgChanges(this.id, 10, cursor);
break;
}
this.mapAndUpdate(more);
@@ -84,8 +83,8 @@ export class ChangesComponent implements OnInit {
private getCursor(): number {
const current = this._data.value;
if (current.length) {
// return true ? current[0].sequence :
return current[current.length - 1].sequence;
return !this.sortDirectionAsc ? current[0].sequence :
current[current.length - 1].sequence;
}
return 0;
}
@@ -126,9 +125,4 @@ export class ChangesComponent implements OnInit {
take(1),
).subscribe();
}
public dateFromTimestamp(date: Timestamp.AsObject): any {
const ts: Date = new Date(date.seconds * 1000 + date.nanos / 1000);
return ts;
}
}