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, diff --git a/client/src/app/videos/+video-watch/modal/video-share.component.html b/client/src/app/videos/+video-watch/modal/video-share.component.html index e0be9f265..549a9f30e 100644 --- a/client/src/app/videos/+video-watch/modal/video-share.component.html +++ b/client/src/app/videos/+video-watch/modal/video-share.component.html @@ -4,167 +4,176 @@ +