fix pug indent issue

This commit is contained in:
lesion 2022-07-01 15:55:09 +02:00
parent baeb141ccd
commit 1ca44cf048
No known key found for this signature in database
GPG key ID: 352918250B012177
31 changed files with 888 additions and 894 deletions

View file

@ -1,18 +1,18 @@
<template lang="pug"> <template lang="pug">
#calendar #calendar
vc-date-picker( vc-date-picker(
v-model='selectedDate' v-model='selectedDate'
title-position='left' title-position='left'
:is-dark="settings['theme.is_dark']" :is-dark="settings['theme.is_dark']"
:columns="$screens({ sm: 2 }, 1)" :columns="$screens({ sm: 2 }, 1)"
@input='click' @input='click'
@update:from-page='updatePage' @update:from-page='updatePage'
:locale='$i18n.locale' :locale='$i18n.locale'
:attributes='attributes' :attributes='attributes'
transition='fade' transition='fade'
aria-label='Calendar' aria-label='Calendar'
is-expanded is-expanded
is-inline) is-inline)
</template> </template>
<script> <script>

View file

@ -1,19 +1,19 @@
<template lang="pug"> <template lang="pug">
v-dialog(v-model='show' v-dialog(v-model='show'
:fullscreen='$vuetify.breakpoint.xsOnly' :fullscreen='$vuetify.breakpoint.xsOnly'
:color='options.color' :color='options.color'
:title='title' :title='title'
:max-width='options.width' :max-width='options.width'
:style="{ zIndex: options.zIndex, position: 'absolute' }" :style="{ zIndex: options.zIndex, position: 'absolute' }"
@keydown.esc='cancel') @keydown.esc='cancel')
v-card v-card
v-card-title {{ title }} v-card-title {{ title }}
v-card-text(v-show='!!message') {{ message }} v-card-text(v-show='!!message') {{ message }}
v-card-actions v-card-actions
v-spacer v-spacer
v-btn(text color='error' @click='cancel') {{$t('common.cancel')}} v-btn(text color='error' @click='cancel') {{$t('common.cancel')}}
v-btn(text color='primary' @click='agree') {{$t('common.ok')}} v-btn(text color='primary' @click='agree') {{$t('common.ok')}}
</template> </template>
<script> <script>

View file

@ -1,23 +1,23 @@
<template lang="pug"> <template lang="pug">
v-container v-container
v-card-title.text-h5 Database v-card-title.text-h5 Database
v-card-text v-card-text
v-form v-form
v-btn-toggle(text color='primary' v-model='db.dialect') v-btn-toggle(text color='primary' v-model='db.dialect')
v-btn(value='sqlite' text) sqlite v-btn(value='sqlite' text) sqlite
v-btn(value='postgres' text) postgres v-btn(value='postgres' text) postgres
v-btn(value='mariadb' text) mariadb v-btn(value='mariadb' text) mariadb
template(v-if='db.dialect === "sqlite"') template(v-if='db.dialect === "sqlite"')
v-text-field(v-model='db.storage' label='Path') v-text-field(v-model='db.storage' label='Path')
template(v-if='db.dialect !== "sqlite"') template(v-if='db.dialect !== "sqlite"')
v-text-field(v-model='db.host' label='Hostname' :rules="[$validators.required('hostname')]") v-text-field(v-model='db.host' label='Hostname' :rules="[$validators.required('hostname')]")
v-text-field(v-model='db.database' label='Database' :rules="[$validators.required('database')]") v-text-field(v-model='db.database' label='Database' :rules="[$validators.required('database')]")
v-text-field(v-model='db.username' label='Username' :rules="[$validators.required('username')]") v-text-field(v-model='db.username' label='Username' :rules="[$validators.required('username')]")
v-text-field(type='password' v-model='db.password' label='Password' :rules="[$validators.required('password')]") v-text-field(type='password' v-model='db.password' label='Password' :rules="[$validators.required('password')]")
v-card-actions v-card-actions
v-btn(text @click='checkDb' color='primary' :loading='loading' :disabled='loading') {{$t('common.next')}} v-btn(text @click='checkDb' color='primary' :loading='loading' :disabled='loading') {{$t('common.next')}}
v-icon(v-text='mdiArrowRight') v-icon(v-text='mdiArrowRight')
</template> </template>
<script> <script>
import { mdiArrowRight } from '@mdi/js' import { mdiArrowRight } from '@mdi/js'

View file

@ -1,67 +1,67 @@
<template lang='pug'> <template lang='pug'>
.editor(:class='focused') .editor(:class='focused')
.label {{label}} .label {{label}}
editor-menu-bar.menubar.is-hidden(:editor='editor' editor-menu-bar.menubar.is-hidden(:editor='editor'
:keep-in-bounds='true' v-slot='{ commands, isActive, getMarkAttrs, focused }') :keep-in-bounds='true' v-slot='{ commands, isActive, getMarkAttrs, focused }')
v-btn-toggle(dense) v-btn-toggle(dense)
v-btn(icon text tabindex='-1' v-btn(icon text tabindex='-1'
:class="{ primary: isActive.bold() }" :class="{ primary: isActive.bold() }"
@click="commands.bold") @click="commands.bold")
v-icon(v-text='mdiFormatBold') v-icon(v-text='mdiFormatBold')
v-btn(icon text tabindex='-1' v-btn(icon text tabindex='-1'
:class="{ primary: isActive.underline() }" :class="{ primary: isActive.underline() }"
@click="commands.underline") @click="commands.underline")
v-icon(v-text='mdiFormatUnderline') v-icon(v-text='mdiFormatUnderline')
v-btn(icon text tabindex='-1' v-btn(icon text tabindex='-1'
:class="{ primary: isActive.strike() }" :class="{ primary: isActive.strike() }"
@click="commands.strike") @click="commands.strike")
v-icon(v-text='mdiFormatStrikethroughVariant') v-icon(v-text='mdiFormatStrikethroughVariant')
v-btn(icon text tabindex='-1' v-btn(icon text tabindex='-1'
:class="{ primary: isActive.italic() }" :class="{ primary: isActive.italic() }"
@click="commands.italic") @click="commands.italic")
v-icon(v-text='mdiFormatItalic') v-icon(v-text='mdiFormatItalic')
v-btn(icon text tabindex='-1' v-btn(icon text tabindex='-1'
:class="{ primary: isActive.heading({level: 1}) }" :class="{ primary: isActive.heading({level: 1}) }"
@click="commands.heading({level: 1})") @click="commands.heading({level: 1})")
v-icon(v-text='mdiFormatHeader1') v-icon(v-text='mdiFormatHeader1')
v-btn(icon text tabindex='-1' v-btn(icon text tabindex='-1'
:class="{ primary: isActive.heading({level: 2}) }" :class="{ primary: isActive.heading({level: 2}) }"
@click="commands.heading({level: 2})") @click="commands.heading({level: 2})")
v-icon(v-text='mdiFormatHeader2') v-icon(v-text='mdiFormatHeader2')
v-btn(icon text tabindex='-1' v-btn(icon text tabindex='-1'
:class="{ primary: isActive.heading({level: 3}) }" :class="{ primary: isActive.heading({level: 3}) }"
@click="commands.heading({level: 3})") @click="commands.heading({level: 3})")
v-icon(v-text='mdiFormatHeader3') v-icon(v-text='mdiFormatHeader3')
v-btn(icon text tabindex='-1' v-btn(icon text tabindex='-1'
:class="{ primary: isActive.code() }" :class="{ primary: isActive.code() }"
@click="commands.code") @click="commands.code")
v-icon(v-text='mdiCodeTags') v-icon(v-text='mdiCodeTags')
v-btn(icon text tabindex='-1' v-btn(icon text tabindex='-1'
:class="{ primary: isActive.blockquote() }" :class="{ primary: isActive.blockquote() }"
@click="commands.blockquote") @click="commands.blockquote")
v-icon(v-text='mdiFormatQuoteOpen') v-icon(v-text='mdiFormatQuoteOpen')
v-btn(icon text tabindex='-1' v-btn(icon text tabindex='-1'
:class="{ primary: isActive.bullet_list() }" :class="{ primary: isActive.bullet_list() }"
@click="commands.bullet_list") @click="commands.bullet_list")
v-icon(v-text='mdiFormatListBulleted') v-icon(v-text='mdiFormatListBulleted')
v-btn(icon text tabindex='-1' :class='{ primary: isActive.link() }' v-btn(icon text tabindex='-1' :class='{ primary: isActive.link() }'
@click='commands.link({href: getMarkAttrs("link") && getMarkAttrs("link").href ? "" : "https://"}); $refs.link.focus();') @click='commands.link({href: getMarkAttrs("link") && getMarkAttrs("link").href ? "" : "https://"}); $refs.link.focus();')
v-icon(v-text='mdiLink') v-icon(v-text='mdiLink')
v-text-field.pt-0.ml-1(v-show='isActive.link()' ref='link' @focus='focus' @blur='e => { blur(); commands.link({ href: e.target.value}) }' hide-details v-text-field.pt-0.ml-1(v-show='isActive.link()' ref='link' @focus='focus' @blur='e => { blur(); commands.link({ href: e.target.value}) }' hide-details
:value='isActive.link() && getMarkAttrs("link") && getMarkAttrs("link").href || ""' :value='isActive.link() && getMarkAttrs("link") && getMarkAttrs("link").href || ""'
@keypress.enter='commands.link({ href: $event.target.value}); editor.focus()') @keypress.enter='commands.link({ href: $event.target.value}); editor.focus()')
editor-content.content(:editor='editor' spellcheck='false' :style="{ 'max-height': maxHeight }" :aria-label='label' :label='label') editor-content.content(:editor='editor' spellcheck='false' :style="{ 'max-height': maxHeight }" :aria-label='label' :label='label')
</template> </template>
<script> <script>
import debounce from 'lodash/debounce' import debounce from 'lodash/debounce'

View file

@ -1,51 +1,51 @@
<template lang="pug"> <template lang="pug">
v-card.h-event.event.d-flex(itemscope itemtype="https://schema.org/Event") v-card.h-event.event.d-flex(itemscope itemtype="https://schema.org/Event")
nuxt-link(:to='`/event/${event.slug || event.id}`' itemprop="url") nuxt-link(:to='`/event/${event.slug || event.id}`' itemprop="url")
MyPicture(:event='event' thumb :lazy='lazy') MyPicture(:event='event' thumb :lazy='lazy')
v-icon.float-right.mr-1(v-if='event.parentId' color='success' v-text='mdiRepeat') v-icon.float-right.mr-1(v-if='event.parentId' color='success' v-text='mdiRepeat')
.title.p-name(itemprop="name") {{event.title}} .title.p-name(itemprop="name") {{event.title}}
v-card-text.body.pt-0.pb-0 v-card-text.body.pt-0.pb-0
time.dt-start.subtitle-1(:datetime='event.start_datetime|unixFormat("YYYY-MM-DD HH:mm")' itemprop="startDate" :content="event.start_datetime|unixFormat('YYYY-MM-DDTHH:mm')") <v-icon v-text='mdiCalendar'></v-icon> {{ event|when }} time.dt-start.subtitle-1(:datetime='event.start_datetime|unixFormat("YYYY-MM-DD HH:mm")' itemprop="startDate" :content="event.start_datetime|unixFormat('YYYY-MM-DDTHH:mm')") <v-icon v-text='mdiCalendar'></v-icon> {{ event|when }}
.d-none.dt-end(itemprop="endDate" :content="event.end_datetime|unixFormat('YYYY-MM-DDTHH:mm')") {{event.end_datetime|unixFormat('YYYY-MM-DD HH:mm')}} .d-none.dt-end(itemprop="endDate" :content="event.end_datetime|unixFormat('YYYY-MM-DDTHH:mm')") {{event.end_datetime|unixFormat('YYYY-MM-DD HH:mm')}}
nuxt-link.place.d-block.p-location.pl-0(text color='primary' :to='`/place/${event.place.name}`' itemprop="location" :content="event.place.name") <v-icon v-text='mdiMapMarker'></v-icon> {{event.place.name}} nuxt-link.place.d-block.p-location.pl-0(text color='primary' :to='`/place/${event.place.name}`' itemprop="location" :content="event.place.name") <v-icon v-text='mdiMapMarker'></v-icon> {{event.place.name}}
.d-none(itemprop='location.address') {{event.place.address}} .d-none(itemprop='location.address') {{event.place.address}}
v-card-actions.pt-0.actions.justify-space-between v-card-actions.pt-0.actions.justify-space-between
.tags .tags
v-chip.ml-1.mt-1(v-for='tag in event.tags.slice(0,6)' small :to='`/tag/${tag}`' v-chip.ml-1.mt-1(v-for='tag in event.tags.slice(0,6)' small :to='`/tag/${tag}`'
:key='tag' outlined color='primary') {{tag}} :key='tag' outlined color='primary') {{tag}}
client-only client-only
v-menu(offset-y eager) v-menu(offset-y eager)
template(v-slot:activator="{on}") template(v-slot:activator="{on}")
v-btn.align-self-end(icon v-on='on' color='primary' title='more' aria-label='more') v-btn.align-self-end(icon v-on='on' color='primary' title='more' aria-label='more')
v-icon(v-text='mdiDotsVertical') v-icon(v-text='mdiDotsVertical')
v-list(dense) v-list(dense)
v-list-item-group v-list-item-group
v-list-item(@click='clipboard(`${settings.baseurl}/event/${event.slug || event.id}`)') v-list-item(@click='clipboard(`${settings.baseurl}/event/${event.slug || event.id}`)')
v-list-item-icon v-list-item-icon
v-icon(v-text='mdiContentCopy') v-icon(v-text='mdiContentCopy')
v-list-item-content v-list-item-content
v-list-item-title {{$t('common.copy_link')}} v-list-item-title {{$t('common.copy_link')}}
v-list-item(:href='`/api/event/${event.slug || event.id}.ics`') v-list-item(:href='`/api/event/${event.slug || event.id}.ics`')
v-list-item-icon v-list-item-icon
v-icon(v-text='mdiCalendarExport') v-icon(v-text='mdiCalendarExport')
v-list-item-content v-list-item-content
v-list-item-title {{$t('common.add_to_calendar')}} v-list-item-title {{$t('common.add_to_calendar')}}
v-list-item(v-if='is_mine' :to='`/add/${event.id}`') v-list-item(v-if='is_mine' :to='`/add/${event.id}`')
v-list-item-icon v-list-item-icon
v-icon(v-text='mdiPencil') v-icon(v-text='mdiPencil')
v-list-item-content v-list-item-content
v-list-item-title {{$t('common.edit')}} v-list-item-title {{$t('common.edit')}}
v-list-item(v-if='is_mine' @click='remove(false)') v-list-item(v-if='is_mine' @click='remove(false)')
v-list-item-icon v-list-item-icon
v-icon(color='error' v-text='mdiDeleteForever') v-icon(color='error' v-text='mdiDeleteForever')
v-list-item-content v-list-item-content
v-list-item-title {{$t('common.remove')}} v-list-item-title {{$t('common.remove')}}
template(#placeholder) template(#placeholder)
v-btn.align-self-end(icon color='primary' aria-label='more') v-btn.align-self-end(icon color='primary' aria-label='more')
v-icon(v-text='mdiDotsVertical') v-icon(v-text='mdiDotsVertical')
</template> </template>
<script> <script>
import { mapState } from 'vuex' import { mapState } from 'vuex'

View file

@ -1,23 +1,23 @@
<template lang='pug'> <template lang='pug'>
v-card v-card
v-card-title(v-text="$t('common.follow_me_title')") v-card-title(v-text="$t('common.follow_me_title')")
v-card-text v-card-text
p(v-html="$t('event.follow_me_description', { title: settings.title, account: `@${settings.instance_name}@${settings.hostname}`})") p(v-html="$t('event.follow_me_description', { title: settings.title, account: `@${settings.instance_name}@${settings.hostname}`})")
v-text-field( v-text-field(
:rules="[$validators.required('common.url')]" :rules="[$validators.required('common.url')]"
:loading='loading' :loading='loading'
:label="$t('common.url')" :label="$t('common.url')"
v-model='instance_hostname') v-model='instance_hostname')
v-btn(v-if='!isDialog' slot='prepend' text :disabled='(!couldGo || !proceed)' :href='link' target='_blank' v-btn(v-if='!isDialog' slot='prepend' text :disabled='(!couldGo || !proceed)' :href='link' target='_blank'
:loading='loading' color="primary") {{$t("common.follow")}}
p(slot='append') <img class='instance_thumb' :src="instance.thumbnail"/> {{instance.title}}
v-card-actions(v-if='isDialog')
v-spacer
v-btn(v-if='isDialog' color='warning' @click="$emit('close')") {{$t("common.cancel")}}
v-btn(:disabled='(!couldGo || !proceed)' :href='link' target='_blank'
:loading='loading' color="primary") {{$t("common.follow")}} :loading='loading' color="primary") {{$t("common.follow")}}
p(slot='append') <img class='instance_thumb' :src="instance.thumbnail"/> {{instance.title}}
v-card-actions(v-if='isDialog')
v-spacer
v-btn(v-if='isDialog' color='warning' @click="$emit('close')") {{$t("common.cancel")}}
v-btn(:disabled='(!couldGo || !proceed)' :href='link' target='_blank'
:loading='loading' color="primary") {{$t("common.follow")}}
</template> </template>
<script> <script>
import { mapState } from 'vuex' import { mapState } from 'vuex'

View file

@ -1,31 +1,31 @@
<template lang="pug"> <template lang="pug">
v-footer(aria-label='Footer') v-footer(aria-label='Footer')
v-dialog(v-model='showFollowMe' destroy-on-close max-width='700px' :fullscreen='$vuetify.breakpoint.xsOnly') v-dialog(v-model='showFollowMe' destroy-on-close max-width='700px' :fullscreen='$vuetify.breakpoint.xsOnly')
FollowMe(@close='showFollowMe=false' is-dialog) FollowMe(@close='showFollowMe=false' is-dialog)
v-btn(color='primary' text href='https://gancio.org' target='_blank' rel="noopener") Gancio <small>{{settings.version}}</small> v-btn(color='primary' text href='https://gancio.org' target='_blank' rel="noopener") Gancio <small>{{settings.version}}</small>
v-btn.ml-1(v-for='link in footerLinks' v-btn.ml-1(v-for='link in footerLinks'
:key='link.label' color='primary' text :key='link.label' color='primary' text
:href='link.href' :to='link.to' :target="link.href && '_blank'") {{link.label}} :href='link.href' :to='link.to' :target="link.href && '_blank'") {{link.label}}
v-menu(v-if='settings.enable_trusted_instances && settings.trusted_instances && settings.trusted_instances.length' v-menu(v-if='settings.enable_trusted_instances && settings.trusted_instances && settings.trusted_instances.length'
offset-y bottom open-on-hover transition="slide-y-transition") offset-y bottom open-on-hover transition="slide-y-transition")
template(v-slot:activator="{ on, attrs }") template(v-slot:activator="{ on, attrs }")
v-btn.ml-1(v-bind='attrs' v-on='on' color='primary' text) {{$t('common.places')}} v-btn.ml-1(v-bind='attrs' v-on='on' color='primary' text) {{$t('common.places')}}
v-list(subheaders two-lines) v-list(subheaders two-lines)
v-list-item(v-for='instance in settings.trusted_instances' v-list-item(v-for='instance in settings.trusted_instances'
:key='instance.name' :key='instance.name'
target='_blank' target='_blank'
:href='instance.url' :href='instance.url'
two-line) two-line)
v-list-item-avatar v-list-item-avatar
v-img(:src='`${instance.url}/logo.png`') v-img(:src='`${instance.url}/logo.png`')
v-list-item-content v-list-item-content
v-list-item-title {{instance.name}} v-list-item-title {{instance.name}}
v-list-item-subtitle {{instance.label}} v-list-item-subtitle {{instance.label}}
v-btn.ml-1(v-if='settings.enable_federation' color='primary' text rel='me' @click.prevent='showFollowMe=true') {{$t('event.interact_with_me')}} v-btn.ml-1(v-if='settings.enable_federation' color='primary' text rel='me' @click.prevent='showFollowMe=true') {{$t('event.interact_with_me')}}
</template> </template>
<script> <script>
import { mapState } from 'vuex' import { mapState } from 'vuex'

View file

@ -1,36 +1,35 @@
<template lang="pug"> <template lang="pug">
v-card v-card
v-card-title {{$t('common.import')}} v-card-title {{$t('common.import')}}
v-card-text v-card-text
p(v-html="$t('event.import_description')") p(v-html="$t('event.import_description')")
v-form(v-model='valid' ref='form' lazy-validation @submit.prevent='importGeneric') v-form(v-model='valid' ref='form' lazy-validation @submit.prevent='importGeneric')
v-row v-row
.col-xl-5.col-lg-5.col-md-7.col-sm-12.col-xs-12 .col-xl-5.col-lg-5.col-md-7.col-sm-12.col-xs-12
v-text-field(v-model='URL' v-text-field(v-model='URL'
:label="$t('common.url')" :label="$t('common.url')"
:hint="$t('event.import_URL')" :hint="$t('event.import_URL')"
persistent-hint persistent-hint
:loading='loading' :error='error' :loading='loading' :error='error'
:error-messages='errorMessage') :error-messages='errorMessage')
.col .col
v-file-input( v-file-input(
v-model='file' v-model='file'
accept=".ics" accept=".ics"
:label="$t('event.ics')" :label="$t('event.ics')"
:hint="$t('event.import_ICS')" :hint="$t('event.import_ICS')"
persistent-hint) persistent-hint)
v-card-actions v-card-actions
v-spacer v-spacer
v-btn(text @click='$emit("close")' color='warning') {{$t('common.cancel')}} v-btn(text @click='$emit("close")' color='warning') {{$t('common.cancel')}}
v-btn(text @click='importGeneric' :loading='loading' :disabled='loading' v-btn(text @click='importGeneric' :loading='loading' :disabled='loading'
color='primary') {{$t('common.import')}} color='primary') {{$t('common.import')}}
</template> </template>
<script> <script>
import ical from 'ical.js' import ical from 'ical.js'
import get from 'lodash/get' import get from 'lodash/get'
import { mapState } from 'vuex'
export default { export default {
name: 'ImportDialog', name: 'ImportDialog',

View file

@ -1,6 +1,6 @@
<template lang='pug'> <template lang='pug'>
.loading-page(:class='{ loading }') .loading-page(:class='{ loading }')
v-progress-circular(:size="100" :width="10" style='color: orangered;' indeterminate) v-progress-circular(:size="100" :width="10" style='color: orangered;' indeterminate)
</template> </template>
<script> <script>

View file

@ -1,51 +1,51 @@
<template lang="pug"> <template lang="pug">
span span
v-dialog(v-model='openMediaDetails' :fullscreen="$vuetify.breakpoint.xsOnly" width='1000px') v-dialog(v-model='openMediaDetails' :fullscreen="$vuetify.breakpoint.xsOnly" width='1000px')
v-card v-card
v-card-title {{$t('common.media')}} v-card-title {{$t('common.media')}}
v-card-text v-card-text
v-row.mt-1 v-row.mt-1
v-col#focalPointSelector( v-col#focalPointSelector(
@mousedown='handleStart' @touchstart='handleStart' @mousedown='handleStart' @touchstart='handleStart'
@mousemove='handleMove' @touchmove='handleMove' @mousemove='handleMove' @touchmove='handleMove'
@mouseup='handleStop' @touchend='handleStop' @mouseup='handleStop' @touchend='handleStop'
) )
div.focalPoint(:style="{ top, left }") div.focalPoint(:style="{ top, left }")
img(v-if='mediaPreview' :src='mediaPreview') img(v-if='mediaPreview' :src='mediaPreview')
v-col.col-12.col-sm-4 v-col.col-12.col-sm-4
p {{$t('event.choose_focal_point')}} p {{$t('event.choose_focal_point')}}
img.mediaPreview.d-none.d-sm-block(v-if='mediaPreview' img.mediaPreview.d-none.d-sm-block(v-if='mediaPreview'
:src='mediaPreview' :style="{ 'object-position': position }") :src='mediaPreview' :style="{ 'object-position': position }")
v-textarea.mt-4(type='text' v-textarea.mt-4(type='text'
label='Alternative text' label='Alternative text'
persistent-hint persistent-hint
@input='v => name=v' @input='v => name=v'
:value='value.name' filled :value='value.name' filled
:hint='$t("event.alt_text_description")') :hint='$t("event.alt_text_description")')
br br
v-card-actions.justify-space-between v-card-actions.justify-space-between
v-btn(text @click='openMediaDetails=false' color='warning') Cancel v-btn(text @click='openMediaDetails=false' color='warning') Cancel
v-btn(text color='primary' @click='save') Save v-btn(text color='primary' @click='save') Save
h3.mb-3.font-weight-regular(v-if='mediaPreview') {{$t('common.media')}} h3.mb-3.font-weight-regular(v-if='mediaPreview') {{$t('common.media')}}
v-card-actions(v-if='mediaPreview') v-card-actions(v-if='mediaPreview')
v-spacer v-spacer
v-btn(text color='primary' @click='openMediaDetails = true') {{$t('common.edit')}} v-btn(text color='primary' @click='openMediaDetails = true') {{$t('common.edit')}}
v-btn(text color='error' @click='remove') {{$t('common.remove')}} v-btn(text color='error' @click='remove') {{$t('common.remove')}}
div(v-if='mediaPreview') div(v-if='mediaPreview')
img.mediaPreview.col-12.ml-3(:src='mediaPreview' :style="{ 'object-position': savedPosition }") img.mediaPreview.col-12.ml-3(:src='mediaPreview' :style="{ 'object-position': savedPosition }")
span.float-right {{event.media[0].name}} span.float-right {{event.media[0].name}}
v-file-input( v-file-input(
v-else v-else
:label="$t('common.media')" :label="$t('common.media')"
:hint="$t('event.media_description')" :hint="$t('event.media_description')"
:prepend-icon="mdiCamera" :prepend-icon="mdiCamera"
:value='value.image' :value='value.image'
@change="selectMedia" @change="selectMedia"
persistent-hint persistent-hint
accept='image/*') accept='image/*')
</template> </template>
<script> <script>
import { mdiCamera } from '@mdi/js' import { mdiCamera } from '@mdi/js'

View file

@ -1,16 +1,16 @@
<template lang='pug'> <template lang='pug'>
v-snackbar( v-snackbar(
v-model="active" v-model="active"
:color="color" :color="color"
:bottom="bottom" :bottom="bottom"
:top="top" :top="top"
:left="left" :left="left"
:right="right" :right="right"
:timeout="timeout") :timeout="timeout")
v-icon.mr-3(color="white" v-text='icon') v-icon.mr-3(color="white" v-text='icon')
span {{ message }} span {{ message }}
template(v-slot:action="{ }") template(v-slot:action="{ }")
v-icon(size="16" @click="active = false" v-text='mdiCloseCircle') v-icon(size="16" @click="active = false" v-text='mdiCloseCircle')
</template> </template>
<script> <script>
@ -19,7 +19,7 @@ import { mdiAlert, mdiCloseCircle, mdiInformation } from '@mdi/js'
export default { export default {
data () { data () {
return { return {
mdiAlert, mdiAlert, mdiCloseCircle, mdiInformation, mdiAlert, mdiCloseCircle, mdiInformation,
icon: mdiInformation, icon: mdiInformation,
color: 'secondary', color: 'secondary',
bottom: true, bottom: true,

View file

@ -1,35 +1,34 @@
<template lang='pug'> <template lang='pug'>
v-container v-container
v-card-title {{$t('common.announcements')}} v-card-title {{$t('common.announcements')}}
v-card-subtitle(v-html="$t('admin.announcement_description')") v-card-subtitle(v-html="$t('admin.announcement_description')")
v-dialog(v-model='dialog' width='800px' :fullscreen='$vuetify.breakpoint.xsOnly') v-dialog(v-model='dialog' width='800px' :fullscreen='$vuetify.breakpoint.xsOnly')
v-card v-card
v-card-title {{$t('admin.new_announcement')}} v-card-title {{$t('admin.new_announcement')}}
v-card-text.px-0 v-card-text.px-0
v-form(v-model='valid' ref='announcement' @submit.prevent='save' lazy-validation) v-form(v-model='valid' ref='announcement' @submit.prevent='save' lazy-validation)
v-text-field.col-12(v-model='announcement.title' v-text-field.col-12(v-model='announcement.title'
:rules="[$validators.required('common.title')]" :rules="[$validators.required('common.title')]"
:label='$t("common.title")') :label='$t("common.title")')
Editor.col-12(v-model='announcement.announcement' Editor.col-12(v-model='announcement.announcement'
border no-save max-height='400px' :placeholder="$t('common.description')") border no-save max-height='400px' :placeholder="$t('common.description')")
v-card-actions v-card-actions
v-spacer v-spacer
v-btn(@click='dialog=false' color='error') {{$t('common.cancel')}} v-btn(@click='dialog=false' color='error') {{$t('common.cancel')}}
v-btn(@click='save' color='primary' :disabled='!valid || loading' :loading='loading') {{$t(`common.${editing?'save':'send'}`)}} v-btn(@click='save' color='primary' :disabled='!valid || loading' :loading='loading') {{$t(`common.${editing?'save':'send'}`)}}
v-btn(@click='openDialog' text color='primary') <v-icon v-text='mdiPlus'></v-icon> {{$t('common.add')}}
v-card-text
v-data-table(
v-if='announcements.length'
:footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }'
:headers='headers'
:items='announcements')
template(v-slot:item.actions='{ item }')
v-btn(text small @click.stop='toggle(item)'
:color='item.visible?"warning":"success"') {{item.visible?$t('common.disable'):$t('common.enable')}}
v-btn(text small @click='edit(item)' color='primary') {{$t('common.edit')}}
v-btn(text small @click='remove(item)' color='error') {{$t('common.delete')}}
v-btn(@click='openDialog' text color='primary') <v-icon v-text='mdiPlus'></v-icon> {{$t('common.add')}}
v-card-text
v-data-table(
v-if='announcements.length'
:footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }'
:headers='headers'
:items='announcements')
template(v-slot:item.actions='{ item }')
v-btn(text small @click.stop='toggle(item)'
:color='item.visible?"warning":"success"') {{item.visible?$t('common.disable'):$t('common.enable')}}
v-btn(text small @click='edit(item)' color='primary') {{$t('common.edit')}}
v-btn(text small @click='remove(item)' color='error') {{$t('common.delete')}}
</template> </template>
<script> <script>
import { mapActions } from 'vuex' import { mapActions } from 'vuex'

View file

@ -1,21 +1,20 @@
<template lang='pug'> <template lang='pug'>
v-container v-container
v-card-title {{$t('common.events')}} v-card-title {{$t('common.events')}}
v-card-subtitle {{$t('admin.event_confirm_description')}} v-card-subtitle {{$t('admin.event_confirm_description')}}
v-card-text v-card-text
v-data-table( v-data-table(
:hide-default-footer='unconfirmedEvents.length<10' :hide-default-footer='unconfirmedEvents.length<10'
:footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }' :footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }'
:items='unconfirmedEvents' :items='unconfirmedEvents'
:headers='headers') :headers='headers')
template(v-slot:item.when='{ item }') {{item|when}} template(v-slot:item.when='{ item }') {{item|when}}
template(v-slot:item.actions='{ item }') template(v-slot:item.actions='{ item }')
v-btn(text small @click='confirm(item)' color='success') {{$t('common.confirm')}} v-btn(text small @click='confirm(item)' color='success') {{$t('common.confirm')}}
v-btn(text small :to='`/event/${item.slug || item.id}`' color='success') {{$t('common.preview')}} v-btn(text small :to='`/event/${item.slug || item.id}`' color='success') {{$t('common.preview')}}
v-btn(text small :to='`/add/${item.id}`' color='warning') {{$t('common.edit')}} v-btn(text small :to='`/add/${item.id}`' color='warning') {{$t('common.edit')}}
v-btn(text small @click='remove(item)' v-btn(text small @click='remove(item)'
color='error') {{$t('common.delete')}} color='error') {{$t('common.delete')}}
</template> </template>
<script> <script>
import { mdiChevronLeft, mdiChevronRight } from '@mdi/js' import { mdiChevronLeft, mdiChevronRight } from '@mdi/js'

View file

@ -1,71 +1,71 @@
<template lang="pug"> <template lang="pug">
v-container v-container
v-card-title {{$t('common.federation')}} v-card-title {{$t('common.federation')}}
v-card-text v-card-text
v-switch(v-model='enable_federation' v-switch(v-model='enable_federation'
:label="$t('admin.enable_federation')" :label="$t('admin.enable_federation')"
persistent-hint
inset
:hint="$t('admin.enable_federation_help')")
template(v-if='enable_federation')
v-switch.mt-4(v-model='enable_resources'
:label="$t('admin.enable_resources')"
:hint="$t('admin.enable_resources_help')"
persistent-hint inset)
v-switch.mt-4(v-model='hide_boosts'
:label="$t('admin.hide_boost_bookmark')"
:hint="$t('admin.hide_boost_bookmark_help')"
persistent-hint inset)
//- div.mt-4 {{$t('admin.instance_name')}}
v-text-field.mt-5(v-model='instance_name'
:label="$t('admin.instance_name')"
:hint="`${$t('admin.instance_name_help')} ${instance_ap_url}`"
placeholder='Instance name' persistent-hint
@blur='save("instance_name", instance_name)')
v-switch.mt-4(v-model='enable_trusted_instances'
:label="$t('admin.enable_trusted_instances')"
persistent-hint inset
:hint="$t('admin.trusted_instances_help')")
template(v-if='enable_trusted_instances')
v-text-field.mt-4(v-model='instance_place'
:label="$t('admin.instance_place')"
persistent-hint persistent-hint
inset :hint="$t('admin.instance_place_help')"
:hint="$t('admin.enable_federation_help')") @blur='save("instance_place", instance_place)'
)
template(v-if='enable_federation') v-dialog(v-model='dialogAddInstance' width='500px' :fullscreen='$vuetify.breakpoint.xsOnly')
v-card
v-card-title {{$t('admin.add_trusted_instance')}}
v-card-text
v-form(v-model='valid' @submit.prevent='createTrustedInstance' ref='form' lazy-validation)
v-text-field.mt-4(v-model='instance_url'
persistent-hint
:rules="[$validators.required('common.url')]"
:loading='loading'
:hint="$t('admin.add_trusted_instance')"
:label="$t('common.url')")
v-card-actions
v-spacer
v-btn(color='error' @click='dialogAddInstance=false') {{$t('common.cancel')}}
v-btn(color='primary' :disabled='!valid || loading' :loading='loading' @click='createTrustedInstance') {{$t('common.ok')}}
v-switch.mt-4(v-model='enable_resources' v-btn.mt-4(@click='dialogAddInstance = true' color='primary' text) <v-icon v-text='mdiPlus'></v-icon> {{$t('admin.add_instance')}}
:label="$t('admin.enable_resources')" v-data-table(
:hint="$t('admin.enable_resources_help')" v-if='settings.trusted_instances.length'
persistent-hint inset) :hide-default-footer='settings.trusted_instances.length<10'
:footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }'
v-switch.mt-4(v-model='hide_boosts' :headers='headers'
:label="$t('admin.hide_boost_bookmark')" :items='settings.trusted_instances')
:hint="$t('admin.hide_boost_bookmark_help')" template(v-slot:item.actions="{item}")
persistent-hint inset) v-btn(icon @click='deleteInstance(item)' color='error')
v-icon(v-text='mdiDeleteForever')
//- div.mt-4 {{$t('admin.instance_name')}}
v-text-field.mt-5(v-model='instance_name'
:label="$t('admin.instance_name')"
:hint="`${$t('admin.instance_name_help')} ${instance_ap_url}`"
placeholder='Instance name' persistent-hint
@blur='save("instance_name", instance_name)')
v-switch.mt-4(v-model='enable_trusted_instances'
:label="$t('admin.enable_trusted_instances')"
persistent-hint inset
:hint="$t('admin.trusted_instances_help')")
template(v-if='enable_trusted_instances')
v-text-field.mt-4(v-model='instance_place'
:label="$t('admin.instance_place')"
persistent-hint
:hint="$t('admin.instance_place_help')"
@blur='save("instance_place", instance_place)'
)
v-dialog(v-model='dialogAddInstance' width='500px' :fullscreen='$vuetify.breakpoint.xsOnly')
v-card
v-card-title {{$t('admin.add_trusted_instance')}}
v-card-text
v-form(v-model='valid' @submit.prevent='createTrustedInstance' ref='form' lazy-validation)
v-text-field.mt-4(v-model='instance_url'
persistent-hint
:rules="[$validators.required('common.url')]"
:loading='loading'
:hint="$t('admin.add_trusted_instance')"
:label="$t('common.url')")
v-card-actions
v-spacer
v-btn(color='error' @click='dialogAddInstance=false') {{$t('common.cancel')}}
v-btn(color='primary' :disabled='!valid || loading' :loading='loading' @click='createTrustedInstance') {{$t('common.ok')}}
v-btn.mt-4(@click='dialogAddInstance = true' color='primary' text) <v-icon v-text='mdiPlus'></v-icon> {{$t('admin.add_instance')}}
v-data-table(
v-if='settings.trusted_instances.length'
:hide-default-footer='settings.trusted_instances.length<10'
:footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }'
:headers='headers'
:items='settings.trusted_instances')
template(v-slot:item.actions="{item}")
v-btn(icon @click='deleteInstance(item)' color='error')
v-icon(v-text='mdiDeleteForever')
</template> </template>
<script> <script>

View file

@ -1,62 +1,62 @@
<template lang='pug'> <template lang='pug'>
v-container v-container
v-card-title {{$t('common.moderation')}} v-card-title {{$t('common.moderation')}}
v-card-text v-card-text
v-row v-row
v-col(:span='12') v-col(:span='12')
span {{$t('common.instances')}} span {{$t('common.instances')}}
v-text-field(v-model='instancesFilter' :placeholder="$t('admin.filter_instances')") v-text-field(v-model='instancesFilter' :placeholder="$t('admin.filter_instances')")
v-data-table(:items='instances' v-data-table(:items='instances'
:items-per-page='5' :items-per-page='5'
:search='instancesFilter' :search='instancesFilter'
:hide-default-footer='instances.length<5' :hide-default-footer='instances.length<5'
:footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }' :footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }'
dense :headers='instancesHeader' dense :headers='instancesHeader'
@click:row='instanceSelected') @click:row='instanceSelected')
template(v-slot:item.blocked="{ item }") template(v-slot:item.blocked="{ item }")
v-icon(@click='toggleBlock(item)' v-text='item.blocked ? mdiCheckboxIntermediate : mdiCheckboxBlankOutline') v-icon(@click='toggleBlock(item)' v-text='item.blocked ? mdiCheckboxIntermediate : mdiCheckboxBlankOutline')
v-col(:span='11') v-col(:span='11')
span {{$t('common.users')}} span {{$t('common.users')}}
v-text-field(v-model='usersFilter' :placeholder="$t('admin.filter_users')") v-text-field(v-model='usersFilter' :placeholder="$t('admin.filter_users')")
v-data-table(:items='users' v-data-table(:items='users'
:items-per-page='5' :items-per-page='5'
:search='usersFilter' :search='usersFilter'
:hide-default-footer='users.length<5' :hide-default-footer='users.length<5'
:footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }' :footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }'
dense :headers='usersHeader') dense :headers='usersHeader')
template(v-slot:item.blocked="{ item }") template(v-slot:item.blocked="{ item }")
v-icon(@click='toggleUserBlock(item)' v-text='item.blocked ? mdiCheckboxIntermediate : mdiCheckboxBlankOutline') v-icon(@click='toggleUserBlock(item)' v-text='item.blocked ? mdiCheckboxIntermediate : mdiCheckboxBlankOutline')
div div
v-card-title {{$t('common.resources')}} v-card-title {{$t('common.resources')}}
v-data-table(:items='resources' dense v-data-table(:items='resources' dense
:headers='resourcesHeader' :headers='resourcesHeader'
:hide-default-footer='resources.length<10' :hide-default-footer='resources.length<10'
:items-per-page='10' :items-per-page='10'
:footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }') :footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }')
template(v-slot:item.content='{ item }') template(v-slot:item.content='{ item }')
span(v-html='item.data.content') span(v-html='item.data.content')
template(v-slot:item.created='{ item }') template(v-slot:item.created='{ item }')
span {{item.created | dateFormat('lll')}} span {{item.created | dateFormat('lll')}}
template(v-slot:item.user='{ item }') template(v-slot:item.user='{ item }')
a(:href='item.ap_user.url || item.ap_user.ap_id' target='_blank') {{item.ap_user.preferredUsername}} a(:href='item.ap_user.url || item.ap_user.ap_id' target='_blank') {{item.ap_user.preferredUsername}}
template(v-slot:item.event='{ item }') template(v-slot:item.event='{ item }')
nuxt-link(:to='`/event/${item.event.slug || item.event.id}`') {{item.event.title}} nuxt-link(:to='`/event/${item.event.slug || item.event.id}`') {{item.event.title}}
template(v-slot:item.actions='{ item }') template(v-slot:item.actions='{ item }')
v-menu(offset-y) v-menu(offset-y)
template(v-slot:activator="{ on }") template(v-slot:activator="{ on }")
v-btn.mr-2(v-on='on' color='primary' small icon) v-btn.mr-2(v-on='on' color='primary' small icon)
v-icon(v-text='mdiDotsVertical') v-icon(v-text='mdiDotsVertical')
v-list v-list
v-list-item(v-if='!item.hidden' @click='hideResource(item, true)') v-list-item(v-if='!item.hidden' @click='hideResource(item, true)')
v-list-item-title <v-icon left v-text='mdiEyeOff'></v-icon> {{$t('admin.hide_resource')}} v-list-item-title <v-icon left v-text='mdiEyeOff'></v-icon> {{$t('admin.hide_resource')}}
v-list-item(v-else @click='hideResource(item, false)') v-list-item(v-else @click='hideResource(item, false)')
v-list-item-title <v-icon left v-text='mdiEye'></v-icon> {{$t('admin.show_resource')}} v-list-item-title <v-icon left v-text='mdiEye'></v-icon> {{$t('admin.show_resource')}}
v-list-item(@click='deleteResource(item)') v-list-item(@click='deleteResource(item)')
v-list-item-title <v-icon left v-text='mdiDelete'></v-icon> {{$t('admin.delete_resource')}} v-list-item-title <v-icon left v-text='mdiDelete'></v-icon> {{$t('admin.delete_resource')}}
//- v-list-item(@click='toggleUserBlock(item.ap_user)') //- v-list-item(@click='toggleUserBlock(item.ap_user)')
//- v-list-item-title <v-icon left>mdi-lock</v-icon> {{$t('admin.block_user')}} //- v-list-item-title <v-icon left>mdi-lock</v-icon> {{$t('admin.block_user')}}
</template> </template>
<script> <script>
import { mapState, mapActions } from 'vuex' import { mapState, mapActions } from 'vuex'

View file

@ -1,46 +1,46 @@
<template lang="pug"> <template lang="pug">
v-card v-card
v-card-title SMTP Email configuration v-card-title SMTP Email configuration
v-card-text v-card-text
p(v-html="$t('admin.smtp_description')") p(v-html="$t('admin.smtp_description')")
v-form(v-model='isValid') v-form(v-model='isValid')
v-text-field(v-model='admin_email' v-text-field(v-model='admin_email'
@blur="save('admin_email', admin_email )" @blur="save('admin_email', admin_email )"
:label="$t('admin.sender_email')" :label="$t('admin.sender_email')"
:rules="$validators.email") :rules="$validators.email")
v-switch(v-model='smtp.sendmail' v-switch(v-model='smtp.sendmail'
:label="$t('admin.smtp_use_sendmail')") :label="$t('admin.smtp_use_sendmail')")
v-row(v-if='!smtp.sendmail') v-row(v-if='!smtp.sendmail')
v-col(cols=12 md=9) v-col(cols=12 md=9)
v-text-field(v-model='smtp.host' v-text-field(v-model='smtp.host'
:label="$t('admin.smtp_hostname')" :label="$t('admin.smtp_hostname')"
:rules="[$validators.required('admin.smtp_hostname')]") :rules="[$validators.required('admin.smtp_hostname')]")
v-col(cols=12 md=3) v-col(cols=12 md=3)
v-text-field(v-model='smtp.port' v-text-field(v-model='smtp.port'
:label="$t('admin.smtp_port')" :label="$t('admin.smtp_port')"
:rules="[$validators.required('admin.smtp_port')]") :rules="[$validators.required('admin.smtp_port')]")
v-col(cols=12) v-col(cols=12)
v-switch(v-model='smtp.secure' v-switch(v-model='smtp.secure'
:label="$t('admin.smtp_secure')") :label="$t('admin.smtp_secure')")
v-col(md=6) v-col(md=6)
v-text-field(v-model='smtp.auth.user' v-text-field(v-model='smtp.auth.user'
:label="$t('common.user')") :label="$t('common.user')")
v-col(md=6) v-col(md=6)
v-text-field(v-model='smtp.auth.pass' v-text-field(v-model='smtp.auth.pass'
:label="$t('common.password')" :label="$t('common.password')"
type='password') type='password')
v-card-actions
v-spacer
v-btn(color='primary' @click='testSMTP' :loading='loading' :disabled='loading || !isValid' outlined) {{$t('admin.smtp_test_button')}}
v-btn(color='warning' @click="done" outlined) {{$t("common.ok")}}
v-card-actions
v-spacer
v-btn(color='primary' @click='testSMTP' :loading='loading' :disabled='loading || !isValid' outlined) {{$t('admin.smtp_test_button')}}
v-btn(color='warning' @click="done" outlined) {{$t("common.ok")}}
</template> </template>
<script> <script>
import { mapActions, mapState } from 'vuex' import { mapActions, mapState } from 'vuex'

View file

@ -1,62 +1,61 @@
<template lang="pug"> <template lang="pug">
v-container v-container
v-card-title {{$t('common.settings')}} v-card-title {{$t('common.settings')}}
v-card-text v-card-text
v-text-field(v-model='title' v-text-field(v-model='title'
:label="$t('common.title')" :label="$t('common.title')"
:hint="$t('admin.title_description')" :hint="$t('admin.title_description')"
@blur='save("title", title)' @blur='save("title", title)'
persistent-hint) persistent-hint)
v-text-field.mt-5(v-model='description' v-text-field.mt-5(v-model='description'
:label="$t('common.description')" :label="$t('common.description')"
:hint="$t('admin.description_description')" :hint="$t('admin.description_description')"
persistent-hint persistent-hint
@blur='save("description", description)') @blur='save("description", description)')
//- select timezone //- select timezone
v-autocomplete.mt-5(v-model='instance_timezone' v-autocomplete.mt-5(v-model='instance_timezone'
:label="$t('admin.select_instance_timezone')" :label="$t('admin.select_instance_timezone')"
:hint="$t('admin.instance_timezone_description')" :hint="$t('admin.instance_timezone_description')"
:items="filteredTimezones" :items="filteredTimezones"
persistent-hint persistent-hint
placeholder='Timezone, type to search') placeholder='Timezone, type to search')
v-select.mt-5( v-select.mt-5(
v-model='instance_locale' v-model='instance_locale'
:label="$t('admin.instance_locale')" :label="$t('admin.instance_locale')"
:hint="$t('admin.instance_locale_description')" :hint="$t('admin.instance_locale_description')"
persistent-hint persistent-hint
:items='locales' :items='locales'
) )
v-switch.mt-4(v-model='allow_registration' v-switch.mt-4(v-model='allow_registration'
inset inset
:label="$t('admin.allow_registration_description')") :label="$t('admin.allow_registration_description')")
v-switch.mt-1(v-model='allow_anon_event' v-switch.mt-1(v-model='allow_anon_event'
inset inset
:label="$t('admin.allow_anon_event')") :label="$t('admin.allow_anon_event')")
v-switch.mt-1(v-model='allow_recurrent_event' v-switch.mt-1(v-model='allow_recurrent_event'
inset inset
:label="$t('admin.allow_recurrent_event')") :label="$t('admin.allow_recurrent_event')")
v-switch.mt-1(v-if='allow_recurrent_event' v-switch.mt-1(v-if='allow_recurrent_event'
v-model='recurrent_event_visible' v-model='recurrent_event_visible'
inset inset
:label="$t('admin.recurrent_event_visible')") :label="$t('admin.recurrent_event_visible')")
v-dialog(v-model='showSMTP' destroy-on-close max-width='700px' :fullscreen='$vuetify.breakpoint.xsOnly') v-dialog(v-model='showSMTP' destroy-on-close max-width='700px' :fullscreen='$vuetify.breakpoint.xsOnly')
SMTP(@close='showSMTP = false') SMTP(@close='showSMTP = false')
v-card-actions
v-btn(text @click='showSMTP=true')
<v-icon v-if='showSMTPAlert' color='error' v-text='mdiAlert'></v-icon> {{$t('admin.show_smtp_setup')}}
v-btn(text @click='$emit("complete")' color='primary' v-if='setup') {{$t('common.next')}}
v-icon(v-text='mdiArrowRight')
v-card-actions
v-btn(text @click='showSMTP=true')
<v-icon v-if='showSMTPAlert' color='error' v-text='mdiAlert'></v-icon> {{$t('admin.show_smtp_setup')}}
v-btn(text @click='$emit("complete")' color='primary' v-if='setup') {{$t('common.next')}}
v-icon(v-text='mdiArrowRight')
</template> </template>
<script> <script>

View file

@ -1,69 +1,69 @@
<template lang="pug"> <template lang="pug">
v-container v-container
v-card-title {{$t('common.theme')}} v-card-title {{$t('common.theme')}}
v-card-text v-card-text
//- LOGO //- LOGO
v-file-input.mt-5(ref='upload' v-file-input.mt-5(ref='upload'
:label="$t('admin.favicon')" :label="$t('admin.favicon')"
@change='uploadLogo' @change='uploadLogo'
accept='image/*') accept='image/*')
template(slot='append-outer') template(slot='append-outer')
v-btn(color='warning' text @click='resetLogo') <v-icon v-text='mdiRestore'></v-icon> {{$t('common.reset')}} v-btn(color='warning' text @click='resetLogo') <v-icon v-text='mdiRestore'></v-icon> {{$t('common.reset')}}
v-img(:src='`/logo.png?${logoKey}`' v-img(:src='`/logo.png?${logoKey}`'
max-width="60px" max-height="60px" contain) max-width="60px" max-height="60px" contain)
v-switch.mt-5(v-model='is_dark' v-switch.mt-5(v-model='is_dark'
inset inset
:label="$t('admin.is_dark')") :label="$t('admin.is_dark')")
//- TODO choose theme colors //- TODO choose theme colors
//- v-row //- v-row
//- v-col(v-for='(color, i) in colors' :key='i') //- v-col(v-for='(color, i) in colors' :key='i')
//- v-menu(v-model='menu[i]' //- v-menu(v-model='menu[i]'
//- :close-on-content-click="false" //- :close-on-content-click="false"
//- transition="slide-x-transition" //- transition="slide-x-transition"
//- offset-y //- offset-y
//- absolute //- absolute
//- bottom //- bottom
//- max-width="290px" //- max-width="290px"
//- min-width="290px") //- min-width="290px")
//- template(v-slot:activator='{ on }') //- template(v-slot:activator='{ on }')
//- v-btn(:color='i' small //- v-btn(:color='i' small
//- v-on='on') {{i}} //- v-on='on') {{i}}
//- v-color-picker(light @update:color='c => updateColor(i, c)') //- v-color-picker(light @update:color='c => updateColor(i, c)')
v-dialog(v-model='linkModal' width='500' :fullscreen='$vuetify.breakpoint.xsOnly') v-dialog(v-model='linkModal' width='500' :fullscreen='$vuetify.breakpoint.xsOnly')
v-card
v-card-title {{$t('admin.footer_links')}}
v-card-text
v-form(v-model='valid' ref='linkModalForm')
v-text-field(v-model='link.label'
:rules="[$validators.required('common.label')]"
label='Label')
v-text-field(v-model='link.href'
:rules="[$validators.required('common.url')]"
:label="$t('common.url')")
v-card-actions
v-spacer
v-btn(link @click='linkModal=false' color='error') {{$t('common.cancel')}}
v-btn(link @click='addFooterLink' color='primary' :disabled='!valid') {{$t('common.add')}}
v-card-title {{$t('admin.footer_links')}}
v-card-text
v-btn(color='primary' text @click='openLinkModal') <v-icon v-text='mdiPlus'></v-icon> {{$t('admin.add_link')}}
v-btn(color='warning' text @click='reset') <v-icon v-text='mdiRestore'></v-icon> {{$t('common.reset')}}
v-card v-card
v-list.mt-1(two-line subheader) v-card-title {{$t('admin.footer_links')}}
v-list-item(v-for='(link, idx) in settings.footerLinks' v-card-text
:key='`${link.label}`' @click='editFooterLink(link)') v-form(v-model='valid' ref='linkModalForm')
v-list-item-content v-text-field(v-model='link.label'
v-list-item-title {{link.label}} :rules="[$validators.required('common.label')]"
v-list-item-subtitle {{link.href}} label='Label')
v-list-item-action v-text-field(v-model='link.href'
v-btn.left(v-if='idx !== 0' icon color='warn' @click.stop='moveUpFooterLink(link, idx)') :rules="[$validators.required('common.url')]"
v-icon(v-text='mdiChevronUp') :label="$t('common.url')")
v-btn.float-right(icon color='error' @click.stop='removeFooterLink(link)') v-card-actions
v-icon(v-text='mdiDeleteForever') v-spacer
v-btn(link @click='linkModal=false' color='error') {{$t('common.cancel')}}
v-btn(link @click='addFooterLink' color='primary' :disabled='!valid') {{$t('common.add')}}
v-card-title {{$t('admin.footer_links')}}
v-card-text
v-btn(color='primary' text @click='openLinkModal') <v-icon v-text='mdiPlus'></v-icon> {{$t('admin.add_link')}}
v-btn(color='warning' text @click='reset') <v-icon v-text='mdiRestore'></v-icon> {{$t('common.reset')}}
v-card
v-list.mt-1(two-line subheader)
v-list-item(v-for='(link, idx) in settings.footerLinks'
:key='`${link.label}`' @click='editFooterLink(link)')
v-list-item-content
v-list-item-title {{link.label}}
v-list-item-subtitle {{link.href}}
v-list-item-action
v-btn.left(v-if='idx !== 0' icon color='warn' @click.stop='moveUpFooterLink(link, idx)')
v-icon(v-text='mdiChevronUp')
v-btn.float-right(icon color='error' @click.stop='removeFooterLink(link)')
v-icon(v-text='mdiDeleteForever')
</template> </template>
<script> <script>

View file

@ -1,50 +1,50 @@
<template lang="pug"> <template lang="pug">
v-container v-container
v-card-title {{$t('common.users')}} v-card-title {{$t('common.users')}}
v-spacer v-spacer
v-text-field(v-model='search' v-text-field(v-model='search'
:append-icon='mdiMagnify' outlined rounded :append-icon='mdiMagnify' outlined rounded
label='Search' label='Search'
single-line hide-details) single-line hide-details)
v-btn(color='primary' text @click='newUserDialog = true') <v-icon v-text='mdiPlus'></v-icon> {{$t('common.new_user')}} v-btn(color='primary' text @click='newUserDialog = true') <v-icon v-text='mdiPlus'></v-icon> {{$t('common.new_user')}}
//- ADD NEW USER //- ADD NEW USER
v-dialog(v-model='newUserDialog' :fullscreen='$vuetify.breakpoint.xsOnly') v-dialog(v-model='newUserDialog' :fullscreen='$vuetify.breakpoint.xsOnly')
v-card(color='secondary') v-card(color='secondary')
v-card-title {{$t('common.new_user')}} v-card-title {{$t('common.new_user')}}
v-card-text v-card-text
v-form(v-model='valid' ref='user_form' lazy-validation @submit.prevent='createUser') v-form(v-model='valid' ref='user_form' lazy-validation @submit.prevent='createUser')
v-text-field(v-model='new_user.email' v-text-field(v-model='new_user.email'
:label="$t('common.email')" :label="$t('common.email')"
:rules="$validators.email") :rules="$validators.email")
v-switch(v-model='new_user.is_admin' :label="$t('common.admin')" inset) v-switch(v-model='new_user.is_admin' :label="$t('common.admin')" inset)
v-alert(type='info' :closable='false' :icon='mdiInformation') {{$t('admin.user_add_help')}} v-alert(type='info' :closable='false' :icon='mdiInformation') {{$t('admin.user_add_help')}}
v-card-actions v-card-actions
v-spacer v-spacer
v-btn(@click='newUserDialog=false' color='error' outlined) {{$t('common.cancel')}} v-btn(@click='newUserDialog=false' color='error' outlined) {{$t('common.cancel')}}
v-btn(@click='createUser' :disabled='!valid' color='primary' outlined) {{$t('common.send')}} v-btn(@click='createUser' :disabled='!valid' color='primary' outlined) {{$t('common.send')}}
v-card-text v-card-text
//- USERS LIST //- USERS LIST
v-data-table( v-data-table(
:headers='headers' :headers='headers'
:items='users' :items='users'
:hide-default-footer='users.length<5' :hide-default-footer='users.length<5'
:footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }' :footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }'
:search='search') :search='search')
template(v-slot:item.is_active='{item}') template(v-slot:item.is_active='{item}')
v-icon(v-if='item.is_active' color='success' v-text='mdiCheck') v-icon(v-if='item.is_active' color='success' v-text='mdiCheck')
v-icon(v-else color='warning' v-text='mdiClose') v-icon(v-else color='warning' v-text='mdiClose')
template(v-slot:item.actions='{item}') template(v-slot:item.actions='{item}')
v-btn(v-if='item.recover_code' text small :to='`/user_confirm/${item.recover_code}`') {{$t('common.confirm')}} v-btn(v-if='item.recover_code' text small :to='`/user_confirm/${item.recover_code}`') {{$t('common.confirm')}}
v-btn(text small @click='toggle(item)' v-btn(text small @click='toggle(item)'
:color='item.is_active?"warning":"success"') {{item.is_active?$t('common.disable'):$t('common.enable')}} :color='item.is_active?"warning":"success"') {{item.is_active?$t('common.disable'):$t('common.enable')}}
v-btn(text small @click='toggleAdmin(item)' v-btn(text small @click='toggleAdmin(item)'
:color='item.is_admin?"warning":"error"') {{item.is_admin?$t('common.remove_admin'):$t('common.admin')}} :color='item.is_admin?"warning":"error"') {{item.is_admin?$t('common.remove_admin'):$t('common.admin')}}
v-btn(text small @click='deleteUser(item)' v-btn(text small @click='deleteUser(item)'
color='error') {{$t('admin.delete_user')}} color='error') {{$t('admin.delete_user')}}
</template> </template>
<script> <script>

View file

@ -1,11 +1,11 @@
<template lang='pug'> <template lang='pug'>
v-app(app) v-app(app)
Snackbar Snackbar
Confirm Confirm
v-main(app) v-main(app)
v-fade-transition(hide-on-leave) v-fade-transition(hide-on-leave)
nuxt nuxt
</template> </template>
<script> <script>

View file

@ -1,14 +1,14 @@
<template lang='pug'> <template lang='pug'>
v-app(app) v-app(app)
Snackbar Snackbar
Confirm Confirm
Nav Nav
v-main(app) v-main(app)
v-fade-transition(hide-on-leave) v-fade-transition(hide-on-leave)
nuxt nuxt
Footer Footer
</template> </template>
<script> <script>

View file

@ -1,58 +1,57 @@
<template lang="pug"> <template lang="pug">
v-container.container.pa-0.pa-md-3 v-container.container.pa-0.pa-md-3
v-card v-card
v-alert(v-if='url!==settings.baseurl' outlined type='warning' color='red' show-icon :icon='mdiAlert') v-alert(v-if='url!==settings.baseurl' outlined type='warning' color='red' show-icon :icon='mdiAlert')
span(v-html="$t('admin.wrong_domain_warning', { url, baseurl: settings.baseurl })") span(v-html="$t('admin.wrong_domain_warning', { url, baseurl: settings.baseurl })")
v-tabs(v-model='selectedTab' show-arrows :next-icon='mdiChevronRight' :prev-icon='mdiChevronLeft') v-tabs(v-model='selectedTab' show-arrows :next-icon='mdiChevronRight' :prev-icon='mdiChevronLeft')
//- SETTINGS //- SETTINGS
v-tab {{$t('common.settings')}} v-tab {{$t('common.settings')}}
v-tab-item v-tab-item
Settings Settings
//- THEME //- THEME
v-tab {{$t('common.theme')}} v-tab {{$t('common.theme')}}
v-tab-item v-tab-item
Theme Theme
//- USERS //- USERS
v-tab v-tab
v-badge(:value='!!unconfirmedUsers.length' :content='unconfirmedUsers.length') {{$t('common.users')}} v-badge(:value='!!unconfirmedUsers.length' :content='unconfirmedUsers.length') {{$t('common.users')}}
v-tab-item v-tab-item
Users(:users='users' @update='updateUsers') Users(:users='users' @update='updateUsers')
//- PLACES //- PLACES
v-tab {{$t('common.places')}} v-tab {{$t('common.places')}}
v-tab-item v-tab-item
Places Places
//- Collections //- Collections
v-tab {{$t('common.collections')}} v-tab {{$t('common.collections')}}
v-tab-item v-tab-item
Collections Collections
//- EVENTS //- EVENTS
v-tab v-tab
v-badge(:value='!!unconfirmedEvents.length' :content='unconfirmedEvents.length') {{$t('common.events')}} v-badge(:value='!!unconfirmedEvents.length' :content='unconfirmedEvents.length') {{$t('common.events')}}
v-tab-item v-tab-item
Events(:unconfirmedEvents='unconfirmedEvents' Events(:unconfirmedEvents='unconfirmedEvents'
@confirmed='id => { unconfirmedEvents = unconfirmedEvents.filter(e => e.id !== id)}') @confirmed='id => { unconfirmedEvents = unconfirmedEvents.filter(e => e.id !== id)}')
//- ANNOUNCEMENTS //- ANNOUNCEMENTS
v-tab {{$t('common.announcements')}} v-tab {{$t('common.announcements')}}
v-tab-item v-tab-item
Announcement Announcement
//- FEDERATION //- FEDERATION
v-tab {{$t('common.federation')}} v-tab {{$t('common.federation')}}
v-tab-item v-tab-item
Federation Federation
//- MODERATION
v-tab(v-if='settings.enable_federation') {{$t('common.moderation')}}
v-tab-item
Moderation
//- MODERATION
v-tab(v-if='settings.enable_federation') {{$t('common.moderation')}}
v-tab-item
Moderation
</template> </template>
<script> <script>
import { mapState } from 'vuex' import { mapState } from 'vuex'

View file

@ -1,18 +1,18 @@
<template lang='pug'> <template lang='pug'>
.d-flex.justify-space-around .d-flex.justify-space-around
v-card.mt-5(max-width='600px') v-card.mt-5(max-width='600px')
v-card-title {{settings.title}} - {{$t('common.authorize')}} v-card-title {{settings.title}} - {{$t('common.authorize')}}
v-card-text v-card-text
u {{$auth.user.email}} u {{$auth.user.email}}
div div
p(v-html="$t('oauth.authorization_request', { app: client.name, instance_name: settings.title })") p(v-html="$t('oauth.authorization_request', { app: client.name, instance_name: settings.title })")
ul.mb-2 ul.mb-2
li(v-for="s in scope.split(' ')") {{$t(`oauth.scopes.${scope}`)}} li(v-for="s in scope.split(' ')") {{$t(`oauth.scopes.${scope}`)}}
span(v-html="$t('oauth.redirected_to', {url: $route.query.redirect_uri})") span(v-html="$t('oauth.redirected_to', {url: $route.query.redirect_uri})")
v-card-actions v-card-actions
v-spacer v-spacer
v-btn(color='error' to='/') {{$t('common.cancel')}} v-btn(color='error' to='/') {{$t('common.cancel')}}
v-btn(:href='authorizeURL' color='success') {{$t('common.authorize')}} v-btn(:href='authorizeURL' color='success') {{$t('common.authorize')}}
</template> </template>
<script> <script>

View file

@ -1,40 +1,40 @@
<template lang='pug'> <template lang='pug'>
v-container.pa-0.pa-md-3 v-container.pa-0.pa-md-3
v-row.mt-md-5.ma-0(align='center' justify='center') v-row.mt-md-5.ma-0(align='center' justify='center')
v-col.pa-0.pa-md-3(cols='12' md="6" lg="5" xl="4") v-col.pa-0.pa-md-3(cols='12' md="6" lg="5" xl="4")
v-form(v-model='valid' ref='form' lazy-validation @submit.prevent='submit') v-form(v-model='valid' ref='form' lazy-validation @submit.prevent='submit')
v-card v-card
v-card-title {{$t('common.login')}} v-card-title {{$t('common.login')}}
v-card-subtitle(v-text="$t('login.description')") v-card-subtitle(v-text="$t('login.description')")
v-card-text v-card-text
v-text-field(v-model='email' type='email' v-text-field(v-model='email' type='email'
validate-on-blur validate-on-blur
:rules='$validators.email' autofocus :rules='$validators.email' autofocus
:label='$t("common.email")' :label='$t("common.email")'
ref='email') ref='email')
v-text-field(v-model='password' v-text-field(v-model='password'
:rules='$validators.password' :rules='$validators.password'
type='password' type='password'
:label='$t("common.password")') :label='$t("common.password")')
v-card-actions v-card-actions
v-btn(text v-btn(text
tabindex="1" tabindex="1"
@click='forgot' small) {{$t('login.forgot_password')}} @click='forgot' small) {{$t('login.forgot_password')}}
v-card-actions v-card-actions
v-spacer v-spacer
v-btn(v-if='settings.allow_registration' v-btn(v-if='settings.allow_registration'
to='/register' to='/register'
text text
color='orange') {{$t('login.not_registered')}} color='orange') {{$t('login.not_registered')}}
v-btn(color='success' v-btn(color='success'
type='submit' outlined type='submit' outlined
:disabled='!valid || loading' :loading='loading') {{$t('common.login')}} :disabled='!valid || loading' :loading='loading') {{$t('common.login')}}
</template> </template>

View file

@ -1,13 +1,13 @@
<template lang="pug"> <template lang="pug">
v-container v-container
v-card v-card
v-card-text(v-if='$auth.user && $auth.user.is_admin') v-card-text(v-if='$auth.user && $auth.user.is_admin')
Editor(v-model='about' label="About") Editor(v-model='about' label="About")
v-card-text(v-else v-html='about') v-card-text(v-else v-html='about')
v-card-actions(v-if='$auth.user && $auth.user.is_admin') v-card-actions(v-if='$auth.user && $auth.user.is_admin')
v-spacer v-spacer
v-btn(color='primary' text v-btn(color='primary' text
@click='save') {{$t('common.save')}} @click='save') {{$t('common.save')}}
</template> </template>
<script> <script>
import Editor from '@/components/Editor' import Editor from '@/components/Editor'

View file

@ -1,71 +1,71 @@
<template lang="pug"> <template lang="pug">
v-container.container.pa-0.pa-md-3 v-container.container.pa-0.pa-md-3
v-card v-card
v-card-title v-card-title
h4 {{edit?$t('common.edit_event'):$t('common.add_event')}} h4 {{edit?$t('common.edit_event'):$t('common.add_event')}}
v-spacer v-spacer
v-btn(link text color='primary' @click='openImportDialog=true') v-btn(link text color='primary' @click='openImportDialog=true')
<v-icon v-text='mdiFileImport'></v-icon> {{$t('common.import')}} <v-icon v-text='mdiFileImport'></v-icon> {{$t('common.import')}}
v-dialog(v-model='openImportDialog' :fullscreen='$vuetify.breakpoint.xsOnly') v-dialog(v-model='openImportDialog' :fullscreen='$vuetify.breakpoint.xsOnly')
ImportDialog(@close='openImportDialog=false' @imported='eventImported') ImportDialog(@close='openImportDialog=false' @imported='eventImported')
v-card-text.px-0.px-xs-2 v-card-text.px-0.px-xs-2
v-form(v-model='valid' ref='form' lazy-validation) v-form(v-model='valid' ref='form' lazy-validation)
v-container v-container
v-row v-row
//- Not logged event //- Not logged event
v-col(v-if='!$auth.loggedIn' cols=12) v-col(v-if='!$auth.loggedIn' cols=12)
p(v-html="$t('event.anon_description')") p(v-html="$t('event.anon_description')")
//- Title //- Title
v-col(cols=12) v-col(cols=12)
v-text-field( v-text-field(
@change='v => event.title = v' @change='v => event.title = v'
:value = 'event.title' :value = 'event.title'
:rules="[$validators.required('common.title')]" :rules="[$validators.required('common.title')]"
:prepend-icon='mdiFormatTitle' :prepend-icon='mdiFormatTitle'
:label="$t('common.title')" :label="$t('common.title')"
autofocus autofocus
ref='title') ref='title')
//- Where //- Where
v-col(cols=12) v-col(cols=12)
WhereInput(ref='where' v-model='event.place') WhereInput(ref='where' v-model='event.place')
//- When //- When
DateInput(v-model='date' :event='event') DateInput(v-model='date' :event='event')
//- Description //- Description
v-col.px-0(cols='12') v-col.px-0(cols='12')
Editor.px-3.ma-0( Editor.px-3.ma-0(
:label="$t('event.description_description')" :label="$t('event.description_description')"
v-model='event.description' v-model='event.description'
:placeholder="$t('event.description_description')" :placeholder="$t('event.description_description')"
max-height='400px') max-height='400px')
//- MEDIA / FLYER / POSTER //- MEDIA / FLYER / POSTER
v-col(cols=12 md=6) v-col(cols=12 md=6)
MediaInput(v-model='event.media[0]' :event='event' @remove='event.media=[]') MediaInput(v-model='event.media[0]' :event='event' @remove='event.media=[]')
//- tags //- tags
v-col(cols=12 md=6) v-col(cols=12 md=6)
v-combobox(v-model='event.tags' v-combobox(v-model='event.tags'
:prepend-icon="mdiTagMultiple" :prepend-icon="mdiTagMultiple"
chips small-chips multiple deletable-chips hide-no-data hide-selected persistent-hint chips small-chips multiple deletable-chips hide-no-data hide-selected persistent-hint
cache-items cache-items
@input.native='searchTags' @input.native='searchTags'
:delimiters="[',', ';', '#']" :delimiters="[',', ';', '#']"
:items="tags" :items="tags"
:menu-props="{ maxWidth: 400, eager: true }" :menu-props="{ maxWidth: 400, eager: true }"
:label="$t('common.tags')") :label="$t('common.tags')")
template(v-slot:selection="{ item, on, attrs, selected, parent}") template(v-slot:selection="{ item, on, attrs, selected, parent}")
v-chip(v-bind="attrs" close :close-icon='mdiCloseCircle' @click:close='parent.selectItem(item)' v-chip(v-bind="attrs" close :close-icon='mdiCloseCircle' @click:close='parent.selectItem(item)'
:input-value="selected" label small) {{item}} :input-value="selected" label small) {{item}}
</v-chip> </v-chip>
v-card-actions v-card-actions
v-spacer v-spacer
v-btn(@click='done' :loading='loading' :disabled='!valid || loading' outlined v-btn(@click='done' :loading='loading' :disabled='!valid || loading' outlined
color='primary') {{edit?$t('common.save'):$t('common.send')}} color='primary') {{edit?$t('common.save'):$t('common.send')}}
</template> </template>
<script> <script>

View file

@ -1,16 +1,15 @@
<template lang="pug"> <template lang="pug">
v-container v-container
v-card v-card
v-card-title {{announcement.title}} v-card-title {{announcement.title}}
v-card-text(v-html='announcement.announcement') v-card-text(v-html='announcement.announcement')
</template> </template>
<script> <script>
import { mapState } from 'vuex' import { mapState } from 'vuex'
export default { export default {
name: 'Announcement', name: 'Announcement',
asyncData ({ $axios, params, error, store }) { asyncData ({ params, error, store }) {
try { try {
const id = Number(params.id) const id = Number(params.id)
const announcement = store.state.announcements.find(a => a.id === id) const announcement = store.state.announcements.find(a => a.id === id)

View file

@ -1,21 +1,21 @@
<template lang="pug"> <template lang="pug">
nuxt-link.embed_event(:to='`/event/${event.slug || event.id}`' target='_blank' :class='{ withImg: event.media }') nuxt-link.embed_event(:to='`/event/${event.slug || event.id}`' target='_blank' :class='{ withImg: event.media }')
//- image //- image
img.float-left(:src='event | mediaURL("thumb")') img.float-left(:src='event | mediaURL("thumb")')
.event-info .event-info
//- title //- title
.date {{event|when}}<br/> .date {{event|when}}<br/>
h4 {{event.title}} h4 {{event.title}}
//- date / place //- date / place
.date {{event.place.name}} .date {{event.place.name}}
</template> </template>
<script> <script>
export default { export default {
layout: 'iframe', layout: 'iframe',
async asyncData ({ $axios, params, error, store }) { async asyncData ({ $axios, params, error }) {
try { try {
const event = await $axios.$get(`/event/${params.event_id}`) const event = await $axios.$get(`/event/${params.event_id}`)
return { event } return { event }

View file

@ -1,5 +1,5 @@
<template lang="pug"> <template>
List(:events="events" :title='title') <List :events="events" :title='title'/>
</template> </template>
<script> <script>
import List from '../../components/List' import List from '../../components/List'

View file

@ -1,83 +1,83 @@
<template lang="pug"> <template lang="pug">
v-container.pa-0.pa-md-3 v-container.pa-0.pa-md-3
v-card v-card
v-card-title {{$t('common.share')}} v-card-title {{$t('common.share')}}
v-card-text v-card-text
p.text-body-1 {{$t('export.intro')}} p.text-body-1 {{$t('export.intro')}}
v-row v-row
v-col(:md='2' :cols='12') v-col(:md='2' :cols='12')
v-card-title.py-0 {{$t('common.filter')}} v-card-title.py-0 {{$t('common.filter')}}
v-col v-col
Search( Search(
:filters='filters' :filters='filters'
@update='f => filters = f') @update='f => filters = f')
v-tabs(v-model='type' show-arrows :next-icon='mdiChevronRight' :prev-icon='mdiChevronLeft') v-tabs(v-model='type' show-arrows :next-icon='mdiChevronRight' :prev-icon='mdiChevronLeft')
//- TOFIX
//- v-tab {{$t('common.email')}}
//- v-tab-item
v-card
v-card-text
p(v-html='$t(`export.email_description`)')
v-switch.mt-0(inset :label="$t('notify_on_insert')")
v-switch.mt-0(inset :label="$t('morning_notification')")
v-text-field(v-model='notification.email' :placeholder="$t('export.insert_your_address')" ref='email')
v-btn(slot='prepend' text color='primary' @click='add_notification') {{$t('common.send')}} <v-icon>mdi-email</v-icon>
v-tab {{$t('common.feed')}}
v-tab-item
v-card
v-card-text
p(v-html='$t(`export.feed_description`)')
v-text-field(v-model='link' readonly)
v-btn(slot='prepend' text color='primary' @click='clipboard(link)') {{$t("common.copy")}}
v-icon.ml-1(v-text='mdiContentCopy')
v-tab ics/ical
v-tab-item
v-card
v-card-text
p(v-html='$t(`export.ical_description`)')
v-text-field(v-model='link')
v-btn(slot='prepend' text color='primary' @click='clipboard(link)') {{$t("common.copy")}}
v-icon.ml-1(v-text='mdiContentCopy')
v-tab List
v-tab-item
v-card
v-card-text
p(v-html='$t(`export.list_description`)')
v-row
v-col.col-12.col-lg-4
v-text-field(v-model='list.title' :label='$t("common.title")')
v-text-field(v-model='list.maxEvents' type='number' min='1' :label='$t("common.max_events")')
v-switch(v-model='list.theme' inset true-value='dark' false-value='light' :label="$t('admin.is_dark')")
v-switch(v-model='list.sidebar' inset true-value='true' false-value='false' :label="$t('admin.widget')")
v-col.col-12.col-lg-8
gancio-events(:baseurl='settings.baseurl'
:maxlength='list.maxEvents && Number(list.maxEvents)'
:title='list.title'
:theme='list.theme'
:places='filters.places.join(",")'
:tags='filters.tags.join(",")'
:show_recurrent='filters.show_recurrent'
:sidebar="list.sidebar")
v-alert.pa-5.my-4.blue-grey.darken-4.text-body-1.lime--text.text--lighten-3 <pre>{{code}}</pre>
v-btn.float-end(text color='primary' @click='clipboard(code)') {{$t("common.copy")}}
v-icon.ml-1(v-text='mdiContentCopy')
v-tab(v-if='settings.enable_federation') {{$t('common.fediverse')}}
v-tab-item(v-if='settings.enable_federation')
FollowMe
//- TOFIX //- TOFIX
//- v-tab {{$t('common.email')}} //- v-tab.pt-1(label='calendar' name='calendar')
//- v-tab-item //- v-tab-item
v-card //- p(v-html='$t(`export.calendar_description`)')
v-card-text //- //- no-ssr
p(v-html='$t(`export.email_description`)') //- Calendar.mb-1
v-switch.mt-0(inset :label="$t('notify_on_insert')") //- v-text-field.mb-1(type='textarea' v-model='script')
v-switch.mt-0(inset :label="$t('morning_notification')") //- el-button.float-right(plain type="primary" icon='el-icon-document') Copy
v-text-field(v-model='notification.email' :placeholder="$t('export.insert_your_address')" ref='email')
v-btn(slot='prepend' text color='primary' @click='add_notification') {{$t('common.send')}} <v-icon>mdi-email</v-icon>
v-tab {{$t('common.feed')}}
v-tab-item
v-card
v-card-text
p(v-html='$t(`export.feed_description`)')
v-text-field(v-model='link' readonly)
v-btn(slot='prepend' text color='primary' @click='clipboard(link)') {{$t("common.copy")}}
v-icon.ml-1(v-text='mdiContentCopy')
v-tab ics/ical
v-tab-item
v-card
v-card-text
p(v-html='$t(`export.ical_description`)')
v-text-field(v-model='link')
v-btn(slot='prepend' text color='primary' @click='clipboard(link)') {{$t("common.copy")}}
v-icon.ml-1(v-text='mdiContentCopy')
v-tab List
v-tab-item
v-card
v-card-text
p(v-html='$t(`export.list_description`)')
v-row
v-col.col-12.col-lg-4
v-text-field(v-model='list.title' :label='$t("common.title")')
v-text-field(v-model='list.maxEvents' type='number' min='1' :label='$t("common.max_events")')
v-switch(v-model='list.theme' inset true-value='dark' false-value='light' :label="$t('admin.is_dark')")
v-switch(v-model='list.sidebar' inset true-value='true' false-value='false' :label="$t('admin.widget')")
v-col.col-12.col-lg-8
gancio-events(:baseurl='settings.baseurl'
:maxlength='list.maxEvents && Number(list.maxEvents)'
:title='list.title'
:theme='list.theme'
:places='filters.places.join(",")'
:tags='filters.tags.join(",")'
:show_recurrent='filters.show_recurrent'
:sidebar="list.sidebar")
v-alert.pa-5.my-4.blue-grey.darken-4.text-body-1.lime--text.text--lighten-3 <pre>{{code}}</pre>
v-btn.float-end(text color='primary' @click='clipboard(code)') {{$t("common.copy")}}
v-icon.ml-1(v-text='mdiContentCopy')
v-tab(v-if='settings.enable_federation') {{$t('common.fediverse')}}
v-tab-item(v-if='settings.enable_federation')
FollowMe
//- TOFIX
//- v-tab.pt-1(label='calendar' name='calendar')
//- v-tab-item
//- p(v-html='$t(`export.calendar_description`)')
//- //- no-ssr
//- Calendar.mb-1
//- v-text-field.mb-1(type='textarea' v-model='script')
//- el-button.float-right(plain type="primary" icon='el-icon-document') Copy
</template> </template>
<script> <script>

View file

@ -1,10 +1,10 @@
<template lang="pug"> <template lang="pug">
v-container v-container
v-card v-card
v-card-title.text-h5 {{$auth.user.email}} v-card-title.text-h5 {{$auth.user.email}}
v-card-text v-card-text
p {{$t('settings.remove_account')}} p {{$t('settings.remove_account')}}
v-btn.black--text(color='warning' @click='remove_account') {{$t('common.remove')}} v-btn.black--text(color='warning' @click='remove_account') {{$t('common.remove')}}
</template> </template>
<script> <script>
import { mapState } from 'vuex' import { mapState } from 'vuex'