add loader

This commit is contained in:
2020-04-11 23:54:38 +02:00
parent 4dbd0e47d7
commit 85d20dfe4d
7 changed files with 54 additions and 5 deletions

View File

@@ -24,7 +24,7 @@
<div class="mb-2">
<h2>Liste des utilisateurs</h2>
<ul>
<li v-if="loading">> Loading...</li>
<Loader v-if="loading" />
<li v-else v-for="user in users"><a :href="user.links.self">{{ user.data.attributes.name }}</a> - {{ user.data.attributes.email }} - {{ user.data.attributes.is_admin }}</li>
</ul>
</div>
@@ -38,11 +38,12 @@
import Avatar from '../../components/Avatar';
import AlertBox from '../../components/AlertBox';
import InputField from '../../components/InputField';
import Loader from "../../components/Loader";
export default {
name: 'UserAdmin',
components: {
Avatar, AlertBox, InputField,
Avatar, AlertBox, InputField, Loader
},
data: function () {
return {
@@ -53,7 +54,7 @@
alertType: '',
alertMessage: '',
errors: null,
loading: '',
loading: true,
users: null,
}
},