fix pug indent issue
This commit is contained in:
@@ -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