fix(console): idp name and type, disable toggle if not allowed (#1613)

* fix: idp type

* disable toggle

* restrict access, i18n, fix auth factor remove

* retention in days instead of hours

* chore(deps): bump @types/google-protobuf in /console (#1607)

Bumps [@types/google-protobuf](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/google-protobuf) from 3.7.4 to 3.15.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/google-protobuf)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/node from 14.14.37 to 14.14.41 in /console (#1602)

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.37 to 14.14.41.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @angular/cli from 11.2.8 to 11.2.9 in /console (#1600)

Bumps [@angular/cli](https://github.com/angular/angular-cli) from 11.2.8 to 11.2.9.
- [Release notes](https://github.com/angular/angular-cli/releases)
- [Commits](https://github.com/angular/angular-cli/compare/v11.2.8...v11.2.9)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @angular-devkit/build-angular in /console (#1599)

Bumps [@angular-devkit/build-angular](https://github.com/angular/angular-cli) from 0.1102.8 to 0.1102.9.
- [Release notes](https://github.com/angular/angular-cli/releases)
- [Commits](https://github.com/angular/angular-cli/commits)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Peintner <[email protected]>

* chore(deps-dev): bump @angular/language-service in /console (#1598)

Bumps [@angular/language-service](https://github.com/angular/angular/tree/HEAD/packages/language-service) from 11.2.9 to 11.2.10.
- [Release notes](https://github.com/angular/angular/releases)
- [Changelog](https://github.com/angular/angular/blob/master/CHANGELOG.md)
- [Commits](https://github.com/angular/angular/commits/11.2.10/packages/language-service)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* update deps, remove zitadel prefix

* min-width button

* lint styles

* downgrade

* downgrade

* down

* lock custom

* lock

* pack

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
Max Peintner
2021-04-20 12:53:16 +02:00
committed by GitHub
co-authored by dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
parent f5a8cb20a5
commit 8a91c239bb
10 changed files with 100 additions and 52 deletions
@@ -2,24 +2,24 @@ import { Pipe, PipeTransform } from '@angular/core';
import { Duration } from 'google-protobuf/google/protobuf/duration_pb';
@Pipe({
name: 'timestampToRetention',
name: 'timestampToRetention',
})
export class TimestampToRetentionPipe implements PipeTransform {
transform(value?: Duration.AsObject, ...args: unknown[]): unknown {
if (value) {
return this.retentionFromTimestamp(value);
} else {
return '';
}
transform(value?: Duration.AsObject, ...args: unknown[]): unknown {
if (value) {
return this.retentionFromTimestamp(value);
} else {
return '';
}
}
private retentionFromTimestamp(date: Duration.AsObject): any {
if (date?.seconds !== undefined && date?.nanos !== undefined) {
const ms = (date.seconds * 1000 + date.nanos / 1000 / 1000);
const mins = ms / 1000 / 60;
return mins / 60;
}
private retentionFromTimestamp(date: Duration.AsObject): any {
if (date?.seconds !== undefined && date?.nanos !== undefined) {
const ms = (date.seconds * 1000 + date.nanos / 1000 / 1000);
const mins = ms / 1000 / 60;
return mins / 60 / 24;
}
}
}