Henrique Dias ebabbcc45c Error messages in boxes instead of console.log
Former-commit-id: 03b726cecc890dbfb2276afaf769afbc64adacbc [formerly 9a2fecb0b2c2f763ec7f3de2128935b50c9e1c61] [formerly d25748b6826f5c1960142c358a5fb8ba8e0e2088 [formerly 66093fe117a4a26b5e1e55c1daad38ef602c12d2]]
Former-commit-id: 1d1303017b8b21479ba21898570589074bdc4493 [formerly ead020ca894b16b8bb0b6c0b78a38214becf7677]
Former-commit-id: e726415f9dff654613e1959bbd28baf5c787a0ce
2017-07-08 14:45:56 +01:00

43 lines
929 B
Vue

<template>
<div class="dashboard">
<h1>Users <router-link to="/users/new"><button>New</button></router-link></h1>
<table>
<tr>
<th>Username</th>
<th>Admin</th>
<th>Scope</th>
<th></th>
</tr>
<tr v-for="user in users">
<td>{{ user.username }}</td>
<td><i v-if="user.admin" class="material-icons">done</i><i v-else class="material-icons">close</i></td>
<td>{{ user.filesystem }}</td>
<td><router-link :to="'/users/' + user.ID"><i class="material-icons">mode_edit</i></router-link></td>
</tr>
</table>
</div>
</template>
<script>
import api from '@/utils/api'
export default {
name: 'users',
data: function () {
return {
users: []
}
},
created () {
api.getUsers().then(users => {
this.users = users
}).catch(error => {
this.$store.commit('showError', error)
})
}
}
</script>