2017-08-27 18:39:30 +00:00
|
|
|
extends layout.pug
|
|
|
|
|
|
|
|
block body
|
|
|
|
.container
|
|
|
|
.content
|
|
|
|
h1 Welcome to the Admin Panel
|
2017-08-28 15:42:16 +00:00
|
|
|
.left
|
2017-12-04 18:20:53 +00:00
|
|
|
#userlist
|
|
|
|
h3 Registered Users ({{ pagination.total }})
|
|
|
|
.pgn
|
|
|
|
span.pagenum Page {{ pagination.page }} of {{ pagination.pages }}
|
|
|
|
.button(v-if="pagination.page > 1" v-on:click="getUsers(pagination.page - 1)") Previous
|
|
|
|
.button(v-for="n in pagination.pages" v-on:click="getUsers(n)" v-bind:class="{active: n == pagination.page}") {{ n }}
|
|
|
|
.button(v-if="pagination.page < pagination.pages" v-on:click="getUsers(pagination.page + 1)") Next
|
|
|
|
.list.users
|
|
|
|
.user.list-item(v-for="user in users")
|
|
|
|
.avatar
|
|
|
|
img(v-if="user.avatar_file" v-bind:src="'/usercontent/images/' + user.avatar_file")
|
|
|
|
img(v-else src="/static/image/avatar.png")
|
|
|
|
.info
|
|
|
|
.stamps
|
|
|
|
.noactive(v-if="user.activated == false" title="Not activated.")
|
|
|
|
i.fa.fa-fw.fa-envelope
|
|
|
|
.display_name {{ user.display_name }}
|
|
|
|
.username {{ user.id }} - {{ user.username }} ({{ user.uuid }})
|
|
|
|
.email {{ user.email }}
|
|
|
|
.privilege Privilege: level {{ user.nw_privilege }}
|
|
|
|
.timestamp {{ new Date(user.created_at).toString() }}
|
|
|
|
.external(v-if="!user.password")
|
|
|
|
b Used external login
|
|
|
|
.button.ban(v-if="user.bannable" v-on:click="banning = user.id")
|
|
|
|
i.fa.fa-fw.fa-ban
|
|
|
|
|Ban User
|
|
|
|
ban-modal(:show="banning", @close="banning = 0", :id="banning")
|
2017-08-28 22:36:13 +00:00
|
|
|
.right
|
2017-12-04 18:20:53 +00:00
|
|
|
#banlist
|
|
|
|
h3 Bans ({{pagination.total}})
|
|
|
|
.message.error(v-if="error") {{ error }}
|
|
|
|
.entry(v-else)
|
|
|
|
.pgn
|
|
|
|
span.pagenum Page {{ pagination.page }} of {{ pagination.pages }}
|
|
|
|
.button(v-if="pagination.page > 1" v-on:click="getBans(pagination.page - 1)") Previous
|
|
|
|
.button(v-for="n in pagination.pages" v-on:click="getBans(n)" v-bind:class="{active: n == pagination.page}") {{ n }}
|
|
|
|
.button(v-if="pagination.page < pagination.pages" v-on:click="getBans(pagination.page + 1)") Next
|
|
|
|
.list.bans
|
|
|
|
.ban.list-item(v-for="ban in bans")
|
|
|
|
.stamps
|
|
|
|
.noactive(title="Expired" v-if="ban.expired")
|
|
|
|
.fa.fa-fw.fa-ban
|
|
|
|
.info
|
|
|
|
.section
|
|
|
|
span.key User
|
|
|
|
span.value {{ ban.user.display_name }}
|
|
|
|
.section
|
|
|
|
span.key Admin
|
|
|
|
span.value {{ ban.admin.display_name }}
|
|
|
|
.section
|
|
|
|
span.key Reason
|
|
|
|
span.value {{ ban.reason }}
|
|
|
|
.section
|
|
|
|
span.key Placed
|
|
|
|
span.value {{ new Date(ban.created_at).toString() }}
|
|
|
|
.section
|
|
|
|
span.key Expires
|
|
|
|
span.value(v-if="ban.expires_at") {{ new Date(ban.expires_at).toString() }}
|
|
|
|
span.value(v-else)
|
|
|
|
b This ban is permanent.
|
|
|
|
.button.remove(@click="pardon(ban.id)") Pardon
|
2017-08-28 17:32:54 +00:00
|
|
|
.templates
|
2017-12-04 18:20:53 +00:00
|
|
|
script(type="text/x-template" id="modal-template").
|
|
|
|
<transition name="modal">
|
|
|
|
<div class="modal-mask" @click="close" v-show="show">
|
|
|
|
<div class="modal-wrapper" @click.stop>
|
|
|
|
<div class="modal-container">
|
|
|
|
<slot></slot>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-08-28 17:32:54 +00:00
|
|
|
</div>
|
2017-12-04 18:20:53 +00:00
|
|
|
</transition>
|
|
|
|
script(type="text/x-template" id="ban-modal-template").
|
|
|
|
<modal :show="show" @close="close">
|
|
|
|
<div class="modal-header">
|
|
|
|
<h3>Ban user</h3>
|
2017-08-28 22:36:13 +00:00
|
|
|
</div>
|
2017-12-04 18:20:53 +00:00
|
|
|
|
|
|
|
<div class="modal-body">
|
|
|
|
<div class="message error" v-if="error">{{ error }}</div>
|
|
|
|
<input type="hidden" name="user_id" :value="id">
|
|
|
|
<label for="reason">Reason</label>
|
|
|
|
<input type="text" id="reason" name="reason" v-model="reason">
|
|
|
|
<label for="expires_at">Expires</label>
|
|
|
|
<input type="date" id="expires_at" name="expires_at" v-model="expires_at">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="modal-footer text-right">
|
|
|
|
<button @click="submit">Ban</button>
|
|
|
|
<button @click="close">Cancel</button>
|
|
|
|
</div>
|
|
|
|
</modal>
|