Commit b9f610ab authored by jackie / Andrea Ida Malkah Klaura's avatar jackie / Andrea Ida Malkah Klaura
Browse files

add modal for adding new file

parent b1c883f2
......@@ -39,11 +39,35 @@
<div v-else>
<b-modal id="modal-add-file" title="Add new file" @ok="addFile">
<div v-if="addNewFileURI">
<b-col md="2">
<b-form-input type="url" v-model="uploadSourceURI" placeholder="Insert a HTTP(S) link here"></b-form-input>
<div v-else>
<b-form-file v-model="uploadSourceFile" accept="audio/*" placeholder="Choose a file..." drop-placeholder="Drop file here..."></b-form-file>
<div align="center">
<b-form-checkbox v-model="addNewFileURI" value="true" unchecked_value="false">
Download from remote source instead of uploading a file
<div v-if="files.length === 0" align="center">
<b-alert show variant="warning">There are no files for this show yet.</b-alert>
<b-button variant="success" @click="notYetImplemented">Upload a file</b-button>
<b-button variant="success" v-b-modal.modal-add-file>Upload or add a file</b-button>
<div v-else>
<div align="center" style="padding-bottom: 1.5em;">
<b-button variant="success" v-b-modal.modal-add-file>Upload or add a file</b-button>
<b-table striped :items="filesTable" />
......@@ -84,6 +108,9 @@ export default {
files: [],
playlists: [],
mode: 'files',
addNewFileURI: false,
uploadSourceURI: '',
uploadSourceFile: null,
loaded: {
shows: false,
files: false,
......@@ -130,6 +157,9 @@ export default {
notYetImplemented: function () {
alert('By the mighty witchcraftry of the mother of time!\n\nThis feature is not implemented yet.')
addFile: function () {
switchShow: function (index) {
// set the current show and its ID to whatever we want to switch to now
this.currentShow = index
Supports Markdown
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