aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-02-10 14:37:15 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-02-10 16:39:28 +0100
commit7811819b1a942c99a80e36eb93cc3a8b0e7fc5f2 (patch)
treeae406ce7232f51058f81591072d59d90fd388d33
parentbe27ef3b4682c5639039474c39ee0d234d16f482 (diff)
downloadPeerTube-7811819b1a942c99a80e36eb93cc3a8b0e7fc5f2.tar.gz
PeerTube-7811819b1a942c99a80e36eb93cc3a8b0e7fc5f2.tar.zst
PeerTube-7811819b1a942c99a80e36eb93cc3a8b0e7fc5f2.zip
Use angular 9 clipboard cdk
-rw-r--r--client/package.json1
-rw-r--r--client/src/app/+accounts/accounts.component.html2
-rw-r--r--client/src/app/+video-channels/video-channels.component.html2
-rw-r--r--client/src/app/menu/menu.component.html2
-rw-r--r--client/src/app/shared/forms/input-readonly-copy.component.html2
-rw-r--r--client/src/app/shared/shared.module.ts2
-rw-r--r--client/src/app/shared/video/modals/video-download.component.html4
-rw-r--r--client/yarn.lock15
8 files changed, 8 insertions, 22 deletions
diff --git a/client/package.json b/client/package.json
index 9da34e4e8..9715b3716 100644
--- a/client/package.json
+++ b/client/package.json
@@ -103,7 +103,6 @@
103 "lodash-es": "^4.17.4", 103 "lodash-es": "^4.17.4",
104 "markdown-it": "^9.0.1", 104 "markdown-it": "^9.0.1",
105 "ngx-chips": "2.1.0", 105 "ngx-chips": "2.1.0",
106 "ngx-clipboard": "12.3.0",
107 "ngx-pipes": "^2.6.0", 106 "ngx-pipes": "^2.6.0",
108 "node-sass": "^4.9.3", 107 "node-sass": "^4.9.3",
109 "npm-font-source-sans-pro": "^1.0.2", 108 "npm-font-source-sans-pro": "^1.0.2",
diff --git a/client/src/app/+accounts/accounts.component.html b/client/src/app/+accounts/accounts.component.html
index 85f7dd30c..915bee0a2 100644
--- a/client/src/app/+accounts/accounts.component.html
+++ b/client/src/app/+accounts/accounts.component.html
@@ -9,7 +9,7 @@
9 <div class="actor-display-name">{{ account.displayName }}</div> 9 <div class="actor-display-name">{{ account.displayName }}</div>
10 <div class="actor-name">{{ account.nameWithHost }} 10 <div class="actor-name">{{ account.nameWithHost }}
11 11
12 <button ngxClipboard [cbContent]="account.nameWithHostForced" (click)="activateCopiedMessage()" 12 <button [cdkCopyToClipboard]="account.nameWithHostForced" (click)="activateCopiedMessage()"
13 class="btn btn-outline-secondary btn-sm copy-button" 13 class="btn btn-outline-secondary btn-sm copy-button"
14 > 14 >
15 <span class="glyphicon glyphicon-copy"></span> 15 <span class="glyphicon glyphicon-copy"></span>
diff --git a/client/src/app/+video-channels/video-channels.component.html b/client/src/app/+video-channels/video-channels.component.html
index f0bb083ca..debda9948 100644
--- a/client/src/app/+video-channels/video-channels.component.html
+++ b/client/src/app/+video-channels/video-channels.component.html
@@ -8,7 +8,7 @@
8 <div class="actor-names"> 8 <div class="actor-names">
9 <div class="actor-display-name">{{ videoChannel.displayName }}</div> 9 <div class="actor-display-name">{{ videoChannel.displayName }}</div>
10 <div class="actor-name">{{ videoChannel.nameWithHost }} 10 <div class="actor-name">{{ videoChannel.nameWithHost }}
11 <button ngxClipboard [cbContent]="videoChannel.nameWithHost" (click)="activateCopiedMessage()" 11 <button [cdkCopyToClipboard]="videoChannel.nameWithHost" (click)="activateCopiedMessage()"
12 class="btn btn-outline-secondary btn-sm copy-button" 12 class="btn btn-outline-secondary btn-sm copy-button"
13 > 13 >
14 <span class="glyphicon glyphicon-copy"></span> 14 <span class="glyphicon glyphicon-copy"></span>
diff --git a/client/src/app/menu/menu.component.html b/client/src/app/menu/menu.component.html
index 675fb597d..b99c7308e 100644
--- a/client/src/app/menu/menu.component.html
+++ b/client/src/app/menu/menu.component.html
@@ -8,7 +8,7 @@
8 <a *ngIf="user.account" [routerLink]="[ '/accounts', user.account.nameWithHost ]" class="logged-in-display-name">{{ user.account?.displayName }}</a> 8 <a *ngIf="user.account" [routerLink]="[ '/accounts', user.account.nameWithHost ]" class="logged-in-display-name">{{ user.account?.displayName }}</a>
9 <a *ngIf="!user.account" routerLink="/my-account/settings" class="logged-in-display-name">{{ user.account?.displayName }}</a> 9 <a *ngIf="!user.account" routerLink="/my-account/settings" class="logged-in-display-name">{{ user.account?.displayName }}</a>
10 10
11 <div ngxClipboard [cbContent]="user.account?.nameWithHost" class="logged-in-username">{{ user.username }}</div> 11 <div class="logged-in-username">{{ user.username }}</div>
12 </div> 12 </div>
13 13
14 <div class="logged-in-more" ngbDropdown placement="bottom-right auto"> 14 <div class="logged-in-more" ngbDropdown placement="bottom-right auto">
diff --git a/client/src/app/shared/forms/input-readonly-copy.component.html b/client/src/app/shared/forms/input-readonly-copy.component.html
index 27571b63f..b6a56ec44 100644
--- a/client/src/app/shared/forms/input-readonly-copy.component.html
+++ b/client/src/app/shared/forms/input-readonly-copy.component.html
@@ -2,7 +2,7 @@
2 <input #urlInput (click)="urlInput.select()" type="text" class="form-control readonly" readonly [value]="value" /> 2 <input #urlInput (click)="urlInput.select()" type="text" class="form-control readonly" readonly [value]="value" />
3 3
4 <div class="input-group-append"> 4 <div class="input-group-append">
5 <button [ngxClipboard]="urlInput" (click)="activateCopiedMessage()" type="button" class="btn btn-outline-secondary"> 5 <button [cdkCopyToClipboard]="urlInput.value" (click)="activateCopiedMessage()" type="button" class="btn btn-outline-secondary">
6 <span class="glyphicon glyphicon-copy"></span> 6 <span class="glyphicon glyphicon-copy"></span>
7 </button> 7 </button>
8 </div> 8 </div>
diff --git a/client/src/app/shared/shared.module.ts b/client/src/app/shared/shared.module.ts
index f39a889e9..759de7020 100644
--- a/client/src/app/shared/shared.module.ts
+++ b/client/src/app/shared/shared.module.ts
@@ -93,12 +93,12 @@ import { VideoActionsDropdownComponent } from '@app/shared/video/video-actions-d
93import { VideoBlacklistComponent } from '@app/shared/video/modals/video-blacklist.component' 93import { VideoBlacklistComponent } from '@app/shared/video/modals/video-blacklist.component'
94import { VideoDownloadComponent } from '@app/shared/video/modals/video-download.component' 94import { VideoDownloadComponent } from '@app/shared/video/modals/video-download.component'
95import { VideoReportComponent } from '@app/shared/video/modals/video-report.component' 95import { VideoReportComponent } from '@app/shared/video/modals/video-report.component'
96import { ClipboardModule } from 'ngx-clipboard'
97import { FollowService } from '@app/shared/instance/follow.service' 96import { FollowService } from '@app/shared/instance/follow.service'
98import { MultiSelectModule } from 'primeng/multiselect' 97import { MultiSelectModule } from 'primeng/multiselect'
99import { FeatureBooleanComponent } from '@app/shared/instance/feature-boolean.component' 98import { FeatureBooleanComponent } from '@app/shared/instance/feature-boolean.component'
100import { InputReadonlyCopyComponent } from '@app/shared/forms/input-readonly-copy.component' 99import { InputReadonlyCopyComponent } from '@app/shared/forms/input-readonly-copy.component'
101import { RedundancyService } from '@app/shared/video/redundancy.service' 100import { RedundancyService } from '@app/shared/video/redundancy.service'
101import { ClipboardModule } from '@angular/cdk/clipboard'
102 102
103@NgModule({ 103@NgModule({
104 imports: [ 104 imports: [
diff --git a/client/src/app/shared/video/modals/video-download.component.html b/client/src/app/shared/video/modals/video-download.component.html
index 8cca985b1..976da03f3 100644
--- a/client/src/app/shared/video/modals/video-download.component.html
+++ b/client/src/app/shared/video/modals/video-download.component.html
@@ -23,13 +23,15 @@
23 <select *ngIf="type === 'video'" [(ngModel)]="resolutionId"> 23 <select *ngIf="type === 'video'" [(ngModel)]="resolutionId">
24 <option *ngFor="let file of getVideoFiles()" [value]="file.resolution.id">{{ file.resolution.label }}</option> 24 <option *ngFor="let file of getVideoFiles()" [value]="file.resolution.id">{{ file.resolution.label }}</option>
25 </select> 25 </select>
26
26 <select *ngIf="type === 'subtitles'" [(ngModel)]="subtitleLanguageId"> 27 <select *ngIf="type === 'subtitles'" [(ngModel)]="subtitleLanguageId">
27 <option *ngFor="let caption of videoCaptions" [value]="caption.language.id">{{ caption.language.label }}</option> 28 <option *ngFor="let caption of videoCaptions" [value]="caption.language.id">{{ caption.language.label }}</option>
28 </select> 29 </select>
29 </div> 30 </div>
31
30 <input #urlInput (click)="urlInput.select()" type="text" class="form-control input-sm readonly" readonly [value]="getLink()" /> 32 <input #urlInput (click)="urlInput.select()" type="text" class="form-control input-sm readonly" readonly [value]="getLink()" />
31 <div class="input-group-append"> 33 <div class="input-group-append">
32 <button [ngxClipboard]="urlInput" (click)="activateCopiedMessage()" type="button" class="btn btn-outline-secondary"> 34 <button [cdkCopyToClipboard]="urlInput.value" (click)="activateCopiedMessage()" type="button" class="btn btn-outline-secondary">
33 <span class="glyphicon glyphicon-copy"></span> 35 <span class="glyphicon glyphicon-copy"></span>
34 </button> 36 </button>
35 </div> 37 </div>
diff --git a/client/yarn.lock b/client/yarn.lock
index a891b4dbd..c2f33bc55 100644
--- a/client/yarn.lock
+++ b/client/yarn.lock
@@ -7584,14 +7584,6 @@ ngx-chips@2.1.0:
7584 ng2-material-dropdown "0.11.0" 7584 ng2-material-dropdown "0.11.0"
7585 tslib "^1.9.0" 7585 tslib "^1.9.0"
7586 7586
7587ngx-clipboard@12.3.0:
7588 version "12.3.0"
7589 resolved "https://registry.yarnpkg.com/ngx-clipboard/-/ngx-clipboard-12.3.0.tgz#8e61a894ff57249db64b733d26f9a0b98c08829f"
7590 integrity sha512-ToSsuDv9I1L0g+TcthePcZ4B859/MpoarlHVr2KnHWy3pR8SxfJlNyP2i9STYRQkJ5bSEg65RFErW4tx52lHYQ==
7591 dependencies:
7592 ngx-window-token "^2.0.0"
7593 tslib "^1.9.0"
7594
7595ngx-pipes@^2.6.0: 7587ngx-pipes@^2.6.0:
7596 version "2.6.0" 7588 version "2.6.0"
7597 resolved "https://registry.yarnpkg.com/ngx-pipes/-/ngx-pipes-2.6.0.tgz#8aec62de477067ef2726f2b87086a169bcf41b8a" 7589 resolved "https://registry.yarnpkg.com/ngx-pipes/-/ngx-pipes-2.6.0.tgz#8aec62de477067ef2726f2b87086a169bcf41b8a"
@@ -7599,13 +7591,6 @@ ngx-pipes@^2.6.0:
7599 dependencies: 7591 dependencies:
7600 tslib "^1.9.0" 7592 tslib "^1.9.0"
7601 7593
7602ngx-window-token@^2.0.0:
7603 version "2.0.1"
7604 resolved "https://registry.yarnpkg.com/ngx-window-token/-/ngx-window-token-2.0.1.tgz#8f91221af4116aa9f49bb3f7a6f1111639884fba"
7605 integrity sha512-rvqdqJEfnWXQFU5fyfYt06E10tR/UtFOYdF3QebfcOh5VIJhnTKiprX8e4B9OrX7WEVFm9BT8uV72xXcEgsaKA==
7606 dependencies:
7607 tslib "^1.9.0"
7608
7609nice-try@^1.0.4: 7594nice-try@^1.0.4:
7610 version "1.0.5" 7595 version "1.0.5"
7611 resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" 7596 resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"