Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

add info dialog #116

Merged
merged 2 commits into from
Nov 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion viewer/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { AppService } from './app.service';
import { MatDialog } from '@angular/material/dialog';
import { MovedComponent } from './moved/moved.component';

@Component({
selector: 'app-root',
Expand All @@ -9,10 +11,13 @@ import { AppService } from './app.service';
export class AppComponent implements OnInit {
tabs: string[] = [];

constructor(private appService: AppService) {}
constructor(private appService: AppService, private dialog: MatDialog) {}

ngOnInit(): void {
this.appService.getElements();

this.dialog.open(MovedComponent);

this.tabs = Object.keys(this.appService.getElements()).filter(
(key) => key !== 'Credential Profile' && key !== 'defs'
);
Expand Down
107 changes: 59 additions & 48 deletions viewer/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { NgModule } from '@angular/core';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import {
provideHttpClient,
withInterceptorsFromDi,
} from '@angular/common/http';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
Expand Down Expand Up @@ -42,55 +45,63 @@ import { CredentialProfileShowComponent } from './credential-profile/credential-
import { MarkdownModule } from 'ngx-markdown';
import { DefinitionComponent } from './definition/definition.component';
import { ResourcesShowComponent } from './resources/resources-show/resources-show.component';
import { MovedComponent } from './moved/moved.component';

const appearance: MatFormFieldDefaultOptions = {
appearance: 'outline',
};
@NgModule({ declarations: [
AppComponent,
ResourcesListComponent,
CredentialProfileListComponent,
CredentialProfileShowComponent,
FormatPipe,
AutoSelectComponent,
FilterComponent,
ProfileConfigComponent,
DefinitionComponent,
ResourcesShowComponent,
],
bootstrap: [AppComponent], imports: [CommonModule,
BrowserModule,
BrowserAnimationsModule,
ReactiveFormsModule,
MatInputModule,
FlexLayoutModule,
AppRoutingModule,
MatToolbarModule,
MatTableModule,
MatSnackBarModule,
MatTooltipModule,
MatSelectModule,
MatDialogModule,
MatIconModule,
MatButtonModule,
MatTabsModule,
MatSortModule,
MatListModule,
MatCheckboxModule,
MatChipsModule,
MatFormFieldModule,
MatAutocompleteModule,
MatPaginatorModule,
ClipboardModule,
MatMenuModule,
MatCardModule,
MatExpansionModule,
MarkdownModule.forRoot()], providers: [
FormatPipe,
{
provide: MAT_FORM_FIELD_DEFAULT_OPTIONS,
useValue: appearance,
},
provideHttpClient(withInterceptorsFromDi()),
] })
@NgModule({
declarations: [
AppComponent,
ResourcesListComponent,
CredentialProfileListComponent,
CredentialProfileShowComponent,
FormatPipe,
AutoSelectComponent,
FilterComponent,
ProfileConfigComponent,
DefinitionComponent,
ResourcesShowComponent,
MovedComponent,
],
bootstrap: [AppComponent],
imports: [
CommonModule,
BrowserModule,
BrowserAnimationsModule,
ReactiveFormsModule,
MatInputModule,
FlexLayoutModule,
AppRoutingModule,
MatToolbarModule,
MatTableModule,
MatSnackBarModule,
MatTooltipModule,
MatSelectModule,
MatDialogModule,
MatIconModule,
MatButtonModule,
MatTabsModule,
MatSortModule,
MatListModule,
MatCheckboxModule,
MatChipsModule,
MatFormFieldModule,
MatAutocompleteModule,
MatPaginatorModule,
ClipboardModule,
MatMenuModule,
MatCardModule,
MatExpansionModule,
MarkdownModule.forRoot(),
],
providers: [
FormatPipe,
{
provide: MAT_FORM_FIELD_DEFAULT_OPTIONS,
useValue: appearance,
},
provideHttpClient(withInterceptorsFromDi()),
],
})
export class AppModule {}
14 changes: 14 additions & 0 deletions viewer/src/app/moved/moved.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<h1 mat-dialog-title>Project was moved</h1>

<mat-dialog-content>
<p>
The project was merged with the Wallet and Agent overview and moved to a new
<a
href="https://openwallet-foundation.github.io/digital-wallet-and-agent-overviews-sig/#/"
>location</a
>. Please update your bookmarks.
</p>
</mat-dialog-content>
<mat-dialog-actions>
<button mat-button [mat-dialog-close]>Close</button>
</mat-dialog-actions>
Empty file.
23 changes: 23 additions & 0 deletions viewer/src/app/moved/moved.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { MovedComponent } from './moved.component';

describe('MovedComponent', () => {
let component: MovedComponent;
let fixture: ComponentFixture<MovedComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [MovedComponent]
})
.compileComponents();

fixture = TestBed.createComponent(MovedComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
8 changes: 8 additions & 0 deletions viewer/src/app/moved/moved.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-moved',
templateUrl: './moved.component.html',
styleUrl: './moved.component.scss',
})
export class MovedComponent {}