start a better events selection

This commit is contained in:
les
2020-10-17 00:41:21 +02:00
parent b80eb3f6e3
commit 3f892f7f4a
18 changed files with 199 additions and 266 deletions

View File

@@ -56,9 +56,7 @@ export default {
reader.readAsText(this.file)
reader.onload = () => {
const data = reader.result
console.error(data)
const event = ical.parse(data)
console.error(event)
this.event = {
title: event.name
}
@@ -79,7 +77,6 @@ export default {
this.event = ret
// check if contain an h-event
this.$emit('imported', ret)
console.error(ret)
} catch (e) {
console.error(e)
this.error = true

View File

@@ -281,7 +281,6 @@ export default {
}
if (this.event.image) {
console.error(this.event.image)
formData.append('image', this.event.image)
}
formData.append('title', this.event.title)
@@ -307,7 +306,6 @@ export default {
this.loading = false
this.$root.$message(this.$auth.loggedIn ? 'event.added' : 'event.added_anon', { color: 'success' })
} catch (e) {
console.error(e.response)
switch (e.request.status) {
case 413:
this.$root.$message('event.image_too_big', { color: 'error' })