From 4098f7ec5c533d3b35e629278006d6134ff8ee38 Mon Sep 17 00:00:00 2001
From: Baptiste Lemoine
Date: Thu, 16 Jan 2020 12:00:39 +0100
Subject: [PATCH] :zap: copy to clipboard ok
---
package.json | 1 +
src/app/app.module.ts | 9 +++++++--
.../end-confirmation.component.html | 14 ++++++++++++--
.../end-confirmation.component.scss | 5 +++++
.../end-confirmation.component.ts | 8 ++++++--
.../directives/resettable-input.directive.spec.ts | 8 ++++++++
.../ui/directives/resettable-input.directive.ts | 11 +++++++++++
yarn.lock | 15 +++++++++++++++
8 files changed, 65 insertions(+), 6 deletions(-)
create mode 100644 src/app/ui/directives/resettable-input.directive.spec.ts
create mode 100644 src/app/ui/directives/resettable-input.directive.ts
diff --git a/package.json b/package.json
index efae5b14..cfde9f4d 100644
--- a/package.json
+++ b/package.json
@@ -27,6 +27,7 @@
"@ngx-translate/http-loader": "^4.0.0",
"chart.js": "^2.8.0",
"font-awesome": "^4.7.0",
+ "ngx-clipboard": "^12.3.0",
"ngx-markdown": "^8.2.1",
"ngx-toaster": "^1.0.1",
"primeicons": "^2.0.0",
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index fcc9b6f0..73f0465b 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -44,10 +44,12 @@ import {BrowserAnimationsModule} from "@angular/platform-browser/animations";
import {ConfigService} from "./services/config.service";
import {PollService} from "./services/poll.service";
import {ToastModule} from 'primeng/toast';
-import {MessageService} from "primeng";
+import {MessageModule, MessageService} from "primeng";
import {PollDisplayComponent} from './pages/poll-display/poll-display.component';
import {VotingComponent} from './pages/voting/voting.component';
-import { VotingCommentComponent } from './pages/voting/voting-comment/voting-comment.component';
+import {VotingCommentComponent} from './pages/voting/voting-comment/voting-comment.component';
+import {ResettableInputDirective} from './ui/directives/resettable-input.directive';
+import {ClipboardModule} from "ngx-clipboard";
export class MyMissingTranslationHandler implements MissingTranslationHandler {
handle(params: MissingTranslationHandlerParams) {
@@ -89,14 +91,17 @@ export function HttpLoaderFactory(http: HttpClient) {
PollDisplayComponent,
VotingComponent,
VotingCommentComponent,
+ ResettableInputDirective,
],
imports: [
+ ClipboardModule,
CommonModule,
BrowserModule,
BrowserAnimationsModule,
AppRoutingModule,
ToastModule,
+ MessageModule,
MarkdownModule.forRoot(),
TranslateModule.forRoot({
missingTranslationHandler: {
diff --git a/src/app/pages/end-confirmation/end-confirmation.component.html b/src/app/pages/end-confirmation/end-confirmation.component.html
index 988fbe9e..35eff720 100644
--- a/src/app/pages/end-confirmation/end-confirmation.component.html
+++ b/src/app/pages/end-confirmation/end-confirmation.component.html
@@ -17,11 +17,15 @@
- Pour accéder au sondage et à tous ses paramètres : {{config.urlAdmin}}
+ Pour accéder au sondage et à tous ses paramètres :
+ {{config.urlAdmin}}
+