mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-18 05:52:51 +00:00
chore(console): remove all console eslint warnings (#11853)
<!-- Please inform yourself about the contribution guidelines on submitting a PR here: https://github.com/zitadel/zitadel/blob/main/CONTRIBUTING.md#submit-a-pull-request-pr. Take note of how PR/commit titles should be written and replace the template texts in the sections below. Don't remove any of the sections. It is important that the commit history clearly shows what is changed and why. Important: By submitting a contribution you agree to the terms from our Licensing Policy as described here: https://github.com/zitadel/zitadel/blob/main/LICENSING.md#community-contributions. --> # Which Problems Are Solved When running the nx target @zitadel/console:lint-check-ng currently there are a lot of eslint warnings. # How the Problems Are Solved Removed unused variables, imports etc. # Additional Changes # Additional Context
This commit is contained in:
@@ -41,7 +41,7 @@ export class AppComponent {
|
||||
@HostBinding('class') public componentCssClass: string = 'dark-theme';
|
||||
|
||||
public yoffset: number = 0;
|
||||
@HostListener('window:scroll', ['$event']) onScroll(event: Event): void {
|
||||
@HostListener('window:scroll') onScroll(): void {
|
||||
this.yoffset = this.viewPortScroller.getScrollPosition()[1];
|
||||
}
|
||||
public showAccount: boolean = false;
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ import { MatAutocompleteModule, MatAutocompleteSelectedEvent } from '@angular/ma
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { InputModule } from 'src/app/modules/input/input.module';
|
||||
import { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { Observable, map, of, startWith, switchMap, tap } from 'rxjs';
|
||||
import { Observable, map, of, startWith } from 'rxjs';
|
||||
import { Framework } from '../quickstart/quickstart.component';
|
||||
|
||||
@Component({
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
import { Component, Inject, signal } from '@angular/core';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import {
|
||||
MAT_DIALOG_DATA,
|
||||
MatDialogActions,
|
||||
MatDialogClose,
|
||||
MatDialogContent,
|
||||
MatDialogModule,
|
||||
MatDialogRef,
|
||||
MatDialogTitle,
|
||||
} from '@angular/material/dialog';
|
||||
import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
|
||||
import { FrameworkAutocompleteComponent } from '../framework-autocomplete/framework-autocomplete.component';
|
||||
import { Framework } from '../quickstart/quickstart.component';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output, signal } from '@angular/core';
|
||||
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { FormBuilder, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { Observable, Subject, map, of, startWith, switchMap, tap } from 'rxjs';
|
||||
import { Observable, startWith } from 'rxjs';
|
||||
import { MatRadioModule } from '@angular/material/radio';
|
||||
import { ConditionType } from '../actions-two-add-action-condition/actions-two-add-action-condition.component';
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { KeyValue } from '@angular/common';
|
||||
import { Component, DestroyRef, Input, OnDestroy, OnInit } from '@angular/core';
|
||||
import { Component, DestroyRef, Input, OnInit } from '@angular/core';
|
||||
import { Timestamp } from 'google-protobuf/google/protobuf/timestamp_pb';
|
||||
import { BehaviorSubject, from, Observable, of, Subject } from 'rxjs';
|
||||
import { catchError, debounceTime, scan, take, takeUntil, tap } from 'rxjs/operators';
|
||||
import { BehaviorSubject, from, Observable, of } from 'rxjs';
|
||||
import { catchError, debounceTime, scan, take, tap } from 'rxjs/operators';
|
||||
import { ListMyUserChangesResponse } from 'src/app/proto/generated/zitadel/auth_pb';
|
||||
import { Change } from 'src/app/proto/generated/zitadel/change_pb';
|
||||
import {
|
||||
@@ -269,7 +269,6 @@ export class ChangesComponent implements OnInit {
|
||||
}
|
||||
|
||||
// Order by ascending property value
|
||||
/* eslint-disable */
|
||||
valueAscOrder = (a: KeyValue<number, string>, b: KeyValue<number, string>): number => {
|
||||
return a.value.localeCompare(b.value);
|
||||
};
|
||||
@@ -278,5 +277,4 @@ export class ChangesComponent implements OnInit {
|
||||
keyDescOrder = (a: KeyValue<number, string>, b: KeyValue<number, string>): number => {
|
||||
return a.key > b.key ? -1 : b.key > a.key ? 1 : 0;
|
||||
};
|
||||
/* eslint-enable */
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { PrivacyPolicy } from 'src/app/proto/generated/zitadel/policy_pb';
|
||||
import { Component } from '@angular/core';
|
||||
import { GrpcAuthService } from 'src/app/services/grpc-auth.service';
|
||||
import { faXTwitter } from '@fortawesome/free-brands-svg-icons';
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import { MatDialog } from '@angular/material/dialog';
|
||||
import { MatTableDataSource } from '@angular/material/table';
|
||||
import { Router, RouterLink } from '@angular/router';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { Duration } from 'google-protobuf/google/protobuf/duration_pb';
|
||||
import { BehaviorSubject, firstValueFrom, Observable, Subject } from 'rxjs';
|
||||
import {
|
||||
ListProvidersRequest as AdminListProvidersRequest,
|
||||
@@ -20,8 +19,6 @@ import {
|
||||
ProviderType,
|
||||
} from 'src/app/proto/generated/zitadel/idp_pb';
|
||||
import {
|
||||
AddCustomLoginPolicyRequest,
|
||||
AddCustomLoginPolicyResponse,
|
||||
ListProvidersRequest as MgmtListProvidersRequest,
|
||||
ListProvidersResponse as MgmtListProvidersResponse,
|
||||
} from 'src/app/proto/generated/zitadel/management_pb';
|
||||
@@ -37,7 +34,6 @@ import { PageEvent, PaginatorComponent } from '../paginator/paginator.component'
|
||||
import { PolicyComponentServiceType } from '../policies/policy-component-types.enum';
|
||||
import { WarnDialogComponent } from '../warn-dialog/warn-dialog.component';
|
||||
import { LoginPolicyService } from '../../services/login-policy.service';
|
||||
import { first } from 'rxjs/operators';
|
||||
|
||||
@Component({
|
||||
selector: 'cnsl-idp-table',
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { App, AppState } from 'src/app/proto/generated/zitadel/app_pb';
|
||||
import { IDP, IDPState } from 'src/app/proto/generated/zitadel/idp_pb';
|
||||
import { InstanceDetail, State } from 'src/app/proto/generated/zitadel/instance_pb';
|
||||
import { Org, OrgState } from 'src/app/proto/generated/zitadel/org_pb';
|
||||
import { LoginPolicy } from 'src/app/proto/generated/zitadel/policy_pb';
|
||||
|
||||
@@ -331,10 +331,8 @@ export class InputDirective implements MatFormFieldControl<any>, OnChanges, OnDe
|
||||
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
||||
// ViewEngine they're overwritten.
|
||||
/** Callback for the cases where the focused state of the input changes. */
|
||||
/* eslint-disable */
|
||||
@HostListener('focus', ['true'])
|
||||
@HostListener('blur', ['false'])
|
||||
/* eslint-enable */
|
||||
_focusChanged(isFocused: boolean): void {
|
||||
if (isFocused !== this.focused && (!this.readonly || !isFocused)) {
|
||||
this.focused = isFocused;
|
||||
@@ -345,7 +343,6 @@ export class InputDirective implements MatFormFieldControl<any>, OnChanges, OnDe
|
||||
// We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
|
||||
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
||||
// ViewEngine they're overwritten.
|
||||
// eslint-disable-next-line
|
||||
@HostListener('input')
|
||||
_onInput(): void {
|
||||
// This is a noop function and is used to let Angular know whenever the value changes.
|
||||
@@ -461,7 +458,6 @@ export class InputDirective implements MatFormFieldControl<any>, OnChanges, OnDe
|
||||
this.focus();
|
||||
}
|
||||
}
|
||||
/* eslint-disable */
|
||||
static ngAcceptInputType_disabled: BooleanInput;
|
||||
static ngAcceptInputType_readonly: BooleanInput;
|
||||
static ngAcceptInputType_required: BooleanInput;
|
||||
@@ -469,5 +465,4 @@ export class InputDirective implements MatFormFieldControl<any>, OnChanges, OnDe
|
||||
// Accept `any` to avoid conflicts with other directives on `<input>` that may
|
||||
// accept different types.
|
||||
static ngAcceptInputType_value: any;
|
||||
/* eslint-enable */
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ export class MembershipsTableComponent implements OnInit, OnDestroy {
|
||||
const membershipOrg = await this.authService.getActiveOrg(membership.orgId);
|
||||
await this.router.navigate(['/org/members']);
|
||||
this.startOrgContextWorkflow(membershipOrg?.id, org.id);
|
||||
} catch (error) {
|
||||
} catch {
|
||||
this.toast.showInfo('USER.MEMBERSHIPS.NOPERMISSIONTOEDIT', true);
|
||||
}
|
||||
} else if (membership.projectGrantId && membership.details?.resourceOwner) {
|
||||
@@ -133,7 +133,7 @@ export class MembershipsTableComponent implements OnInit, OnDestroy {
|
||||
const membershipOrg = await this.authService.getActiveOrg(membership.details?.resourceOwner);
|
||||
await this.router.navigate(['/granted-projects', membership.projectId, 'grants', membership.projectGrantId]);
|
||||
this.startOrgContextWorkflow(membershipOrg?.id, org.id);
|
||||
} catch (error) {
|
||||
} catch {
|
||||
this.toast.showInfo('USER.MEMBERSHIPS.NOPERMISSIONTOEDIT', true);
|
||||
}
|
||||
} else if (membership.projectId && membership.details?.resourceOwner) {
|
||||
@@ -142,7 +142,7 @@ export class MembershipsTableComponent implements OnInit, OnDestroy {
|
||||
const membershipOrg = await this.authService.getActiveOrg(membership.details?.resourceOwner);
|
||||
await this.router.navigate(['/projects', membership.projectId, 'members']);
|
||||
this.startOrgContextWorkflow(membershipOrg?.id, org.id);
|
||||
} catch (error) {
|
||||
} catch {
|
||||
this.toast.showInfo('USER.MEMBERSHIPS.NOPERMISSIONTOEDIT', true);
|
||||
}
|
||||
} else if (membership.iam) {
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import { ChangeDetectorRef, Component, OnInit } from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
import { AdminService } from 'src/app/services/admin.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { UntypedFormBuilder } from '@angular/forms';
|
||||
import { LanguagesService } from '../../../services/languages.service';
|
||||
import { BehaviorSubject, concat, forkJoin, from, Observable, of, Subject, switchMap, take, takeUntil } from 'rxjs';
|
||||
import { BehaviorSubject, forkJoin, from, Observable, take } from 'rxjs';
|
||||
import { GrpcAuthService } from '../../../services/grpc-auth.service';
|
||||
import { CdkDrag, CdkDragDrop, moveItemInArray, transferArrayItem } from '@angular/cdk/drag-drop';
|
||||
import { catchError, map } from 'rxjs/operators';
|
||||
import { map } from 'rxjs/operators';
|
||||
|
||||
interface State {
|
||||
allowed: string[];
|
||||
|
||||
@@ -15,7 +15,6 @@ import { MatFormFieldModule } from '@angular/material/form-field';
|
||||
import { DragDropModule } from '@angular/cdk/drag-drop';
|
||||
import { MatRadioModule } from '@angular/material/radio';
|
||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
import { TableActionsModule } from '../../table-actions/table-actions.module';
|
||||
import { MatMenuModule } from '@angular/material/menu';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Component, Injector, Input, OnDestroy, OnInit, Type } from '@angular/co
|
||||
import { FormControl, UntypedFormGroup } from '@angular/forms';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { Timestamp } from 'google-protobuf/google/protobuf/timestamp_pb';
|
||||
import { BehaviorSubject, from, interval, Observable, of, Subject, Subscription, switchMap, take, tap } from 'rxjs';
|
||||
import { BehaviorSubject, from, interval, Observable, of, Subject, Subscription, take, tap } from 'rxjs';
|
||||
import { map, pairwise, startWith, takeUntil } from 'rxjs/operators';
|
||||
import {
|
||||
GetCustomLoginTextsRequest as AdminGetCustomLoginTextsRequest,
|
||||
@@ -27,7 +27,6 @@ import { LanguagesService } from '../../../services/languages.service';
|
||||
|
||||
const MIN_INTERVAL_SECONDS = 10; // if the difference of a newer version to the current exceeds this time, a refresh button is shown.
|
||||
|
||||
/* eslint-disable */
|
||||
const KeyNamesArray = [
|
||||
'emailVerificationDoneText',
|
||||
'emailVerificationText',
|
||||
@@ -64,7 +63,6 @@ const KeyNamesArray = [
|
||||
'passwordlessText',
|
||||
'externalRegistrationUserOverviewText',
|
||||
];
|
||||
/* eslint-enable */
|
||||
|
||||
const REQUESTMAP = {
|
||||
[PolicyComponentServiceType.MGMT]: {
|
||||
@@ -180,7 +178,7 @@ export class LoginTextsComponent implements OnInit, OnDestroy {
|
||||
// debounceTime(5000),
|
||||
takeUntil(this.destroy$),
|
||||
)
|
||||
.subscribe((x) => {
|
||||
.subscribe(() => {
|
||||
this.checkForChanges();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Component, Injector, Input, OnDestroy, OnInit, Type } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { MatSelectChange } from '@angular/material/select';
|
||||
import { BehaviorSubject, from, Observable, of, Subscription, switchMap, take, tap } from 'rxjs';
|
||||
import { BehaviorSubject, from, Observable, of, Subscription, take, tap } from 'rxjs';
|
||||
import {
|
||||
GetDefaultDomainClaimedMessageTextRequest as AdminGetDefaultDomainClaimedMessageTextRequest,
|
||||
GetDefaultInitMessageTextRequest as AdminGetDefaultInitMessageTextRequest,
|
||||
@@ -65,7 +65,6 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
import { InfoSectionType } from '../../info-section/info-section.component';
|
||||
import { WarnDialogComponent } from '../../warn-dialog/warn-dialog.component';
|
||||
import { PolicyComponentServiceType } from '../policy-component-types.enum';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { LanguagesService } from '../../../services/languages.service';
|
||||
|
||||
enum MESSAGETYPES {
|
||||
|
||||
+1
-2
@@ -1,8 +1,7 @@
|
||||
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, signal, WritableSignal } from '@angular/core';
|
||||
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
import { WebKey } from '@zitadel/proto/zitadel/webkey/v2/key_pb';
|
||||
import { ReplaySubject } from 'rxjs';
|
||||
import { RSAHasher, RSABits, ECDSACurve } from '@zitadel/proto/zitadel/webkey/v2/key_pb';
|
||||
import { RSAHasher, RSABits, ECDSACurve, WebKey } from '@zitadel/proto/zitadel/webkey/v2/key_pb';
|
||||
|
||||
type RawValue<T extends FormGroup> = ReturnType<T['getRawValue']>;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ChangeDetectionStrategy, Component, DestroyRef, OnInit, signal } from '@angular/core';
|
||||
import { ChangeDetectionStrategy, Component, DestroyRef, signal } from '@angular/core';
|
||||
import { WebKeysService } from 'src/app/services/webkeys.service';
|
||||
import { defer, EMPTY, firstValueFrom, Observable, ObservedValueOf, of, shareReplay, Subject, switchMap } from 'rxjs';
|
||||
import { catchError, map, startWith, withLatestFrom } from 'rxjs/operators';
|
||||
import { firstValueFrom, Observable, ObservedValueOf, shareReplay, Subject, switchMap } from 'rxjs';
|
||||
import { catchError, map, startWith } from 'rxjs/operators';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { MessageInitShape } from '@bufbuild/protobuf';
|
||||
import { OidcWebKeysCreateComponent } from './oidc-webkeys-create/oidc-webkeys-create.component';
|
||||
@@ -9,9 +9,8 @@ import { TimestampToDatePipe } from 'src/app/pipes/timestamp-to-date-pipe/timest
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { WarnDialogComponent } from 'src/app/modules/warn-dialog/warn-dialog.component';
|
||||
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
import { State, WebKey } from '@zitadel/proto/zitadel/webkey/v2/key_pb';
|
||||
import { CreateWebKeyRequestSchema } from '@zitadel/proto/zitadel/webkey/v2/webkey_service_pb';
|
||||
import { RSAHasher, RSABits, ECDSACurve } from '@zitadel/proto/zitadel/webkey/v2/key_pb';
|
||||
import { RSAHasher, RSABits, ECDSACurve, State, WebKey } from '@zitadel/proto/zitadel/webkey/v2/key_pb';
|
||||
|
||||
const CACHE_WARNING_MS = 5 * 60 * 1000; // 5 minutes
|
||||
|
||||
|
||||
+4
-6
@@ -1,5 +1,5 @@
|
||||
import { Component, Injector, Input, OnInit, Type } from '@angular/core';
|
||||
import { AbstractControl, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
|
||||
import { AbstractControl, UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { GetPasswordAgePolicyResponse as AdminGetPasswordAgePolicyResponse } from 'src/app/proto/generated/zitadel/admin_pb';
|
||||
import { GetPasswordAgePolicyResponse as MgmtGetPasswordAgePolicyResponse } from 'src/app/proto/generated/zitadel/management_pb';
|
||||
@@ -11,7 +11,6 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
import { InfoSectionType } from '../../info-section/info-section.component';
|
||||
import { WarnDialogComponent } from '../../warn-dialog/warn-dialog.component';
|
||||
import { PolicyComponentServiceType } from '../policy-component-types.enum';
|
||||
import { requiredValidator } from '../../form-field/validators/validators';
|
||||
import { Observable } from 'rxjs';
|
||||
import { GrpcAuthService } from '../../../services/grpc-auth.service';
|
||||
import { take } from 'rxjs/operators';
|
||||
@@ -123,10 +122,9 @@ export class PasswordAgePolicyComponent implements OnInit {
|
||||
}
|
||||
|
||||
public savePolicy(): void {
|
||||
let promise: Promise<any>;
|
||||
if (this.passwordAgeData) {
|
||||
if (this.service instanceof AdminService) {
|
||||
promise = this.service
|
||||
this.service
|
||||
.updatePasswordAgePolicy(this.maxAgeDays?.value ?? 0, this.expireWarnDays?.value ?? 0)
|
||||
.then(() => {
|
||||
this.toast.showInfo('POLICY.TOAST.SET', true);
|
||||
@@ -137,7 +135,7 @@ export class PasswordAgePolicyComponent implements OnInit {
|
||||
});
|
||||
} else {
|
||||
if ((this.passwordAgeData as PasswordAgePolicy.AsObject).isDefault) {
|
||||
promise = (this.service as ManagementService)
|
||||
(this.service as ManagementService)
|
||||
.addCustomPasswordAgePolicy(this.maxAgeDays?.value ?? 0, this.expireWarnDays?.value ?? 0)
|
||||
.then(() => {
|
||||
this.toast.showInfo('POLICY.TOAST.SET', true);
|
||||
@@ -147,7 +145,7 @@ export class PasswordAgePolicyComponent implements OnInit {
|
||||
this.toast.showError(error);
|
||||
});
|
||||
} else {
|
||||
promise = (this.service as ManagementService)
|
||||
(this.service as ManagementService)
|
||||
.updateCustomPasswordAgePolicy(this.maxAgeDays?.value ?? 0, this.expireWarnDays?.value ?? 0)
|
||||
.then(() => {
|
||||
this.toast.showInfo('POLICY.TOAST.SET', true);
|
||||
|
||||
+3
-4
@@ -117,10 +117,9 @@ export class PasswordLockoutPolicyComponent implements OnInit {
|
||||
}
|
||||
|
||||
public savePolicy(): void {
|
||||
let promise: Promise<any>;
|
||||
if (this.lockoutData) {
|
||||
if (this.service instanceof AdminService) {
|
||||
promise = this.service
|
||||
this.service
|
||||
.updateLockoutPolicy(this.lockoutData.maxPasswordAttempts, this.lockoutData.maxOtpAttempts)
|
||||
.then(() => {
|
||||
this.toast.showInfo('POLICY.TOAST.SET', true);
|
||||
@@ -131,7 +130,7 @@ export class PasswordLockoutPolicyComponent implements OnInit {
|
||||
});
|
||||
} else {
|
||||
if ((this.lockoutData as LockoutPolicy.AsObject).isDefault) {
|
||||
promise = (this.service as ManagementService)
|
||||
(this.service as ManagementService)
|
||||
.addCustomLockoutPolicy(this.lockoutData.maxPasswordAttempts, this.lockoutData.maxOtpAttempts)
|
||||
.then(() => {
|
||||
this.toast.showInfo('POLICY.TOAST.SET', true);
|
||||
@@ -141,7 +140,7 @@ export class PasswordLockoutPolicyComponent implements OnInit {
|
||||
this.toast.showError(error);
|
||||
});
|
||||
} else {
|
||||
promise = (this.service as ManagementService)
|
||||
(this.service as ManagementService)
|
||||
.updateCustomLockoutPolicy(this.lockoutData.maxPasswordAttempts, this.lockoutData.maxOtpAttempts)
|
||||
.then(() => {
|
||||
this.toast.showInfo('POLICY.TOAST.SET', true);
|
||||
|
||||
@@ -117,7 +117,7 @@ export class PrivacyPolicyComponent implements OnInit, OnDestroy {
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
.catch(() => {
|
||||
this.privacyPolicy = undefined;
|
||||
this.form.patchValue({
|
||||
tosLink: '',
|
||||
|
||||
+1
-2
@@ -14,7 +14,6 @@ import {
|
||||
GetPreviewLabelPolicyResponse as MgmtGetPreviewLabelPolicyResponse,
|
||||
UpdateCustomLabelPolicyRequest,
|
||||
} from 'src/app/proto/generated/zitadel/management_pb';
|
||||
import { Org } from 'src/app/proto/generated/zitadel/org_pb';
|
||||
import { LabelPolicy, ThemeMode } from 'src/app/proto/generated/zitadel/policy_pb';
|
||||
import { AdminService } from 'src/app/services/admin.service';
|
||||
import { AssetEndpoint, AssetService, AssetType } from 'src/app/services/asset.service';
|
||||
@@ -724,7 +723,7 @@ export class PrivateLabelingPolicyComponent implements OnInit, OnDestroy {
|
||||
try {
|
||||
const font = opentype.parse(e.target.result);
|
||||
this.fontName = font.names.fullName['en'];
|
||||
} catch (e) {
|
||||
} catch {
|
||||
this.fontName = 'Could not parse font name';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ export class ProjectRolesDataSource extends DataSource<Role.AsObject> {
|
||||
super();
|
||||
}
|
||||
|
||||
public loadRoles(projectId: string, grantId: string, pageIndex: number, pageSize: number, sortDirection?: string): void {
|
||||
public loadRoles(projectId: string, grantId: string, pageIndex: number, pageSize: number): void {
|
||||
const offset = pageIndex * pageSize;
|
||||
|
||||
this.loadingSubject.next(true);
|
||||
|
||||
@@ -2,7 +2,6 @@ import { Component, EventEmitter, Input, OnChanges, OnDestroy, Output } from '@a
|
||||
import { FormControl, FormGroup } from '@angular/forms';
|
||||
import { Subject, takeUntil } from 'rxjs';
|
||||
import { Options, AutoLinkingOption } from 'src/app/proto/generated/zitadel/idp_pb';
|
||||
import { AccessTokenType } from '../../proto/generated/zitadel/user_pb';
|
||||
|
||||
@Component({
|
||||
selector: 'cnsl-provider-options',
|
||||
|
||||
@@ -219,7 +219,7 @@ export class ProviderAppleComponent {
|
||||
this.loading = true;
|
||||
(this.service as ManagementService)
|
||||
.updateAppleProvider(req)
|
||||
.then((idp) => {
|
||||
.then(() => {
|
||||
setTimeout(() => {
|
||||
this.loading = false;
|
||||
this.close();
|
||||
@@ -246,7 +246,7 @@ export class ProviderAppleComponent {
|
||||
this.loading = true;
|
||||
(this.service as AdminService)
|
||||
.updateAppleProvider(req)
|
||||
.then((idp) => {
|
||||
.then(() => {
|
||||
setTimeout(() => {
|
||||
this.loading = false;
|
||||
this.close();
|
||||
@@ -272,7 +272,7 @@ export class ProviderAppleComponent {
|
||||
} else {
|
||||
this.privateKey?.setValue('');
|
||||
const reader = new FileReader();
|
||||
reader.onload = ((aXML) => {
|
||||
reader.onload = (() => {
|
||||
return (e) => {
|
||||
const keyBase64 = e.target?.result;
|
||||
if (keyBase64 && typeof keyBase64 === 'string') {
|
||||
@@ -281,7 +281,7 @@ export class ProviderAppleComponent {
|
||||
this.privateKey?.setValue(cropped);
|
||||
}
|
||||
};
|
||||
})(file);
|
||||
})();
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ import {
|
||||
AutoLinkingOption,
|
||||
AzureADTenant,
|
||||
AzureADTenantType,
|
||||
IDPOwnerType,
|
||||
Options,
|
||||
Provider,
|
||||
} from 'src/app/proto/generated/zitadel/idp_pb';
|
||||
@@ -273,7 +272,7 @@ export class ProviderAzureADComponent {
|
||||
this.loading = true;
|
||||
this.service
|
||||
.updateAzureADProvider(req)
|
||||
.then((idp) => {
|
||||
.then(() => {
|
||||
setTimeout(() => {
|
||||
this.loading = false;
|
||||
this.close();
|
||||
|
||||
+1
-1
@@ -219,7 +219,7 @@ export class ProviderGithubESComponent {
|
||||
this.loading = true;
|
||||
this.service
|
||||
.updateGitHubEnterpriseServerProvider(req)
|
||||
.then((idp) => {
|
||||
.then(() => {
|
||||
setTimeout(() => {
|
||||
this.loading = false;
|
||||
this.close();
|
||||
|
||||
@@ -213,7 +213,7 @@ export class ProviderGithubComponent {
|
||||
this.loading = true;
|
||||
this.service
|
||||
.updateGitHubProvider(req)
|
||||
.then((idp) => {
|
||||
.then(() => {
|
||||
setTimeout(() => {
|
||||
this.loading = false;
|
||||
this.close();
|
||||
|
||||
+1
-1
@@ -216,7 +216,7 @@ export class ProviderGitlabSelfHostedComponent {
|
||||
this.loading = true;
|
||||
this.service
|
||||
.updateGitLabSelfHostedProvider(req)
|
||||
.then((idp) => {
|
||||
.then(() => {
|
||||
setTimeout(() => {
|
||||
this.loading = false;
|
||||
this.close();
|
||||
|
||||
@@ -213,7 +213,7 @@ export class ProviderGitlabComponent {
|
||||
this.loading = true;
|
||||
this.service
|
||||
.updateGitLabProvider(req)
|
||||
.then((idp) => {
|
||||
.then(() => {
|
||||
setTimeout(() => {
|
||||
this.loading = false;
|
||||
this.close();
|
||||
|
||||
@@ -209,7 +209,7 @@ export class ProviderGoogleComponent {
|
||||
this.loading = true;
|
||||
(this.service as ManagementService)
|
||||
.updateGoogleProvider(req)
|
||||
.then((idp) => {
|
||||
.then(() => {
|
||||
setTimeout(() => {
|
||||
this.loading = false;
|
||||
this.close();
|
||||
@@ -234,7 +234,7 @@ export class ProviderGoogleComponent {
|
||||
this.loading = true;
|
||||
(this.service as AdminService)
|
||||
.updateGoogleProvider(req)
|
||||
.then((idp) => {
|
||||
.then(() => {
|
||||
setTimeout(() => {
|
||||
this.loading = false;
|
||||
this.close();
|
||||
|
||||
@@ -208,7 +208,7 @@ export class ProviderJWTComponent {
|
||||
this.loading = true;
|
||||
this.service
|
||||
.updateJWTProvider(req)
|
||||
.then((idp) => {
|
||||
.then(() => {
|
||||
setTimeout(() => {
|
||||
this.loading = false;
|
||||
this.close();
|
||||
|
||||
@@ -243,7 +243,7 @@ export class ProviderLDAPComponent {
|
||||
this.loading = true;
|
||||
(this.service as ManagementService)
|
||||
.updateLDAPProvider(req)
|
||||
.then((idp) => {
|
||||
.then(() => {
|
||||
setTimeout(() => {
|
||||
this.loading = false;
|
||||
this.close();
|
||||
|
||||
@@ -226,7 +226,7 @@ export class ProviderOAuthComponent {
|
||||
this.loading = true;
|
||||
this.service
|
||||
.updateGenericOAuthProvider(req)
|
||||
.then((idp) => {
|
||||
.then(() => {
|
||||
setTimeout(() => {
|
||||
this.loading = false;
|
||||
this.close();
|
||||
|
||||
@@ -33,17 +33,17 @@ const typeMap = {
|
||||
[ProviderType.PROVIDER_TYPE_SAML]: { path: 'saml', component: ProviderSamlSpComponent },
|
||||
};
|
||||
|
||||
const routes: Routes = Object.entries(typeMap).map(([key, value]) => {
|
||||
const routes: Routes = Object.values(typeMap).map(({ path, component }) => {
|
||||
return {
|
||||
path: value.path,
|
||||
path,
|
||||
children: [
|
||||
{
|
||||
path: 'create',
|
||||
component: value.component,
|
||||
component,
|
||||
},
|
||||
{
|
||||
path: ':id',
|
||||
component: value.component,
|
||||
component,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
-1
@@ -2,7 +2,6 @@ import { COMMA, ENTER } from '@angular/cdk/keycodes';
|
||||
import { Component, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild } from '@angular/core';
|
||||
import { UntypedFormControl } from '@angular/forms';
|
||||
import { MatAutocomplete, MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
|
||||
import { MatChipInputEvent } from '@angular/material/chips';
|
||||
import { forkJoin, from, Subject } from 'rxjs';
|
||||
import { debounceTime, switchMap, takeUntil, tap } from 'rxjs/operators';
|
||||
import { ListProjectGrantsResponse, ListProjectsResponse } from 'src/app/proto/generated/zitadel/management_pb';
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ export class SearchRolesAutocompleteComponent implements OnDestroy {
|
||||
this.isLoading = false;
|
||||
this.filteredRoles = resp.resultList;
|
||||
},
|
||||
(error) => {
|
||||
() => {
|
||||
this.isLoading = false;
|
||||
},
|
||||
);
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</div>
|
||||
|
||||
<div class="shortcut-list-row">
|
||||
<div cdkDropList [cdkDropListData]="main" class="shortcut-list" (cdkDropListDropped)="drop($event, 'main')">
|
||||
<div cdkDropList [cdkDropListData]="main" class="shortcut-list" (cdkDropListDropped)="drop($event)">
|
||||
@if (editState) {
|
||||
<p class="shortcut-desc cnsl-secondary-text">{{ 'HOME.SHORTCUTS.REORDER' | translate }}</p>
|
||||
}
|
||||
@@ -74,7 +74,7 @@
|
||||
}
|
||||
</div>
|
||||
|
||||
<div cdkDropList [cdkDropListData]="secondary" class="shortcut-list" (cdkDropListDropped)="drop($event, 'secondary')">
|
||||
<div cdkDropList [cdkDropListData]="secondary" class="shortcut-list" (cdkDropListDropped)="drop($event)">
|
||||
@if (editState) {
|
||||
<p class="shortcut-desc cnsl-secondary-text">{{ 'HOME.SHORTCUTS.REORDER' | translate }}</p>
|
||||
}
|
||||
@@ -123,7 +123,7 @@
|
||||
}
|
||||
</div>
|
||||
|
||||
<div cdkDropList [cdkDropListData]="third" class="shortcut-list" (cdkDropListDropped)="drop($event, 'third')">
|
||||
<div cdkDropList [cdkDropListData]="third" class="shortcut-list" (cdkDropListDropped)="drop($event)">
|
||||
@if (editState) {
|
||||
<p class="shortcut-desc cnsl-secondary-text">{{ 'HOME.SHORTCUTS.REORDER' | translate }}</p>
|
||||
}
|
||||
@@ -185,7 +185,7 @@
|
||||
cdkDropList
|
||||
[cdkDropListData]="allAvailableShortcuts"
|
||||
class="available-shortcut-list"
|
||||
(cdkDropListDropped)="drop($event, 'main')"
|
||||
(cdkDropListDropped)="drop($event)"
|
||||
>
|
||||
@for (shortcut of allAvailableShortcuts; track shortcut) {
|
||||
<ng-template cnslHasRole [hasRole]="shortcut.withRole">
|
||||
|
||||
@@ -232,7 +232,7 @@ export class ShortcutsComponent implements OnDestroy {
|
||||
this.destroy$.complete();
|
||||
}
|
||||
|
||||
public drop(event: CdkDragDrop<ShortcutItem[]>, listName: string) {
|
||||
public drop(event: CdkDragDrop<ShortcutItem[]>) {
|
||||
if (event.previousContainer === event.container) {
|
||||
moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
|
||||
this.saveStateToStorage();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { CommonModule, TitleCasePipe } from '@angular/common';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import { SelectionModel } from '@angular/cdk/collections';
|
||||
import { Component, EventEmitter, OnInit, Output, ViewChild } from '@angular/core';
|
||||
import { Router, RouterLink } from '@angular/router';
|
||||
import { Router } from '@angular/router';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { BehaviorSubject, Observable } from 'rxjs';
|
||||
import { SMTPConfigState } from 'src/app/proto/generated/zitadel/settings_pb';
|
||||
import { ListQuery } from 'src/app/proto/generated/zitadel/object_pb';
|
||||
import { LoginPolicy } from 'src/app/proto/generated/zitadel/policy_pb';
|
||||
import { AdminService } from 'src/app/services/admin.service';
|
||||
@@ -12,7 +11,7 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
import { PageEvent, PaginatorComponent } from '../paginator/paginator.component';
|
||||
import { PolicyComponentServiceType } from '../policies/policy-component-types.enum';
|
||||
import { ListSMTPConfigsRequest, ListSMTPConfigsResponse } from 'src/app/proto/generated/zitadel/admin_pb';
|
||||
import { SMTPConfig } from 'src/app/proto/generated/zitadel/settings_pb';
|
||||
import { SMTPConfig, SMTPConfigState } from 'src/app/proto/generated/zitadel/settings_pb';
|
||||
import { WarnDialogComponent } from '../warn-dialog/warn-dialog.component';
|
||||
import { MatTableDataSource } from '@angular/material/table';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, inject, Inject, signal } from '@angular/core';
|
||||
import { Component, inject, signal } from '@angular/core';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
|
||||
export type UserGrantRoleDialogData = {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, OnDestroy, signal } from '@angular/core';
|
||||
import { ActivatedRoute, Navigation, Params, Router } from '@angular/router';
|
||||
import { ActivatedRoute, Params, Router } from '@angular/router';
|
||||
import { Subject, takeUntil } from 'rxjs';
|
||||
import { InfoSectionType } from 'src/app/modules/info-section/info-section.component';
|
||||
import { ProjectType } from 'src/app/modules/project-members/project-members-datasource';
|
||||
|
||||
@@ -2,16 +2,13 @@ import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatCheckboxModule } from '@angular/material/checkbox';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { HasRoleModule } from 'src/app/directives/has-role/has-role.module';
|
||||
import { CreateLayoutModule } from 'src/app/modules/create-layout/create-layout.module';
|
||||
import { InfoSectionModule } from 'src/app/modules/info-section/info-section.module';
|
||||
import { InputModule } from 'src/app/modules/input/input.module';
|
||||
import { PasswordComplexityViewModule } from 'src/app/modules/password-complexity-view/password-complexity-view.module';
|
||||
import { HasRolePipeModule } from 'src/app/pipes/has-role-pipe/has-role-pipe.module';
|
||||
|
||||
import { SearchProjectAutocompleteModule } from 'src/app/modules/search-project-autocomplete/search-project-autocomplete.module';
|
||||
|
||||
@@ -106,7 +106,7 @@ export class ActionTableComponent implements OnInit {
|
||||
if (req) {
|
||||
this.mgmtService
|
||||
.createAction(req)
|
||||
.then((resp) => {
|
||||
.then(() => {
|
||||
this.refreshPage();
|
||||
})
|
||||
.catch((error: any) => {
|
||||
@@ -129,7 +129,7 @@ export class ActionTableComponent implements OnInit {
|
||||
if (req) {
|
||||
this.mgmtService
|
||||
.updateAction(req)
|
||||
.then((resp) => {
|
||||
.then(() => {
|
||||
this.refreshPage();
|
||||
})
|
||||
.catch((error: any) => {
|
||||
|
||||
@@ -5,7 +5,7 @@ import { MatDialog } from '@angular/material/dialog';
|
||||
import { ActionKeysType } from 'src/app/modules/action-keys/action-keys.component';
|
||||
import { InfoSectionType } from 'src/app/modules/info-section/info-section.component';
|
||||
import { WarnDialogComponent } from 'src/app/modules/warn-dialog/warn-dialog.component';
|
||||
import { Action, ActionState, Flow, FlowType, TriggerType } from 'src/app/proto/generated/zitadel/action_pb';
|
||||
import { Action, ActionState, Flow, FlowType } from 'src/app/proto/generated/zitadel/action_pb';
|
||||
import { SetTriggerActionsRequest } from 'src/app/proto/generated/zitadel/management_pb';
|
||||
import { Breadcrumb, BreadcrumbService, BreadcrumbType } from 'src/app/services/breadcrumb.service';
|
||||
import { ManagementService } from 'src/app/services/mgmt.service';
|
||||
@@ -100,7 +100,7 @@ export class ActionsComponent {
|
||||
});
|
||||
}
|
||||
|
||||
protected openAddTrigger(flow: FlowType.AsObject, trigger?: TriggerType.AsObject): void {
|
||||
protected openAddTrigger(flow: FlowType.AsObject): void {
|
||||
const dialogRef = this.dialog.open(AddFlowDialogComponent, {
|
||||
data: {
|
||||
flowType: flow,
|
||||
|
||||
@@ -159,7 +159,7 @@ export class AddActionDialogComponent implements OnInit, OnDestroy {
|
||||
if (resp) {
|
||||
this.mgmtService
|
||||
.deleteAction(this.id)
|
||||
.then((resp) => {
|
||||
.then(() => {
|
||||
this.dialogRef.close();
|
||||
})
|
||||
.catch((error: any) => {
|
||||
|
||||
@@ -158,7 +158,7 @@ export class AppCreateComponent implements OnInit, OnDestroy {
|
||||
acsURL: ['', []],
|
||||
});
|
||||
|
||||
this.firstFormGroup.valueChanges.subscribe((value) => {
|
||||
this.firstFormGroup.valueChanges.subscribe(() => {
|
||||
if (this.firstFormGroup.valid) {
|
||||
this.oidcAppRequest.setName(this.name?.value);
|
||||
this.apiAppRequest.setName(this.name?.value);
|
||||
@@ -380,7 +380,7 @@ export class AppCreateComponent implements OnInit, OnDestroy {
|
||||
this.toast.showInfo('POLICY.PRIVATELABELING.MAXSIZEEXCEEDED', true);
|
||||
} else {
|
||||
const reader = new FileReader();
|
||||
reader.onload = ((aXML) => {
|
||||
reader.onload = (() => {
|
||||
return (e) => {
|
||||
const xmlBase64 = e.target?.result;
|
||||
if (xmlBase64 && typeof xmlBase64 === 'string') {
|
||||
@@ -388,7 +388,7 @@ export class AppCreateComponent implements OnInit, OnDestroy {
|
||||
this.samlAppRequest.setMetadataXml(cropped);
|
||||
}
|
||||
};
|
||||
})(file);
|
||||
})();
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,16 +92,14 @@ export class AppDetailComponent implements OnInit, OnDestroy {
|
||||
['Admin Service URL', `${env.api}/admin/v1`],
|
||||
['Management Service URL', `${env.api}/management/v1`],
|
||||
['Auth Service URL', `${env.api}/auth/v1`],
|
||||
...wellknown.filter(
|
||||
([k, v]) => k === 'Revocation Endpoint' || k === 'JKWS URI' || k === 'Introspection Endpoint',
|
||||
),
|
||||
...wellknown.filter(([k]) => k === 'Revocation Endpoint' || k === 'JKWS URI' || k === 'Introspection Endpoint'),
|
||||
];
|
||||
}),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
public issuer$ = this.apiURLs$.pipe(map((urls) => urls.find(([k, v]) => k === 'Issuer')?.[1]));
|
||||
public issuer$ = this.apiURLs$.pipe(map((urls) => urls.find(([k]) => k === 'Issuer')?.[1]));
|
||||
|
||||
public samlURLs$ = this.envSvc.env.pipe(
|
||||
map((env) => {
|
||||
@@ -522,7 +520,7 @@ export class AppDetailComponent implements OnInit, OnDestroy {
|
||||
this.entityId?.setValue('');
|
||||
this.acsURL?.setValue('');
|
||||
const reader = new FileReader();
|
||||
reader.onload = ((aXML) => {
|
||||
reader.onload = (() => {
|
||||
return (e) => {
|
||||
const xmlBase64 = e.target?.result;
|
||||
if (xmlBase64 && typeof xmlBase64 === 'string' && this.app?.samlConfig) {
|
||||
@@ -532,7 +530,7 @@ export class AppDetailComponent implements OnInit, OnDestroy {
|
||||
this.app.samlConfig.metadataXml = cropped;
|
||||
}
|
||||
};
|
||||
})(file);
|
||||
})();
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,29 +1,11 @@
|
||||
import { C, COMMA, ENTER, SPACE } from '@angular/cdk/keycodes';
|
||||
import { StepperSelectionEvent } from '@angular/cdk/stepper';
|
||||
import { Location } from '@angular/common';
|
||||
import { Component, OnDestroy, OnInit, Signal, computed, effect, signal } from '@angular/core';
|
||||
import { AbstractControl, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
|
||||
import { Component, OnDestroy, OnInit, effect, signal } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { ActivatedRoute, Params, Router } from '@angular/router';
|
||||
import { Buffer } from 'buffer';
|
||||
import { BehaviorSubject, Subject, Subscription, combineLatest } from 'rxjs';
|
||||
import { debounceTime, map, takeUntil } from 'rxjs/operators';
|
||||
import { RadioItemAuthType } from 'src/app/modules/app-radio/app-auth-method-radio/app-auth-method-radio.component';
|
||||
import { requiredValidator } from 'src/app/modules/form-field/validators/validators';
|
||||
import {
|
||||
APIAuthMethodType,
|
||||
OIDCAppType,
|
||||
OIDCAuthMethodType,
|
||||
OIDCGrantType,
|
||||
OIDCResponseType,
|
||||
} from 'src/app/proto/generated/zitadel/app_pb';
|
||||
import {
|
||||
AddAPIAppRequest,
|
||||
AddAPIAppResponse,
|
||||
AddOIDCAppRequest,
|
||||
AddOIDCAppResponse,
|
||||
AddSAMLAppRequest,
|
||||
} from 'src/app/proto/generated/zitadel/management_pb';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { BehaviorSubject, Subject, combineLatest } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { OIDCAppType } from 'src/app/proto/generated/zitadel/app_pb';
|
||||
import { AddAPIAppResponse, AddOIDCAppRequest, AddOIDCAppResponse } from 'src/app/proto/generated/zitadel/management_pb';
|
||||
import { Breadcrumb, BreadcrumbService, BreadcrumbType } from 'src/app/services/breadcrumb.service';
|
||||
import { ManagementService } from 'src/app/services/mgmt.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
import { Location } from '@angular/common';
|
||||
import { Component, EventEmitter, OnInit } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { ActivatedRoute, Params, Router } from '@angular/router';
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ export class ProjectGrantsDataSource extends DataSource<GrantedProject.AsObject>
|
||||
super();
|
||||
}
|
||||
|
||||
public loadGrants(projectId: string, pageIndex: number, pageSize: number, sortDirection?: string): void {
|
||||
public loadGrants(projectId: string, pageIndex: number, pageSize: number): void {
|
||||
const offset = pageIndex * pageSize;
|
||||
|
||||
this.loadingSubject.next(true);
|
||||
|
||||
+1
-2
@@ -1,11 +1,10 @@
|
||||
import { animate, state, style, transition, trigger } from '@angular/animations';
|
||||
import { SelectionModel } from '@angular/cdk/collections';
|
||||
import { AfterViewInit, Component, Input, OnInit, ViewChild } from '@angular/core';
|
||||
import { Component, Input, OnInit, ViewChild } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { MatSelectChange } from '@angular/material/select';
|
||||
import { MatTable } from '@angular/material/table';
|
||||
import { Router } from '@angular/router';
|
||||
import { tap } from 'rxjs/operators';
|
||||
import { PageEvent, PaginatorComponent } from 'src/app/modules/paginator/paginator.component';
|
||||
import { WarnDialogComponent } from 'src/app/modules/warn-dialog/warn-dialog.component';
|
||||
import { GrantedProject, ProjectGrantState, Role } from 'src/app/proto/generated/zitadel/project_pb';
|
||||
|
||||
@@ -253,7 +253,7 @@ export class UserCreateV2Component implements OnInit {
|
||||
try {
|
||||
// first we try to create a URL directly from the baseUri
|
||||
return new URL(baseUriWithTrailingSlash);
|
||||
} catch (_) {
|
||||
} catch {
|
||||
// if this does not work we assume that the baseUri is relative,
|
||||
// and we need to add the location.origin
|
||||
// we make sure the relative url has a slash at the beginning and end
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ export class AuthPasswordlessComponent implements OnInit, OnDestroy {
|
||||
},
|
||||
});
|
||||
|
||||
dialogRef.afterClosed().subscribe((done) => {
|
||||
dialogRef.afterClosed().subscribe(() => {
|
||||
setTimeout(() => {
|
||||
this.getPasswordless();
|
||||
}, 1000);
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
import { Component, computed, DestroyRef, OnInit } from '@angular/core';
|
||||
import { AbstractControl, UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import {
|
||||
map,
|
||||
switchMap,
|
||||
firstValueFrom,
|
||||
mergeWith,
|
||||
Observable,
|
||||
defer,
|
||||
of,
|
||||
shareReplay,
|
||||
combineLatestWith,
|
||||
EMPTY,
|
||||
} from 'rxjs';
|
||||
import { map, switchMap, firstValueFrom, mergeWith, Observable, defer, of, shareReplay, combineLatestWith } from 'rxjs';
|
||||
import { passwordConfirmValidator, requiredValidator } from 'src/app/modules/form-field/validators/validators';
|
||||
import { Breadcrumb, BreadcrumbService, BreadcrumbType } from 'src/app/services/breadcrumb.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
|
||||
@@ -37,12 +37,11 @@ import { WarnDialogComponent } from 'src/app/modules/warn-dialog/warn-dialog.com
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { UserService } from 'src/app/services/user.service';
|
||||
import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
|
||||
import { SearchQuery as UserSearchQuery } from 'src/app/proto/generated/zitadel/user_pb';
|
||||
import { Type, UserFieldName } from '@zitadel/proto/zitadel/user/v2/query_pb';
|
||||
import { UserState, User } from '@zitadel/proto/zitadel/user/v2/user_pb';
|
||||
import { MessageInitShape } from '@bufbuild/protobuf';
|
||||
import { ListUsersRequestSchema, ListUsersResponse } from '@zitadel/proto/zitadel/user/v2/user_service_pb';
|
||||
import { UserState as UserStateV1 } from 'src/app/proto/generated/zitadel/user_pb';
|
||||
import { UserState as UserStateV1, SearchQuery as UserSearchQuery } from 'src/app/proto/generated/zitadel/user_pb';
|
||||
import { NewOrganizationService } from 'src/app/services/new-organization.service';
|
||||
import { AuthenticationService } from 'src/app/services/authentication.service';
|
||||
import { GrpcAuthService } from 'src/app/services/grpc-auth.service';
|
||||
|
||||
@@ -6,7 +6,7 @@ import { Duration } from 'google-protobuf/google/protobuf/duration_pb';
|
||||
standalone: false,
|
||||
})
|
||||
export class DurationToSecondsPipe implements PipeTransform {
|
||||
transform(value?: Duration.AsObject, ...args: unknown[]): unknown {
|
||||
transform(value?: Duration.AsObject): unknown {
|
||||
if (value) {
|
||||
return this.durationToSeconds(value);
|
||||
} else {
|
||||
|
||||
@@ -5,7 +5,7 @@ import { Duration } from 'google-protobuf/google/protobuf/duration_pb';
|
||||
name: 'timestampToRetention',
|
||||
})
|
||||
export class TimestampToRetentionPipe implements PipeTransform {
|
||||
transform(value?: Duration.AsObject, ...args: unknown[]): unknown {
|
||||
transform(value?: Duration.AsObject): unknown {
|
||||
if (value) {
|
||||
return this.retentionFromTimestamp(value);
|
||||
} else {
|
||||
|
||||
@@ -395,16 +395,16 @@ export class AdminService {
|
||||
}),
|
||||
};
|
||||
});
|
||||
const toArray = Object.entries(obj).sort(([key0, a], [key1, b]) => a.order - b.order);
|
||||
const toArray = Object.entries(obj).sort(([_key0, a], [_key1, b]) => a.order - b.order);
|
||||
|
||||
const toDo = toArray.filter(([key, value]) => value.reached === undefined);
|
||||
const done = toArray.filter(([key, value]) => !!value.reached);
|
||||
const toDo = toArray.filter(([_, value]) => value.reached === undefined);
|
||||
const done = toArray.filter(([_, value]) => !!value.reached);
|
||||
|
||||
return [...toDo, ...done];
|
||||
}),
|
||||
tap((milestones) => {
|
||||
const total = milestones.length;
|
||||
const done = milestones.map(([type, value]) => value.reached !== undefined).filter((res) => !!res).length;
|
||||
const done = milestones.map(([_, value]) => value.reached !== undefined).filter((res) => !!res).length;
|
||||
const percentage = Math.round((done / total) * 100);
|
||||
this.progressDone.next(done);
|
||||
this.progressTotal.next(total);
|
||||
|
||||
@@ -215,8 +215,6 @@ import {
|
||||
GetProjectGrantByIDResponse,
|
||||
GetProviderByIDRequest,
|
||||
GetProviderByIDResponse,
|
||||
GetSupportedLanguagesRequest,
|
||||
GetSupportedLanguagesResponse,
|
||||
GetUserByIDRequest,
|
||||
GetUserByIDResponse,
|
||||
GetUserByLoginNameGlobalRequest,
|
||||
|
||||
@@ -23,7 +23,6 @@ import {
|
||||
ResendHumanInitializationResponse,
|
||||
ResendHumanPhoneVerificationRequestSchema,
|
||||
ResendHumanPhoneVerificationResponse,
|
||||
SendHumanResetPasswordNotificationRequest_Type,
|
||||
SendHumanResetPasswordNotificationRequestSchema,
|
||||
SendHumanResetPasswordNotificationResponse,
|
||||
SetUserMetadataRequestSchema,
|
||||
|
||||
@@ -31,7 +31,7 @@ export class OverlayService {
|
||||
|
||||
const dialogRef = new CnslOverlayRef(overlayRef);
|
||||
|
||||
const overlayComponent = this.attachOverlayContainer(overlayRef, dialogConfig, overlayRef);
|
||||
this.attachOverlayContainer(overlayRef, dialogConfig, overlayRef);
|
||||
|
||||
overlayRef.backdropClick().subscribe((_) => dialogRef.close());
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ export class PosthogService implements OnDestroy {
|
||||
enable_heatmaps: true,
|
||||
persistence: 'memory',
|
||||
loaded: (posthog) => {
|
||||
posthog.onFeatureFlags((flags) => {
|
||||
posthog.onFeatureFlags(() => {
|
||||
if (posthog.isFeatureEnabled('session_recording')) {
|
||||
posthog.startSessionRecording();
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BehaviorSubject, Observable } from 'rxjs';
|
||||
|
||||
declare const tinycolor: any;
|
||||
|
||||
export interface Color {
|
||||
name: string;
|
||||
hex: string;
|
||||
|
||||
@@ -38,7 +38,7 @@ export class ToastService {
|
||||
|
||||
public showError = (error: any | string, isGrpc: boolean = true, i18nKey: boolean = false) => {
|
||||
if (isGrpc) {
|
||||
const { message, code, metadata } = error;
|
||||
const { message, code } = error;
|
||||
if (code !== 16) {
|
||||
this.translate
|
||||
.get('ACTIONS.CLOSE')
|
||||
|
||||
@@ -10,7 +10,7 @@ export function formatPhone(phone?: string): { phone: string; country: CountryCo
|
||||
if (phoneNumber) {
|
||||
return { phone: phoneNumber.formatInternational(), country };
|
||||
}
|
||||
} catch (e) {
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,23 +2,23 @@ import { OnboardingActions } from '../services/admin.service';
|
||||
import { COLORS } from './color';
|
||||
import { MilestoneType } from '../proto/generated/zitadel/milestone/v1/milestone_pb';
|
||||
|
||||
const reddark: string = COLORS[0][700];
|
||||
const redlight = COLORS[0][200];
|
||||
// const reddark: string = COLORS[0][700];
|
||||
// const redlight = COLORS[0][200];
|
||||
|
||||
const yellowdark: string = COLORS[3][700];
|
||||
const yellowlight = COLORS[3][200];
|
||||
// const yellowdark: string = COLORS[3][700];
|
||||
// const yellowlight = COLORS[3][200];
|
||||
|
||||
const greendark: string = COLORS[6][700];
|
||||
const greenlight = COLORS[6][200];
|
||||
|
||||
const bluedark: string = COLORS[9][700];
|
||||
const bluelight = COLORS[9][200];
|
||||
// const bluedark: string = COLORS[9][700];
|
||||
// const bluelight = COLORS[9][200];
|
||||
|
||||
const purpledark: string = COLORS[12][700];
|
||||
const purplelight = COLORS[12][200];
|
||||
|
||||
const pinkdark: string = COLORS[15][700];
|
||||
const pinklight = COLORS[15][200];
|
||||
// const pinkdark: string = COLORS[15][700];
|
||||
// const pinklight = COLORS[15][200];
|
||||
|
||||
const sthdark: string = COLORS[18][700];
|
||||
const sthlight = COLORS[18][200];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { combineLatestWith, distinctUntilChanged, Observable, ObservableInput, ObservableInputTuple } from 'rxjs';
|
||||
import { combineLatestWith, distinctUntilChanged, Observable, ObservableInputTuple } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
|
||||
// withLatestFrom does not work in this case, so we use
|
||||
|
||||
Reference in New Issue
Block a user