Commit 96124aaf authored by Eliot Berriot's avatar Eliot Berriot 💬

See #161: fixed weird extraction issues

parent 6afb0e5e
......@@ -180,12 +180,13 @@ export default {
return
}
let self = this
let msg = this.$gettext('Queue shuffled!')
this.isShuffling = true
setTimeout(() => {
self.$store.dispatch('queue/shuffle', () => {
self.isShuffling = false
self.$store.commit('ui/addMessage', {
content: self.$gettext('Queue shuffled!'),
content: msg,
date: new Date()
})
})
......
......@@ -156,10 +156,11 @@ export default {
}
},
actions () {
let msg = this.$gettext('Import')
return [
{
name: 'import',
label: this.$gettext('Import'),
label: msg,
filterCheckable: (obj) => { return obj.status === 'not_imported' }
}
]
......
......@@ -181,10 +181,11 @@ export default {
}
},
actions () {
let msg = this.$gettext('Delete')
return [
{
name: 'delete',
label: this.$gettext('Delete'),
label: msg,
isDangerous: true
}
]
......
......@@ -186,21 +186,25 @@ export default {
}
},
actions () {
// somehow, extraction fails otherwise
let deleteLabel = this.$gettext('Delete')
let markImportedLabel = this.$gettext('Mark as imported')
let markClosedLabel = this.$gettext('Mark as closed')
return [
{
name: 'delete',
label: this.$gettext('Delete'),
label: deleteLabel,
isDangerous: true
},
{
name: 'mark_imported',
label: this.$gettext('Mark as imported'),
label: markImportedLabel,
filterCheckable: (obj) => { return ['pending', 'accepted'].indexOf(obj.status) > -1 },
isDangerous: true
},
{
name: 'mark_closed',
label: this.$gettext('Mark as closed'),
label: markClosedLabel,
filterCheckable: (obj) => { return ['pending', 'accepted'].indexOf(obj.status) > -1 },
isDangerous: true
}
......
......@@ -158,10 +158,11 @@ export default {
}
},
actions () {
let deleteLabel = this.$gettext('Delete')
return [
{
name: 'delete',
label: this.$gettext('Delete'),
label: deleteLabel,
filterCheckable: (obj) => {
return obj.users.length === 0 && moment().isBefore(obj.expiration_date)
}
......
......@@ -71,9 +71,18 @@ export default {
},
computed: {
groups () {
// somehow, extraction fails if in the return block directly
let instanceLabel = this.$gettext('Instance information')
let usersLabel = this.$gettext('Users')
let importsLabel = this.$gettext('Imports')
let playlistsLabel = this.$gettext('Playlists')
let federationLabel = this.$gettext('Federation')
let subsonicLabel = this.$gettext('Subsonic')
let statisticsLabel = this.$gettext('Statistics')
let errorLabel = this.$gettext('Error reporting')
return [
{
label: this.$gettext('Instance information'),
label: instanceLabel,
id: 'instance',
settings: [
'instance__name',
......@@ -82,7 +91,7 @@ export default {
]
},
{
label: this.$gettext('Users'),
label: usersLabel,
id: 'users',
settings: [
'users__registration_enabled',
......@@ -91,21 +100,21 @@ export default {
]
},
{
label: this.$gettext('Imports'),
label: importsLabel,
id: 'imports',
settings: [
'providers_youtube__api_key'
]
},
{
label: this.$gettext('Playlists'),
label: playlistsLabel,
id: 'playlists',
settings: [
'playlists__max_tracks'
]
},
{
label: this.$gettext('Federation'),
label: federationLabel,
id: 'federation',
settings: [
'federation__enabled',
......@@ -116,14 +125,14 @@ export default {
]
},
{
label: this.$gettext('Subsonic'),
label: subsonicLabel,
id: 'subsonic',
settings: [
'subsonic__enabled'
]
},
{
label: this.$gettext('Statistics'),
label: statisticsLabel,
id: 'statistics',
settings: [
'instance__nodeinfo_enabled',
......@@ -132,7 +141,7 @@ export default {
]
},
{
label: this.$gettext('Error reporting'),
label: errorLabel,
id: 'reporting',
settings: [
'raven__front_enabled',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment