mirror of
https://github.com/block-core/blockcore-notes.git
synced 2024-09-30 06:50:43 +00:00
Display created badges
This commit is contained in:
parent
534d20cb6c
commit
e189917061
@ -103,35 +103,7 @@
|
||||
</ng-template>
|
||||
<ng-template matTabContent>
|
||||
<div class="badges">
|
||||
<mat-card class="badge-card">
|
||||
<mat-card-header class="badge-header">
|
||||
<mat-card-title>Verified Human Badge</mat-card-title>
|
||||
<mat-card-subtitle>Human</mat-card-subtitle>
|
||||
</mat-card-header>
|
||||
<img mat-card-image src="/assets/badge-512x512.png" />
|
||||
<mat-card-content>
|
||||
<p>Badge earned by Fully Verified Humans.</p>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-stroked-button>PUT ON PROFILE</button>
|
||||
<button mat-stroked-button>HIDE</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
|
||||
<mat-card class="badge-card">
|
||||
<mat-card-header class="badge-header">
|
||||
<mat-card-title>Liberstad Membership Organization</mat-card-title>
|
||||
<mat-card-subtitle>liberstad-member</mat-card-subtitle>
|
||||
</mat-card-header>
|
||||
<img mat-card-image src="/assets/badge-512x512.png" />
|
||||
<mat-card-content>
|
||||
<p>Verified One Year Membership.</p>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-stroked-button>PUT ON PROFILE</button>
|
||||
<button mat-stroked-button>HIDE</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
<app-badge-card [badge]="badge" *ngFor="let badge of badgeService.definitions"> </app-badge-card>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
|
@ -1,5 +1,7 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ApplicationState } from '../services/applicationstate';
|
||||
import { BadgeService } from '../services/badge';
|
||||
import { QueueService } from '../services/queue.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-badges',
|
||||
@ -7,7 +9,7 @@ import { ApplicationState } from '../services/applicationstate';
|
||||
styleUrls: ['badges.css'],
|
||||
})
|
||||
export class BadgesComponent implements OnInit {
|
||||
constructor(public appState: ApplicationState) {}
|
||||
constructor(public appState: ApplicationState, public badgeService: BadgeService, public queueService: QueueService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.appState.updateTitle('Badges');
|
||||
@ -28,6 +30,8 @@ export class BadgesComponent implements OnInit {
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
this.queueService.enque(this.appState.getPublicKey(), 'BadgeDefinition');
|
||||
}
|
||||
|
||||
private createBadgeType() {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, HostListener, Output, EventEmitter, Input, ElementRef, OnInit } from '@angular/core';
|
||||
import { BadgeDefinitionEvent, NostrEventDocument } from 'src/app/services/interfaces';
|
||||
import { BadgeDefinitionEvent, NostrBadgeDefinition, NostrEventDocument } from 'src/app/services/interfaces';
|
||||
import { Utilities } from 'src/app/services/utilities';
|
||||
|
||||
@Component({
|
||||
@ -8,7 +8,7 @@ import { Utilities } from 'src/app/services/utilities';
|
||||
styleUrls: ['badge-card.css'],
|
||||
})
|
||||
export class BadgeCardComponent implements OnInit {
|
||||
@Input() badge?: BadgeDefinitionEvent;
|
||||
@Input() badge?: BadgeDefinitionEvent | NostrBadgeDefinition;
|
||||
@Input() preview: boolean = false;
|
||||
|
||||
constructor(private utilities: Utilities) {}
|
||||
|
Loading…
Reference in New Issue
Block a user