toast messages when copied to clipboard and network errors

This commit is contained in:
Baptiste Lemoine 2020-01-16 12:05:54 +01:00
parent 4098f7ec5c
commit b44f2719b4
4 changed files with 12 additions and 5 deletions

View File

@ -52,3 +52,5 @@
<router-outlet></router-outlet>
</main>
<framadate-debugger></framadate-debugger>
<p-toast position="top-right"></p-toast>

View File

@ -89,3 +89,4 @@
</section>
<p-toast position="bottom-right"></p-toast>

View File

@ -24,7 +24,11 @@ export class EndConfirmationComponent extends BaseComponent implements OnInit {
}
copyLink(str: any) {
this.messageService.add({severity: 'success', summary: 'Service Message', detail: 'Via MessageService'});
this.messageService.add({
severity: 'success',
summary: 'Lien copié',
detail: str
});
}
sendToEmail() {

View File

@ -186,7 +186,7 @@ export class ConfigService extends PollConfig {
// TODO handle a toast message
console.error('err', err);
this.loading = false;
this.messageService.add({severity: 'warning', summary: "Erreur lors de l'appel "});
this.messageService.add({severity: 'warning', summary: "Erreur lors de l'appel ", detail: err.message});
}