-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
217 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<h1>Blocks Management</h1> | ||
|
||
<mat-card class="notifications-card"> | ||
<mat-card-header> </mat-card-header> | ||
<mat-card-content> | ||
@for(entry of service.blocks(); track entry) { | ||
<mat-card class="card-notification" appearance="outlined"> | ||
<!-- <mat-card-header> | ||
<mat-icon class="card-icon" inline="true" mat-card-avatar></mat-icon> | ||
<mat-card-title>{{ entry.data }}</mat-card-title> | ||
<mat-card-subtitle>{{ entry.record.dateCreated | ago }}</mat-card-subtitle> | ||
</mat-card-header> --> | ||
<mat-card-content> | ||
{{ entry.data.did }} | ||
</mat-card-content> | ||
<mat-card-actions> | ||
<button mat-flat-button [routerLink]="['/profile', entry.data.did]">VIEW PROFILE</button> | ||
<button mat-button (click)="deleteBlock(entry)">DELETE</button> | ||
</mat-card-actions> | ||
</mat-card> | ||
} | ||
</mat-card-content> | ||
</mat-card> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.card-icon { | ||
font-size: 3em; | ||
} | ||
|
||
.card-notification { | ||
margin-bottom: 1em; | ||
} | ||
|
||
.notifications-title { | ||
display: flex; | ||
width: 100%; | ||
} | ||
|
||
:host { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
} | ||
|
||
.notifications-card { | ||
max-width: 600px; | ||
width: 100%; | ||
} | ||
|
||
.card-notification mat-card-actions button { | ||
width: 100%; | ||
} | ||
.notification-description { | ||
margin-bottom: 1em; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { BlocksComponent } from './blocks.component'; | ||
|
||
describe('BlocksComponent', () => { | ||
let component: BlocksComponent; | ||
let fixture: ComponentFixture<BlocksComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [BlocksComponent] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(BlocksComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { Component, effect, inject, signal } from '@angular/core'; | ||
import { ConnectionService } from '../../connection.service'; | ||
import { AppService } from '../../app.service'; | ||
import { CommonModule } from '@angular/common'; | ||
import { MatCardModule } from '@angular/material/card'; | ||
import { MatButtonModule } from '@angular/material/button'; | ||
import { MatIconModule } from '@angular/material/icon'; | ||
import { RouterModule } from '@angular/router'; | ||
import { AgoPipe } from '../../shared/pipes/ago.pipe'; | ||
|
||
@Component({ | ||
selector: 'app-blocks', | ||
standalone: true, | ||
imports: [AgoPipe, CommonModule, MatCardModule, MatButtonModule, MatIconModule, RouterModule], | ||
templateUrl: './blocks.component.html', | ||
styleUrl: './blocks.component.scss', | ||
}) | ||
export class BlocksComponent { | ||
service = inject(ConnectionService); | ||
|
||
app = inject(AppService); | ||
|
||
constructor() { | ||
// effect(async () => { | ||
// if (this.app.initialized()) { | ||
// } | ||
// }); | ||
} | ||
|
||
// async load() { | ||
// const blocks = await this.service.loadBlocks(); | ||
// this.blocks.set(blocks); | ||
// } | ||
|
||
deleteBlock(entry: any) { | ||
this.service.deleteBlock(entry); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<p>connections works!</p> |
Empty file.
23 changes: 23 additions & 0 deletions
23
app/src/app/settings/connections/connections.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { ConnectionsComponent } from './connections.component'; | ||
|
||
describe('ConnectionsComponent', () => { | ||
let component: ConnectionsComponent; | ||
let fixture: ComponentFixture<ConnectionsComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [ConnectionsComponent] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(ConnectionsComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-connections', | ||
standalone: true, | ||
imports: [], | ||
templateUrl: './connections.component.html', | ||
styleUrl: './connections.component.scss' | ||
}) | ||
export class ConnectionsComponent { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters