minor
This commit is contained in:
parent
41e3e97af7
commit
e7b214655f
9 changed files with 108 additions and 109 deletions
|
@ -1,6 +1,7 @@
|
||||||
<template lang='pug'>
|
<template lang='pug'>
|
||||||
v-container
|
v-container
|
||||||
v-subheader(v-html="$t('admin.place_description')")
|
v-card-title {{$t('common.places')}}
|
||||||
|
v-card-subtitle(v-html="$t('admin.place_description')")
|
||||||
|
|
||||||
v-dialog
|
v-dialog
|
||||||
v-form.mb-2
|
v-form.mb-2
|
||||||
|
@ -18,6 +19,7 @@
|
||||||
|
|
||||||
v-btn(@click='savePlace') {{$t('common.save')}}
|
v-btn(@click='savePlace') {{$t('common.save')}}
|
||||||
|
|
||||||
|
v-card-text
|
||||||
v-data-table(
|
v-data-table(
|
||||||
@click:row='selectPlace'
|
@click:row='selectPlace'
|
||||||
:headers='headers'
|
:headers='headers'
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
min-width="290px")
|
min-width="290px")
|
||||||
template(v-slot:activator='{ on }')
|
template(v-slot:activator='{ on }')
|
||||||
v-text-field(:value='colors[i]'
|
v-text-field(:value='colors[i]'
|
||||||
|
:label='i'
|
||||||
v-on='on' clearable readonly)
|
v-on='on' clearable readonly)
|
||||||
v-color-picker(light @update:color='c => updateColor(i, c)')
|
v-color-picker(light @update:color='c => updateColor(i, c)')
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
v-card
|
v-container
|
||||||
v-card-title {{$t('common.users')}}
|
v-card-title {{$t('common.users')}}
|
||||||
v-spacer
|
v-spacer
|
||||||
v-text-field(v-model='search'
|
v-text-field(v-model='search'
|
||||||
append-icon='mdi-magnify'
|
append-icon='mdi-magnify'
|
||||||
label='Search',
|
label='Search',
|
||||||
single-line hide-details)
|
single-line hide-details)
|
||||||
|
v-btn(text color='primary' small @click='newUserDialog = true') <v-icon>mdi-plus-user</v-icon> {{$t('common.new_user')}}
|
||||||
|
|
||||||
//- ADD NEW USER
|
//- ADD NEW USER
|
||||||
v-dialog(v-model='newUserDialog' width='500')
|
v-dialog(v-model='newUserDialog' width='500')
|
||||||
|
@ -16,13 +17,15 @@
|
||||||
v-form
|
v-form
|
||||||
v-text-field(v-model='new_user.email'
|
v-text-field(v-model='new_user.email'
|
||||||
:label="$t('common.email')"
|
:label="$t('common.email')"
|
||||||
:rules="[validators.required('Email')]")
|
:rules="[validators.required('email')]")
|
||||||
v-switch(v-model='new_user.is_admin' :label="$t('common.admin')" inset)
|
v-switch(v-model='new_user.is_admin' :label="$t('common.admin')" inset)
|
||||||
v-alert(type='info' :closable='false') {{$t('admin.user_add_help')}}
|
v-alert(type='info' :closable='false') {{$t('admin.user_add_help')}}
|
||||||
v-card-actions
|
v-card-actions
|
||||||
|
v-spacer
|
||||||
|
v-btn(@click='newUserDialog=false' color='error') {{$t('common.cancel')}}
|
||||||
v-btn(@click='createUser' color='primary') {{$t('common.send')}}
|
v-btn(@click='createUser' color='primary') {{$t('common.send')}}
|
||||||
v-btn(@click='newUserDialog=false' color='danger' plain) {{$t('common.close')}}
|
|
||||||
|
|
||||||
|
v-card-text
|
||||||
//- USERS LIST
|
//- USERS LIST
|
||||||
v-data-table(
|
v-data-table(
|
||||||
:headers='headers'
|
:headers='headers'
|
||||||
|
@ -36,8 +39,6 @@
|
||||||
v-btn(text small @click='deleteUser(item)'
|
v-btn(text small @click='deleteUser(item)'
|
||||||
color='error') {{$t('admin.delete_user')}}
|
color='error') {{$t('admin.delete_user')}}
|
||||||
|
|
||||||
v-btn(text color='primary' small @click='newUserDialog = true') <v-icon>mdi-plus-user</v-icon> {{$t('common.new_user')}}
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { mapState } from 'vuex'
|
import { mapState } from 'vuex'
|
||||||
|
@ -66,18 +67,14 @@ export default {
|
||||||
},
|
},
|
||||||
computed: mapState(['settings']),
|
computed: mapState(['settings']),
|
||||||
methods: {
|
methods: {
|
||||||
deleteUser (user) {
|
async deleteUser (user) {
|
||||||
this.$root.$confirm(this.$t('admin.delete_user_confirm'),
|
const ret = await this.$root.$confirm(this.$t('common.confirm'),
|
||||||
this.$t('common.confirm'), {
|
this.$t('admin.delete_user_confirm'),
|
||||||
confirmButtonText: this.$t('common.ok'),
|
{ type: 'error' })
|
||||||
cancelButtonText: this.$t('common.cancel'),
|
if (!ret) { return }
|
||||||
type: 'error'
|
await this.$axios.delete(`/user/${user.id}`)
|
||||||
})
|
|
||||||
.then(() => this.$axios.delete(`/user/${user.id}`))
|
|
||||||
.then(() => {
|
|
||||||
this.$root.$message({ message: this.$t('admin.user_remove_ok') })
|
this.$root.$message({ message: this.$t('admin.user_remove_ok') })
|
||||||
this.users_ = this.users_.filter(u => u.id !== user.id)
|
this.users_ = this.users_.filter(u => u.id !== user.id)
|
||||||
})
|
|
||||||
},
|
},
|
||||||
toggle (user) {
|
toggle (user) {
|
||||||
user.is_active = !user.is_active
|
user.is_active = !user.is_active
|
||||||
|
@ -88,7 +85,6 @@ export default {
|
||||||
user.is_admin = !user.is_admin
|
user.is_admin = !user.is_admin
|
||||||
await this.$axios.$put('/user', user)
|
await this.$axios.$put('/user', user)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async createUser () {
|
async createUser () {
|
||||||
|
@ -97,15 +93,13 @@ export default {
|
||||||
const user = await this.$axios.$post('/user', this.new_user)
|
const user = await this.$axios.$post('/user', this.new_user)
|
||||||
this.new_user = { email: '', is_admin: false }
|
this.new_user = { email: '', is_admin: false }
|
||||||
|
|
||||||
Message({
|
this.$root.$message({
|
||||||
showClose: true,
|
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: this.$t('admin.user_create_ok')
|
message: this.$t('admin.user_create_ok')
|
||||||
})
|
})
|
||||||
this.users_.push(user)
|
this.users_.push(user)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
Message({
|
this.$root.$message({
|
||||||
showClose: true,
|
|
||||||
type: 'error',
|
type: 'error',
|
||||||
message: this.$t(e)
|
message: this.$t(e)
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template lang='pug'>
|
<template lang='pug'>
|
||||||
v-container.p-4.text-center
|
v-container.p-4.text-center
|
||||||
v-alert(v-if="error.statusCode === 404") ¯\_(ツ)_/¯ {{error.message}}
|
v-alert(v-if="error.statusCode === 404") ¯\_(ツ)_/¯ {{error.message}}
|
||||||
v-calert(v-else) <i>warning</i> An error occurred: {{error.message}}
|
v-alert(v-else type='danger') <v-icon>mdi-warning</v-icon> An error occurred: {{error.message}}
|
||||||
nuxt-link(to='/') Back to home
|
nuxt-link(to='/') Back to home
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
v-container
|
v-container
|
||||||
|
v-card
|
||||||
v-tabs
|
v-tabs
|
||||||
|
|
||||||
//- SETTINGS
|
//- SETTINGS
|
||||||
|
@ -29,7 +29,9 @@
|
||||||
v-badge(:value='events.length') {{$t('common.events')}}
|
v-badge(:value='events.length') {{$t('common.events')}}
|
||||||
v-tab-item
|
v-tab-item
|
||||||
v-container
|
v-container
|
||||||
v-subheader {{$t('admin.event_confirm_description')}}
|
v-card-title {{$t('common.events')}}
|
||||||
|
v-card-subtitle {{$t('admin.event_confirm_description')}}
|
||||||
|
v-card-text
|
||||||
v-data-table(
|
v-data-table(
|
||||||
:items='events'
|
:items='events'
|
||||||
:headers='eventHeaders')
|
:headers='eventHeaders')
|
||||||
|
|
|
@ -1,21 +1,19 @@
|
||||||
<template lang='pug'>
|
<template lang='pug'>
|
||||||
v-card.mt-5
|
v-row.mt-5(align='center' justify='center')
|
||||||
h4(slot='header')
|
v-col(cols='12' md="6" lg="5" xl="4")
|
||||||
nuxt-link(to='/')
|
v-card(light)
|
||||||
img(src='/favicon.ico')
|
v-card-title {{settings.title}} - {{$t('common.authorize')}}
|
||||||
span {{settings.title}} - {{$t('common.authorize')}}
|
v-card-text
|
||||||
<u>{{$auth.user.email}}</u>
|
u {{$auth.user.email}}
|
||||||
div
|
div
|
||||||
p(v-html="$t('oauth.authorization_request', { app: client.name, instance_name: settings.title })")
|
p(v-html="$t('oauth.authorization_request', { app: client.name, instance_name: settings.title })")
|
||||||
ul
|
ul
|
||||||
li(v-for="s in scope.split(' ')") {{$t(`oauth.scopes.${scope}`)}}
|
li(v-for="s in scope.split(' ')") {{$t(`oauth.scopes.${scope}`)}}
|
||||||
span(v-html="$t('oauth.redirected_to', {url: $route.query.redirect_uri})")
|
span(v-html="$t('oauth.redirected_to', {url: $route.query.redirect_uri})")
|
||||||
br
|
v-card-actions
|
||||||
br
|
v-spacer
|
||||||
a(:href='authorizeURL')
|
v-btn(color='error' to='/') {{$t('common.cancel')}}
|
||||||
v-btn.mr-1(plain color='success') {{$t('common.authorize')}}
|
v-btn(:href='authorizeURL' color='success') {{$t('common.authorize')}}
|
||||||
a(href='/')
|
|
||||||
v-btn.mt-1(plain color='danger') {{$t('common.cancel')}}
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
.edit(v-if='$auth.user && $auth.user.is_admin')
|
.edit(v-if='$auth.user && $auth.user.is_admin')
|
||||||
Editor(v-if='$auth.user && $auth.user.is_admin'
|
Editor(v-if='$auth.user && $auth.user.is_admin'
|
||||||
v-model='about')
|
v-model='about')
|
||||||
v-btn.float-right(type='success' plain icon='el-icon-check'
|
v-btn.float-right(color='success' plain
|
||||||
@click='save') {{$t('common.save')}}
|
@click='save') {{$t('common.save')}}
|
||||||
div(v-else v-html='about')
|
div(v-else v-html='about')
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
b {{event|when}}
|
b {{event|when}}
|
||||||
small ({{event.start_datetime|from}})
|
small ({{event.start_datetime|from}})
|
||||||
v-list-item-title
|
v-list-item-title
|
||||||
i.el-icon-location-outline
|
|
||||||
b.p-location {{event.place.name}}
|
b.p-location {{event.place.name}}
|
||||||
span - {{event.place.address}}
|
span - {{event.place.address}}
|
||||||
h2 {{event.title}}
|
h2 {{event.title}}
|
||||||
|
|
|
@ -1,18 +1,21 @@
|
||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
el-main
|
v-row.mt-5(align='center' justify='center')
|
||||||
h4 <nuxt-link to='/'><img src='/favicon.ico'/></nuxt-link> {{$t('common.set_password')}}
|
v-col(cols='12' md="6" lg="5" xl="4")
|
||||||
|
v-card
|
||||||
|
v-card-title <nuxt-link to='/'><img src='/favicon.ico'/></nuxt-link> {{$t('common.set_password')}}
|
||||||
|
template(v-if='valid')
|
||||||
|
v-card-text(v-if='valid')
|
||||||
|
v-form(v-if='valid')
|
||||||
|
v-text-field(type='password' v-model='new_password' :label="$t('common.new_password')")
|
||||||
|
|
||||||
div(v-if='valid')
|
v-card-actions
|
||||||
el-form
|
v-btn(color="success" :disabled='!new_password' @click='change_password') {{$t('common.send')}}
|
||||||
el-form-item {{$t('common.new_password')}}
|
|
||||||
el-input(type='password', v-model='new_password')
|
|
||||||
el-button(plain type="success" icon='el-icon-send'
|
|
||||||
:disabled='!new_password' @click='change_password') {{$t('common.send')}}
|
|
||||||
|
|
||||||
div(v-else) {{$t('recover.not_valid_code')}}
|
v-card-text(v-else) {{$t('recover.not_valid_code')}}
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import { validators } from '../../plugins/helpers'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Recover',
|
name: 'Recover',
|
||||||
|
@ -26,7 +29,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return { new_password: '' }
|
return { validators, new_password: '' }
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async change_password () {
|
async change_password () {
|
||||||
|
|
Loading…
Reference in a new issue