diff --git a/components/Home.vue b/components/Home.vue index d8b09a74..cac7ead8 100644 --- a/components/Home.vue +++ b/components/Home.vue @@ -61,7 +61,4 @@ export default { justify-content: center; } -.v-dialog { - width: unset !important; -} diff --git a/components/admin/Events.vue b/components/admin/Events.vue new file mode 100644 index 00000000..2a11a393 --- /dev/null +++ b/components/admin/Events.vue @@ -0,0 +1,58 @@ + + diff --git a/components/admin/Users.vue b/components/admin/Users.vue index 556c9591..fd7880c9 100644 --- a/components/admin/Users.vue +++ b/components/admin/Users.vue @@ -6,24 +6,24 @@ append-icon='mdi-magnify' label='Search', single-line hide-details) - v-btn(text color='primary' small @click='newUserDialog = true') mdi-plus-user {{$t('common.new_user')}} + v-btn(color='primary' small @click='newUserDialog = true') mdi-plus {{$t('common.new_user')}} //- ADD NEW USER - v-dialog(v-model='newUserDialog' width='500') + v-dialog(v-model='newUserDialog' :fullscreen="$vuetify.breakpoint.xsOnly") v-card v-card-title {{$t('common.new_user')}} v-card-text - v-form + v-form(v-model='valid') v-text-field(v-model='new_user.email' :label="$t('common.email')" - :rules="[$validators.required('email')]") + :rules="$validators.email") 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-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' :disabled='!valid' color='primary') {{$t('common.send')}} v-card-text //- USERS LIST @@ -51,6 +51,7 @@ export default { data () { return { newUserDialog: false, + valid: false, new_user: { email: '', is_admin: false @@ -66,9 +67,7 @@ export default { computed: mapState(['settings']), methods: { async deleteUser (user) { - const ret = await this.$root.$confirm(this.$t('common.confirm'), - this.$t('admin.delete_user_confirm'), - { type: 'error' }) + const ret = await this.$root.$confirm(this.$t('common.confirm'), this.$t('admin.delete_user_confirm')) if (!ret) { return } await this.$axios.delete(`/user/${user.id}`) this.$root.$message({ message: this.$t('admin.user_remove_ok') }) diff --git a/layouts/default.vue b/layouts/default.vue index 64785d6e..ca94470d 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -30,3 +30,9 @@ export default { } } + diff --git a/pages/Admin.vue b/pages/Admin.vue index 71b67bed..a2b9e507 100644 --- a/pages/Admin.vue +++ b/pages/Admin.vue @@ -15,7 +15,7 @@ //- USERS v-tab - v-badge(:value='unconfirmedUsers.length' :content='unconfirmedUsers.length') {{$t('common.users')}} + v-badge(:value='!!unconfirmedUsers.length' :content='unconfirmedUsers.length') {{$t('common.users')}} v-tab-item Users(:users='users') @@ -26,15 +26,9 @@ //- EVENTS v-tab - v-badge(:value='events.length') {{$t('common.events')}} + v-badge(:value='!!unconfirmedEvents.length' :content='unconfirmedEvents.length') {{$t('common.events')}} v-tab-item - v-container - v-card-title {{$t('common.events')}} - v-card-subtitle {{$t('admin.event_confirm_description')}} - v-card-text - v-data-table( - :items='events' - :headers='eventHeaders') + Events(:unconfirmedEvents='unconfirmedEvents') //- ANNOUNCEMENTS v-tab {{$t('common.announcements')}} @@ -55,6 +49,7 @@