#2279 -- Update a few missing translation locations.
This commit is contained in:
parent
a3bf234aa1
commit
fee43746e4
|
@ -7,9 +7,7 @@
|
|||
<h2 class="card-title" v-translate>Playlists</h2>
|
||||
</b-col>
|
||||
<b-col md="6" class="text-right text-muted">
|
||||
<translate :translate-params="{ tz: stationTimeZone }">
|
||||
This station's time zone is currently %{tz}.
|
||||
</translate>
|
||||
<translate :translate-params="{ tz: stationTimeZone }">This station's time zone is currently %{tz}.</translate>
|
||||
</b-col>
|
||||
</b-row>
|
||||
</b-card-header>
|
||||
|
@ -45,7 +43,7 @@
|
|||
<template v-for="format in ['pls', 'm3u']">
|
||||
<b-dropdown-item :href="row.item.links.export[format]" target="_blank">
|
||||
<translate :translate-params="{ format: format.toUpperCase() }">
|
||||
Export %{format}
|
||||
Export %{format}
|
||||
</translate>
|
||||
</b-dropdown-item>
|
||||
</template>
|
||||
|
@ -101,145 +99,145 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import DataTable from './components/DataTable'
|
||||
import Schedule from './station_playlists/PlaylistSchedule'
|
||||
import EditModal from './station_playlists/PlaylistEditModal'
|
||||
import ReorderModal from './station_playlists/PlaylistReorderModal'
|
||||
import axios from 'axios'
|
||||
import DataTable from './components/DataTable'
|
||||
import Schedule from './station_playlists/PlaylistSchedule'
|
||||
import EditModal from './station_playlists/PlaylistEditModal'
|
||||
import ReorderModal from './station_playlists/PlaylistReorderModal'
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
name: 'StationPlaylists',
|
||||
components: { ReorderModal, EditModal, Schedule, DataTable },
|
||||
props: {
|
||||
listUrl: String,
|
||||
scheduleUrl: String,
|
||||
locale: String,
|
||||
filesUrl: String,
|
||||
stationTimeZone: String
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
fields: [
|
||||
{ key: 'actions', label: this.$gettext('Actions'), sortable: false },
|
||||
{ key: 'name', label: this.$gettext('Playlist'), sortable: false },
|
||||
{ key: 'scheduling', label: this.$gettext('Scheduling'), sortable: false },
|
||||
{ key: 'num_songs', label: this.$gettext('# Songs'), sortable: false }
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
langAllPlaylistsTab () {
|
||||
return this.$gettext('All Playlists')
|
||||
},
|
||||
langScheduleViewTab () {
|
||||
return this.$gettext('Schedule View')
|
||||
},
|
||||
langMore () {
|
||||
return this.$gettext('More')
|
||||
},
|
||||
langReorderButton () {
|
||||
return this.$gettext('Reorder')
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
moment.relativeTimeThreshold('ss', 1)
|
||||
moment.relativeTimeRounding(function (value) {
|
||||
return Math.round(value * 10) / 10
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
langToggleButton (record) {
|
||||
return (record.is_enabled)
|
||||
? this.$gettext('Disable')
|
||||
: this.$gettext('Enable')
|
||||
},
|
||||
formatTime (time) {
|
||||
return moment(time).tz(this.stationTimeZone).format('LT')
|
||||
},
|
||||
formatLength (length) {
|
||||
return moment.duration(length, 'seconds').humanize()
|
||||
},
|
||||
formatType (record) {
|
||||
if (!record.is_enabled) {
|
||||
return this.$gettext('Disabled')
|
||||
}
|
||||
|
||||
switch (record.type) {
|
||||
case 'default':
|
||||
return this.$gettext('General Rotation') + '<br>' + this.$gettext('Weight') + ': ' + record.weight
|
||||
|
||||
case 'once_per_x_songs':
|
||||
let oncePerSongs = this.$gettext('Once per %{songs} Songs')
|
||||
return this.$gettextInterpolate(oncePerSongs, { songs: record.play_per_songs })
|
||||
|
||||
case 'once_per_x_minutes':
|
||||
let oncePerMinutes = this.$gettext('Once per %{minutes} Minutes')
|
||||
return this.$gettextInterpolate(oncePerMinutes, { minutes: record.play_per_minutes })
|
||||
|
||||
case 'once_per_hour':
|
||||
let oncePerHour = this.$gettext('Once per Hour (at %{minute})')
|
||||
return this.$gettextInterpolate(oncePerHour, { minute: record.play_per_hour_minute })
|
||||
|
||||
default:
|
||||
return this.$gettext('Custom')
|
||||
}
|
||||
},
|
||||
relist () {
|
||||
if (this.$refs.datatable) {
|
||||
this.$refs.datatable.refresh()
|
||||
}
|
||||
if (this.$refs.schedule) {
|
||||
this.$refs.schedule.refresh()
|
||||
}
|
||||
},
|
||||
doCreate () {
|
||||
this.$refs.editModal.create()
|
||||
},
|
||||
doEdit (url) {
|
||||
this.$refs.editModal.edit(url)
|
||||
},
|
||||
doReorder (url) {
|
||||
this.$refs.reorderModal.open(url)
|
||||
},
|
||||
doToggle (url) {
|
||||
notify('<b>' + this.$gettext('Applying changes...') + '</b>', 'warning', {
|
||||
delay: 3000
|
||||
})
|
||||
|
||||
axios.put(url).then((resp) => {
|
||||
notify('<b>' + resp.data.message + '</b>', 'success')
|
||||
|
||||
this.relist()
|
||||
}).catch((err) => {
|
||||
console.error(err)
|
||||
if (err.response.message) {
|
||||
notify('<b>' + err.response.message + '</b>', 'danger')
|
||||
}
|
||||
})
|
||||
},
|
||||
doDelete (url) {
|
||||
let buttonText = this.$gettext('Delete')
|
||||
let buttonConfirmText = this.$gettext('Delete playlist?')
|
||||
|
||||
swal({
|
||||
title: buttonConfirmText,
|
||||
buttons: [true, buttonText],
|
||||
dangerMode: true
|
||||
}).then((value) => {
|
||||
if (value) {
|
||||
axios.delete(url).then((resp) => {
|
||||
notify('<b>' + resp.data.message + '</b>', 'success')
|
||||
|
||||
this.relist()
|
||||
}).catch((err) => {
|
||||
console.error(err)
|
||||
if (err.response.message) {
|
||||
notify('<b>' + err.response.message + '</b>', 'danger')
|
||||
}
|
||||
export default {
|
||||
name: 'StationPlaylists',
|
||||
components: { ReorderModal, EditModal, Schedule, DataTable },
|
||||
props: {
|
||||
listUrl: String,
|
||||
scheduleUrl: String,
|
||||
locale: String,
|
||||
filesUrl: String,
|
||||
stationTimeZone: String
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
fields: [
|
||||
{ key: 'actions', label: this.$gettext('Actions'), sortable: false },
|
||||
{ key: 'name', label: this.$gettext('Playlist'), sortable: false },
|
||||
{ key: 'scheduling', label: this.$gettext('Scheduling'), sortable: false },
|
||||
{ key: 'num_songs', label: this.$gettext('# Songs'), sortable: false }
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
langAllPlaylistsTab () {
|
||||
return this.$gettext('All Playlists')
|
||||
},
|
||||
langScheduleViewTab () {
|
||||
return this.$gettext('Schedule View')
|
||||
},
|
||||
langMore () {
|
||||
return this.$gettext('More')
|
||||
},
|
||||
langReorderButton () {
|
||||
return this.$gettext('Reorder')
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
moment.relativeTimeThreshold('ss', 1)
|
||||
moment.relativeTimeRounding(function (value) {
|
||||
return Math.round(value * 10) / 10
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
langToggleButton (record) {
|
||||
return (record.is_enabled)
|
||||
? this.$gettext('Disable')
|
||||
: this.$gettext('Enable')
|
||||
},
|
||||
formatTime (time) {
|
||||
return moment(time).tz(this.stationTimeZone).format('LT')
|
||||
},
|
||||
formatLength (length) {
|
||||
return moment.duration(length, 'seconds').humanize()
|
||||
},
|
||||
formatType (record) {
|
||||
if (!record.is_enabled) {
|
||||
return this.$gettext('Disabled')
|
||||
}
|
||||
|
||||
switch (record.type) {
|
||||
case 'default':
|
||||
return this.$gettext('General Rotation') + '<br>' + this.$gettext('Weight') + ': ' + record.weight
|
||||
|
||||
case 'once_per_x_songs':
|
||||
let oncePerSongs = this.$gettext('Once per %{songs} Songs')
|
||||
return this.$gettextInterpolate(oncePerSongs, { songs: record.play_per_songs })
|
||||
|
||||
case 'once_per_x_minutes':
|
||||
let oncePerMinutes = this.$gettext('Once per %{minutes} Minutes')
|
||||
return this.$gettextInterpolate(oncePerMinutes, { minutes: record.play_per_minutes })
|
||||
|
||||
case 'once_per_hour':
|
||||
let oncePerHour = this.$gettext('Once per Hour (at %{minute})')
|
||||
return this.$gettextInterpolate(oncePerHour, { minute: record.play_per_hour_minute })
|
||||
|
||||
default:
|
||||
return this.$gettext('Custom')
|
||||
}
|
||||
},
|
||||
relist () {
|
||||
if (this.$refs.datatable) {
|
||||
this.$refs.datatable.refresh()
|
||||
}
|
||||
if (this.$refs.schedule) {
|
||||
this.$refs.schedule.refresh()
|
||||
}
|
||||
},
|
||||
doCreate () {
|
||||
this.$refs.editModal.create()
|
||||
},
|
||||
doEdit (url) {
|
||||
this.$refs.editModal.edit(url)
|
||||
},
|
||||
doReorder (url) {
|
||||
this.$refs.reorderModal.open(url)
|
||||
},
|
||||
doToggle (url) {
|
||||
notify('<b>' + this.$gettext('Applying changes...') + '</b>', 'warning', {
|
||||
delay: 3000
|
||||
})
|
||||
|
||||
axios.put(url).then((resp) => {
|
||||
notify('<b>' + resp.data.message + '</b>', 'success')
|
||||
|
||||
this.relist()
|
||||
}).catch((err) => {
|
||||
console.error(err)
|
||||
if (err.response.message) {
|
||||
notify('<b>' + err.response.message + '</b>', 'danger')
|
||||
}
|
||||
})
|
||||
},
|
||||
doDelete (url) {
|
||||
let buttonText = this.$gettext('Delete')
|
||||
let buttonConfirmText = this.$gettext('Delete playlist?')
|
||||
|
||||
swal({
|
||||
title: buttonConfirmText,
|
||||
buttons: [true, buttonText],
|
||||
dangerMode: true
|
||||
}).then((value) => {
|
||||
if (value) {
|
||||
axios.delete(url).then((resp) => {
|
||||
notify('<b>' + resp.data.message + '</b>', 'success')
|
||||
|
||||
this.relist()
|
||||
}).catch((err) => {
|
||||
console.error(err)
|
||||
if (err.response.message) {
|
||||
notify('<b>' + err.response.message + '</b>', 'danger')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -11,7 +11,7 @@
|
|||
<div class="input-group">
|
||||
<span class="icon glyphicon input-group-addon search"></span>
|
||||
<b-form-input debounce="200" v-model="filter" class="search-field form-control"
|
||||
placeholder="Search"></b-form-input>
|
||||
:placeholder="langSearch"></b-form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-shrink-1 pl-3 pr-3">
|
||||
|
@ -93,227 +93,230 @@
|
|||
</style>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
import store from 'store'
|
||||
import _ from 'lodash'
|
||||
import axios from 'axios'
|
||||
import store from 'store'
|
||||
import _ from 'lodash'
|
||||
|
||||
export default {
|
||||
name: 'DataTable',
|
||||
props: {
|
||||
id: String,
|
||||
apiUrl: String,
|
||||
paginated: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
showToolbar: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
defaultPerPage: {
|
||||
type: Number,
|
||||
default: 10
|
||||
},
|
||||
fields: Array,
|
||||
selectable: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
selectFields: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
requestConfig: Function,
|
||||
requestProcess: Function
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
selected: [],
|
||||
allSelected: false,
|
||||
storeKey: 'datatable_' + this.id + '_settings',
|
||||
filter: null,
|
||||
perPage: (this.paginated) ? this.defaultPerPage : 0,
|
||||
pageOptions: [10, 25, 50, 0],
|
||||
currentPage: 1,
|
||||
totalRows: 0,
|
||||
flushCache: false
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.loadStoredSettings()
|
||||
},
|
||||
computed: {
|
||||
langRefreshTooltip () {
|
||||
return this.$gettext('Refresh rows')
|
||||
},
|
||||
langPerPageTooltip () {
|
||||
return this.$gettext('Rows per page')
|
||||
},
|
||||
langSelectFieldsTooltip () {
|
||||
return this.$gettext('Select displayed fields')
|
||||
},
|
||||
langSelectAll () {
|
||||
return this.$gettext('Select all visible rows')
|
||||
},
|
||||
langSelectRow () {
|
||||
return this.$gettext('Select this row')
|
||||
},
|
||||
visibleFields () {
|
||||
let fields = this.fields.slice()
|
||||
export default {
|
||||
name: 'DataTable',
|
||||
props: {
|
||||
id: String,
|
||||
apiUrl: String,
|
||||
paginated: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
showToolbar: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
defaultPerPage: {
|
||||
type: Number,
|
||||
default: 10
|
||||
},
|
||||
fields: Array,
|
||||
selectable: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
selectFields: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
requestConfig: Function,
|
||||
requestProcess: Function
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
selected: [],
|
||||
allSelected: false,
|
||||
storeKey: 'datatable_' + this.id + '_settings',
|
||||
filter: null,
|
||||
perPage: (this.paginated) ? this.defaultPerPage : 0,
|
||||
pageOptions: [10, 25, 50, 0],
|
||||
currentPage: 1,
|
||||
totalRows: 0,
|
||||
flushCache: false
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.loadStoredSettings()
|
||||
},
|
||||
computed: {
|
||||
langRefreshTooltip () {
|
||||
return this.$gettext('Refresh rows')
|
||||
},
|
||||
langPerPageTooltip () {
|
||||
return this.$gettext('Rows per page')
|
||||
},
|
||||
langSelectFieldsTooltip () {
|
||||
return this.$gettext('Select displayed fields')
|
||||
},
|
||||
langSelectAll () {
|
||||
return this.$gettext('Select all visible rows')
|
||||
},
|
||||
langSelectRow () {
|
||||
return this.$gettext('Select this row')
|
||||
},
|
||||
langSearch () {
|
||||
return this.$gettext('Search')
|
||||
},
|
||||
visibleFields () {
|
||||
let fields = this.fields.slice()
|
||||
|
||||
if (this.selectable) {
|
||||
fields.unshift({ key: 'selected', label: '', sortable: false })
|
||||
if (this.selectable) {
|
||||
fields.unshift({ key: 'selected', label: '', sortable: false })
|
||||
}
|
||||
|
||||
if (!this.selectFields) {
|
||||
return fields
|
||||
}
|
||||
|
||||
return _.filter(fields, (field) => {
|
||||
let isSelectable = _.defaultTo(field.selectable, false)
|
||||
if (!isSelectable) {
|
||||
return true
|
||||
}
|
||||
|
||||
return _.defaultTo(field.visible, true)
|
||||
})
|
||||
},
|
||||
selectableFields () {
|
||||
return _.filter(this.fields.slice(), (field) => {
|
||||
return _.defaultTo(field.selectable, false)
|
||||
})
|
||||
},
|
||||
showPagination () {
|
||||
return this.paginated && this.perPage !== 0
|
||||
},
|
||||
perPageLabel () {
|
||||
return this.getPerPageLabel(this.perPage)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadStoredSettings () {
|
||||
if (store.enabled && store.get(this.storeKey) !== undefined) {
|
||||
let settings = store.get(this.storeKey)
|
||||
|
||||
this.perPage = _.defaultTo(settings.perPage, this.defaultPerPage)
|
||||
|
||||
_.forEach(this.selectableFields, (field) => {
|
||||
field.visible = _.includes(settings.visibleFields, field.key)
|
||||
})
|
||||
}
|
||||
},
|
||||
storeSettings () {
|
||||
if (!store.enabled) {
|
||||
return
|
||||
}
|
||||
|
||||
let settings = {
|
||||
'perPage': this.perPage,
|
||||
'visibleFields': _.map(this.visibleFields, 'key')
|
||||
}
|
||||
store.set(this.storeKey, settings)
|
||||
},
|
||||
getPerPageLabel (num) {
|
||||
return (num === 0) ? 'All' : num.toString()
|
||||
},
|
||||
setPerPage (num) {
|
||||
this.perPage = num
|
||||
this.storeSettings()
|
||||
},
|
||||
onClickRefresh (e) {
|
||||
if (e.shiftKey) {
|
||||
this.relist()
|
||||
} else {
|
||||
this.refresh()
|
||||
}
|
||||
},
|
||||
onRefreshed () {
|
||||
this.$emit('refreshed')
|
||||
},
|
||||
refresh () {
|
||||
this.$refs.table.refresh()
|
||||
},
|
||||
navigate () {
|
||||
this.filter = null
|
||||
this.currentPage = 1
|
||||
this.flushCache = true
|
||||
this.refresh()
|
||||
},
|
||||
relist () {
|
||||
this.filter = null
|
||||
this.flushCache = true
|
||||
this.refresh()
|
||||
},
|
||||
setFilter (newTerm) {
|
||||
this.currentPage = 1
|
||||
this.filter = newTerm
|
||||
},
|
||||
loadItems (ctx, callback) {
|
||||
let queryParams = {}
|
||||
|
||||
if (this.paginated) {
|
||||
queryParams.rowCount = ctx.perPage
|
||||
queryParams.current = ctx.currentPage
|
||||
}
|
||||
|
||||
if (this.flushCache) {
|
||||
queryParams.flushCache = true
|
||||
}
|
||||
|
||||
if (typeof ctx.filter === 'string') {
|
||||
queryParams.searchPhrase = ctx.filter
|
||||
}
|
||||
|
||||
if ('' !== ctx.sortBy) {
|
||||
queryParams.sort = ctx.sortBy
|
||||
queryParams.sortOrder = (ctx.sortDesc) ? 'DESC' : 'ASC'
|
||||
}
|
||||
|
||||
let requestConfig = { params: queryParams }
|
||||
if (typeof this.requestConfig === 'function') {
|
||||
requestConfig = this.requestConfig(requestConfig)
|
||||
}
|
||||
|
||||
axios.get(ctx.apiUrl, requestConfig).then((resp) => {
|
||||
this.flushCache = false
|
||||
this.totalRows = resp.data.total
|
||||
|
||||
let rows = resp.data.rows
|
||||
if (typeof this.requestProcess === 'function') {
|
||||
rows = this.requestProcess(rows)
|
||||
}
|
||||
|
||||
callback(rows)
|
||||
}).catch((err) => {
|
||||
this.flushCache = false
|
||||
this.totalRows = 0
|
||||
|
||||
console.error(err.data.message)
|
||||
callback([])
|
||||
})
|
||||
},
|
||||
onRowSelected (items) {
|
||||
if (this.perPage === 0) {
|
||||
this.allSelected = items.length === this.totalRows
|
||||
} else {
|
||||
this.allSelected = items.length === this.perPage
|
||||
}
|
||||
|
||||
this.selected = items
|
||||
this.$emit('row-selected', items)
|
||||
},
|
||||
toggleSelected () {
|
||||
if (this.allSelected) {
|
||||
this.$refs.table.clearSelected()
|
||||
this.allSelected = false
|
||||
} else {
|
||||
this.$refs.table.selectAllRows()
|
||||
this.allSelected = true
|
||||
}
|
||||
},
|
||||
onFiltered (filter) {
|
||||
this.$emit('filtered', filter)
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.selectFields) {
|
||||
return fields
|
||||
}
|
||||
|
||||
return _.filter(fields, (field) => {
|
||||
let isSelectable = _.defaultTo(field.selectable, false)
|
||||
if (!isSelectable) {
|
||||
return true
|
||||
}
|
||||
|
||||
return _.defaultTo(field.visible, true)
|
||||
})
|
||||
},
|
||||
selectableFields () {
|
||||
return _.filter(this.fields.slice(), (field) => {
|
||||
return _.defaultTo(field.selectable, false)
|
||||
})
|
||||
},
|
||||
showPagination () {
|
||||
return this.paginated && this.perPage !== 0
|
||||
},
|
||||
perPageLabel () {
|
||||
return this.getPerPageLabel(this.perPage)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadStoredSettings () {
|
||||
if (store.enabled && store.get(this.storeKey) !== undefined) {
|
||||
let settings = store.get(this.storeKey)
|
||||
|
||||
this.perPage = _.defaultTo(settings.perPage, this.defaultPerPage)
|
||||
|
||||
_.forEach(this.selectableFields, (field) => {
|
||||
field.visible = _.includes(settings.visibleFields, field.key)
|
||||
})
|
||||
}
|
||||
},
|
||||
storeSettings () {
|
||||
if (!store.enabled) {
|
||||
return
|
||||
}
|
||||
|
||||
let settings = {
|
||||
'perPage': this.perPage,
|
||||
'visibleFields': _.map(this.visibleFields, 'key')
|
||||
}
|
||||
store.set(this.storeKey, settings)
|
||||
},
|
||||
getPerPageLabel (num) {
|
||||
return (num === 0) ? 'All' : num.toString()
|
||||
},
|
||||
setPerPage (num) {
|
||||
this.perPage = num
|
||||
this.storeSettings()
|
||||
},
|
||||
onClickRefresh (e) {
|
||||
if (e.shiftKey) {
|
||||
this.relist()
|
||||
} else {
|
||||
this.refresh()
|
||||
}
|
||||
},
|
||||
onRefreshed () {
|
||||
this.$emit('refreshed')
|
||||
},
|
||||
refresh () {
|
||||
this.$refs.table.refresh()
|
||||
},
|
||||
navigate () {
|
||||
this.filter = null
|
||||
this.currentPage = 1
|
||||
this.flushCache = true
|
||||
this.refresh()
|
||||
},
|
||||
relist () {
|
||||
this.filter = null
|
||||
this.flushCache = true
|
||||
this.refresh()
|
||||
},
|
||||
setFilter (newTerm) {
|
||||
this.currentPage = 1
|
||||
this.filter = newTerm
|
||||
},
|
||||
loadItems (ctx, callback) {
|
||||
let queryParams = {}
|
||||
|
||||
if (this.paginated) {
|
||||
queryParams.rowCount = ctx.perPage
|
||||
queryParams.current = ctx.currentPage
|
||||
}
|
||||
|
||||
if (this.flushCache) {
|
||||
queryParams.flushCache = true
|
||||
}
|
||||
|
||||
if (typeof ctx.filter === 'string') {
|
||||
queryParams.searchPhrase = ctx.filter
|
||||
}
|
||||
|
||||
if ('' !== ctx.sortBy) {
|
||||
queryParams.sort = ctx.sortBy
|
||||
queryParams.sortOrder = (ctx.sortDesc) ? 'DESC' : 'ASC'
|
||||
}
|
||||
|
||||
let requestConfig = { params: queryParams }
|
||||
if (typeof this.requestConfig === 'function') {
|
||||
requestConfig = this.requestConfig(requestConfig)
|
||||
}
|
||||
|
||||
axios.get(ctx.apiUrl, requestConfig).then((resp) => {
|
||||
this.flushCache = false
|
||||
this.totalRows = resp.data.total
|
||||
|
||||
let rows = resp.data.rows
|
||||
if (typeof this.requestProcess === 'function') {
|
||||
rows = this.requestProcess(rows)
|
||||
}
|
||||
|
||||
callback(rows)
|
||||
}).catch((err) => {
|
||||
this.flushCache = false
|
||||
this.totalRows = 0
|
||||
|
||||
console.error(err.data.message)
|
||||
callback([])
|
||||
})
|
||||
},
|
||||
onRowSelected (items) {
|
||||
if (this.perPage === 0) {
|
||||
this.allSelected = items.length === this.totalRows
|
||||
} else {
|
||||
this.allSelected = items.length === this.perPage
|
||||
}
|
||||
|
||||
this.selected = items
|
||||
this.$emit('row-selected', items)
|
||||
},
|
||||
toggleSelected () {
|
||||
if (this.allSelected) {
|
||||
this.$refs.table.clearSelected()
|
||||
this.allSelected = false
|
||||
} else {
|
||||
this.$refs.table.selectAllRows()
|
||||
this.allSelected = true
|
||||
}
|
||||
},
|
||||
onFiltered (filter) {
|
||||
this.$emit('filtered', filter)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -5,7 +5,7 @@ msgstr ""
|
|||
"Generated-By: easygettext\n"
|
||||
"Project-Id-Version: \n"
|
||||
|
||||
#: ./vue/StationPlaylists.vue:126
|
||||
#: ./vue/StationPlaylists.vue:124
|
||||
msgid "# Songs"
|
||||
msgstr ""
|
||||
|
||||
|
@ -18,7 +18,7 @@ msgid "A playlist that instructs the station to play from a remote URL."
|
|||
msgstr ""
|
||||
|
||||
#: ./vue/StationMedia.vue:177
|
||||
#: ./vue/StationPlaylists.vue:123
|
||||
#: ./vue/StationPlaylists.vue:121
|
||||
#: ./vue/station_playlists/PlaylistReorderModal.vue:11
|
||||
msgid "Actions"
|
||||
msgstr ""
|
||||
|
@ -27,7 +27,7 @@ msgstr ""
|
|||
msgid "Add Files to Playlist"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/StationPlaylists.vue:20
|
||||
#: ./vue/StationPlaylists.vue:18
|
||||
#: ./vue/station_playlists/PlaylistEditModal.vue:52
|
||||
msgid "Add Playlist"
|
||||
msgstr ""
|
||||
|
@ -55,7 +55,7 @@ msgstr ""
|
|||
msgid "Album Art"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/StationPlaylists.vue:132
|
||||
#: ./vue/StationPlaylists.vue:130
|
||||
msgid "All Playlists"
|
||||
msgstr ""
|
||||
|
||||
|
@ -70,7 +70,7 @@ msgstr ""
|
|||
msgid "An error occurred and your request could not be completed."
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/StationPlaylists.vue:205
|
||||
#: ./vue/StationPlaylists.vue:203
|
||||
#: ./vue/station_media/MediaToolbar.vue:194
|
||||
msgid "Applying changes..."
|
||||
msgstr ""
|
||||
|
@ -81,7 +81,7 @@ msgstr ""
|
|||
msgid "Artist"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/StationPlaylists.vue:73
|
||||
#: ./vue/StationPlaylists.vue:71
|
||||
msgid "Auto-Assigned"
|
||||
msgstr ""
|
||||
|
||||
|
@ -130,13 +130,13 @@ msgstr ""
|
|||
msgid "Create Directory"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/webcaster/microphone.vue:17
|
||||
#: ./vue/webcaster/playlist.vue:23
|
||||
#: ./vue/webcaster/settings.vue:139
|
||||
#: ./vue/webcaster/microphone.vue:18
|
||||
#: ./vue/webcaster/playlist.vue:24
|
||||
#: ./vue/webcaster/settings.vue:141
|
||||
msgid "Cue"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/StationPlaylists.vue:184
|
||||
#: ./vue/StationPlaylists.vue:182
|
||||
msgid "Custom"
|
||||
msgstr ""
|
||||
|
||||
|
@ -168,8 +168,8 @@ msgstr ""
|
|||
msgid "Default"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/StationPlaylists.vue:33
|
||||
#: ./vue/StationPlaylists.vue:221
|
||||
#: ./vue/StationPlaylists.vue:31
|
||||
#: ./vue/StationPlaylists.vue:219
|
||||
#: ./vue/station_media/MediaToolbar.vue:53
|
||||
#: ./vue/station_media/MediaToolbar.vue:114
|
||||
msgid "Delete"
|
||||
|
@ -183,7 +183,7 @@ msgstr ""
|
|||
msgid "Delete Album Art"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/StationPlaylists.vue:222
|
||||
#: ./vue/StationPlaylists.vue:220
|
||||
msgid "Delete playlist?"
|
||||
msgstr ""
|
||||
|
||||
|
@ -196,11 +196,11 @@ msgstr ""
|
|||
msgid "Directory Name"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/StationPlaylists.vue:153
|
||||
#: ./vue/StationPlaylists.vue:151
|
||||
msgid "Disable"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/StationPlaylists.vue:164
|
||||
#: ./vue/StationPlaylists.vue:162
|
||||
msgid "Disabled"
|
||||
msgstr ""
|
||||
|
||||
|
@ -217,7 +217,7 @@ msgid "Drag files here to upload to this folder or"
|
|||
msgstr ""
|
||||
|
||||
#: ./vue/StationMedia.vue:206
|
||||
#: ./vue/StationPlaylists.vue:30
|
||||
#: ./vue/StationPlaylists.vue:28
|
||||
msgid "Edit"
|
||||
msgstr ""
|
||||
|
||||
|
@ -229,7 +229,7 @@ msgstr ""
|
|||
msgid "Edit Playlist"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/StationPlaylists.vue:154
|
||||
#: ./vue/StationPlaylists.vue:152
|
||||
msgid "Enable"
|
||||
msgstr ""
|
||||
|
||||
|
@ -249,7 +249,7 @@ msgstr ""
|
|||
msgid "End Time"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/StationPlaylists.vue:46
|
||||
#: ./vue/StationPlaylists.vue:44
|
||||
msgid "Export %{format}"
|
||||
msgstr ""
|
||||
|
||||
|
@ -278,7 +278,7 @@ msgstr ""
|
|||
msgid "Full Volume"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/StationPlaylists.vue:169
|
||||
#: ./vue/StationPlaylists.vue:167
|
||||
#: ./vue/station_playlists/form/PlaylistFormBasicInfo.vue:42
|
||||
#: ./vue/station_playlists/form/PlaylistFormBasicInfo.vue:113
|
||||
msgid "General Rotation"
|
||||
|
@ -336,7 +336,7 @@ msgstr ""
|
|||
msgid "ISRC"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/StationPlaylists.vue:66
|
||||
#: ./vue/StationPlaylists.vue:64
|
||||
msgid "Jingle Mode"
|
||||
msgstr ""
|
||||
|
||||
|
@ -368,7 +368,7 @@ msgstr ""
|
|||
msgid "Merge playlist to play as a single track."
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/webcaster/settings.vue:15
|
||||
#: ./vue/webcaster/settings.vue:16
|
||||
msgid "Metadata"
|
||||
msgstr ""
|
||||
|
||||
|
@ -384,7 +384,7 @@ msgstr ""
|
|||
msgid "Minute of Hour to Play"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/webcaster/mixer.vue:3
|
||||
#: ./vue/webcaster/mixer.vue:4
|
||||
msgid "Mixer"
|
||||
msgstr ""
|
||||
|
||||
|
@ -396,7 +396,7 @@ msgstr ""
|
|||
msgid "Monday"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/StationPlaylists.vue:138
|
||||
#: ./vue/StationPlaylists.vue:136
|
||||
msgid "More"
|
||||
msgstr ""
|
||||
|
||||
|
@ -461,11 +461,11 @@ msgstr ""
|
|||
msgid "Number of Songs Between Plays"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/StationPlaylists.vue:176
|
||||
#: ./vue/StationPlaylists.vue:174
|
||||
msgid "Once per %{minutes} Minutes"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/StationPlaylists.vue:172
|
||||
#: ./vue/StationPlaylists.vue:170
|
||||
msgid "Once per %{songs} Songs"
|
||||
msgstr ""
|
||||
|
||||
|
@ -474,7 +474,7 @@ msgstr ""
|
|||
msgid "Once per Hour"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/StationPlaylists.vue:180
|
||||
#: ./vue/StationPlaylists.vue:178
|
||||
msgid "Once per Hour (at %{minute})"
|
||||
msgstr ""
|
||||
|
||||
|
@ -496,7 +496,7 @@ msgstr ""
|
|||
msgid "Only play one track at scheduled time."
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/webcaster/settings.vue:171
|
||||
#: ./vue/webcaster/settings.vue:172
|
||||
msgid "Password"
|
||||
msgstr ""
|
||||
|
||||
|
@ -525,15 +525,15 @@ msgstr ""
|
|||
msgid "Play/Pause"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/StationPlaylists.vue:124
|
||||
#: ./vue/StationPlaylists.vue:122
|
||||
msgid "Playlist"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/webcaster/playlist.vue:119
|
||||
#: ./vue/webcaster/playlist.vue:118
|
||||
msgid "Playlist 1"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/webcaster/playlist.vue:120
|
||||
#: ./vue/webcaster/playlist.vue:119
|
||||
msgid "Playlist 2"
|
||||
msgstr ""
|
||||
|
||||
|
@ -587,7 +587,7 @@ msgstr ""
|
|||
msgid "Remote Playback Buffer (Seconds)"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/StationPlaylists.vue:61
|
||||
#: ./vue/StationPlaylists.vue:59
|
||||
#: ./vue/station_playlists/form/PlaylistFormSource.vue:80
|
||||
msgid "Remote URL"
|
||||
msgstr ""
|
||||
|
@ -614,7 +614,7 @@ msgstr ""
|
|||
msgid "Rename File/Directory"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/StationPlaylists.vue:141
|
||||
#: ./vue/StationPlaylists.vue:139
|
||||
msgid "Reorder"
|
||||
msgstr ""
|
||||
|
||||
|
@ -656,7 +656,7 @@ msgstr ""
|
|||
msgid "Schedule"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/StationPlaylists.vue:135
|
||||
#: ./vue/StationPlaylists.vue:133
|
||||
msgid "Schedule View"
|
||||
msgstr ""
|
||||
|
||||
|
@ -668,10 +668,14 @@ msgstr ""
|
|||
msgid "Scheduled Time #%{num}"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/StationPlaylists.vue:125
|
||||
#: ./vue/StationPlaylists.vue:123
|
||||
msgid "Scheduling"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/components/DataTable.vue:162
|
||||
msgid "Search"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/station_media/form/MediaFormAdvancedSettings.vue:49
|
||||
msgid "Seconds from the start of the song that the AutoDJ should start playing."
|
||||
msgstr ""
|
||||
|
@ -696,7 +700,7 @@ msgstr ""
|
|||
msgid "Select this row"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/StationPlaylists.vue:70
|
||||
#: ./vue/StationPlaylists.vue:68
|
||||
msgid "Sequential"
|
||||
msgstr ""
|
||||
|
||||
|
@ -704,7 +708,7 @@ msgstr ""
|
|||
msgid "Set or clear playlists from the selected media"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/webcaster/settings.vue:10
|
||||
#: ./vue/webcaster/settings.vue:11
|
||||
msgid "Settings"
|
||||
msgstr ""
|
||||
|
||||
|
@ -736,7 +740,7 @@ msgstr ""
|
|||
msgid "Song Title"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/StationPlaylists.vue:58
|
||||
#: ./vue/StationPlaylists.vue:56
|
||||
msgid "Song-based"
|
||||
msgstr ""
|
||||
|
||||
|
@ -762,7 +766,7 @@ msgstr ""
|
|||
msgid "Start Date"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/webcaster/settings.vue:176
|
||||
#: ./vue/webcaster/settings.vue:177
|
||||
msgid "Start Streaming"
|
||||
msgstr ""
|
||||
|
||||
|
@ -774,7 +778,7 @@ msgstr ""
|
|||
msgid "Station Time Zone"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/webcaster/settings.vue:175
|
||||
#: ./vue/webcaster/settings.vue:176
|
||||
msgid "Stop Streaming"
|
||||
msgstr ""
|
||||
|
||||
|
@ -866,11 +870,11 @@ msgstr ""
|
|||
msgid "Tuesday"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/webcaster/playlist.vue:126
|
||||
#: ./vue/webcaster/playlist.vue:125
|
||||
msgid "Unknown Artist"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/webcaster/playlist.vue:123
|
||||
#: ./vue/webcaster/playlist.vue:122
|
||||
msgid "Unknown Title"
|
||||
msgstr ""
|
||||
|
||||
|
@ -878,15 +882,15 @@ msgstr ""
|
|||
msgid "Up"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/webcaster/settings.vue:122
|
||||
#: ./vue/webcaster/settings.vue:124
|
||||
msgid "Update Metadata"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/webcaster/settings.vue:100
|
||||
#: ./vue/webcaster/settings.vue:101
|
||||
msgid "Use Asynchronous Worker"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/webcaster/settings.vue:168
|
||||
#: ./vue/webcaster/settings.vue:169
|
||||
msgid "Username"
|
||||
msgstr ""
|
||||
|
||||
|
@ -907,6 +911,6 @@ msgstr ""
|
|||
msgid "Wednesday"
|
||||
msgstr ""
|
||||
|
||||
#: ./vue/StationPlaylists.vue:169
|
||||
#: ./vue/StationPlaylists.vue:167
|
||||
msgid "Weight"
|
||||
msgstr ""
|
||||
|
|
|
@ -48,8 +48,8 @@
|
|||
"dist/light.css": "dist/light-a0a23d9ad3.css",
|
||||
"dist/material.js": "dist/material-df68dbf23f.js",
|
||||
"dist/radio_player.js": "dist/radio_player-e8fb69f5c3.js",
|
||||
"dist/station_media.js": "dist/station_media-0fd87093e7.js",
|
||||
"dist/station_playlists.js": "dist/station_playlists-eaa5f5c8be.js",
|
||||
"dist/station_media.js": "dist/station_media-e603db7e25.js",
|
||||
"dist/station_playlists.js": "dist/station_playlists-dee62b5f6b.js",
|
||||
"dist/vue_gettext.js": "dist/vue_gettext-5d8cb4cc3e.js",
|
||||
"dist/webcaster.js": "dist/webcaster-788fdd9f3d.js",
|
||||
"dist/zxcvbn.js": "dist/zxcvbn-f4433cd930.js"
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue