s/element/vuetify :D

This commit is contained in:
les
2020-07-25 21:41:22 +02:00
parent 59811e580c
commit 2758541df0
33 changed files with 1762 additions and 1340 deletions

View File

@@ -1,69 +1,58 @@
<template lang="pug">
el-main
v-container
el-tabs(v-model='tab')
v-tabs
//- SETTINGS
el-tab-pane.pt-1
template(slot='label')
v-icon(name='cog')
span.hidden-xs-only {{$t('common.settings')}}
v-tab {{$t('common.settings')}}
v-tab-item
Settings
//- USERS
el-tab-pane.pt-1
template(slot='label')
v-icon(name='users')
span.hidden-xs-only.ml-1 {{$t('common.users')}}
el-badge(v-show='unconfirmedUsers.length>0' :value='unconfirmedUsers.length')
v-tab
v-badge(:value='unconfirmedUsers.length' :content='unconfirmedUsers.length') {{$t('common.users')}}
v-tab-item
Users(:users='users')
//- PLACES
el-tab-pane.pt-1
template(slot='label')
v-icon(name='map-marker-alt')
span.hidden-xs-only.ml-1 {{$t('common.places')}}
v-tab {{$t('common.places')}}
v-tab-item
Places
//- EVENTS
el-tab-pane.pt-1
template(slot='label')
v-icon(name='calendar')
span.hidden-xs-only.ml-1 {{$t('common.events')}}
el-badge(v-show='events.length>0' :value='events.length')
v-tab
v-badge(:content='events.length') {{$t('common.events')}}
v-tab-item
p {{$t('admin.event_confirm_description')}}
el-table(:data='paginatedEvents' small primary-key='id' v-loading='loading')
el-table-column(:label='$t("common.name")' width='300')
template(slot-scope='data') {{data.row.title}}
el-table-column(:label='$t("common.where")' width='250')
template(slot-scope='data') {{data.row.place.name}}
el-table-column(:label='$t("common.confirm")' width='250')
template(slot-scope='data')
el-button-group
el-button(type='primary' @click='confirm(data.row.id)' size='mini') {{$t('common.confirm')}}
el-button(type='success' @click='preview(data.row.id)' size='mini') {{$t('common.preview')}}
client-only
el-pagination(v-if='events.length>perPage' :page-size='perPage' :currentPage.sync='eventPage' :total='events.length')
v-data-table(
:items='events'
:headers='eventHeaders'
)
//- el-table-column(:label='$t("common.name")' width='300')
//- template(slot-scope='data') {{data.row.title}}
//- el-table-column(:label='$t("common.where")' width='250')
//- template(slot-scope='data') {{data.row.place.name}}
//- el-table-column(:label='$t("common.confirm")' width='250')
//- template(slot-scope='data')
//- el-button-group
//- el-button(type='primary' @click='confirm(data.row.id)' size='mini') {{$t('common.confirm')}}
//- el-button(type='success' @click='preview(data.row.id)' size='mini') {{$t('common.preview')}}
//- client-only
//- el-pagination(v-if='events.length>perPage' :page-size='perPage' :currentPage.sync='eventPage' :total='events.length')
//- ANNOUNCEMENTS
el-tab-pane.pt-1
template(slot='label')
v-icon(name='bullhorn')
span.hidden-xs-only.ml-1 {{$t('common.announcements')}}
v-tab {{$t('common.announcements')}}
v-tab-item
Announcement
//- FEDERATION
el-tab-pane.pt-1
template(slot='label')
v-icon(name='network-wired')
span.hidden-xs-only.ml-1 {{$t('common.federation')}}
v-tab {{$t('common.federation')}}
v-tab-item
Federation
//- MODERATION
el-tab-pane.pt-1(v-if='settings.enable_federation')
template(slot='label')
v-icon(name='vector-square')
span.hidden-xs-only.ml-1 {{$t('common.moderation')}}
v-tab(v-if='settings.enable_federation') {{$t('common.moderation')}}
v-tab-item
Moderation
</template>
@@ -93,26 +82,14 @@ export default {
},
data () {
return {
perPage: 10,
eventPage: 1,
description: '',
events: [],
loading: false,
tab: '0',
open: true
events: []
}
},
head () {
return { title: `${this.settings.title} - ${this.$t('common.admin')}` }
},
computed: {
...mapState(['settings']),
unconfirmedUsers () {
return this.users.filter(u => !u.is_active)
},
paginatedEvents () {
return this.events.slice((this.eventPage - 1) * this.perPage,
this.eventPage * this.perPage)
}
},
methods: {
@@ -133,6 +110,9 @@ export default {
} catch (e) {
}
}
},
head () {
return { title: `${this.settings.title} - ${this.$t('common.admin')}` }
}
}
</script>

View File

@@ -1,24 +1,33 @@
<template lang='pug'>
el-main
el-card
h4(slot='header').text-center <el-icon name='user'/> {{$t('common.login')}}
p(v-html="$t('login.description')")
div(v-loading='loading')
v-row.mt-5(align='center' justify='center')
v-col(cols='12' md="6" lg="5" xl="4")
el-input.mb-2(v-model='email' type='email' title='email' prefix-icon='el-icon-user'
:placeholder='$t("common.email")' autocomplete='email' ref='email')
v-card
v-card-title {{$t('common.login')}}
v-card-subtitle(v-text="$t('login.description')")
el-input.mb-1(v-model='password' @keyup.enter.native="submit"
prefix-icon='el-icon-lock' name='password'
type='password' :placeholder='$t("common.password")')
v-card-text
div
el-button.text-right(type='text' @click='forgot') {{$t('login.forgot_password')}}
v-text-field(v-model='email' type='email'
:placeholder='$t("common.email")'
ref='email')
el-button.mt-5.mr-1(plain type="success"
:disabled='disabled' @click='submit') {{$t('common.login')}}
nuxt-link(to='/register' v-if='settings.allow_registration')
el-button(type='primary' plain) {{$t('login.not_registered')}}
v-text-field(v-model='password'
type='password'
:placeholder='$t("common.password")')
v-card-actions
v-btn(color='success'
text
:disabled='disabled'
@click='submit') {{$t('common.login')}}
v-btn(v-if='settings.allow_registration'
to='/register'
text
color='orange') {{$t('login.not_registered')}}
v-btn(text @click='forgot') {{$t('login.forgot_password')}}
</template>
<script>

View File

@@ -1,20 +1,24 @@
<template lang='pug'>
el-main
el-card
h4(slot='header').text-center <el-icon name='user'/> {{$t('common.register')}}
p(v-html="$t('register.description')")
div(v-loading='loading')
v-row.mt-5(align='center' justify='center')
v-col(cols='12' sm='10' md="6")
el-input.mb-2(ref='email' v-model='user.email' type='email' required
:placeholder='$t("common.email")' autocomplete='email'
prefix-icon='el-icon-message' name='email')
v-card
v-card-title {{$t('common.register')}}
el-input.mb-2(v-model='user.password' type="password"
placeholder="Password" name='password' required prefix-icon='el-icon-lock')
v-card-text
el-input.mb-2(v-model='user.description' type="textarea" rows='3' :placeholder="$t('common.description')")
p(v-html="$t('register.description')")
v-text-field(ref='email' v-model='user.email' type='email' required
:placeholder='$t("common.email")' autocomplete='email'
prefix-icon='el-icon-message')
el-button(plain type="success" :disabled='disabled' @click='register') {{$t('common.send')}} <v-icon name='chevron-right'/>
v-text-field(v-model='user.password' type="password"
placeholder="Password")
v-text-field(v-model='user.description' textarea rows='3' :placeholder="$t('common.description')")
v-card-actions
v-btn(plain type="success" :disabled='disabled' @click='register') {{$t('common.send')}} <v-icon name='chevron-right'/>
</template>
<script>

View File

@@ -1,9 +1,9 @@
<template lang="pug">
el-main
v-container
.edit(v-if='$auth.user && $auth.user.is_admin')
Editor(v-if='$auth.user && $auth.user.is_admin'
v-model='about')
el-button.float-right(type='success' plain icon='el-icon-check'
v-btn.float-right(type='success' plain icon='el-icon-check'
@click='save') {{$t('common.save')}}
div(v-else v-html='about')
</template>

View File

@@ -1,52 +1,57 @@
<template lang="pug">
el-main#edit_page
h5.text-center {{edit?$t('common.edit_event'):$t('common.add_event')}}
el-form(v-loading='loading')
v-container
h2.text-center {{edit?$t('common.edit_event'):$t('common.add_event')}}
v-form
//- NOT LOGGED EVENT
div(v-if='!$auth.loggedIn')
el-divider <v-icon name='user-secret'/> {{$t('event.anon')}}
v-divider <v-icon name='user-secret'/> {{$t('event.anon')}}
p(v-html="$t('event.anon_description')")
//- title
span {{$t('event.what_description')}}
el-input.mb-3(v-model='event.title' ref='title' autofocus)
v-text-field.mb-3(v-model='event.title'
:label="$t('event.what_description')"
ref='title')
//- description
span {{$t('event.description_description')}}
Editor.mb-3(v-model='event.description' border no-save style='max-height: 400px;')
//- span {{$t('event.description_description')}}
//- Editor.mb-3(v-model='event.description' border no-save style='max-height: 400px;')
//- tags
div {{$t('event.tag_description')}}
client-only
el-select.mb-3(v-model='event.tags' multiple filterable
@input.native='queryTags=$event.target.value' @change='queryTags=""'
allow-create default-first-option placeholder='Tag')
el-option(v-for='tag in filteredTags' :key='tag.tag' :label='tag.tag' :value='tag.tag')
//- div {{$t('event.tag_description')}}
//- client-only
//- v-select.m b-3(v-model='event.tags' multiple filterable
//- @input.native='queryTags=$event.target.value' @change='queryTags=""'
//- allow-create default-first-option placeholder='Tag')
//- v-option(v-for='tag in filteredTags' :key='tag.tag' :label='tag.tag' :value='tag.tag')
//- WHERE
el-divider
i.el-icon-location-outline
span {{$t('common.where')}}
p(v-html="$t('event.where_description')")
el-autocomplete(v-model='event.place.name' @blur='selectPlace($event.target.value)'
highlight-first-item :fetch-suggestions='filterPlaces' @select='selectPlace')
//- v-divider
//- i.el-icon-location-outline
//- span {{$t('common.where')}}
//- p(v-html="$t('event.where_description')")
v-autocomplete(v-model='event.place.name'
:label="$t('common.where')"
:items="places"
item-text="name"
item-value="id"
@change='selectPlace')
div {{$t("common.address")}}
el-input.mb-3(ref='address' v-model='event.place.address' :disabled='disableAddress')
//- div {{$t("common.address")}}
v-text-field(ref='address' :label="$t('common.address')" v-model='event.place.address' :disabled='disableAddress')
//- WHEN
el-divider <v-icon name='clock'/> {{$t('common.when')}}
//- v-divider <v-icon name='clock'/> {{$t('common.when')}}
.text-center
el-radio-group(v-model="event.type")
el-radio-button(label="normal") <v-icon name='calendar-day'/> {{$t('event.normal')}}
el-radio-button(label="multidate") <v-icon name='calendar-week'/> {{$t('event.multidate')}}
el-radio-button(v-if='settings.allow_recurrent_event' label="recurrent") <v-icon name='calendar-alt'/> {{$t('event.recurrent')}}
v-btn-toggle(v-model="event.type")
v-btn(value='normal' label="normal") <v-icon name='calendar-day'/> {{$t('event.normal')}}
v-btn(value='multidate' label="multidate") <v-icon name='calendar-week'/> {{$t('event.multidate')}}
v-btn(v-if='settings.allow_recurrent_event' value='recurrent' label="recurrent") <v-icon name='calendar-alt'/> {{$t('event.recurrent')}}
br
span {{$t(`event.${event.type}_description`)}}
el-select.ml-2(v-if='event.type==="recurrent"' v-model='event.recurrent.frequency' placeholder='Frequenza')
el-option(:label="$t('event.each_week')" value='1w' key='1w')
el-option(:label="$t('event.each_2w')" value='2w' key='2w')
v-select.ml-2(v-if='event.type==="recurrent"' v-model='event.recurrent.frequency' placeholder='Frequenza')
v-option(:label="$t('event.each_week')" value='1w' key='1w')
v-option(:label="$t('event.each_2w')" value='2w' key='2w')
//- el-option(:label="$t('event.each_month')" value='1m' key='1m')
client-only
@@ -57,43 +62,40 @@
v-model='date'
:locale='$i18n.locale'
:from-page.sync='page'
is-dark
is-inline
is-expanded
:min-date='event.type !== "recurrent" && new Date()')
div.text-center.mb-2(v-if='event.type === "recurrent"')
span(v-if='event.recurrent.frequency !== "1m" && event.recurrent.frequency !== "2m"') {{whenPatterns}}
el-radio-group(v-else v-model='event.recurrent.type')
el-radio-button(v-for='whenPattern in whenPatterns' :label='whenPattern.key' :key='whenPatterns.key')
v-radio-group(v-else v-model='event.recurrent.type')
v-radio-button(v-for='whenPattern in whenPatterns' :label='whenPattern.key' :key='whenPatterns.key')
span {{whenPattern.label}}
.text-center
el-form-item(:label="$t('event.from')" width='100')
el-time-select.mr-2(ref='time_start'
v-model="time.start"
:picker-options="{ start: '00:00', step: '00:30', end: '24:00'}")
el-form-item(:label="$t('event.due')")
el-time-select(v-model='time.end'
:picker-options="{start: '00:00', step: '00:30', end: '24:00'}")
v-time-picker.mr-2(
:label="$t('event.from')"
ref='time_start'
v-model="time.start")
v-time-picker(v-model='time.end'
:label="$t('event.due')")
List(v-if='event.type==="normal" && todayEvents.length' :events='todayEvents' :title='$t("event.same_day")')
//- MEDIA / FLYER / POSTER
el-divider <v-icon name='image'/> {{$t('common.media')}}
div.mb-2 {{$t('event.media_description')}}
el-upload.text-center(
action=''
:limit="1"
:auto-upload='false'
drag
accept='image/*'
:on-remove='cleanFile'
:on-change='uploadedFile'
:multiple='false')
i.el-icon-upload
//- el-input(v-model='mediaUrl')
el-button.mt-2.float-right(@click='done' :disabled='!couldProceed') {{edit?$t('common.edit'):$t('common.send')}}
p {{JSON.stringify(event.image)}}
v-file-input(
:label="$t('common.media')"
:hint="$t('event.media_description')"
filled
prepend-icon="mdi-camera"
v-model='event.image'
persistent-hint
accept='image/*')
v-btn.mt-2.float-right(@click='done' :disabled='!couldProceed') {{edit?$t('common.edit'):$t('common.send')}}
</template>
<script>
@@ -156,7 +158,7 @@ export default {
title: '',
description: '',
tags: [],
image: false,
image: {},
recurrent: { frequency: '1w', days: [], type: 'weekday' }
},
page: { month, year },
@@ -264,10 +266,11 @@ export default {
.value()
},
couldProceed () {
return (this.event.place.name.length > 0 &&
this.event.place.address.length > 0 &&
(this.date && this.time.start) &&
this.event.title.length > 0)
return true
// return (this.event.place.name.length > 0 &&
// this.event.place.address.length > 0 &&
// (this.date && this.time.start) &&
// this.event.title.length > 0)
}
},
mounted () {
@@ -286,7 +289,8 @@ export default {
cb(ret)
},
selectPlace (p) {
const place = this.places.find(p => p.name === this.event.place.name)
console.error('sono dentro selectPlace ', p)
const place = this.places.find(place => place.id === p)
if (place && place.address) {
this.event.place.address = place.address
this.disableAddress = true
@@ -303,16 +307,19 @@ export default {
// },
// },
cleanFile () {
this.event.image = null
this.event.image = {}
},
uploadedFile (file, fileList) {
if (file.size / 1024 / 1024 > 4) {
Message({ type: 'warning', showClose: true, message: this.$tc('event.image_too_big') })
this.fileList = []
return false
}
this.fileList = [{ name: file.name, url: file.url }]
this.event.image = file
uploadedFile (files) {
// const file = files[0]
console.error('dentro uploadedfile', arguments)
// if (file.size / 1024 / 1024 > 4) {
// Message({ type: 'warning', showClose: true, message: this.$tc('event.image_too_big') })
// this.fileList = []
// return false
// }
// this.fileList = [{ name: file.name, url: file.url }]
// this.event.image = file
},
async done () {
this.loading = true
@@ -351,7 +358,7 @@ export default {
}
if (this.event.image) {
formData.append('image', this.event.image.raw, this.event.image.name)
formData.append('image', this.event.image[0])
}
formData.append('title', this.event.title)
formData.append('place_name', this.event.place.name)
@@ -396,7 +403,7 @@ export default {
}
</script>
<style style='less'>
#edit_page
/* #edit_page
i {
font-size: 1.3em;
}
@@ -416,6 +423,6 @@ export default {
margin: 0 auto;
max-width: 80%;
font-size: 2em;
}
} */
</style>

View File

@@ -1,51 +1,97 @@
<template lang="pug">
el-container#eventDetail.h-event
el-header
v-card#eventDetail.h-event.d-inline-block-mx-auto
v-toolbar(prominent)
v-list-item(two-line)
v-list-item-content
h2(v-text='event.title')
v-list-item-subtitle
time.dt-start(:datetime='event.start_datetime|unixFormat("YYYY-MM-DD HH:mm")')
v-icon mdi-date
b {{event|when}}
small ({{event.start_datetime|from}})
v-list-item-subtitle
i.el-icon-location-outline
b.p-location {{event.place.name}}
span - {{event.place.address}}
.title {{event.title}}
v-spacer
v-btn.mr-1(nuxt :to='`/event/${event.prev}`' color='primary' icon :disabled='!event.prev')
v-icon mdi-arrow-left
v-btn(nuxt :to='`/event/${event.next}`' color='primary' :disabled='!event.next' icon)
v-icon mdi-arrow-right
//- h2 {{event.title}}
//- v-toolbar-subtitle
#arrow
nuxt-link.mr-1(:to='`/event/${event.prev}`')
el-button(circle plain size='small' icon='el-icon-arrow-left' :disabled='!event.prev')
nuxt-link(:to='`/event/${event.next}`')
el-button(circle plain size='small' :disabled='!event.next' icon='el-icon-arrow-right')
//- v-toolbar(prominent)
//- v-list-item
//- h3 {{event.title}}
//- v-row(justify='space-between')
v-col(cols='auto')
v-list-item(two-line)
v-list-item-content
v-list-item-title.headline(v-text='event.title')
v-list-item-subtitle
time.dt-start(:datetime='event.start_datetime|unixFormat("YYYY-MM-DD HH:mm")')
v-icon mdi-date
b {{event|when}}
small ({{event.start_datetime|from}})
v-list-item-subtitle
i.el-icon-location-outline
b.p-location {{event.place.name}}
span - {{event.place.address}}
v-col
v-btn.mr-1(nuxt :to='`/event/${event.prev}`' color='primary' icon :disabled='!event.prev')
v-icon mdi-arrow-left
v-btn(nuxt :to='`/event/${event.next}`' color='primary' :disabled='!event.next' icon)
v-icon mdi-arrow-right
el-main
el-dialog.embedDialog(:visible.sync='showEmbed')
template(slot='extension')
h2 {{event.title}}
//- v-list-item
//- i.el-icon-location-outline
//- b.p-location {{event.place.name}}
//- span - {{event.place.address}}
//- v-spacer
//- v-chip.p-category.ml-1(v-for='tag in event.tags' :key='tag' small color='secondary') {{tag}}
v-card-text
v-dialog.embedDialog(:visible.sync='showEmbed')
h4(slot='title') {{$t('common.embed_title')}}
EmbedEvent(:event='event')
el-row
el-col.p-2(:sm='18' :xs="24")
//- v-row
v-col(sm="10")
//- event image
el-image.main_image.mb-3(:src='imgPath' v-if='event.image_path' fit='contain')
div.loading(slot='placeholder')
el-icon(name='loading')
//- event image
v-img.main_image.mb-3(
lazy
:src='imgPath'
:lazy-src='thumbImgPath'
v-if='event.image_path')
pre.p-description(v-html='event.description')
el-button.p-category.ml-1(type='text' plain round size='mini' v-for='tag in event.tags' :key='tag') {{tag}}
p.p-description(v-html='event.description')
v-btn.p-category.ml-1(type='text' plain round size='mini' v-for='tag in event.tags' :key='tag') {{tag}}
//- info & actions
el-col.menu(:sm='6' :xs='24')
el-menu.menu(router)
//- v-col
v-list
time.dt-start(:datetime='event.start_datetime|unixFormat("YYYY-MM-DD HH:mm")') <i class='el-icon-date'></i> <b>{{event|when}}</b> <br/><small>{{event.start_datetime|from}}</small>
p
i.el-icon-location-outline
b.p-location {{event.place.name}}
span - {{event.place.address}}
el-divider {{$t('common.actions')}}
el-menu-item(
v-divider {{$t('common.actions')}}
v-list-item(
v-clipboard:success='copyLink'
v-clipboard:copy='`${settings.baseurl}/event/${event.id}`') <i class='el-icon-paperclip'></i> {{$t('common.copy_link')}}
el-menu-item(@click='showEmbed=true') <i class='el-icon-copy-document'></i> {{$t('common.embed')}}
v-list-item(@click='showEmbed=true') <i class='el-icon-copy-document'></i> {{$t('common.embed')}}
el-menu-item
v-list-item
a(:href='`${settings.baseurl}/api/event/${event.id}.ics`') <i class='el-icon-date'></i> {{$t('common.add_to_calendar')}}
EventAdmin(v-if='is_mine' :event='event')
hr
//- hr
//- resources from fediverse
#resources.mt-1(v-if='settings.enable_federation')
@@ -54,22 +100,22 @@
small {{event.boost.length}}<br/>
p.p-2
el-button(type='text' @click='showFollowMe=true') {{$t('event.interact_with_me')}}
v-btn(type='text' @click='showFollowMe=true') {{$t('event.interact_with_me')}}
span(v-if='settings.enable_resources && event.resources.length') - {{$tc('common.n_resources', event.resources.length)}}
el-dialog(:visible.sync='showFollowMe' destroy-on-close)
v-dialog(:visible.sync='showFollowMe' destroy-on-close)
h4(slot='title') {{$t('common.follow_me_title')}}
FollowMe
el-dialog.showResource#resourceDialog(:visible.sync='showResources' fullscreen
v-dialog.showResource#resourceDialog(:visible.sync='showResources' fullscreen
width='95vw'
destroy-on-close
@keydown.native.right='$refs.carousel.next()'
@keydown.native.left='$refs.carousel.prev()')
el-carousel(:interval='10000' ref='carousel' arrow='always')
el-carousel-item(v-for='attachment in selectedResource.data.attachment' :key='attachment.url')
el-image(:src='attachment.url')
el-card.mb-1(v-if='settings.enable_resources' v-for='resource in event.resources' :key='resource.id' :class='{disabled: resource.hidden}')
v-carousel(:interval='10000' ref='carousel' arrow='always')
v-carousel-item(v-for='attachment in selectedResource.data.attachment' :key='attachment.url')
v-img(:src='attachment.url')
v-card.mb-1(v-if='settings.enable_resources' v-for='resource in event.resources' :key='resource.id' :class='{disabled: resource.hidden}')
span
el-dropdown.mr-2(v-if='$auth.user && $auth.user.is_admin')
el-button(circle icon='el-icon-more' size='mini')
@@ -297,163 +343,162 @@ export default {
}
</script>
<style lang='less'>
#eventDetail {
time {
margin: 0rem 0rem 0rem 1rem;
display: inline-block;
}
// #eventDetail {
// time {
// margin: 0rem 0rem 0rem 1rem;
// display: inline-block;
// }
#arrow {
position: absolute;
top: 1em;
right: 1em;
}
// #arrow {
// position: absolute;
// top: 1em;
// right: 1em;
// }
.el-header {
height: auto !important;
position: sticky;
padding-top: .4em;
top: 0px;
border-bottom: 1px solid lightgray;
z-index: 1;
overflow: hidden;
}
// .el-header {
// height: auto !important;
// position: sticky;
// padding-top: .4em;
// top: 0px;
// border-bottom: 1px solid lightgray;
// z-index: 1;
// overflow: hidden;
// }
.embedDialog {
.el-dialog {
min-height: 500px;
max-width: 1000px;
width: 100%;
}
}
// .embedDialog {
// .el-dialog {
// min-height: 500px;
// max-width: 1000px;
// width: 100%;
// }
// }
.followDialog {
.el-dialog {
min-height: 300px;
max-width: 600px;
width: 100%;
.el-dialog__body {
word-break: normal !important;
}
}
}
// .followDialog {
// .el-dialog {
// min-height: 300px;
// max-width: 600px;
// width: 100%;
// .el-dialog__body {
// word-break: normal !important;
// }
// }
// }
.head {
z-index: 1;
position: sticky;
top: 0px;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
border-bottom: 1px solid #e6e6e6;
}
// .head {
// z-index: 1;
// position: sticky;
// top: 0px;
// padding-top: 10px;
// padding-bottom: 10px;
// background-color: white;
// border-bottom: 1px solid #e6e6e6;
// }
.menu {
border-right: none;
background-color: transparent;
}
// .menu {
// border-right: none;
// background-color: transparent;
// }
div.menu {
border-left: 1px solid #e6e6e6;
p {
margin: 1rem 0rem 1rem 1rem;
}
}
// div.menu {
// border-left: 1px solid #e6e6e6;
// p {
// margin: 1rem 0rem 1rem 1rem;
// }
// }
.title {
display: table-cell;
padding-right: 70px;
height: 2.1em;
font-size: 1.6rem;
color: #404246;
line-height: 1;
vertical-align: middle;
}
// .title {
// display: table-cell;
// padding-right: 70px;
// height: 2.1em;
// font-size: 1.6rem;
// color: #404246;
// line-height: 1;
// vertical-align: middle;
// }
pre {
white-space: pre-line;
word-break: break-word;
color: #404246;
font-size: 1em;
font-family: inherit;
// pre {
// white-space: pre-line;
// word-break: break-word;
// font-size: 1em;
// font-family: inherit;
p:empty {
min-height: 1em;
}
// font-family: BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Oxygen,
// Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, Helvetica, Arial,
// sans-serif !important;
}
// p:empty {
// min-height: 1em;
// }
// // font-family: BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Oxygen,
// // Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, Helvetica, Arial,
// // sans-serif !important;
// }
.main_image {
width: 100%;
transition: height .100s;
height: auto;
// .main_image {
// width: 100%;
// transition: height .100s;
// height: auto;
img {
// object-fit: contain;
margin: 0 auto;
max-height: 88vh;
}
// img {
// // object-fit: contain;
// margin: 0 auto;
// max-height: 88vh;
// }
.loading {
display: flex;
justify-content: center;
align-items: center;
font-size: 30px;
margin: 0 auto;
height: 100px;
}
}
// .loading {
// display: flex;
// justify-content: center;
// align-items: center;
// font-size: 30px;
// margin: 0 auto;
// height: 100px;
// }
// }
#resources {
img {
max-width: 100%;
}
.card-header {
border-left: 3px solid transparent;
}
.card-header:hover {
border-left: 3px solid #888;
}
.invisible {
visibility: visible !important;
}
.disabled {
opacity: 0.5;
}
.previewImage {
display: flex;
flex-flow: wrap;
justify-content: space-evenly;
img {
margin-left: 5px;
margin-top: 5px;
object-fit: cover;
min-height: 100px;
max-width: 45%;
border-radius: 5px;
border: 1px solid #ccc;
}
}
}
.nextprev {
font-size: 10px;
margin-bottom: 5px;
}
}
// #resources {
// img {
// max-width: 100%;
// }
// .card-header {
// border-left: 3px solid transparent;
// }
// .card-header:hover {
// border-left: 3px solid #888;
// }
// .invisible {
// visibility: visible !important;
// }
// .disabled {
// opacity: 0.5;
// }
// .previewImage {
// display: flex;
// flex-flow: wrap;
// justify-content: space-evenly;
// img {
// margin-left: 5px;
// margin-top: 5px;
// object-fit: cover;
// min-height: 100px;
// max-width: 45%;
// border-radius: 5px;
// border: 1px solid #ccc;
// }
// }
// }
// .nextprev {
// font-size: 10px;
// margin-bottom: 5px;
// }
// }
@media only screen and (max-width: 768px) {
#eventDetail {
.menu {
border: 0px !important;
}
// @media only screen and (max-width: 768px) {
// #eventDetail {
// .menu {
// border: 0px !important;
// }
.title {
// font-size: 1.1em;
line-height: 1.4em;
color: black;
}
}
}
// .title {
// // font-size: 1.1em;
// line-height: 1.4em;
// color: black;
// }
// }
// }
</style>

View File

@@ -1,23 +1,23 @@
<template lang='pug'>
div
el-divider {{$t('common.admin')}}
v-divider {{$t('common.admin')}}
el-menu.menu
el-menu-item
v-menu.menu
v-menu-item
div(v-if='event.is_visible' @click='toggle(false)') <i class='el-icon-open'/> {{$t(`common.${event.parentId?'skip':'hide'}`)}}
div(v-else @click='toggle(false)') <i class='el-icon-turn-off'/> {{$t('common.confirm')}}
el-menu-item(@click='$router.push(`/add/${event.id}`)') <i class='el-icon-edit'/> {{$t('common.edit')}}
el-menu-item(v-if='!event.parentId' @click='remove(false)') <i class='el-icon-delete'/> {{$t('common.remove')}}
v-menu-item(@click='$router.push(`/add/${event.id}`)') <i class='el-icon-edit'/> {{$t('common.edit')}}
v-menu-item(v-if='!event.parentId' @click='remove(false)') <i class='el-icon-delete'/> {{$t('common.remove')}}
template(v-if='event.parentId')
el-divider {{$t('event.recurrent')}}
v-divider {{$t('event.recurrent')}}
p.text-secondary
i.el-icon-refresh
small {{event|recurrentDetail}}<br/>
el-menu-item(v-if='event.parent.is_visible' @click='toggle(true)') <i class='el-icon-video-pause'/> {{$t('common.pause')}}
el-menu-item(v-else @click='toggle(true)') <i class='el-icon-video-play'/> {{$t('common.start')}}
el-menu-item(@click='$router.push(`/add/${event.parentId}`)') <i class='el-icon-edit'/> {{$t('common.edit')}}
el-menu-item(@click='remove(true)') <i class='el-icon-delete'/> {{$t('common.remove')}}
v-menu-item(v-if='event.parent.is_visible' @click='toggle(true)') <i class='el-icon-video-pause'/> {{$t('common.pause')}}
v-menu-item(v-else @click='toggle(true)') <i class='el-icon-video-play'/> {{$t('common.start')}}
v-menu-item(@click='$router.push(`/add/${event.parentId}`)') <i class='el-icon-edit'/> {{$t('common.edit')}}
v-menu-item(@click='remove(true)') <i class='el-icon-delete'/> {{$t('common.remove')}}
</template>
<script>
import { MessageBox } from 'element-ui'

View File

@@ -1,11 +1,12 @@
<template lang="pug">
el-main
v-container
p {{$t('export.intro')}}
//- Search
el-tabs.mt-2(v-model='type')
v-tabs(v-model='type')
//- TOFIX
//- el-tab-pane.pt-1(label='email' name='email')
//- v-tab.pt-1(label='email' name='email')
//- v-tab-item
//- p(v-html='$t(`export.email_description`)')
//- el-form(@submit.native.prevent)
//- //- el-switch(v-model='notification.notify_on_add' :active-text="$t('notify_on_insert')")
@@ -14,42 +15,45 @@
//- el-input.mt-2(v-model='notification.email' :placeholder="$t('export.insert_your_address')" ref='email')
//- el-button.mt-2.float-right(native-type= 'submit' type='success' @click='add_notification') {{$t('common.send')}}
el-tab-pane.pt-1(label='Feed rss' name='rss')
v-tab {{$t('common.feed')}}
v-tab-item
span(v-html='$t(`export.feed_description`)')
el-input(v-model='link')
el-button(slot='append' plain
v-clipboard:copy='link' v-clipboard:success='copyLink'
type="primary" icon='el-icon-document' ) {{$t("common.copy")}}
v-text-field(v-model='link' readonly)
v-btn(slot='append' plain text
v-clipboard:copy='link'
v-clipboard:success='copyLink') {{$t("common.copy")}}
el-tab-pane.pt-1(v-if='settings.enable_federation' :label="$t('common.fediverse')" name='fediverse')
v-tab(v-if='settings.enable_federation') {{$t('common.fediverse')}}
v-tab-item
FollowMe
el-tab-pane.pt-1(label='ics/ical' name='ics')
v-tab ics/ical
v-tab-item
p(v-html='$t(`export.ical_description`)')
el-input(v-model='link')
el-button(slot='append' v-clipboard:copy='link' v-clipboard:success='copyLink'
plain type="primary" icon='el-icon-document') {{$t("common.copy")}}
v-text-field(v-model='link')
v-btn(slot='append' v-clipboard:copy='link' v-clipboard:success='copyLink') {{$t("common.copy")}}
el-tab-pane.pt-1(label='list' name='list')
v-tab List
v-tab-item
p(v-html='$t(`export.list_description`)')
el-row
el-col.mr-2(:span='11')
el-input(v-model='list.title') Title
el-col.float-right(:span='12')
v-row
v-col.mr-2(:span='11')
v-text-field(v-model='list.title') Title
v-col.float-right(:span='12')
List(
:title='list.title'
:events='filteredEvents')
el-input.mb-1(type='textarea' v-model='listScript' readonly )
el-button.float-right(plain v-clipboard:copy='listScript' v-clipboard:success='copyLink'
type='primary' icon='el-icon-document') {{$t('common.copy')}}
v-text-field.mb-1(type='textarea' v-model='listScript' readonly )
v-btn(plain v-clipboard:copy='listScript' v-clipboard:success='copyLink') {{$t('common.copy')}}
//- TOFIX
//- el-tab-pane.pt-1(label='calendar' name='calendar')
//- v-tab.pt-1(label='calendar' name='calendar')
//- v-tab-item
//- p(v-html='$t(`export.calendar_description`)')
//- //- no-ssr
//- Calendar.mb-1
//- el-input.mb-1(type='textarea' v-model='script')
//- v-text-field.mb-1(type='textarea' v-model='script')
//- el-button.float-right(plain type="primary" icon='el-icon-document') Copy
</template>
@@ -57,7 +61,6 @@
import { mapState, mapGetters } from 'vuex'
import List from '@/components/List'
import FollowMe from '../components/FollowMe'
import { Message } from 'element-ui'
export default {
name: 'Exports',
@@ -120,16 +123,17 @@ export default {
},
methods: {
copyLink () {
Message({ message: this.$t('common.copied'), type: 'success', showClose: true })
// Message({ message: this.$t('common.copied'), type: 'success', showClose: true })
this.$root.$emit('message', { message: this.$t('common.feed_url_copied') })
},
add_notification () {
if (!this.notification.email) {
Message({ message: 'Inserisci una mail', showClose: true, type: 'error' })
// Message({ message: 'Inserisci una mail', showClose: true, type: 'error' })
// return this.$refs.email.focus()
}
// await api.addNotification({ ...this.notification, filters: this.filters})
// this.$refs.modal.hide()
Message({ message: this.$t('email_notification_activated'), showClose: true, type: 'success' })
// Message({ message: this.$t('email_notification_activated'), showClose: true, type: 'success' })
},
imgPath (event) {
return event.image_path && event.image_path
@@ -142,9 +146,3 @@ export default {
}
}
</script>
<style>
#list {
max-height: 400px;
overflow-y: auto;
}
</style>