fix pug indent issue
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
<template lang="pug">
|
||||
#calendar
|
||||
vc-date-picker(
|
||||
v-model='selectedDate'
|
||||
title-position='left'
|
||||
:is-dark="settings['theme.is_dark']"
|
||||
:columns="$screens({ sm: 2 }, 1)"
|
||||
@input='click'
|
||||
@update:from-page='updatePage'
|
||||
:locale='$i18n.locale'
|
||||
:attributes='attributes'
|
||||
transition='fade'
|
||||
aria-label='Calendar'
|
||||
is-expanded
|
||||
is-inline)
|
||||
#calendar
|
||||
vc-date-picker(
|
||||
v-model='selectedDate'
|
||||
title-position='left'
|
||||
:is-dark="settings['theme.is_dark']"
|
||||
:columns="$screens({ sm: 2 }, 1)"
|
||||
@input='click'
|
||||
@update:from-page='updatePage'
|
||||
:locale='$i18n.locale'
|
||||
:attributes='attributes'
|
||||
transition='fade'
|
||||
aria-label='Calendar'
|
||||
is-expanded
|
||||
is-inline)
|
||||
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
|
||||
<template lang="pug">
|
||||
v-dialog(v-model='show'
|
||||
:fullscreen='$vuetify.breakpoint.xsOnly'
|
||||
:color='options.color'
|
||||
:title='title'
|
||||
:max-width='options.width'
|
||||
:style="{ zIndex: options.zIndex, position: 'absolute' }"
|
||||
@keydown.esc='cancel')
|
||||
v-card
|
||||
v-card-title {{ title }}
|
||||
v-card-text(v-show='!!message') {{ message }}
|
||||
v-card-actions
|
||||
v-spacer
|
||||
v-btn(text color='error' @click='cancel') {{$t('common.cancel')}}
|
||||
v-btn(text color='primary' @click='agree') {{$t('common.ok')}}
|
||||
v-dialog(v-model='show'
|
||||
:fullscreen='$vuetify.breakpoint.xsOnly'
|
||||
:color='options.color'
|
||||
:title='title'
|
||||
:max-width='options.width'
|
||||
:style="{ zIndex: options.zIndex, position: 'absolute' }"
|
||||
@keydown.esc='cancel')
|
||||
v-card
|
||||
v-card-title {{ title }}
|
||||
v-card-text(v-show='!!message') {{ message }}
|
||||
v-card-actions
|
||||
v-spacer
|
||||
v-btn(text color='error' @click='cancel') {{$t('common.cancel')}}
|
||||
v-btn(text color='primary' @click='agree') {{$t('common.ok')}}
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
<template lang="pug">
|
||||
v-container
|
||||
v-card-title.text-h5 Database
|
||||
v-card-text
|
||||
v-form
|
||||
v-btn-toggle(text color='primary' v-model='db.dialect')
|
||||
v-btn(value='sqlite' text) sqlite
|
||||
v-btn(value='postgres' text) postgres
|
||||
v-btn(value='mariadb' text) mariadb
|
||||
template(v-if='db.dialect === "sqlite"')
|
||||
v-text-field(v-model='db.storage' label='Path')
|
||||
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.database' label='Database' :rules="[$validators.required('database')]")
|
||||
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-container
|
||||
v-card-title.text-h5 Database
|
||||
v-card-text
|
||||
v-form
|
||||
v-btn-toggle(text color='primary' v-model='db.dialect')
|
||||
v-btn(value='sqlite' text) sqlite
|
||||
v-btn(value='postgres' text) postgres
|
||||
v-btn(value='mariadb' text) mariadb
|
||||
template(v-if='db.dialect === "sqlite"')
|
||||
v-text-field(v-model='db.storage' label='Path')
|
||||
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.database' label='Database' :rules="[$validators.required('database')]")
|
||||
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-card-actions
|
||||
v-btn(text @click='checkDb' color='primary' :loading='loading' :disabled='loading') {{$t('common.next')}}
|
||||
v-icon(v-text='mdiArrowRight')
|
||||
v-card-actions
|
||||
v-btn(text @click='checkDb' color='primary' :loading='loading' :disabled='loading') {{$t('common.next')}}
|
||||
v-icon(v-text='mdiArrowRight')
|
||||
</template>
|
||||
<script>
|
||||
import { mdiArrowRight } from '@mdi/js'
|
||||
|
||||
@@ -1,67 +1,67 @@
|
||||
<template lang='pug'>
|
||||
.editor(:class='focused')
|
||||
.label {{label}}
|
||||
editor-menu-bar.menubar.is-hidden(:editor='editor'
|
||||
:keep-in-bounds='true' v-slot='{ commands, isActive, getMarkAttrs, focused }')
|
||||
v-btn-toggle(dense)
|
||||
v-btn(icon text tabindex='-1'
|
||||
:class="{ primary: isActive.bold() }"
|
||||
@click="commands.bold")
|
||||
v-icon(v-text='mdiFormatBold')
|
||||
.editor(:class='focused')
|
||||
.label {{label}}
|
||||
editor-menu-bar.menubar.is-hidden(:editor='editor'
|
||||
:keep-in-bounds='true' v-slot='{ commands, isActive, getMarkAttrs, focused }')
|
||||
v-btn-toggle(dense)
|
||||
v-btn(icon text tabindex='-1'
|
||||
:class="{ primary: isActive.bold() }"
|
||||
@click="commands.bold")
|
||||
v-icon(v-text='mdiFormatBold')
|
||||
|
||||
v-btn(icon text tabindex='-1'
|
||||
:class="{ primary: isActive.underline() }"
|
||||
@click="commands.underline")
|
||||
v-icon(v-text='mdiFormatUnderline')
|
||||
v-btn(icon text tabindex='-1'
|
||||
:class="{ primary: isActive.underline() }"
|
||||
@click="commands.underline")
|
||||
v-icon(v-text='mdiFormatUnderline')
|
||||
|
||||
v-btn(icon text tabindex='-1'
|
||||
:class="{ primary: isActive.strike() }"
|
||||
@click="commands.strike")
|
||||
v-icon(v-text='mdiFormatStrikethroughVariant')
|
||||
v-btn(icon text tabindex='-1'
|
||||
:class="{ primary: isActive.strike() }"
|
||||
@click="commands.strike")
|
||||
v-icon(v-text='mdiFormatStrikethroughVariant')
|
||||
|
||||
v-btn(icon text tabindex='-1'
|
||||
:class="{ primary: isActive.italic() }"
|
||||
@click="commands.italic")
|
||||
v-icon(v-text='mdiFormatItalic')
|
||||
v-btn(icon text tabindex='-1'
|
||||
:class="{ primary: isActive.italic() }"
|
||||
@click="commands.italic")
|
||||
v-icon(v-text='mdiFormatItalic')
|
||||
|
||||
v-btn(icon text tabindex='-1'
|
||||
:class="{ primary: isActive.heading({level: 1}) }"
|
||||
@click="commands.heading({level: 1})")
|
||||
v-icon(v-text='mdiFormatHeader1')
|
||||
v-btn(icon text tabindex='-1'
|
||||
:class="{ primary: isActive.heading({level: 1}) }"
|
||||
@click="commands.heading({level: 1})")
|
||||
v-icon(v-text='mdiFormatHeader1')
|
||||
|
||||
v-btn(icon text tabindex='-1'
|
||||
:class="{ primary: isActive.heading({level: 2}) }"
|
||||
@click="commands.heading({level: 2})")
|
||||
v-icon(v-text='mdiFormatHeader2')
|
||||
v-btn(icon text tabindex='-1'
|
||||
:class="{ primary: isActive.heading({level: 2}) }"
|
||||
@click="commands.heading({level: 2})")
|
||||
v-icon(v-text='mdiFormatHeader2')
|
||||
|
||||
v-btn(icon text tabindex='-1'
|
||||
:class="{ primary: isActive.heading({level: 3}) }"
|
||||
@click="commands.heading({level: 3})")
|
||||
v-icon(v-text='mdiFormatHeader3')
|
||||
v-btn(icon text tabindex='-1'
|
||||
:class="{ primary: isActive.heading({level: 3}) }"
|
||||
@click="commands.heading({level: 3})")
|
||||
v-icon(v-text='mdiFormatHeader3')
|
||||
|
||||
v-btn(icon text tabindex='-1'
|
||||
:class="{ primary: isActive.code() }"
|
||||
@click="commands.code")
|
||||
v-icon(v-text='mdiCodeTags')
|
||||
v-btn(icon text tabindex='-1'
|
||||
:class="{ primary: isActive.code() }"
|
||||
@click="commands.code")
|
||||
v-icon(v-text='mdiCodeTags')
|
||||
|
||||
v-btn(icon text tabindex='-1'
|
||||
:class="{ primary: isActive.blockquote() }"
|
||||
@click="commands.blockquote")
|
||||
v-icon(v-text='mdiFormatQuoteOpen')
|
||||
v-btn(icon text tabindex='-1'
|
||||
:class="{ primary: isActive.blockquote() }"
|
||||
@click="commands.blockquote")
|
||||
v-icon(v-text='mdiFormatQuoteOpen')
|
||||
|
||||
v-btn(icon text tabindex='-1'
|
||||
:class="{ primary: isActive.bullet_list() }"
|
||||
@click="commands.bullet_list")
|
||||
v-icon(v-text='mdiFormatListBulleted')
|
||||
v-btn(icon text tabindex='-1'
|
||||
:class="{ primary: isActive.bullet_list() }"
|
||||
@click="commands.bullet_list")
|
||||
v-icon(v-text='mdiFormatListBulleted')
|
||||
|
||||
v-btn(icon text tabindex='-1' :class='{ primary: isActive.link() }'
|
||||
@click='commands.link({href: getMarkAttrs("link") && getMarkAttrs("link").href ? "" : "https://"}); $refs.link.focus();')
|
||||
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
|
||||
:value='isActive.link() && getMarkAttrs("link") && getMarkAttrs("link").href || ""'
|
||||
@keypress.enter='commands.link({ href: $event.target.value}); editor.focus()')
|
||||
v-btn(icon text tabindex='-1' :class='{ primary: isActive.link() }'
|
||||
@click='commands.link({href: getMarkAttrs("link") && getMarkAttrs("link").href ? "" : "https://"}); $refs.link.focus();')
|
||||
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
|
||||
:value='isActive.link() && getMarkAttrs("link") && getMarkAttrs("link").href || ""'
|
||||
@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>
|
||||
<script>
|
||||
import debounce from 'lodash/debounce'
|
||||
|
||||
@@ -1,51 +1,51 @@
|
||||
<template lang="pug">
|
||||
v-card.h-event.event.d-flex(itemscope itemtype="https://schema.org/Event")
|
||||
nuxt-link(:to='`/event/${event.slug || event.id}`' itemprop="url")
|
||||
MyPicture(:event='event' thumb :lazy='lazy')
|
||||
v-icon.float-right.mr-1(v-if='event.parentId' color='success' v-text='mdiRepeat')
|
||||
.title.p-name(itemprop="name") {{event.title}}
|
||||
v-card.h-event.event.d-flex(itemscope itemtype="https://schema.org/Event")
|
||||
nuxt-link(:to='`/event/${event.slug || event.id}`' itemprop="url")
|
||||
MyPicture(:event='event' thumb :lazy='lazy')
|
||||
v-icon.float-right.mr-1(v-if='event.parentId' color='success' v-text='mdiRepeat')
|
||||
.title.p-name(itemprop="name") {{event.title}}
|
||||
|
||||
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 }}
|
||||
.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}}
|
||||
.d-none(itemprop='location.address') {{event.place.address}}
|
||||
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 }}
|
||||
.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}}
|
||||
.d-none(itemprop='location.address') {{event.place.address}}
|
||||
|
||||
v-card-actions.pt-0.actions.justify-space-between
|
||||
.tags
|
||||
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}}
|
||||
v-card-actions.pt-0.actions.justify-space-between
|
||||
.tags
|
||||
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}}
|
||||
|
||||
client-only
|
||||
v-menu(offset-y eager)
|
||||
template(v-slot:activator="{on}")
|
||||
v-btn.align-self-end(icon v-on='on' color='primary' title='more' aria-label='more')
|
||||
v-icon(v-text='mdiDotsVertical')
|
||||
v-list(dense)
|
||||
v-list-item-group
|
||||
v-list-item(@click='clipboard(`${settings.baseurl}/event/${event.slug || event.id}`)')
|
||||
v-list-item-icon
|
||||
v-icon(v-text='mdiContentCopy')
|
||||
v-list-item-content
|
||||
v-list-item-title {{$t('common.copy_link')}}
|
||||
v-list-item(:href='`/api/event/${event.slug || event.id}.ics`')
|
||||
v-list-item-icon
|
||||
v-icon(v-text='mdiCalendarExport')
|
||||
v-list-item-content
|
||||
v-list-item-title {{$t('common.add_to_calendar')}}
|
||||
v-list-item(v-if='is_mine' :to='`/add/${event.id}`')
|
||||
v-list-item-icon
|
||||
v-icon(v-text='mdiPencil')
|
||||
v-list-item-content
|
||||
v-list-item-title {{$t('common.edit')}}
|
||||
v-list-item(v-if='is_mine' @click='remove(false)')
|
||||
v-list-item-icon
|
||||
v-icon(color='error' v-text='mdiDeleteForever')
|
||||
v-list-item-content
|
||||
v-list-item-title {{$t('common.remove')}}
|
||||
template(#placeholder)
|
||||
v-btn.align-self-end(icon color='primary' aria-label='more')
|
||||
v-icon(v-text='mdiDotsVertical')
|
||||
client-only
|
||||
v-menu(offset-y eager)
|
||||
template(v-slot:activator="{on}")
|
||||
v-btn.align-self-end(icon v-on='on' color='primary' title='more' aria-label='more')
|
||||
v-icon(v-text='mdiDotsVertical')
|
||||
v-list(dense)
|
||||
v-list-item-group
|
||||
v-list-item(@click='clipboard(`${settings.baseurl}/event/${event.slug || event.id}`)')
|
||||
v-list-item-icon
|
||||
v-icon(v-text='mdiContentCopy')
|
||||
v-list-item-content
|
||||
v-list-item-title {{$t('common.copy_link')}}
|
||||
v-list-item(:href='`/api/event/${event.slug || event.id}.ics`')
|
||||
v-list-item-icon
|
||||
v-icon(v-text='mdiCalendarExport')
|
||||
v-list-item-content
|
||||
v-list-item-title {{$t('common.add_to_calendar')}}
|
||||
v-list-item(v-if='is_mine' :to='`/add/${event.id}`')
|
||||
v-list-item-icon
|
||||
v-icon(v-text='mdiPencil')
|
||||
v-list-item-content
|
||||
v-list-item-title {{$t('common.edit')}}
|
||||
v-list-item(v-if='is_mine' @click='remove(false)')
|
||||
v-list-item-icon
|
||||
v-icon(color='error' v-text='mdiDeleteForever')
|
||||
v-list-item-content
|
||||
v-list-item-title {{$t('common.remove')}}
|
||||
template(#placeholder)
|
||||
v-btn.align-self-end(icon color='primary' aria-label='more')
|
||||
v-icon(v-text='mdiDotsVertical')
|
||||
</template>
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
<template lang='pug'>
|
||||
v-card
|
||||
v-card-title(v-text="$t('common.follow_me_title')")
|
||||
v-card-text
|
||||
p(v-html="$t('event.follow_me_description', { title: settings.title, account: `@${settings.instance_name}@${settings.hostname}`})")
|
||||
v-text-field(
|
||||
:rules="[$validators.required('common.url')]"
|
||||
:loading='loading'
|
||||
:label="$t('common.url')"
|
||||
v-model='instance_hostname')
|
||||
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'
|
||||
v-card
|
||||
v-card-title(v-text="$t('common.follow_me_title')")
|
||||
v-card-text
|
||||
p(v-html="$t('event.follow_me_description', { title: settings.title, account: `@${settings.instance_name}@${settings.hostname}`})")
|
||||
v-text-field(
|
||||
:rules="[$validators.required('common.url')]"
|
||||
:loading='loading'
|
||||
:label="$t('common.url')"
|
||||
v-model='instance_hostname')
|
||||
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")}}
|
||||
</template>
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
<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')
|
||||
FollowMe(@close='showFollowMe=false' is-dialog)
|
||||
v-dialog(v-model='showFollowMe' destroy-on-close max-width='700px' :fullscreen='$vuetify.breakpoint.xsOnly')
|
||||
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.ml-1(v-for='link in footerLinks'
|
||||
:key='link.label' color='primary' text
|
||||
:href='link.href' :to='link.to' :target="link.href && '_blank'") {{link.label}}
|
||||
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'
|
||||
:key='link.label' color='primary' text
|
||||
: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'
|
||||
offset-y bottom open-on-hover transition="slide-y-transition")
|
||||
template(v-slot:activator="{ on, attrs }")
|
||||
v-btn.ml-1(v-bind='attrs' v-on='on' color='primary' text) {{$t('common.places')}}
|
||||
v-list(subheaders two-lines)
|
||||
v-list-item(v-for='instance in settings.trusted_instances'
|
||||
:key='instance.name'
|
||||
target='_blank'
|
||||
:href='instance.url'
|
||||
two-line)
|
||||
v-list-item-avatar
|
||||
v-img(:src='`${instance.url}/logo.png`')
|
||||
v-list-item-content
|
||||
v-list-item-title {{instance.name}}
|
||||
v-list-item-subtitle {{instance.label}}
|
||||
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")
|
||||
template(v-slot:activator="{ on, attrs }")
|
||||
v-btn.ml-1(v-bind='attrs' v-on='on' color='primary' text) {{$t('common.places')}}
|
||||
v-list(subheaders two-lines)
|
||||
v-list-item(v-for='instance in settings.trusted_instances'
|
||||
:key='instance.name'
|
||||
target='_blank'
|
||||
:href='instance.url'
|
||||
two-line)
|
||||
v-list-item-avatar
|
||||
v-img(:src='`${instance.url}/logo.png`')
|
||||
v-list-item-content
|
||||
v-list-item-title {{instance.name}}
|
||||
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>
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
@@ -1,36 +1,35 @@
|
||||
<template lang="pug">
|
||||
v-card
|
||||
v-card-title {{$t('common.import')}}
|
||||
v-card-text
|
||||
p(v-html="$t('event.import_description')")
|
||||
v-form(v-model='valid' ref='form' lazy-validation @submit.prevent='importGeneric')
|
||||
v-row
|
||||
.col-xl-5.col-lg-5.col-md-7.col-sm-12.col-xs-12
|
||||
v-text-field(v-model='URL'
|
||||
:label="$t('common.url')"
|
||||
:hint="$t('event.import_URL')"
|
||||
persistent-hint
|
||||
:loading='loading' :error='error'
|
||||
:error-messages='errorMessage')
|
||||
.col
|
||||
v-file-input(
|
||||
v-model='file'
|
||||
accept=".ics"
|
||||
:label="$t('event.ics')"
|
||||
:hint="$t('event.import_ICS')"
|
||||
persistent-hint)
|
||||
v-card
|
||||
v-card-title {{$t('common.import')}}
|
||||
v-card-text
|
||||
p(v-html="$t('event.import_description')")
|
||||
v-form(v-model='valid' ref='form' lazy-validation @submit.prevent='importGeneric')
|
||||
v-row
|
||||
.col-xl-5.col-lg-5.col-md-7.col-sm-12.col-xs-12
|
||||
v-text-field(v-model='URL'
|
||||
:label="$t('common.url')"
|
||||
:hint="$t('event.import_URL')"
|
||||
persistent-hint
|
||||
:loading='loading' :error='error'
|
||||
:error-messages='errorMessage')
|
||||
.col
|
||||
v-file-input(
|
||||
v-model='file'
|
||||
accept=".ics"
|
||||
:label="$t('event.ics')"
|
||||
:hint="$t('event.import_ICS')"
|
||||
persistent-hint)
|
||||
|
||||
v-card-actions
|
||||
v-spacer
|
||||
v-btn(text @click='$emit("close")' color='warning') {{$t('common.cancel')}}
|
||||
v-btn(text @click='importGeneric' :loading='loading' :disabled='loading'
|
||||
color='primary') {{$t('common.import')}}
|
||||
v-card-actions
|
||||
v-spacer
|
||||
v-btn(text @click='$emit("close")' color='warning') {{$t('common.cancel')}}
|
||||
v-btn(text @click='importGeneric' :loading='loading' :disabled='loading'
|
||||
color='primary') {{$t('common.import')}}
|
||||
|
||||
</template>
|
||||
<script>
|
||||
import ical from 'ical.js'
|
||||
import get from 'lodash/get'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'ImportDialog',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template lang='pug'>
|
||||
.loading-page(:class='{ loading }')
|
||||
v-progress-circular(:size="100" :width="10" style='color: orangered;' indeterminate)
|
||||
.loading-page(:class='{ loading }')
|
||||
v-progress-circular(:size="100" :width="10" style='color: orangered;' indeterminate)
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -1,51 +1,51 @@
|
||||
<template lang="pug">
|
||||
span
|
||||
v-dialog(v-model='openMediaDetails' :fullscreen="$vuetify.breakpoint.xsOnly" width='1000px')
|
||||
v-card
|
||||
v-card-title {{$t('common.media')}}
|
||||
v-card-text
|
||||
v-row.mt-1
|
||||
v-col#focalPointSelector(
|
||||
@mousedown='handleStart' @touchstart='handleStart'
|
||||
@mousemove='handleMove' @touchmove='handleMove'
|
||||
@mouseup='handleStop' @touchend='handleStop'
|
||||
)
|
||||
div.focalPoint(:style="{ top, left }")
|
||||
img(v-if='mediaPreview' :src='mediaPreview')
|
||||
span
|
||||
v-dialog(v-model='openMediaDetails' :fullscreen="$vuetify.breakpoint.xsOnly" width='1000px')
|
||||
v-card
|
||||
v-card-title {{$t('common.media')}}
|
||||
v-card-text
|
||||
v-row.mt-1
|
||||
v-col#focalPointSelector(
|
||||
@mousedown='handleStart' @touchstart='handleStart'
|
||||
@mousemove='handleMove' @touchmove='handleMove'
|
||||
@mouseup='handleStop' @touchend='handleStop'
|
||||
)
|
||||
div.focalPoint(:style="{ top, left }")
|
||||
img(v-if='mediaPreview' :src='mediaPreview')
|
||||
|
||||
v-col.col-12.col-sm-4
|
||||
p {{$t('event.choose_focal_point')}}
|
||||
img.mediaPreview.d-none.d-sm-block(v-if='mediaPreview'
|
||||
:src='mediaPreview' :style="{ 'object-position': position }")
|
||||
v-col.col-12.col-sm-4
|
||||
p {{$t('event.choose_focal_point')}}
|
||||
img.mediaPreview.d-none.d-sm-block(v-if='mediaPreview'
|
||||
:src='mediaPreview' :style="{ 'object-position': position }")
|
||||
|
||||
v-textarea.mt-4(type='text'
|
||||
label='Alternative text'
|
||||
persistent-hint
|
||||
@input='v => name=v'
|
||||
:value='value.name' filled
|
||||
:hint='$t("event.alt_text_description")')
|
||||
br
|
||||
v-card-actions.justify-space-between
|
||||
v-btn(text @click='openMediaDetails=false' color='warning') Cancel
|
||||
v-btn(text color='primary' @click='save') Save
|
||||
v-textarea.mt-4(type='text'
|
||||
label='Alternative text'
|
||||
persistent-hint
|
||||
@input='v => name=v'
|
||||
:value='value.name' filled
|
||||
:hint='$t("event.alt_text_description")')
|
||||
br
|
||||
v-card-actions.justify-space-between
|
||||
v-btn(text @click='openMediaDetails=false' color='warning') Cancel
|
||||
v-btn(text color='primary' @click='save') Save
|
||||
|
||||
h3.mb-3.font-weight-regular(v-if='mediaPreview') {{$t('common.media')}}
|
||||
v-card-actions(v-if='mediaPreview')
|
||||
v-spacer
|
||||
v-btn(text color='primary' @click='openMediaDetails = true') {{$t('common.edit')}}
|
||||
v-btn(text color='error' @click='remove') {{$t('common.remove')}}
|
||||
div(v-if='mediaPreview')
|
||||
img.mediaPreview.col-12.ml-3(:src='mediaPreview' :style="{ 'object-position': savedPosition }")
|
||||
span.float-right {{event.media[0].name}}
|
||||
v-file-input(
|
||||
v-else
|
||||
:label="$t('common.media')"
|
||||
:hint="$t('event.media_description')"
|
||||
:prepend-icon="mdiCamera"
|
||||
:value='value.image'
|
||||
@change="selectMedia"
|
||||
persistent-hint
|
||||
accept='image/*')
|
||||
h3.mb-3.font-weight-regular(v-if='mediaPreview') {{$t('common.media')}}
|
||||
v-card-actions(v-if='mediaPreview')
|
||||
v-spacer
|
||||
v-btn(text color='primary' @click='openMediaDetails = true') {{$t('common.edit')}}
|
||||
v-btn(text color='error' @click='remove') {{$t('common.remove')}}
|
||||
div(v-if='mediaPreview')
|
||||
img.mediaPreview.col-12.ml-3(:src='mediaPreview' :style="{ 'object-position': savedPosition }")
|
||||
span.float-right {{event.media[0].name}}
|
||||
v-file-input(
|
||||
v-else
|
||||
:label="$t('common.media')"
|
||||
:hint="$t('event.media_description')"
|
||||
:prepend-icon="mdiCamera"
|
||||
:value='value.image'
|
||||
@change="selectMedia"
|
||||
persistent-hint
|
||||
accept='image/*')
|
||||
</template>
|
||||
<script>
|
||||
import { mdiCamera } from '@mdi/js'
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<template lang='pug'>
|
||||
v-snackbar(
|
||||
v-model="active"
|
||||
:color="color"
|
||||
:bottom="bottom"
|
||||
:top="top"
|
||||
:left="left"
|
||||
:right="right"
|
||||
:timeout="timeout")
|
||||
v-icon.mr-3(color="white" v-text='icon')
|
||||
span {{ message }}
|
||||
template(v-slot:action="{ }")
|
||||
v-icon(size="16" @click="active = false" v-text='mdiCloseCircle')
|
||||
v-snackbar(
|
||||
v-model="active"
|
||||
:color="color"
|
||||
:bottom="bottom"
|
||||
:top="top"
|
||||
:left="left"
|
||||
:right="right"
|
||||
:timeout="timeout")
|
||||
v-icon.mr-3(color="white" v-text='icon')
|
||||
span {{ message }}
|
||||
template(v-slot:action="{ }")
|
||||
v-icon(size="16" @click="active = false" v-text='mdiCloseCircle')
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -19,7 +19,7 @@ import { mdiAlert, mdiCloseCircle, mdiInformation } from '@mdi/js'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
mdiAlert, mdiAlert, mdiCloseCircle, mdiInformation,
|
||||
mdiAlert, mdiCloseCircle, mdiInformation,
|
||||
icon: mdiInformation,
|
||||
color: 'secondary',
|
||||
bottom: true,
|
||||
|
||||
@@ -1,35 +1,34 @@
|
||||
<template lang='pug'>
|
||||
v-container
|
||||
v-card-title {{$t('common.announcements')}}
|
||||
v-card-subtitle(v-html="$t('admin.announcement_description')")
|
||||
v-dialog(v-model='dialog' width='800px' :fullscreen='$vuetify.breakpoint.xsOnly')
|
||||
v-card
|
||||
v-card-title {{$t('admin.new_announcement')}}
|
||||
v-card-text.px-0
|
||||
v-form(v-model='valid' ref='announcement' @submit.prevent='save' lazy-validation)
|
||||
v-text-field.col-12(v-model='announcement.title'
|
||||
:rules="[$validators.required('common.title')]"
|
||||
:label='$t("common.title")')
|
||||
Editor.col-12(v-model='announcement.announcement'
|
||||
border no-save max-height='400px' :placeholder="$t('common.description')")
|
||||
v-card-actions
|
||||
v-spacer
|
||||
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='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-container
|
||||
v-card-title {{$t('common.announcements')}}
|
||||
v-card-subtitle(v-html="$t('admin.announcement_description')")
|
||||
v-dialog(v-model='dialog' width='800px' :fullscreen='$vuetify.breakpoint.xsOnly')
|
||||
v-card
|
||||
v-card-title {{$t('admin.new_announcement')}}
|
||||
v-card-text.px-0
|
||||
v-form(v-model='valid' ref='announcement' @submit.prevent='save' lazy-validation)
|
||||
v-text-field.col-12(v-model='announcement.title'
|
||||
:rules="[$validators.required('common.title')]"
|
||||
:label='$t("common.title")')
|
||||
Editor.col-12(v-model='announcement.announcement'
|
||||
border no-save max-height='400px' :placeholder="$t('common.description')")
|
||||
v-card-actions
|
||||
v-spacer
|
||||
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='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>
|
||||
<script>
|
||||
import { mapActions } from 'vuex'
|
||||
|
||||
@@ -1,21 +1,20 @@
|
||||
<template lang='pug'>
|
||||
v-container
|
||||
v-card-title {{$t('common.events')}}
|
||||
v-card-subtitle {{$t('admin.event_confirm_description')}}
|
||||
v-card-text
|
||||
v-data-table(
|
||||
:hide-default-footer='unconfirmedEvents.length<10'
|
||||
:footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }'
|
||||
:items='unconfirmedEvents'
|
||||
:headers='headers')
|
||||
template(v-slot:item.when='{ item }') {{item|when}}
|
||||
template(v-slot:item.actions='{ item }')
|
||||
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='`/add/${item.id}`' color='warning') {{$t('common.edit')}}
|
||||
v-btn(text small @click='remove(item)'
|
||||
color='error') {{$t('common.delete')}}
|
||||
|
||||
v-container
|
||||
v-card-title {{$t('common.events')}}
|
||||
v-card-subtitle {{$t('admin.event_confirm_description')}}
|
||||
v-card-text
|
||||
v-data-table(
|
||||
:hide-default-footer='unconfirmedEvents.length<10'
|
||||
:footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }'
|
||||
:items='unconfirmedEvents'
|
||||
:headers='headers')
|
||||
template(v-slot:item.when='{ item }') {{item|when}}
|
||||
template(v-slot:item.actions='{ item }')
|
||||
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='`/add/${item.id}`' color='warning') {{$t('common.edit')}}
|
||||
v-btn(text small @click='remove(item)'
|
||||
color='error') {{$t('common.delete')}}
|
||||
</template>
|
||||
<script>
|
||||
import { mdiChevronLeft, mdiChevronRight } from '@mdi/js'
|
||||
|
||||
@@ -1,71 +1,71 @@
|
||||
<template lang="pug">
|
||||
v-container
|
||||
v-card-title {{$t('common.federation')}}
|
||||
v-card-text
|
||||
v-switch(v-model='enable_federation'
|
||||
:label="$t('admin.enable_federation')"
|
||||
v-container
|
||||
v-card-title {{$t('common.federation')}}
|
||||
v-card-text
|
||||
v-switch(v-model='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
|
||||
inset
|
||||
:hint="$t('admin.enable_federation_help')")
|
||||
:hint="$t('admin.instance_place_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'
|
||||
: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
|
||||
: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')
|
||||
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>
|
||||
<script>
|
||||
|
||||
@@ -1,62 +1,62 @@
|
||||
<template lang='pug'>
|
||||
v-container
|
||||
v-card-title {{$t('common.moderation')}}
|
||||
v-card-text
|
||||
v-row
|
||||
v-col(:span='12')
|
||||
span {{$t('common.instances')}}
|
||||
v-text-field(v-model='instancesFilter' :placeholder="$t('admin.filter_instances')")
|
||||
v-data-table(:items='instances'
|
||||
:items-per-page='5'
|
||||
:search='instancesFilter'
|
||||
:hide-default-footer='instances.length<5'
|
||||
:footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }'
|
||||
dense :headers='instancesHeader'
|
||||
@click:row='instanceSelected')
|
||||
template(v-slot:item.blocked="{ item }")
|
||||
v-icon(@click='toggleBlock(item)' v-text='item.blocked ? mdiCheckboxIntermediate : mdiCheckboxBlankOutline')
|
||||
v-container
|
||||
v-card-title {{$t('common.moderation')}}
|
||||
v-card-text
|
||||
v-row
|
||||
v-col(:span='12')
|
||||
span {{$t('common.instances')}}
|
||||
v-text-field(v-model='instancesFilter' :placeholder="$t('admin.filter_instances')")
|
||||
v-data-table(:items='instances'
|
||||
:items-per-page='5'
|
||||
:search='instancesFilter'
|
||||
:hide-default-footer='instances.length<5'
|
||||
:footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }'
|
||||
dense :headers='instancesHeader'
|
||||
@click:row='instanceSelected')
|
||||
template(v-slot:item.blocked="{ item }")
|
||||
v-icon(@click='toggleBlock(item)' v-text='item.blocked ? mdiCheckboxIntermediate : mdiCheckboxBlankOutline')
|
||||
|
||||
v-col(:span='11')
|
||||
span {{$t('common.users')}}
|
||||
v-text-field(v-model='usersFilter' :placeholder="$t('admin.filter_users')")
|
||||
v-data-table(:items='users'
|
||||
:items-per-page='5'
|
||||
:search='usersFilter'
|
||||
:hide-default-footer='users.length<5'
|
||||
:footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }'
|
||||
dense :headers='usersHeader')
|
||||
template(v-slot:item.blocked="{ item }")
|
||||
v-icon(@click='toggleUserBlock(item)' v-text='item.blocked ? mdiCheckboxIntermediate : mdiCheckboxBlankOutline')
|
||||
v-col(:span='11')
|
||||
span {{$t('common.users')}}
|
||||
v-text-field(v-model='usersFilter' :placeholder="$t('admin.filter_users')")
|
||||
v-data-table(:items='users'
|
||||
:items-per-page='5'
|
||||
:search='usersFilter'
|
||||
:hide-default-footer='users.length<5'
|
||||
:footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }'
|
||||
dense :headers='usersHeader')
|
||||
template(v-slot:item.blocked="{ item }")
|
||||
v-icon(@click='toggleUserBlock(item)' v-text='item.blocked ? mdiCheckboxIntermediate : mdiCheckboxBlankOutline')
|
||||
|
||||
div
|
||||
v-card-title {{$t('common.resources')}}
|
||||
v-data-table(:items='resources' dense
|
||||
:headers='resourcesHeader'
|
||||
:hide-default-footer='resources.length<10'
|
||||
:items-per-page='10'
|
||||
:footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }')
|
||||
template(v-slot:item.content='{ item }')
|
||||
span(v-html='item.data.content')
|
||||
template(v-slot:item.created='{ item }')
|
||||
span {{item.created | dateFormat('lll')}}
|
||||
template(v-slot:item.user='{ item }')
|
||||
a(:href='item.ap_user.url || item.ap_user.ap_id' target='_blank') {{item.ap_user.preferredUsername}}
|
||||
template(v-slot:item.event='{ item }')
|
||||
nuxt-link(:to='`/event/${item.event.slug || item.event.id}`') {{item.event.title}}
|
||||
template(v-slot:item.actions='{ item }')
|
||||
v-menu(offset-y)
|
||||
template(v-slot:activator="{ on }")
|
||||
v-btn.mr-2(v-on='on' color='primary' small icon)
|
||||
v-icon(v-text='mdiDotsVertical')
|
||||
v-list
|
||||
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(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(@click='deleteResource(item)')
|
||||
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-title <v-icon left>mdi-lock</v-icon> {{$t('admin.block_user')}}
|
||||
div
|
||||
v-card-title {{$t('common.resources')}}
|
||||
v-data-table(:items='resources' dense
|
||||
:headers='resourcesHeader'
|
||||
:hide-default-footer='resources.length<10'
|
||||
:items-per-page='10'
|
||||
:footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }')
|
||||
template(v-slot:item.content='{ item }')
|
||||
span(v-html='item.data.content')
|
||||
template(v-slot:item.created='{ item }')
|
||||
span {{item.created | dateFormat('lll')}}
|
||||
template(v-slot:item.user='{ item }')
|
||||
a(:href='item.ap_user.url || item.ap_user.ap_id' target='_blank') {{item.ap_user.preferredUsername}}
|
||||
template(v-slot:item.event='{ item }')
|
||||
nuxt-link(:to='`/event/${item.event.slug || item.event.id}`') {{item.event.title}}
|
||||
template(v-slot:item.actions='{ item }')
|
||||
v-menu(offset-y)
|
||||
template(v-slot:activator="{ on }")
|
||||
v-btn.mr-2(v-on='on' color='primary' small icon)
|
||||
v-icon(v-text='mdiDotsVertical')
|
||||
v-list
|
||||
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(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(@click='deleteResource(item)')
|
||||
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-title <v-icon left>mdi-lock</v-icon> {{$t('admin.block_user')}}
|
||||
</template>
|
||||
<script>
|
||||
import { mapState, mapActions } from 'vuex'
|
||||
|
||||
@@ -1,46 +1,46 @@
|
||||
<template lang="pug">
|
||||
v-card
|
||||
v-card-title SMTP Email configuration
|
||||
v-card-text
|
||||
p(v-html="$t('admin.smtp_description')")
|
||||
v-form(v-model='isValid')
|
||||
v-card
|
||||
v-card-title SMTP Email configuration
|
||||
v-card-text
|
||||
p(v-html="$t('admin.smtp_description')")
|
||||
v-form(v-model='isValid')
|
||||
|
||||
v-text-field(v-model='admin_email'
|
||||
@blur="save('admin_email', admin_email )"
|
||||
:label="$t('admin.sender_email')"
|
||||
:rules="$validators.email")
|
||||
v-text-field(v-model='admin_email'
|
||||
@blur="save('admin_email', admin_email )"
|
||||
:label="$t('admin.sender_email')"
|
||||
:rules="$validators.email")
|
||||
|
||||
v-switch(v-model='smtp.sendmail'
|
||||
:label="$t('admin.smtp_use_sendmail')")
|
||||
v-switch(v-model='smtp.sendmail'
|
||||
:label="$t('admin.smtp_use_sendmail')")
|
||||
|
||||
v-row(v-if='!smtp.sendmail')
|
||||
v-col(cols=12 md=9)
|
||||
v-text-field(v-model='smtp.host'
|
||||
:label="$t('admin.smtp_hostname')"
|
||||
:rules="[$validators.required('admin.smtp_hostname')]")
|
||||
v-col(cols=12 md=3)
|
||||
v-text-field(v-model='smtp.port'
|
||||
:label="$t('admin.smtp_port')"
|
||||
:rules="[$validators.required('admin.smtp_port')]")
|
||||
v-row(v-if='!smtp.sendmail')
|
||||
v-col(cols=12 md=9)
|
||||
v-text-field(v-model='smtp.host'
|
||||
:label="$t('admin.smtp_hostname')"
|
||||
:rules="[$validators.required('admin.smtp_hostname')]")
|
||||
v-col(cols=12 md=3)
|
||||
v-text-field(v-model='smtp.port'
|
||||
:label="$t('admin.smtp_port')"
|
||||
:rules="[$validators.required('admin.smtp_port')]")
|
||||
|
||||
v-col(cols=12)
|
||||
v-switch(v-model='smtp.secure'
|
||||
:label="$t('admin.smtp_secure')")
|
||||
|
||||
v-col(md=6)
|
||||
v-text-field(v-model='smtp.auth.user'
|
||||
:label="$t('common.user')")
|
||||
v-col(cols=12)
|
||||
v-switch(v-model='smtp.secure'
|
||||
:label="$t('admin.smtp_secure')")
|
||||
|
||||
v-col(md=6)
|
||||
v-text-field(v-model='smtp.auth.user'
|
||||
:label="$t('common.user')")
|
||||
|
||||
v-col(md=6)
|
||||
v-text-field(v-model='smtp.auth.pass'
|
||||
:label="$t('common.password')"
|
||||
type='password')
|
||||
v-col(md=6)
|
||||
v-text-field(v-model='smtp.auth.pass'
|
||||
:label="$t('common.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>
|
||||
<script>
|
||||
import { mapActions, mapState } from 'vuex'
|
||||
|
||||
@@ -1,62 +1,61 @@
|
||||
<template lang="pug">
|
||||
v-container
|
||||
v-card-title {{$t('common.settings')}}
|
||||
v-card-text
|
||||
v-container
|
||||
v-card-title {{$t('common.settings')}}
|
||||
v-card-text
|
||||
|
||||
v-text-field(v-model='title'
|
||||
:label="$t('common.title')"
|
||||
:hint="$t('admin.title_description')"
|
||||
@blur='save("title", title)'
|
||||
persistent-hint)
|
||||
v-text-field(v-model='title'
|
||||
:label="$t('common.title')"
|
||||
:hint="$t('admin.title_description')"
|
||||
@blur='save("title", title)'
|
||||
persistent-hint)
|
||||
|
||||
v-text-field.mt-5(v-model='description'
|
||||
:label="$t('common.description')"
|
||||
:hint="$t('admin.description_description')"
|
||||
persistent-hint
|
||||
@blur='save("description", description)')
|
||||
v-text-field.mt-5(v-model='description'
|
||||
:label="$t('common.description')"
|
||||
:hint="$t('admin.description_description')"
|
||||
persistent-hint
|
||||
@blur='save("description", description)')
|
||||
|
||||
//- select timezone
|
||||
v-autocomplete.mt-5(v-model='instance_timezone'
|
||||
:label="$t('admin.select_instance_timezone')"
|
||||
:hint="$t('admin.instance_timezone_description')"
|
||||
:items="filteredTimezones"
|
||||
persistent-hint
|
||||
placeholder='Timezone, type to search')
|
||||
//- select timezone
|
||||
v-autocomplete.mt-5(v-model='instance_timezone'
|
||||
:label="$t('admin.select_instance_timezone')"
|
||||
:hint="$t('admin.instance_timezone_description')"
|
||||
:items="filteredTimezones"
|
||||
persistent-hint
|
||||
placeholder='Timezone, type to search')
|
||||
|
||||
v-select.mt-5(
|
||||
v-model='instance_locale'
|
||||
:label="$t('admin.instance_locale')"
|
||||
:hint="$t('admin.instance_locale_description')"
|
||||
persistent-hint
|
||||
:items='locales'
|
||||
)
|
||||
v-select.mt-5(
|
||||
v-model='instance_locale'
|
||||
:label="$t('admin.instance_locale')"
|
||||
:hint="$t('admin.instance_locale_description')"
|
||||
persistent-hint
|
||||
:items='locales'
|
||||
)
|
||||
|
||||
v-switch.mt-4(v-model='allow_registration'
|
||||
inset
|
||||
:label="$t('admin.allow_registration_description')")
|
||||
v-switch.mt-4(v-model='allow_registration'
|
||||
inset
|
||||
:label="$t('admin.allow_registration_description')")
|
||||
|
||||
v-switch.mt-1(v-model='allow_anon_event'
|
||||
inset
|
||||
:label="$t('admin.allow_anon_event')")
|
||||
v-switch.mt-1(v-model='allow_anon_event'
|
||||
inset
|
||||
:label="$t('admin.allow_anon_event')")
|
||||
|
||||
v-switch.mt-1(v-model='allow_recurrent_event'
|
||||
inset
|
||||
:label="$t('admin.allow_recurrent_event')")
|
||||
v-switch.mt-1(v-model='allow_recurrent_event'
|
||||
inset
|
||||
:label="$t('admin.allow_recurrent_event')")
|
||||
|
||||
v-switch.mt-1(v-if='allow_recurrent_event'
|
||||
v-model='recurrent_event_visible'
|
||||
inset
|
||||
:label="$t('admin.recurrent_event_visible')")
|
||||
v-switch.mt-1(v-if='allow_recurrent_event'
|
||||
v-model='recurrent_event_visible'
|
||||
inset
|
||||
:label="$t('admin.recurrent_event_visible')")
|
||||
|
||||
v-dialog(v-model='showSMTP' destroy-on-close max-width='700px' :fullscreen='$vuetify.breakpoint.xsOnly')
|
||||
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-dialog(v-model='showSMTP' destroy-on-close max-width='700px' :fullscreen='$vuetify.breakpoint.xsOnly')
|
||||
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')
|
||||
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -1,69 +1,69 @@
|
||||
<template lang="pug">
|
||||
v-container
|
||||
v-card-title {{$t('common.theme')}}
|
||||
v-card-text
|
||||
//- LOGO
|
||||
v-file-input.mt-5(ref='upload'
|
||||
:label="$t('admin.favicon')"
|
||||
@change='uploadLogo'
|
||||
accept='image/*')
|
||||
template(slot='append-outer')
|
||||
v-btn(color='warning' text @click='resetLogo') <v-icon v-text='mdiRestore'></v-icon> {{$t('common.reset')}}
|
||||
v-img(:src='`/logo.png?${logoKey}`'
|
||||
max-width="60px" max-height="60px" contain)
|
||||
v-container
|
||||
v-card-title {{$t('common.theme')}}
|
||||
v-card-text
|
||||
//- LOGO
|
||||
v-file-input.mt-5(ref='upload'
|
||||
:label="$t('admin.favicon')"
|
||||
@change='uploadLogo'
|
||||
accept='image/*')
|
||||
template(slot='append-outer')
|
||||
v-btn(color='warning' text @click='resetLogo') <v-icon v-text='mdiRestore'></v-icon> {{$t('common.reset')}}
|
||||
v-img(:src='`/logo.png?${logoKey}`'
|
||||
max-width="60px" max-height="60px" contain)
|
||||
|
||||
v-switch.mt-5(v-model='is_dark'
|
||||
inset
|
||||
:label="$t('admin.is_dark')")
|
||||
v-switch.mt-5(v-model='is_dark'
|
||||
inset
|
||||
:label="$t('admin.is_dark')")
|
||||
|
||||
//- TODO choose theme colors
|
||||
//- v-row
|
||||
//- v-col(v-for='(color, i) in colors' :key='i')
|
||||
//- v-menu(v-model='menu[i]'
|
||||
//- :close-on-content-click="false"
|
||||
//- transition="slide-x-transition"
|
||||
//- offset-y
|
||||
//- absolute
|
||||
//- bottom
|
||||
//- max-width="290px"
|
||||
//- min-width="290px")
|
||||
//- template(v-slot:activator='{ on }')
|
||||
//- v-btn(:color='i' small
|
||||
//- v-on='on') {{i}}
|
||||
//- v-color-picker(light @update:color='c => updateColor(i, c)')
|
||||
//- TODO choose theme colors
|
||||
//- v-row
|
||||
//- v-col(v-for='(color, i) in colors' :key='i')
|
||||
//- v-menu(v-model='menu[i]'
|
||||
//- :close-on-content-click="false"
|
||||
//- transition="slide-x-transition"
|
||||
//- offset-y
|
||||
//- absolute
|
||||
//- bottom
|
||||
//- max-width="290px"
|
||||
//- min-width="290px")
|
||||
//- template(v-slot:activator='{ on }')
|
||||
//- v-btn(:color='i' small
|
||||
//- v-on='on') {{i}}
|
||||
//- v-color-picker(light @update:color='c => updateColor(i, c)')
|
||||
|
||||
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-dialog(v-model='linkModal' width='500' :fullscreen='$vuetify.breakpoint.xsOnly')
|
||||
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')
|
||||
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-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>
|
||||
<script>
|
||||
|
||||
@@ -1,50 +1,50 @@
|
||||
<template lang="pug">
|
||||
v-container
|
||||
v-card-title {{$t('common.users')}}
|
||||
v-spacer
|
||||
v-text-field(v-model='search'
|
||||
:append-icon='mdiMagnify' outlined rounded
|
||||
label='Search'
|
||||
single-line hide-details)
|
||||
v-container
|
||||
v-card-title {{$t('common.users')}}
|
||||
v-spacer
|
||||
v-text-field(v-model='search'
|
||||
:append-icon='mdiMagnify' outlined rounded
|
||||
label='Search'
|
||||
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
|
||||
v-dialog(v-model='newUserDialog' :fullscreen='$vuetify.breakpoint.xsOnly')
|
||||
//- ADD NEW USER
|
||||
v-dialog(v-model='newUserDialog' :fullscreen='$vuetify.breakpoint.xsOnly')
|
||||
|
||||
v-card(color='secondary')
|
||||
v-card-title {{$t('common.new_user')}}
|
||||
v-card-text
|
||||
v-form(v-model='valid' ref='user_form' lazy-validation @submit.prevent='createUser')
|
||||
v-text-field(v-model='new_user.email'
|
||||
:label="$t('common.email')"
|
||||
:rules="$validators.email")
|
||||
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-card-actions
|
||||
v-spacer
|
||||
v-btn(@click='newUserDialog=false' color='error' outlined) {{$t('common.cancel')}}
|
||||
v-btn(@click='createUser' :disabled='!valid' color='primary' outlined) {{$t('common.send')}}
|
||||
v-card(color='secondary')
|
||||
v-card-title {{$t('common.new_user')}}
|
||||
v-card-text
|
||||
v-form(v-model='valid' ref='user_form' lazy-validation @submit.prevent='createUser')
|
||||
v-text-field(v-model='new_user.email'
|
||||
:label="$t('common.email')"
|
||||
:rules="$validators.email")
|
||||
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-card-actions
|
||||
v-spacer
|
||||
v-btn(@click='newUserDialog=false' color='error' outlined) {{$t('common.cancel')}}
|
||||
v-btn(@click='createUser' :disabled='!valid' color='primary' outlined) {{$t('common.send')}}
|
||||
|
||||
v-card-text
|
||||
//- USERS LIST
|
||||
v-data-table(
|
||||
:headers='headers'
|
||||
:items='users'
|
||||
:hide-default-footer='users.length<5'
|
||||
:footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }'
|
||||
:search='search')
|
||||
template(v-slot:item.is_active='{item}')
|
||||
v-icon(v-if='item.is_active' color='success' v-text='mdiCheck')
|
||||
v-icon(v-else color='warning' v-text='mdiClose')
|
||||
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(text small @click='toggle(item)'
|
||||
:color='item.is_active?"warning":"success"') {{item.is_active?$t('common.disable'):$t('common.enable')}}
|
||||
v-btn(text small @click='toggleAdmin(item)'
|
||||
:color='item.is_admin?"warning":"error"') {{item.is_admin?$t('common.remove_admin'):$t('common.admin')}}
|
||||
v-btn(text small @click='deleteUser(item)'
|
||||
color='error') {{$t('admin.delete_user')}}
|
||||
v-card-text
|
||||
//- USERS LIST
|
||||
v-data-table(
|
||||
:headers='headers'
|
||||
:items='users'
|
||||
:hide-default-footer='users.length<5'
|
||||
:footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }'
|
||||
:search='search')
|
||||
template(v-slot:item.is_active='{item}')
|
||||
v-icon(v-if='item.is_active' color='success' v-text='mdiCheck')
|
||||
v-icon(v-else color='warning' v-text='mdiClose')
|
||||
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(text small @click='toggle(item)'
|
||||
:color='item.is_active?"warning":"success"') {{item.is_active?$t('common.disable'):$t('common.enable')}}
|
||||
v-btn(text small @click='toggleAdmin(item)'
|
||||
:color='item.is_admin?"warning":"error"') {{item.is_admin?$t('common.remove_admin'):$t('common.admin')}}
|
||||
v-btn(text small @click='deleteUser(item)'
|
||||
color='error') {{$t('admin.delete_user')}}
|
||||
|
||||
</template>
|
||||
<script>
|
||||
|
||||
Reference in New Issue
Block a user