Users list + Edit user interface

This commit is contained in:
NGPixel
2017-01-04 00:07:15 -05:00
parent 9578989b67
commit 0809946914
57 changed files with 265 additions and 3462 deletions

View File

@@ -7,7 +7,7 @@ block rootNavRight
i.nav-item#notifload
.nav-item
a.button.btn-edit-discard(href='/')
i.fa.fa-home
i.icon-home
span Home
block content

View File

@@ -33,11 +33,11 @@ block adminContent
label.label Provider
p.control.account-profile-provider
case user.provider
when 'local': i.fa.fa-database
when 'windowslive': i.fa.fa-windows.is-blue
when 'google': i.fa.fa-google.is-blue
when 'facebook': i.fa.fa-facebook.is-purple
default: i.fa.fa-question-circle
when 'local': i.icon-server
when 'windowslive': i.icon-windows2.is-blue
when 'google': i.icon-google.is-blue
when 'facebook': i.icon-facebook.is-purple
default: i.icon-warning
= t('auth:providers.' + user.provider)
label.label Member since
p.control= userMoment(user.createdAt).format('LL')

View File

@@ -0,0 +1,114 @@
extends ./_layout.pug
block rootNavRight
i.nav-item#notifload
.nav-item
a.button(href='/admin/users')
i.icon-reply
span Return to Users
block adminContent
#page-type-admin
.hero
h1.title#title Edit User
h2.subtitle= usr.email
table.table
thead
tr
th Unique ID
th Email
th Provider
th Created On
th Updated On
tbody
tr
td.is-centered= usr._id
td.is-centered= usr.email
td.is-centered.has-icons
case usr.provider
when 'local'
i.icon-server.is-deep-orange
| Local Database
when 'windowslive'
i.icon-windows2.is-blue
| Microsoft Account
when 'google'
i.icon-google.is-blue
| Google ID
when 'facebook'
i.icon-facebook.is-purple
| Facebook
default: i.icon-warning
td.is-centered= userMoment(usr.createdAt).format('lll')
td.is-centered= userMoment(usr.updatedAt).format('lll')
.form-sections
section
label.label Display Name
p.control.is-fullwidth
input.input(type='text', placeholder='John Smith', value=usr.name)
if usr.provider == 'local'
section
label.label Password
p.control.is-fullwidth
input.input(type='password', placeholder='Password', value='********')
section
label.label Access Rights
table.table
thead.is-teal
tr
th
th(style={width: '200px'}) Permission(s)
th Path
th(style={width: '150px'}) Access
th(style={width: '50px'})
tbody
tr(v-for='right in rights')
td.is-icon
i.icon-marquee-plus.is-green(v-if='!right.deny')
i.icon-marquee-minus.is-red(v-if='right.deny')
td
p.control.is-fullwidth
select(v-model='right.role')
option(value='write') Read and Write
option(value='read') Read Only
td
.columns
.column.is-narrow
p.control
select(v-model='right.exact')
option(value='false') Path starts with:
option(value='true') Path match exactly:
.column
p.control.is-fullwidth
input.input(type='text', placeholder='/', v-model='right.path')
td
p.control.is-fullwidth
select(v-model='right.deny')
option(value='false') Allow
option(value='true') Deny
td.is-centered.has-action-icons
i.icon-delete.is-red
.table-actions
button.button.is-blue
i.icon-plus
span Add New Row
section
label.label Role Override
p.control.is-fullwidth
select(v-model='roleoverride')
option(value='none') None
option(value='admin') Global Administrator
.columns.is-gapless
.column
section
button.button.is-green
i.icon-check
span Save Changes
button.button.is-grey.is-outlined
i.icon-cancel
span Discard
.column.is-narrow
section
button.button.is-red
i.icon-trash2
span Delete Account

View File

@@ -1,18 +1,50 @@
extends ./_layout.pug
block rootNavRight
i.nav-item#notifload
.nav-item
a.button.btn-create-prompt
i.icon-plus
span Create / Authorize User
block adminContent
.hero
h1.title#title Users
h2.subtitle Manage users and rights
ul.hero-menu
li
a.is-blue(href='/')
i.icon-plus
span Create Local User
li
a.is-indigo(href='/')
i.icon-globe
span Authorize Social User
.form-sections
section
| Coming soon
#page-type-admin
.hero
h1.title#title Users
h2.subtitle Manage users and access rights
table.table
thead
tr
th
th Name
th Email
th Provider
th Created On
th Updated On
tbody
each usr in usrs
tr
td.is-icon
i.icon-user.is-grey
td
a(href='/admin/users/' + usr._id)= usr.name
td= usr.email
td.is-centered.has-icons
case usr.provider
when 'local'
i.icon-server.is-deep-orange
| Local Database
when 'windowslive'
i.icon-windows2.is-blue
| Microsoft Account
when 'google'
i.icon-google.is-blue
| Google ID
when 'facebook'
i.icon-facebook.is-purple
| Facebook
default: i.icon-warning
td.is-centered= userMoment(usr.createdAt).format('lll')
td.is-centered= userMoment(usr.updatedAt).format('lll')
include ../../modals/admin-createuser.pug