This repository has been archived on 2022-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
IcyNet.eu/src/script/component/User.vue

49 lines
1.5 KiB
Vue

<template lang="pug">
.user.list-item
.avatar
img(v-if='avatar_file', v-bind:src="'/usercontent/images/' + avatar_file")
img(v-else='v-else', src='/static/image/avatar.png')
.info
.stamps
.noactive.stamp(v-if='activated == false', title='Not activated.')
i.fa.fa-fw.fa-envelope
.dropdown-wrapper.stamp(@click="dropdown = !dropdown" v-on-clickaway='away')
i.fa.fa-fw.fa-ellipsis-v
transition(name="modal")
.dropdown(v-show="dropdown")
.title Actions
.action(v-if='bannable' v-on:click='$parent.$emit("ban", id)')
i.fa.fa-fw.fa-ban
|&nbsp;Ban User
.display_name {{ display_name }}
.ame {{ id }} - {{ username }} ({{ uuid }})
.email {{ email }}
.privilege Privilege: level {{ nw_privilege }}
.timestamp {{ new Date(created_at).toString() }}
.external(v-if='!password')
b Used external login
</template>
<script type="text/javascript">
import { directive as onClickaway } from 'vue-clickaway';
export default {
props: ['avatar_file', 'activated', 'display_name', 'id', 'username', 'uuid', 'email', 'nw_privilege', 'created_at', 'password', 'bannable'],
directives: {
onClickaway: onClickaway,
},
data: function () {
return {
dropdown: false
}
},
methods: {
away: function () {
this.dropdown = false
}
}
}
</script>