finesse on Blobs

This commit is contained in:
lesion
2022-06-07 21:10:17 +02:00
parent 080ffca56e
commit 8cdfd1a8f7
7 changed files with 26 additions and 19 deletions

View File

@@ -1,18 +1,18 @@
<template lang='pug'>
v-container
v-card-title {{$t('common.cohort')}}
v-card-title {{$t('common.blobs')}}
v-spacer
v-text-field(v-model='search'
:append-icon='mdiMagnify' outlined rounded
label='Search'
single-line hide-details)
v-card-subtitle(v-html="$t('admin.cohort_description')")
v-card-subtitle(v-html="$t('admin.blobs_description')")
v-btn(color='primary' text @click='newCohort') <v-icon v-text='mdiPlus'></v-icon> {{$t('common.new')}}
v-btn(color='primary' text @click='newCohort') <v-icon v-text='mdiPlus'></v-icon> {{$t('admin.new_blob')}}
v-dialog(v-model='dialog' width='800' destroy-on-close :fullscreen='$vuetify.breakpoint.xsOnly')
v-card(color='secondary')
v-card-title {{$t('admin.edit_cohort')}}
v-card-title {{$t('admin.edit_blob')}}
v-card-text
v-form(v-model='valid' ref='form')
v-text-field(
@@ -39,6 +39,9 @@ v-container
:delimiters="[',', ';']"
:items="tags"
:label="$t('common.tags')")
template(v-slot:selection="{ item, on, attrs, selected, parent}")
v-chip(v-bind="attrs" close :close-icon='mdiCloseCircle' @click:close='parent.selectItem(item)'
:input-value="selected" label small) {{item}}
v-col(cols=5)
v-autocomplete(v-model='filterPlaces'
@@ -54,6 +57,10 @@ v-container
:delimiters="[',', ';']"
:items="places"
:label="$t('common.places')")
template(v-slot:selection="{ item, on, attrs, selected, parent}")
v-chip(v-bind="attrs" close :close-icon='mdiCloseCircle' @click:close='parent.selectItem(item)'
:input-value="selected" label small) {{item.name}}
//- template(v-slot:item="{ item, attrs, on }")
//- v-list-item(v-bind='attrs' v-on='on')
//- v-list-item-content(two-line)
@@ -76,14 +83,11 @@ v-container
v-chip.ma-1(small v-for='tag in item.tags' v-text='tag' :key='tag')
template(v-slot:item.places='{item}')
v-chip.ma-1(small v-for='place in item.places' v-text='place.name' :key='place.id' )
v-card-actions
v-spacer
v-btn(text @click='dialog=false' color='warning') {{$t('common.close')}}
//- v-btn(text @click='saveCohort' color='primary' :loading='loading'
//- :disable='!valid || loading') {{$t('common.save')}}
v-card-text
v-data-table(
@@ -168,13 +172,14 @@ export default {
this.dialog = true
},
newCohort () {
this.cohort = { name: '', id: null },
this.cohort = { name: '', id: null }
this.filters = []
this.dialog = true
},
async saveCohort () {
if (!this.$refs.form.validate()) return
this.loading = true
this.cohort.name = this.cohort.name.trim()
this.cohort = await this.$axios.$post('/cohorts', this.cohort)
this.$fetch()
this.loading = false

View File

@@ -79,7 +79,7 @@ export default {
if (!this.$refs.form.validate()) return
this.loading = true
await this.$axios.$put('/place', this.place)
this.updateMeta()
await this.$fetch()
this.loading = false
this.dialog = false
}

View File

@@ -87,7 +87,8 @@
"import": "Import",
"max_events": "N. max events",
"label": "Label",
"blobs": "Blobs"
"blobs": "Blobs",
"close": "Close"
},
"login": {
"description": "By logging in you can publish new events.",
@@ -233,7 +234,10 @@
"smtp_test_button": "Send a test email",
"admin_email": "Admin e-mail",
"widget": "Widget",
"wrong_domain_warning": "The baseurl configured in config.json <b>({baseurl})</b> differs from the one you're visiting <b>({url})</b>"
"wrong_domain_warning": "The baseurl configured in config.json <b>({baseurl})</b> differs from the one you're visiting <b>({url})</b>",
"new_blob": "New blob",
"blobs_description": "Blobs are groupings of events by tags and places. They will be displayed on the home page",
"edit_blob": "Edit Blob"
},
"auth": {
"not_confirmed": "Not confirmed yet…",

View File

@@ -231,7 +231,11 @@
"smtp_hostname": "SMTP Hostname",
"smtp_test_success": "Una mail di test è stata inviata all'indirizzo {admin_email}, controlla la tua casella di posta",
"smtp_test_button": "Invia una mail di prova",
"admin_email": "E-mail dell'admin"
"admin_email": "E-mail dell'admin",
"new_blob": "Crea bolla",
"wrong_domain_warning": "Il \"baseurl\" configurato in config.json <b>({baseurl})</b> è diverso da quello che stai visitando <b>({url})</b>",
"blobs_description": "Le bolle sono raggruppamenti di eventi per tag e posti.",
"edit_blob": "Modifica bolla"
},
"auth": {
"not_confirmed": "Non ancora confermato…",

View File

@@ -32,7 +32,6 @@
"@nuxtjs/auth": "^4.9.1",
"@nuxtjs/axios": "^5.13.5",
"@nuxtjs/sitemap": "^2.4.0",
"@snyk/protect": "latest",
"accept-language": "^3.0.18",
"axios": "^0.27.2",
"bcryptjs": "^2.4.3",

View File

@@ -53,7 +53,7 @@
chips small-chips multiple deletable-chips hide-no-data hide-selected persistent-hint
cache-items
@input.native='searchTags'
:delimiters="[',', ';']"
:delimiters="[',', ';', '#']"
:items="tags"
:menu-props="{ maxWidth: 400, eager: true }"
:label="$t('common.tags')")

View File

@@ -1897,11 +1897,6 @@
dependencies:
"@sinonjs/commons" "^1.7.0"
"@snyk/protect@^1.946.0":
version "1.946.0"
resolved "https://registry.yarnpkg.com/@snyk/protect/-/protect-1.946.0.tgz#4960ad4079145615d16fcbf2644ef016f08a7fdc"
integrity sha512-LdqVSuI3gFX87dLfZsUvlb5lp7XuURa22uY2oDuOyNxk4Z0gsSOoYxYrFXUW2RreH+mch1T6rU5HztQkoL38YQ==
"@tootallnate/once@1":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82"