Skip to content
Snippets Groups Projects
Commit fb495ee8 authored by Jo Vuit's avatar Jo Vuit
Browse files

Now distinguishes whether the Follow request has been accepted yet or not, and...

Now distinguishes whether the Follow request has been accepted yet or not, and adapts the message displayed in the NotificationData.
parent fda6b60c
Branches
Tags
No related merge requests found
......@@ -38,9 +38,11 @@ export default {
labels () {
let libraryFollowMessage = this.$gettext('%{ username } followed your 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 {
libraryFollowMessage,
libraryAcceptFollowMessage,
libraryPendingFollowMessage,
markRead: this.$gettext('Mark as read'),
markUnread: this.$gettext('Mark as unread'),
......@@ -55,19 +57,23 @@ export default {
if (a.type === 'Follow') {
if (a.object && a.object.type === 'music.Library') {
let action = null
let message = null
if (!a.related_object.approved) {
message = this.labels.libraryPendingFollowMessage
action = {
buttonClass: 'green',
icon: 'check',
label: this.$gettext('Approve'),
handler: () => { self.approveLibraryFollow(a.related_object) }
}
}
} else {
message = this.labels.libraryFollowMessage
}
return {
action,
detailUrl: {name: 'content.libraries.detail', params: {id: a.object.uuid}},
message: this.$gettextInterpolate(
this.labels.libraryFollowMessage,
message,
{username: this.username, library: a.object.name}
)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment