From e379f813d45c4a83442aa13268d351e2605a7a01 Mon Sep 17 00:00:00 2001 From: Nassim Bounouas Date: Wed, 19 Jun 2019 14:57:39 +0200 Subject: Feature/completeUsernameCopy (#1913) * #1843 Copy icon added to account page to copy Username * #1843 Store an account name with the host forced and bind it to copy button * #1843 tslint correction * #1843 copy to clipboard replaced by ngx-clipboard --- client/src/app/shared/actor/actor.model.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client/src/app/shared/actor') diff --git a/client/src/app/shared/actor/actor.model.ts b/client/src/app/shared/actor/actor.model.ts index 5a517c975..285f71ce0 100644 --- a/client/src/app/shared/actor/actor.model.ts +++ b/client/src/app/shared/actor/actor.model.ts @@ -23,11 +23,11 @@ export abstract class Actor implements ActorServer { return window.location.origin + '/client/assets/images/default-avatar.png' } - static CREATE_BY_STRING (accountName: string, host: string) { + static CREATE_BY_STRING (accountName: string, host: string, forceHostname = false) { const absoluteAPIUrl = getAbsoluteAPIUrl() const thisHost = new URL(absoluteAPIUrl).host - if (host.trim() === thisHost) return accountName + if (host.trim() === thisHost && !forceHostname) return accountName return accountName + '@' + host } -- cgit v1.2.3