From 4cf824caca1da102f1da29602011b4cc6f480039 Mon Sep 17 00:00:00 2001 From: Nicolas Constant Date: Mon, 5 Aug 2019 18:42:06 -0400 Subject: [PATCH] added moved information in profile --- .../user-profile/user-profile.component.html | 27 ++++++++++--------- .../user-profile/user-profile.component.scss | 27 +++++++++++++++++++ .../user-profile/user-profile.component.ts | 3 ++- .../services/models/mastodon.interfaces.ts | 2 +- 4 files changed, 44 insertions(+), 15 deletions(-) diff --git a/src/app/components/stream/user-profile/user-profile.component.html b/src/app/components/stream/user-profile/user-profile.component.html index 09e4a138..4083c9fa 100644 --- a/src/app/components/stream/user-profile/user-profile.component.html +++ b/src/app/components/stream/user-profile/user-profile.component.html @@ -1,18 +1,22 @@
+
+ {{displayedAccount | accountEmoji }} has moved to @{{displayedAccount.moved.acct }} +
- header + header

@{{displayedAccount.acct}}

- +
- +
- +
diff --git a/src/app/components/stream/user-profile/user-profile.component.scss b/src/app/components/stream/user-profile/user-profile.component.scss index 95db8ce5..c52e1fd7 100644 --- a/src/app/components/stream/user-profile/user-profile.component.scss +++ b/src/app/components/stream/user-profile/user-profile.component.scss @@ -8,6 +8,33 @@ $header-height: 160px; // overflow: auto; height: calc(100%); overflow: auto; + + &__moved { + padding: 5px; + text-align: center; + + &--link { + transition: .2s; + color: white; + display: inline-block; + max-width: calc(100%); + text-overflow: ellipsis; + overflow: hidden; + + &:hover { + color: rgb(255, 190, 71); + } + } + } + + &__disabled { + filter: gray; + -webkit-filter: grayscale(100%); + -moz-filter: grayscale(100%); + -ms-filter: grayscale(100%); + -o-filter: grayscale(100%); + } + &-header { background-size: cover; position: relative; // height: 140px; diff --git a/src/app/components/stream/user-profile/user-profile.component.ts b/src/app/components/stream/user-profile/user-profile.component.ts index 078351db..29aeb69f 100644 --- a/src/app/components/stream/user-profile/user-profile.component.ts +++ b/src/app/components/stream/user-profile/user-profile.component.ts @@ -196,8 +196,9 @@ export class UserProfileComponent implements OnInit { this.load(this.lastAccountName); } - browseAccount(accountName: string): void { + browseAccount(accountName: string): boolean { this.browseAccountEvent.next(accountName); + return false; } browseHashtag(hashtag: string): void { diff --git a/src/app/services/models/mastodon.interfaces.ts b/src/app/services/models/mastodon.interfaces.ts index 41dbe107..48e4cb3b 100644 --- a/src/app/services/models/mastodon.interfaces.ts +++ b/src/app/services/models/mastodon.interfaces.ts @@ -38,7 +38,7 @@ export interface Account { header: string; header_static: string; emojis: Emoji[]; - moved: boolean; + moved: Account; fields: Field[]; bot: boolean; source: AccountInfo;