From 67f303b382d638d7f68a5b79b0e5ef5f7678569c Mon Sep 17 00:00:00 2001 From: Evert Date: Tue, 13 Feb 2018 22:12:45 +0200 Subject: [PATCH] Use bootstrap on admin panel --- src/script/component/Ban.vue | 34 +++++------ src/script/component/BanList.vue | 2 +- src/script/component/BanModal.vue | 18 +++--- src/script/component/ClientModal.vue | 36 ++++++------ src/script/component/OAuthClient.vue | 55 +++++++++--------- src/script/component/OAuthClients.vue | 2 +- src/script/component/Pagination.vue | 12 ++-- src/script/component/User.vue | 45 +++++++++------ src/script/component/UserList.vue | 15 +++-- src/script/component/UserLockModal.vue | 50 +++++++++++++++++ src/script/component/UserModal.vue | 30 +++++----- src/script/views/Users.vue | 9 +-- src/style/admin.styl | 77 +++++-------------------- views/admin/index.pug | 7 +-- views/admin/layout.pug | 29 ++++++---- views/admin/oauth2.pug | 78 -------------------------- 16 files changed, 225 insertions(+), 274 deletions(-) create mode 100644 src/script/component/UserLockModal.vue delete mode 100644 views/admin/oauth2.pug diff --git a/src/script/component/Ban.vue b/src/script/component/Ban.vue index d8f3de8..26feada 100644 --- a/src/script/component/Ban.vue +++ b/src/script/component/Ban.vue @@ -4,24 +4,24 @@ .noactive.stamp(title='Expired', v-if='expired') i.fa.fa-fw.fa-ban .info - .section - span.key User - span.value {{ user.display_name }} - .section - span.key Admin - span.value {{ admin.display_name }} - .section - span.key Reason - span.value {{ reason }} - .section - span.key Placed - span.value {{ new Date(created_at).toString() }} - .section - span.key Expires - span.value(v-if='expires_at') {{ new Date(expires_at).toString() }} - span.value(v-else='v-else') + .row + .col-3 User + .col {{ user.display_name }} + .row + .col-3 Admin + .col {{ admin.display_name }} + .row + .col-3 Reason + .col {{ reason }} + .row + .col-3 Placed + .col {{ new Date(created_at).toString() }} + .row + .col-3 Expires + .col(v-if='expires_at') {{ new Date(expires_at).toString() }} + .col(v-else='v-else') b This ban is permanent. - .button.remove(@click='$parent.$emit("pardon", id)') + .btn.btn-success.remove.mt-3(@click='$parent.$emit("pardon", id)') i.fa.fa-fw.fa-check | Pardon diff --git a/src/script/component/BanList.vue b/src/script/component/BanList.vue index 370615a..43f3375 100644 --- a/src/script/component/BanList.vue +++ b/src/script/component/BanList.vue @@ -1,7 +1,7 @@ diff --git a/src/script/component/UserModal.vue b/src/script/component/UserModal.vue index 1f0903e..dbc3e23 100644 --- a/src/script/component/UserModal.vue +++ b/src/script/component/UserModal.vue @@ -2,27 +2,27 @@ modal(:show='show', @close='close') .modal-header h3 Edit User - .modal-body.aligned-form - .message.error(v-if='error') {{ error }} - .cell + .modal-body + .alert.alert-danger(v-if='error') {{ error }} + .form-group label(for="username") Username - input(type="text" id="username" name="username" v-model="username") - .cell + input.form-control(type="text" id="username" name="username" v-model="username") + .form-group label(for="display_name") Display Name - input(type="text" id="display_name" name="display_name" v-model="display_name") - .cell + input.form-control(type="text" id="display_name" name="display_name" v-model="display_name") + .form-group label(for="email") Email - input(type="email" id="email" name="email" v-model="email") - .cell + input.form-control(type="email" id="email" name="email" v-model="email") + .form-group label(for="privilege") Privilege input(type="range" min="0" max="5" step="1" id="privilege" name="privilege" v-model="nw_privilege") span {{ nw_privilege }} - .cell - label(for="activated") Activated - input(type="checkbox" id="activated" name="activated" v-model="activated") - .modal-footer.text-align - button(@click='submit') Done - button(@click='close') Cancel + .form-check + input.form-check-input(type="checkbox" id="activated" name="activated" v-model="activated") + label.form-check-label(for="activated") Activated + .modal-footer.text-right + button.btn.btn-primary(@click='submit') Done + button.btn.btn-secondary(@click='close') Cancel