add icon to allow expand collapsed (status-related) notifications
This commit is contained in:
parent
bcb24938aa
commit
efdcfedfbe
@ -20,7 +20,9 @@ import {
|
|||||||
faUserPlus,
|
faUserPlus,
|
||||||
faEyeSlash,
|
faEyeSlash,
|
||||||
faUser,
|
faUser,
|
||||||
faSuitcaseRolling
|
faSuitcaseRolling,
|
||||||
|
faExpandAlt,
|
||||||
|
faCompressAlt
|
||||||
} from '@fortawesome/free-solid-svg-icons'
|
} from '@fortawesome/free-solid-svg-icons'
|
||||||
|
|
||||||
library.add(
|
library.add(
|
||||||
@ -31,13 +33,15 @@ library.add(
|
|||||||
faUserPlus,
|
faUserPlus,
|
||||||
faUser,
|
faUser,
|
||||||
faEyeSlash,
|
faEyeSlash,
|
||||||
faSuitcaseRolling
|
faSuitcaseRolling,
|
||||||
|
faExpandAlt,
|
||||||
|
faCompressAlt
|
||||||
)
|
)
|
||||||
|
|
||||||
const Notification = {
|
const Notification = {
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
userExpanded: false,
|
statusExpanded: false,
|
||||||
betterShadow: this.$store.state.interface.browserSupport.cssFilter,
|
betterShadow: this.$store.state.interface.browserSupport.cssFilter,
|
||||||
unmuted: false
|
unmuted: false
|
||||||
}
|
}
|
||||||
@ -55,8 +59,9 @@ const Notification = {
|
|||||||
UserLink
|
UserLink
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toggleUserExpanded () {
|
toggleStatusExpanded () {
|
||||||
this.userExpanded = !this.userExpanded
|
console.log('as')
|
||||||
|
this.statusExpanded = !this.statusExpanded
|
||||||
},
|
},
|
||||||
generateUserProfileLink (user) {
|
generateUserProfileLink (user) {
|
||||||
return generateProfileLink(user.id, user.screen_name, this.$store.state.instance.restrictedNicknames)
|
return generateProfileLink(user.id, user.screen_name, this.$store.state.instance.restrictedNicknames)
|
||||||
|
@ -144,13 +144,23 @@
|
|||||||
<router-link
|
<router-link
|
||||||
v-if="notification.status"
|
v-if="notification.status"
|
||||||
:to="{ name: 'conversation', params: { id: notification.status.id } }"
|
:to="{ name: 'conversation', params: { id: notification.status.id } }"
|
||||||
class="faint-link"
|
class="timeago-link faint-link"
|
||||||
>
|
>
|
||||||
<Timeago
|
<Timeago
|
||||||
:time="notification.created_at"
|
:time="notification.created_at"
|
||||||
:auto-update="240"
|
:auto-update="240"
|
||||||
/>
|
/>
|
||||||
</router-link>
|
</router-link>
|
||||||
|
<button
|
||||||
|
class="button-unstyled expand-icon"
|
||||||
|
@click.prevent="toggleStatusExpanded"
|
||||||
|
>
|
||||||
|
<FAIcon
|
||||||
|
class="fa-scale-110"
|
||||||
|
fixed-width
|
||||||
|
:icon="statusExpanded ? 'compress-alt' : 'expand-alt'"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-else
|
v-else
|
||||||
@ -222,8 +232,8 @@
|
|||||||
/>
|
/>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<StatusContent
|
<StatusContent
|
||||||
class="faint"
|
:class="{ faint: !statusExpanded }"
|
||||||
:compact="true"
|
:compact="!statusExpanded"
|
||||||
:status="notification.action"
|
:status="notification.action"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
@ -112,6 +112,16 @@
|
|||||||
min-width: 3em;
|
min-width: 3em;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.timeago-link {
|
||||||
|
margin-right: 0.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.expand-icon {
|
||||||
|
.svg-inline--fa {
|
||||||
|
margin-left: 0.25em;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.emoji-reaction-emoji {
|
.emoji-reaction-emoji {
|
||||||
|
Loading…
Reference in New Issue
Block a user