diff options
Diffstat (limited to 'client/src/app/+accounts/accounts.component.ts')
-rw-r--r-- | client/src/app/+accounts/accounts.component.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/client/src/app/+accounts/accounts.component.ts b/client/src/app/+accounts/accounts.component.ts index d9786fb5c..3118d7562 100644 --- a/client/src/app/+accounts/accounts.component.ts +++ b/client/src/app/+accounts/accounts.component.ts | |||
@@ -7,6 +7,7 @@ import { catchError, distinctUntilChanged, map, switchMap, tap } from 'rxjs/oper | |||
7 | import { Subscription } from 'rxjs' | 7 | import { Subscription } from 'rxjs' |
8 | import { AuthService, Notifier, RedirectService } from '@app/core' | 8 | import { AuthService, Notifier, RedirectService } from '@app/core' |
9 | import { User, UserRight } from '../../../../shared' | 9 | import { User, UserRight } from '../../../../shared' |
10 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
10 | 11 | ||
11 | @Component({ | 12 | @Component({ |
12 | templateUrl: './accounts.component.html', | 13 | templateUrl: './accounts.component.html', |
@@ -25,7 +26,8 @@ export class AccountsComponent implements OnInit, OnDestroy { | |||
25 | private notifier: Notifier, | 26 | private notifier: Notifier, |
26 | private restExtractor: RestExtractor, | 27 | private restExtractor: RestExtractor, |
27 | private redirectService: RedirectService, | 28 | private redirectService: RedirectService, |
28 | private authService: AuthService | 29 | private authService: AuthService, |
30 | private i18n: I18n | ||
29 | ) {} | 31 | ) {} |
30 | 32 | ||
31 | ngOnInit () { | 33 | ngOnInit () { |
@@ -56,6 +58,10 @@ export class AccountsComponent implements OnInit, OnDestroy { | |||
56 | this.redirectService.redirectToHomepage() | 58 | this.redirectService.redirectToHomepage() |
57 | } | 59 | } |
58 | 60 | ||
61 | activateCopiedMessage () { | ||
62 | this.notifier.success(this.i18n('Username copied')) | ||
63 | } | ||
64 | |||
59 | private getUserIfNeeded (account: Account) { | 65 | private getUserIfNeeded (account: Account) { |
60 | if (!account.userId) return | 66 | if (!account.userId) return |
61 | if (!this.authService.isLoggedIn()) return | 67 | if (!this.authService.isLoggedIn()) return |