forked from rc/aircox
radiocampus: style update
This commit is contained in:
45
radiocampus/assets/src/app.js
Normal file
45
radiocampus/assets/src/app.js
Normal file
@ -0,0 +1,45 @@
|
||||
import {Calendar, DatePicker} from 'v-calendar';
|
||||
import components from './components'
|
||||
|
||||
const App = {
|
||||
el: '#app',
|
||||
delimiters: ['[[', ']]'],
|
||||
components: {
|
||||
...components,
|
||||
...{
|
||||
VCalendar: Calendar,
|
||||
VDatepicker: DatePicker
|
||||
},
|
||||
},
|
||||
|
||||
computed: {
|
||||
player() { return window.aircox.player; },
|
||||
},
|
||||
|
||||
methods: {
|
||||
//! Delete elements from DOM using provided selector.
|
||||
deleteElements(sel) {
|
||||
for(var el of document.querySelectorAll(sel))
|
||||
el.parentNode.removeChild(el)
|
||||
},
|
||||
|
||||
//! File has been selected
|
||||
//! TODO: replace using regular ref and bindings.
|
||||
fileSelected(select, input, preview) {
|
||||
const item = this.$refs[select].item
|
||||
if(item) {
|
||||
this.$refs[input].value = item.id
|
||||
if(preview)
|
||||
preview.src = item.file
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
export const PlayerApp = {
|
||||
el: '#player',
|
||||
delimiters: ['[[', ']]'],
|
||||
components: {...components},
|
||||
}
|
||||
|
||||
export default App
|
Reference in New Issue
Block a user