mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-03 22:59:15 +02:00
[EPIC] Audio metadata update - UI / API
This commit is contained in:
parent
1a1c62ab37
commit
e0c5ffcb16
59 changed files with 2793 additions and 436 deletions
|
@ -92,6 +92,16 @@ export default {
|
|||
id: 'sidebarCount',
|
||||
handler: this.incrementNotificationCountInSidebar
|
||||
})
|
||||
this.$store.commit('ui/addWebsocketEventHandler', {
|
||||
eventName: 'mutation.created',
|
||||
id: 'sidebarReviewEditCount',
|
||||
handler: this.incrementReviewEditCountInSidebar
|
||||
})
|
||||
this.$store.commit('ui/addWebsocketEventHandler', {
|
||||
eventName: 'mutation.updated',
|
||||
id: 'sidebarReviewEditCount',
|
||||
handler: this.incrementReviewEditCountInSidebar
|
||||
})
|
||||
},
|
||||
mounted () {
|
||||
let self = this
|
||||
|
@ -110,12 +120,23 @@ export default {
|
|||
eventName: 'inbox.item_added',
|
||||
id: 'sidebarCount',
|
||||
})
|
||||
this.$store.commit('ui/removeWebsocketEventHandler', {
|
||||
eventName: 'mutation.created',
|
||||
id: 'sidebarReviewEditCount',
|
||||
})
|
||||
this.$store.commit('ui/removeWebsocketEventHandler', {
|
||||
eventName: 'mutation.updated',
|
||||
id: 'sidebarReviewEditCount',
|
||||
})
|
||||
this.disconnect()
|
||||
},
|
||||
methods: {
|
||||
incrementNotificationCountInSidebar (event) {
|
||||
this.$store.commit('ui/incrementNotifications', {type: 'inbox', count: 1})
|
||||
},
|
||||
incrementReviewEditCountInSidebar (event) {
|
||||
this.$store.commit('ui/incrementNotifications', {type: 'pendingReviewEdits', value: event.pending_review_count})
|
||||
},
|
||||
fetchNodeInfo () {
|
||||
let self = this
|
||||
axios.get('instance/nodeinfo/2.0/').then(response => {
|
||||
|
@ -179,7 +200,6 @@ export default {
|
|||
}),
|
||||
suggestedInstances () {
|
||||
let instances = this.$store.state.instance.knownInstances.slice(0)
|
||||
console.log('instance', instances)
|
||||
if (this.$store.state.instance.frontSettings.defaultServerUrl) {
|
||||
let serverUrl = this.$store.state.instance.frontSettings.defaultServerUrl
|
||||
if (!serverUrl.endsWith('/')) {
|
||||
|
@ -188,7 +208,6 @@ export default {
|
|||
instances.push(serverUrl)
|
||||
}
|
||||
instances.push(this.$store.getters['instance/defaultUrl'](), 'https://demo.funkwhale.audio/')
|
||||
console.log('HELLO', instances)
|
||||
return _.uniq(instances.filter((e) => {return e}))
|
||||
},
|
||||
version () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue