From 3a1fed11c52705002cbf2a17294509fb5a89237c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 5 Dec 2019 10:05:00 +0100 Subject: Support playlists in share modal --- .../shared/forms/input-readonly-copy.component.html | 9 +++++++++ .../shared/forms/input-readonly-copy.component.scss | 3 +++ .../shared/forms/input-readonly-copy.component.ts | 21 +++++++++++++++++++++ client/src/app/shared/shared.module.ts | 3 +++ 4 files changed, 36 insertions(+) create mode 100644 client/src/app/shared/forms/input-readonly-copy.component.html create mode 100644 client/src/app/shared/forms/input-readonly-copy.component.scss create mode 100644 client/src/app/shared/forms/input-readonly-copy.component.ts (limited to 'client/src/app/shared') 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 @@ +
+ + +
+ +
+
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 @@ +input.readonly { + font-size: 15px; +} 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 @@ +import { Component, Input } from '@angular/core' +import { Notifier } from '@app/core' +import { I18n } from '@ngx-translate/i18n-polyfill' + +@Component({ + selector: 'my-input-readonly-copy', + templateUrl: './input-readonly-copy.component.html', + styleUrls: [ './input-readonly-copy.component.scss' ] +}) +export class InputReadonlyCopyComponent { + @Input() value = '' + + constructor ( + private notifier: Notifier, + private i18n: I18n + ) { } + + activateCopiedMessage () { + this.notifier.success(this.i18n('Copied')) + } +} 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' import { FollowService } from '@app/shared/instance/follow.service' import { MultiSelectModule } from 'primeng/multiselect' import { FeatureBooleanComponent } from '@app/shared/instance/feature-boolean.component' +import { InputReadonlyCopyComponent } from '@app/shared/forms/input-readonly-copy.component' @NgModule({ imports: [ @@ -155,6 +156,7 @@ import { FeatureBooleanComponent } from '@app/shared/instance/feature-boolean.co ReactiveFileComponent, PeertubeCheckboxComponent, TimestampInputComponent, + InputReadonlyCopyComponent, SubscribeButtonComponent, RemoteSubscribeComponent, @@ -220,6 +222,7 @@ import { FeatureBooleanComponent } from '@app/shared/instance/feature-boolean.co InfiniteScrollerDirective, TextareaAutoResizeDirective, HelpComponent, + InputReadonlyCopyComponent, ReactiveFileComponent, PeertubeCheckboxComponent, -- cgit v1.2.3