diff options
Diffstat (limited to 'client/src/app/+about/about-instance/about-instance.component.ts')
-rw-r--r-- | client/src/app/+about/about-instance/about-instance.component.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/client/src/app/+about/about-instance/about-instance.component.ts b/client/src/app/+about/about-instance/about-instance.component.ts index bd587fa26..e74b5daeb 100644 --- a/client/src/app/+about/about-instance/about-instance.component.ts +++ b/client/src/app/+about/about-instance/about-instance.component.ts | |||
@@ -2,7 +2,8 @@ import { ViewportScroller } from '@angular/common' | |||
2 | import { AfterViewChecked, Component, OnInit, ViewChild } from '@angular/core' | 2 | import { AfterViewChecked, Component, OnInit, ViewChild } from '@angular/core' |
3 | import { ActivatedRoute } from '@angular/router' | 3 | import { ActivatedRoute } from '@angular/router' |
4 | import { ContactAdminModalComponent } from '@app/+about/about-instance/contact-admin-modal.component' | 4 | import { ContactAdminModalComponent } from '@app/+about/about-instance/contact-admin-modal.component' |
5 | import { ServerService } from '@app/core' | 5 | import { Notifier } from '@app/core' |
6 | import { copyToClipboard } from '../../../assets/player/utils' | ||
6 | import { InstanceService } from '@app/shared/shared-instance' | 7 | import { InstanceService } from '@app/shared/shared-instance' |
7 | import { ServerConfig } from '@shared/models' | 8 | import { ServerConfig } from '@shared/models' |
8 | import { ResolverData } from './about-instance.resolver' | 9 | import { ResolverData } from './about-instance.resolver' |
@@ -42,6 +43,7 @@ export class AboutInstanceComponent implements OnInit, AfterViewChecked { | |||
42 | constructor ( | 43 | constructor ( |
43 | private viewportScroller: ViewportScroller, | 44 | private viewportScroller: ViewportScroller, |
44 | private route: ActivatedRoute, | 45 | private route: ActivatedRoute, |
46 | private notifier: Notifier, | ||
45 | private instanceService: InstanceService | 47 | private instanceService: InstanceService |
46 | ) {} | 48 | ) {} |
47 | 49 | ||
@@ -87,4 +89,10 @@ export class AboutInstanceComponent implements OnInit, AfterViewChecked { | |||
87 | openContactModal () { | 89 | openContactModal () { |
88 | return this.contactAdminModal.show() | 90 | return this.contactAdminModal.show() |
89 | } | 91 | } |
92 | |||
93 | onClickCopyLink (anchor: HTMLAnchorElement) { | ||
94 | const link = anchor.href | ||
95 | copyToClipboard(link) | ||
96 | this.notifier.success(link, $localize `Link copied`) | ||
97 | } | ||
90 | } | 98 | } |