Skip to content

Commit

Permalink
fix: Activity Reactions display issue on certain screen resolutions - M…
Browse files Browse the repository at this point in the history
…EED-7823 - Meeds-io/meeds#2593 (#4248)

This PR will fix the display of activity reaction in some screen
resolution
  • Loading branch information
AzmiTouil authored Dec 6, 2024
1 parent 9b7cba6 commit 5fa32fa
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export default {
return this.showAvatarAnimation;
},
isDesktop() {
return !this.$vuetify.breakpoint.mobile;
return this.$vuetify.breakpoint.width >= this.$vuetify.breakpoint.thresholds.lg;
}
},
methods: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ export default {
activity: this.activity,
activityTypeExtension: this.activityTypeExtension,
isActivityDetail: this.isActivityDetail,
isMobile: !this.isDesktop
};
},
actionBarBorderClass() {
return !this.isDesktop && 'border-top-color border-light-color' || '';
},
isDesktop() {
return this.$vuetify && this.$vuetify.breakpoint && this.$vuetify.breakpoint.name !== 'xs' && this.$vuetify.breakpoint.name !== 'sm' && this.$vuetify.breakpoint.name !== 'md';
return this.$vuetify.breakpoint.width >= this.$vuetify.breakpoint.thresholds.lg;
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default {
return this.isDesktop && 'border-top-color border-light-color' || '';
},
isDesktop() {
return this.$vuetify && this.$vuetify.breakpoint && this.$vuetify.breakpoint.name !== 'xs' && this.$vuetify.breakpoint.name !== 'sm' && this.$vuetify.breakpoint.name !== 'md';
return this.$vuetify.breakpoint.width >= this.$vuetify.breakpoint.thresholds.lg;
},
},
created() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ export default {
type: Object,
default: null,
},
isMobile: {
type: Boolean,
default: () => false
},
},
data: () => ({
hasCommented: false,
Expand All @@ -54,9 +58,6 @@ export default {
commentTextColorClass() {
return this.hasCommented && 'primary--text' || '';
},
isMobile() {
return this.$vuetify.breakpoint.name === 'sm' || this.$vuetify.breakpoint.name === 'xs';
},
},
watch: {
activity() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ export default {
type: Object,
default: null,
},
isMobile: {
type: Boolean,
default: () => false
},
},
data: () => ({
changingLike: false,
Expand All @@ -59,9 +63,6 @@ export default {
likeButtonTitle() {
return this.hasLiked && this.$t('UIActivity.msg.UnlikeActivity') || this.$t('UIActivity.msg.LikeActivity');
},
isMobile() {
return this.$vuetify.breakpoint.name === 'sm' || this.$vuetify.breakpoint.name === 'xs';
},
},
created() {
this.computeLikes();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ export default {
type: Object,
default: null,
},
isMobile: {
type: Boolean,
default: () => false
},
},
data: () => ({
hasShared: false,
Expand All @@ -68,9 +72,6 @@ export default {
shareIconColorClass() {
return this.hasShared && 'primary--text' || 'disabled--text';
},
isMobile() {
return this.$vuetify.breakpoint.name === 'sm' || this.$vuetify.breakpoint.name === 'xs';
},
},
created() {
this.$root.$on('activity-shared', this.setHasShared);
Expand Down

0 comments on commit 5fa32fa

Please sign in to comment.