Skip to content

Commit

Permalink
refactor: remove comments[3141]
Browse files Browse the repository at this point in the history
  • Loading branch information
Ihar committed Dec 21, 2024
1 parent 4da6fb4 commit dce5d0c
Show file tree
Hide file tree
Showing 232 changed files with 1,296 additions and 9,485 deletions.
30 changes: 7 additions & 23 deletions frontend/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import { Component, ElementRef, HostListener, OnInit, ViewChild } from '@angular/core';
import { AuthStateService } from './services/auth-state.service';
import { WebSocketService } from './services/web-socket.service';
import { BrandingService } from './services/branding.service';
import {Component, ElementRef, HostListener, OnInit, ViewChild} from '@angular/core';
import {AuthStateService} from './services/auth-state.service';
import {WebSocketService} from './services/web-socket.service';
import {BrandingService} from './services/branding.service';
import './modules/policy-engine/policy-lang-modes/policy-json-lang.mode';
import './modules/policy-engine/policy-lang-modes/policy-yaml-lang.mode';
import './modules/common/models/lang-modes/formula-lang.mode';
import './modules/common/models/lang-modes/single-line';
import { globalLoaderActive } from './static/global-loader.function';
import { ActivatedRoute } from '@angular/router';
// import { MatIconRegistry } from '@angular/material/icon';
import { DomSanitizer } from '@angular/platform-browser';
import {globalLoaderActive} from './static/global-loader.function';
import {ActivatedRoute} from '@angular/router';
import {DomSanitizer} from '@angular/platform-browser';

@Component({
selector: 'app-root',
Expand Down Expand Up @@ -37,22 +36,7 @@ export class AppComponent implements OnInit {
private brandingService: BrandingService,
private activatedRoute: ActivatedRoute,
private domSanitizer: DomSanitizer,
// private matIconRegistry: MatIconRegistry
) {
// this.matIconRegistry.addSvgIconLiteral('policy-module', this.domSanitizer.bypassSecurityTrustHtml(`
// <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
// <path style="fill:#e1933c" d="M 12,0.83007812 3.0507812,6 12,11.160156 20.949219,6 Z" />
// <path style="fill:#24bfe1" d="m 21.673828,7.25 -8.96289,5.169922 V 22.75 l 8.96289,-5.199219 z" />
// <path style="fill:#9e57f5" d="M 2.3261719,7.25 V 17.550781 L 11.279297,22.75 V 12.419922 Z" />
// </svg>
// `));
// this.matIconRegistry.addSvgIconLiteral('policy-tool', this.domSanitizer.bypassSecurityTrustHtml(`
// <svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 24 24">
// <path style="fill:#e1933c" d="M 12,0.83007812 3.0507812,6 12,11.160156 15.266636,9.2766003 11.8147,7.2852641 14.3213,5.878 17.736428,7.8525082 20.949219,6 Z" />
// <path style="fill:#e1933c" d="M 21.673828,7.25 18.5,9.076 v 4 c -0.806467,0.526344 -1.661691,0.973915 -2.5,1.447 l -4.61e-4,-4 -3.288601,1.896922 V 22.75 l 8.96289,-5.199219 z" />
// <path style="fill:#e1933c" d="M 11.279297,22.75 V 12.419922 L 2.3261719,7.25 V 17.550781 M 5.58267,15.641 7.96751,17.09534 v 1.89518 L 5.58267,17.53363 Z" />
// </svg>
// `));
activatedRoute.url.subscribe(segs => {
this.url = segs.pop()!.path;
})
Expand Down
263 changes: 135 additions & 128 deletions frontend/src/app/app.module.ts

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,6 @@ <h1 mat-dialog-title class="dialog-title">VC Subject Submission</h1>
</li>
</ul>

<!-- <mat-form-field *ngIf="!userRole" class="content__role-select">-->
<!-- <mat-label>Role</mat-label>-->
<!-- <mat-select [(value)]="selectedRole" [required]="true">-->
<!-- <mat-option *ngFor="let role of roles" [value]="role.value">-->
<!-- {{ role.displayName }}-->
<!-- </mat-option>-->
<!-- </mat-select>-->
<!-- </mat-form-field>-->

<div *ngIf="!userRole" class="p-fluid content__role-select">
<label for="roleDropdown">Role</label>
<p-dropdown
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {Component, Inject} from '@angular/core';
// import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
import {UserRole} from '@guardian/interfaces';
import {WebSocketService} from 'src/app/services/web-socket.service';
import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog';
Expand Down Expand Up @@ -43,8 +42,6 @@ export class MeecoVCSubmitDialogComponent {
selectedRole: UserRole;

constructor(
// @Inject(MAT_DIALOG_DATA) private data: VCSubmitDialogData,
// private dialogRef: MatDialogRef<MeecoVCSubmitDialogComponent>,
private dialogRef: DynamicDialogRef,
private config: DynamicDialogConfig,
private wsService: WebSocketService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
{{ unreadNotifications }}
</span>
</div>
<!-- <div-->
<!-- class="notification-position"-->
<!-- (menuClosed)="menuOpened = false"-->
<!-- [matMenuTriggerFor]="notificationMenu"-->
<!-- >-->
<div class="notification-position">
<p-overlayPanel
#notificationMenu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {ToastrService} from 'ngx-toastr';
import {forkJoin, Subscription} from 'rxjs';
import {NotificationService} from 'src/app/services/notify.service';
import {WebSocketService} from 'src/app/services/web-socket.service';
// import {MatLegacyMenu as MatMenu, MatLegacyMenuTrigger as MatMenuTrigger} from '@angular/material/legacy-menu';

@Component({
selector: 'app-notification',
Expand All @@ -21,9 +20,6 @@ export class NotificationComponent implements OnInit {

@Input() menuCollapsed: boolean;

// @ViewChild('notificationMenu') notificationMenu: MatMenu;
// @ViewChild(MatMenuTrigger) trigger: MatMenuTrigger;s

viewDetails($event: MouseEvent, notification: any) {
if (!notification.action) {
$event.stopPropagation();
Expand Down Expand Up @@ -234,15 +230,8 @@ export class NotificationComponent implements OnInit {
$event.stopPropagation();
$event.stopImmediatePropagation();
this.menuOpened = true;
// this.trigger.openMenu();
notificationMenu.toggle($event)

// if (this.menuCollapsed) {
// $event.stopImmediatePropagation();
// this.router.navigatыe(['notifications']);
// return;
// }
//this.readFirstNotification();
notificationMenu.toggle($event)
}

viewAllNotifications() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<div class="qr-code-dialog">
<div class="qr-code-dialog__header">
<span>Please scan the QR code with Meeco Wallet application</span>
<!-- <mat-icon class="qr-code-dialog__close" (click)="closeDialog()">close</mat-icon>-->

<i class="pi pi-times qr-code-dialog__close" (click)="closeDialog()"></i>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Component, Inject, OnDestroy } from '@angular/core';
// import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
import { ToastrService } from 'ngx-toastr';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
Expand All @@ -18,8 +17,6 @@ export class QrCodeDialogComponent implements OnDestroy {
isMobile: boolean = window.innerWidth <= 810;

constructor(
// @Inject(MAT_DIALOG_DATA) private data: any,
// private dialogRef: MatDialogRef<QrCodeDialogComponent>,
private dialogRef: DynamicDialogRef,
private config: DynamicDialogConfig,
private toastr: ToastrService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@
</div>

<ng-container *ngIf="registry.policies.length > 0; else noPolicies">
<!-- <div-->
<!-- class="policies-menu-trigger"-->
<!-- [matMenuTriggerFor]="policiesList"-->
<!-- (click)="stopPropagation($event)"-->
<!-- [ngClass]="{ 'policies-menu-trigger&#45;&#45;opened': isPoliciesMenuOpened }"-->
<!-- >-->

<div
class="policies-menu-trigger"
Expand All @@ -23,27 +17,13 @@
<span>
{{ registry.policies.length }} {{ getPoliciesLabel(registry.policies.length) }}
</span>
<!-- <mat-icon-->
<!-- class="policies-menu-icon"-->
<!-- [ngClass]="{ 'policies-menu-icon&#45;&#45;opened': isPoliciesMenuOpened }"-->
<!-- svgIcon="chevron_down"-->
<!-- ></mat-icon>-->

<i
class="pi pi-chevron-down policies-menu-icon"
[ngClass]="{ 'policies-menu-icon--opened': isPoliciesMenuOpened }"
></i>
</div>

<!-- <mat-menu #policiesList="matMenu">-->
<!-- <ul class="policies-list">-->
<!-- <li *ngFor="let policy of registry.policies" class="policies-list__item" value="policy.name">-->
<!-- <span>{{ policy.name }} </span>-->
<!-- <span *ngIf="policy.version">({{ policy.version }})</span>-->
<!-- </li>-->
<!-- </ul>-->
<!-- </mat-menu>-->

<p-overlayPanel #policiesOverlay>
<ul class="policies-list">
<li *ngFor="let policy of registry.policies" class="policies-list__item">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {Component, EventEmitter, Input, Output, SimpleChanges, ViewChild} from '@angular/core';
// import {MatIconRegistry} from '@angular/material/icon';
// import { MatLegacyMenuTrigger as MatMenuTrigger } from '@angular/material/legacy-menu';
// import {DomSanitizer} from '@angular/platform-browser';
import {IStandardRegistryResponse} from '@guardian/interfaces';
import {OverlayPanel} from 'primeng/overlaypanel';

Expand All @@ -11,7 +8,6 @@ import {OverlayPanel} from 'primeng/overlaypanel';
styleUrls: ['./standard-registry-card.component.scss'],
})
export class StandardRegistryCardComponent {
// @ViewChild(MatMenuTrigger) policiesMenuTrigger!: MatMenuTrigger;
@ViewChild('policiesOverlay') policiesOverlay!: OverlayPanel;
@Input() registry!: IStandardRegistryResponse;
@Input() isRegistrySelected!: boolean;
Expand All @@ -21,18 +17,7 @@ export class StandardRegistryCardComponent {

private ignoreFields: string[] = ['@context', 'id', 'type'];

constructor(
// private matIconRegistry: MatIconRegistry,
// private domSanitizer: DomSanitizer
) {
// this.matIconRegistry.addSvgIconLiteral(
// 'chevron_down',
// this.domSanitizer.bypassSecurityTrustHtml(`
// <svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" fill="none">
// <path d="M6 7.4L0 1.4L1.4 0L6 4.6L10.6 0L12 1.4L6 7.4Z" fill="#222222"/>
// </svg>
// `)
// );
constructor() {
}

ngOnChanges(changes: SimpleChanges) {
Expand Down Expand Up @@ -69,10 +54,6 @@ export class StandardRegistryCardComponent {
return policiesArrLength === 1 ? 'policy' : 'policies';
}

// get isPoliciesMenuOpened(): boolean {
// return this.policiesMenuTrigger?.menuOpen || false;
// }

get isPoliciesMenuOpened(): boolean {
return this.policiesOverlay?.overlayVisible || false;
}
Expand Down
Loading

0 comments on commit dce5d0c

Please sign in to comment.