import { Subscription } from 'rxjs'
import { AuthService, Notifier, RedirectService } from '@app/core'
import { User, UserRight } from '../../../../shared'
+import { I18n } from '@ngx-translate/i18n-polyfill'
@Component({
templateUrl: './accounts.component.html',
private notifier: Notifier,
private restExtractor: RestExtractor,
private redirectService: RedirectService,
- private authService: AuthService
+ private authService: AuthService,
+ private i18n: I18n
) {}
ngOnInit () {
this.redirectService.redirectToHomepage()
}
+ activateCopiedMessage () {
+ this.notifier.success(this.i18n('Username copied'))
+ }
+
private getUserIfNeeded (account: Account) {
if (!account.userId) return
if (!this.authService.isLoggedIn()) return