Skip to content

Commit

Permalink
fix(friends): add friend picture shrinking
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmcg authored and stavares843 committed Jun 29, 2022
1 parent 28cee7f commit 5ac1b1b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
4 changes: 2 additions & 2 deletions components/views/friends/friend/Friend.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<div class="friend" data-cy="friend">
<UiUserState v-if="showStatus" :user="friend" :src="src" />
<UiCircle
v-else
v-if="send"
:type="src ? 'image' : 'random'"
:seed="friend.address"
:source="src"
/>
<UiUserState v-else :user="friend" :src="src" />
<div class="description">
<TypographySubtitle :size="6" :text="friend.name" data-cy="friend-name" />
<TypographyText :text="friend.status" />
Expand Down
3 changes: 2 additions & 1 deletion components/views/friends/friend/Friend.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
}

.user-state,
.controls {
.controls,
.circle {
flex-shrink: 0;
}
.description {
Expand Down
7 changes: 0 additions & 7 deletions components/views/friends/friend/Friend.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ export default Vue.extend({
}
},
computed: {
...mapGetters('friends', ['friendExists']),
...mapState(['accounts']),
src(): string {
const hash =
Expand All @@ -69,12 +68,6 @@ export default Vue.extend({
contextMenuValues(): ContextMenuItem[] {
return [{ text: this.$t('context.remove'), func: this.removeFriend }]
},
showStatus(): boolean {
return (
this.friendExists(this.$props.friend.address) ||
this.$props.friend.address === this.accounts.active
)
},
},
beforeDestroy() {
this.$store.commit('ui/toggleContextMenu', false)
Expand Down

0 comments on commit 5ac1b1b

Please sign in to comment.