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

FEAT: add modal for logo/image upload

parent 2eff6b50
......@@ -142,6 +142,44 @@
</b-row>
</b-modal>
<b-modal ref="modalLogo" title="Logo of this show" size="lg" @ok="saveLogo">
<b-row>
<b-col lg="4">
<p>Current logo:</p>
</b-col>
<b-col lg="8">
<p v-if="string.length === 0"><small><i>(none set)</i></small></p>
<p v-else>
<b-img thumbnail fluid :src="string" />
</p>
</b-col>
</b-row>
<b-row>
<b-col>
<b-form-file v-model="file" ref="fileinputLogo" accept="image/jpeg, image/png" :state="Boolean(file)" placeholder="Choose a new logo..."></b-form-file>
</b-col>
</b-row>
</b-modal>
<b-modal ref="modalImage" title="Image of this show" size="lg" @ok="saveImage">
<b-row>
<b-col lg="4">
<p>Current image:</p>
</b-col>
<b-col lg="8">
<p v-if="string.length === 0"><small><i>(none set)</i></small></p>
<p v-else>
<b-img thumbnail fluid :src="string" />
</p>
</b-col>
</b-row>
<b-row>
<b-col>
<b-form-file v-model="file" ref="fileinputImage" accept="image/jpeg, image/png" :state="Boolean(file)" placeholder="Choose a new image..."></b-form-file>
</b-col>
</b-row>
</b-modal>
</div>
</template>
......@@ -173,6 +211,7 @@ export default {
backupid: 0,
array: [],
backuparray: [],
file: null,
// we use this when opening modals, that have to fetch options through the API first.
loaded: false,
/*
......@@ -523,6 +562,12 @@ export default {
})
}
},
saveLogo (event) {
alert('Not yet implemented')
},
saveImage (event) {
alert('Not yet implemented')
},
/*
Functions to activate modals
They are called from the parent component
......@@ -668,10 +713,18 @@ export default {
this.$refs.modalShowHosts.show()
},
showLogo () {
alert('Not yet implemented')
if (this.show.logo === null) this.string = ''
else this.string = this.show.logo
this.file = null
this.$refs.fileinputLogo.reset()
this.$refs.modalLogo.show()
},
showImage () {
alert('Not yet implemented')
if (this.show.image === null) this.string = ''
else this.string = this.show.image
this.file = null
this.$refs.fileinputImage.reset()
this.$refs.modalImage.show()
}
}
}
......
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