diff options
author | Chocobozzz <me@florianbigard.com> | 2019-12-05 10:05:00 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-12-05 10:05:00 +0100 |
commit | 3a1fed11c52705002cbf2a17294509fb5a89237c (patch) | |
tree | 9140310efbd9ba7f1b7254e3fd580e84322792a7 /client/src/app/shared/forms | |
parent | 689a4f6946e47ddf4871fd43bbd1284a4dc79e68 (diff) | |
download | PeerTube-3a1fed11c52705002cbf2a17294509fb5a89237c.tar.gz PeerTube-3a1fed11c52705002cbf2a17294509fb5a89237c.tar.zst PeerTube-3a1fed11c52705002cbf2a17294509fb5a89237c.zip |
Support playlists in share modal
Diffstat (limited to 'client/src/app/shared/forms')
3 files changed, 33 insertions, 0 deletions
diff --git a/client/src/app/shared/forms/input-readonly-copy.component.html b/client/src/app/shared/forms/input-readonly-copy.component.html new file mode 100644 index 000000000..27571b63f --- /dev/null +++ b/client/src/app/shared/forms/input-readonly-copy.component.html | |||
@@ -0,0 +1,9 @@ | |||
1 | <div class="input-group"> | ||
2 | <input #urlInput (click)="urlInput.select()" type="text" class="form-control readonly" readonly [value]="value" /> | ||
3 | |||
4 | <div class="input-group-append"> | ||
5 | <button [ngxClipboard]="urlInput" (click)="activateCopiedMessage()" type="button" class="btn btn-outline-secondary"> | ||
6 | <span class="glyphicon glyphicon-copy"></span> | ||
7 | </button> | ||
8 | </div> | ||
9 | </div> | ||
diff --git a/client/src/app/shared/forms/input-readonly-copy.component.scss b/client/src/app/shared/forms/input-readonly-copy.component.scss new file mode 100644 index 000000000..8dc4f113c --- /dev/null +++ b/client/src/app/shared/forms/input-readonly-copy.component.scss | |||
@@ -0,0 +1,3 @@ | |||
1 | input.readonly { | ||
2 | font-size: 15px; | ||
3 | } | ||
diff --git a/client/src/app/shared/forms/input-readonly-copy.component.ts b/client/src/app/shared/forms/input-readonly-copy.component.ts new file mode 100644 index 000000000..7528fb7a1 --- /dev/null +++ b/client/src/app/shared/forms/input-readonly-copy.component.ts | |||
@@ -0,0 +1,21 @@ | |||
1 | import { Component, Input } from '@angular/core' | ||
2 | import { Notifier } from '@app/core' | ||
3 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
4 | |||
5 | @Component({ | ||
6 | selector: 'my-input-readonly-copy', | ||
7 | templateUrl: './input-readonly-copy.component.html', | ||
8 | styleUrls: [ './input-readonly-copy.component.scss' ] | ||
9 | }) | ||
10 | export class InputReadonlyCopyComponent { | ||
11 | @Input() value = '' | ||
12 | |||
13 | constructor ( | ||
14 | private notifier: Notifier, | ||
15 | private i18n: I18n | ||
16 | ) { } | ||
17 | |||
18 | activateCopiedMessage () { | ||
19 | this.notifier.success(this.i18n('Copied')) | ||
20 | } | ||
21 | } | ||