aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-12-05 10:05:00 +0100
committerChocobozzz <me@florianbigard.com>2019-12-05 10:05:00 +0100
commit3a1fed11c52705002cbf2a17294509fb5a89237c (patch)
tree9140310efbd9ba7f1b7254e3fd580e84322792a7 /client/src/app/shared
parent689a4f6946e47ddf4871fd43bbd1284a4dc79e68 (diff)
downloadPeerTube-3a1fed11c52705002cbf2a17294509fb5a89237c.tar.gz
PeerTube-3a1fed11c52705002cbf2a17294509fb5a89237c.tar.zst
PeerTube-3a1fed11c52705002cbf2a17294509fb5a89237c.zip
Support playlists in share modal
Diffstat (limited to 'client/src/app/shared')
-rw-r--r--client/src/app/shared/forms/input-readonly-copy.component.html9
-rw-r--r--client/src/app/shared/forms/input-readonly-copy.component.scss3
-rw-r--r--client/src/app/shared/forms/input-readonly-copy.component.ts21
-rw-r--r--client/src/app/shared/shared.module.ts3
4 files changed, 36 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 @@
1input.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 @@
1import { Component, Input } from '@angular/core'
2import { Notifier } from '@app/core'
3import { 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})
10export 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}
diff --git a/client/src/app/shared/shared.module.ts b/client/src/app/shared/shared.module.ts
index 8cbb15bfa..29ddf7b81 100644
--- a/client/src/app/shared/shared.module.ts
+++ b/client/src/app/shared/shared.module.ts
@@ -95,6 +95,7 @@ import { ClipboardModule } from 'ngx-clipboard'
95import { FollowService } from '@app/shared/instance/follow.service' 95import { FollowService } from '@app/shared/instance/follow.service'
96import { MultiSelectModule } from 'primeng/multiselect' 96import { MultiSelectModule } from 'primeng/multiselect'
97import { FeatureBooleanComponent } from '@app/shared/instance/feature-boolean.component' 97import { FeatureBooleanComponent } from '@app/shared/instance/feature-boolean.component'
98import { InputReadonlyCopyComponent } from '@app/shared/forms/input-readonly-copy.component'
98 99
99@NgModule({ 100@NgModule({
100 imports: [ 101 imports: [
@@ -155,6 +156,7 @@ import { FeatureBooleanComponent } from '@app/shared/instance/feature-boolean.co
155 ReactiveFileComponent, 156 ReactiveFileComponent,
156 PeertubeCheckboxComponent, 157 PeertubeCheckboxComponent,
157 TimestampInputComponent, 158 TimestampInputComponent,
159 InputReadonlyCopyComponent,
158 160
159 SubscribeButtonComponent, 161 SubscribeButtonComponent,
160 RemoteSubscribeComponent, 162 RemoteSubscribeComponent,
@@ -220,6 +222,7 @@ import { FeatureBooleanComponent } from '@app/shared/instance/feature-boolean.co
220 InfiniteScrollerDirective, 222 InfiniteScrollerDirective,
221 TextareaAutoResizeDirective, 223 TextareaAutoResizeDirective,
222 HelpComponent, 224 HelpComponent,
225 InputReadonlyCopyComponent,
223 226
224 ReactiveFileComponent, 227 ReactiveFileComponent,
225 PeertubeCheckboxComponent, 228 PeertubeCheckboxComponent,