From 1f01f6c60d20fcc913894819680f7aea7cd026db Mon Sep 17 00:00:00 2001 From: silverpill Date: Sat, 15 Jan 2022 00:46:19 +0000 Subject: [PATCH] Add link to remote profile to profile menu --- src/api/users.ts | 1 + src/assets/feather/more-vertical.svg | 1 + src/views/Profile.vue | 55 ++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 src/assets/feather/more-vertical.svg diff --git a/src/api/users.ts b/src/api/users.ts index 5f99df7..5b900e9 100644 --- a/src/api/users.ts +++ b/src/api/users.ts @@ -15,6 +15,7 @@ export interface Profile { id: string; username: string; acct: string; + url: string; display_name: string | null; note: string | null; avatar: string | null; diff --git a/src/assets/feather/more-vertical.svg b/src/assets/feather/more-vertical.svg new file mode 100644 index 0000000..1f2907e --- /dev/null +++ b/src/assets/feather/more-vertical.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/Profile.vue b/src/views/Profile.vue index 3d88eae..fa511f7 100644 --- a/src/views/Profile.vue +++ b/src/views/Profile.vue @@ -18,6 +18,29 @@ +
@@ -108,6 +131,9 @@ export default class ProfileView extends Vue { profile: Profile | null = null relationship: Relationship | null = null + + profileMenuVisible = false + tabName = "posts" posts: Post[] = [] followList: Profile[] = [] @@ -197,6 +223,21 @@ export default class ProfileView extends Vue { ) } + toggleProfileMenu() { + this.profileMenuVisible = !this.profileMenuVisible + } + + hideProfileMenu() { + this.profileMenuVisible = false + } + + isLocalUser(): boolean { + if (!this.profile) { + return false + } + return this.profile.username === this.profile.acct + } + async loadNextPage(maxId: string) { if (!this.profile) { return @@ -237,6 +278,7 @@ $avatar-size: 170px; .profile-info { @include block-btn; + align-items: flex-start; display: flex; flex-direction: row; flex-wrap: wrap; @@ -266,6 +308,13 @@ $avatar-size: 170px; user-select: all; } } + + .buttons { + display: flex; + flex-grow: 1; + gap: $block-inner-padding; + justify-content: right; + } } .bio { @@ -324,6 +373,12 @@ $avatar-size: 170px; } } +.dropdown-menu-wrapper { + @include post-dropdown-menu; + + align-self: center; +} + .profile { margin-bottom: $block-outer-padding; }