Merge branch 'notifmessagepending' into 'develop'
Make distinction between pending and approved follow request in the notification area Closes #675 See merge request funkwhale/funkwhale!558
This commit is contained in:
commit
fa1430d350
|
@ -38,9 +38,11 @@ export default {
|
||||||
labels () {
|
labels () {
|
||||||
let libraryFollowMessage = this.$gettext('%{ username } followed your library "%{ library }"')
|
let libraryFollowMessage = this.$gettext('%{ username } followed your library "%{ library }"')
|
||||||
let libraryAcceptFollowMessage = this.$gettext('%{ username } accepted your follow on library "%{ library }"')
|
let libraryAcceptFollowMessage = this.$gettext('%{ username } accepted your follow on library "%{ library }"')
|
||||||
|
let libraryPendingFollowMessage = this.$gettext('%{ username } wants to follow your library "%{ library }"')
|
||||||
return {
|
return {
|
||||||
libraryFollowMessage,
|
libraryFollowMessage,
|
||||||
libraryAcceptFollowMessage,
|
libraryAcceptFollowMessage,
|
||||||
|
libraryPendingFollowMessage,
|
||||||
markRead: this.$gettext('Mark as read'),
|
markRead: this.$gettext('Mark as read'),
|
||||||
markUnread: this.$gettext('Mark as unread'),
|
markUnread: this.$gettext('Mark as unread'),
|
||||||
|
|
||||||
|
@ -55,19 +57,23 @@ export default {
|
||||||
if (a.type === 'Follow') {
|
if (a.type === 'Follow') {
|
||||||
if (a.object && a.object.type === 'music.Library') {
|
if (a.object && a.object.type === 'music.Library') {
|
||||||
let action = null
|
let action = null
|
||||||
|
let message = null
|
||||||
if (!a.related_object.approved) {
|
if (!a.related_object.approved) {
|
||||||
|
message = this.labels.libraryPendingFollowMessage
|
||||||
action = {
|
action = {
|
||||||
buttonClass: 'green',
|
buttonClass: 'green',
|
||||||
icon: 'check',
|
icon: 'check',
|
||||||
label: this.$gettext('Approve'),
|
label: this.$gettext('Approve'),
|
||||||
handler: () => { self.approveLibraryFollow(a.related_object) }
|
handler: () => { self.approveLibraryFollow(a.related_object) }
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
|
message = this.labels.libraryFollowMessage
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
action,
|
action,
|
||||||
detailUrl: {name: 'content.libraries.detail', params: {id: a.object.uuid}},
|
detailUrl: {name: 'content.libraries.detail', params: {id: a.object.uuid}},
|
||||||
message: this.$gettextInterpolate(
|
message: this.$gettextInterpolate(
|
||||||
this.labels.libraryFollowMessage,
|
message,
|
||||||
{username: this.username, library: a.object.name}
|
{username: this.username, library: a.object.name}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue