From d69dde1df5c2db74c10fe86ead50a63528c4487d Mon Sep 17 00:00:00 2001 From: NGPixel Date: Sat, 2 Nov 2019 16:04:43 -0400 Subject: [PATCH] fix: UI fixes + search crash (#1086) --- client/components/admin.vue | 2 +- client/components/admin/admin-auth.vue | 24 ++++++++++--------- client/components/admin/admin-dev-flags.vue | 2 +- .../admin/admin-groups-edit-rules.vue | 6 ++++- .../admin/admin-groups-edit-users.vue | 2 +- client/components/admin/admin-pages-edit.vue | 18 +++++++------- client/components/common/search-results.vue | 21 +++++++++------- client/themes/default/components/page.vue | 12 +++++----- server/modules/search/db/engine.js | 22 +++++------------ 9 files changed, 55 insertions(+), 54 deletions(-) diff --git a/client/components/admin.vue b/client/components/admin.vue index a0d680eb..b063278e 100644 --- a/client/components/admin.vue +++ b/client/components/admin.vue @@ -104,7 +104,7 @@ v-list-item(to='/dev-flags') v-list-item-title {{ $t('admin:dev.flags.title') }} v-list-item(href='/graphql') - v-list-item-title {{ $t('admin:dev.graphiql.title') }} + v-list-item-title GraphQL //- v-list-item(to='/dev-graphiql') //- v-list-item-title {{ $t('admin:dev.graphiql.title') }} //- v-list-item(to='/dev-voyager') diff --git a/client/components/admin/admin-auth.vue b/client/components/admin/admin-auth.vue index abfcaa41..35fbc74a 100644 --- a/client/components/admin/admin-auth.vue +++ b/client/components/admin/admin-auth.vue @@ -148,16 +148,6 @@ persistent-hint inset ) - v-switch.ml-3( - v-if='strategy.key === `local`' - :disabled='!strategy.selfRegistration || true' - v-model='strategy.recaptcha' - label='Use reCAPTCHA by Google' - color='primary' - hint='Protects against spam robots and malicious registrations.' - persistent-hint - inset - ) v-combobox.ml-3.mt-3( :label='$t(`admin:auth.domainsWhitelist`)' v-model='strategy.domainWhitelist' @@ -191,7 +181,19 @@ ) template(v-if='strategy.useForm') v-divider.mt-3 - .overline.my-5 {{$t('admin:auth.security')}} + .d-flex.my-5.align-center + .overline {{$t('admin:auth.security')}} + v-chip.ml-3.grey--text(outlined, small, label) Coming soon + v-switch.ml-3( + v-if='strategy.key === `local`' + :disabled='!strategy.selfRegistration || true' + v-model='strategy.recaptcha' + label='Use reCAPTCHA by Google' + color='primary' + hint='Protects against spam robots and malicious registrations.' + persistent-hint + inset + ) v-switch.ml-3( v-model='strategy.recaptcha' :disabled='true' diff --git a/client/components/admin/admin-dev-flags.vue b/client/components/admin/admin-dev-flags.vue index 6c41fe2b..3cc7d32f 100644 --- a/client/components/admin/admin-dev-flags.vue +++ b/client/components/admin/admin-dev-flags.vue @@ -12,7 +12,7 @@ v-icon(left) mdi-check span {{$t('common:actions.apply')}} - v-card.mt-3.white.grey--text.text--darken-3 + v-card.mt-3(:class='$vuetify.theme.dark ? `grey darken-3-d5` : `white grey--text text--darken-3`') v-alert(color='red', :value='true', icon='mdi-alert', dark, prominent) span Do NOT enable these flags unless you know what you're doing! .caption Doing so may result in data loss or broken installation! diff --git a/client/components/admin/admin-groups-edit-rules.vue b/client/components/admin/admin-groups-edit-rules.vue index 3f8c62d9..d16a7eff 100644 --- a/client/components/admin/admin-groups-edit-rules.vue +++ b/client/components/admin/admin-groups-edit-rules.vue @@ -72,6 +72,7 @@ chips deletable-chips small-chips + height='48px' style='flex: 0 1 440px;' :menu-props='{ "maxHeight": 500 }' clearable @@ -99,6 +100,7 @@ v-model='rule.match' placeholder='Match...' hide-details + height='48px' style='flex: 0 1 250px;' dense ) @@ -118,6 +120,7 @@ placeholder='Any Locale' multiple hide-details + height='48px' dense :menu-props='{ "minWidth": 250 }' style='flex: 0 1 150px;' @@ -161,7 +164,7 @@ :color='$vuetify.theme.dark ? `grey` : `blue-grey`' ) - v-btn.ml-2.mt-1(icon, @click='removeRule(rule.id)', small) + v-btn.ml-2(icon, @click='removeRule(rule.id)', small) v-icon(:color='$vuetify.theme.dark ? `grey` : `blue-grey`') mdi-close v-divider.mt-3 @@ -277,6 +280,7 @@ export default { background-color: mc('blue-grey', '100'); border-radius: 4px; padding: .5rem; + align-items: center; &-enter-active, &-leave-active { transition: all .5s ease; diff --git a/client/components/admin/admin-groups-edit-users.vue b/client/components/admin/admin-groups-edit-users.vue index af586746..5e1b7465 100644 --- a/client/components/admin/admin-groups-edit-users.vue +++ b/client/components/admin/admin-groups-edit-users.vue @@ -39,7 +39,7 @@ v-list-item-content v-list-item-title Unassign template(slot='no-data') - v-alert.ma-3(icon='warning', outlined) No users to display. + v-alert.ma-3(icon='mdi-alert', outlined) No users to display. .text-center.py-2(v-if='group.users.length > 15') v-pagination(v-model='pagination', :length='pageCount') diff --git a/client/components/admin/admin-pages-edit.vue b/client/components/admin/admin-pages-edit.vue index 93cc9aa7..1bd894a8 100644 --- a/client/components/admin/admin-pages-edit.vue +++ b/client/components/admin/admin-pages-edit.vue @@ -58,17 +58,17 @@ v-list-item v-list-item-content v-list-item-title: .overline.grey--text Title - v-list-item-subtitle.body-2.grey--text.text--darken-3 {{ page.title }} + v-list-item-subtitle.body-2(:class='$vuetify.theme.dark ? `grey--text text--lighten-2` : `grey--text text--darken-3`') {{ page.title }} v-divider v-list-item v-list-item-content v-list-item-title: .overline.grey--text Description - v-list-item-subtitle.body-2.grey--text.text--darken-3 {{ page.description || '-' }} + v-list-item-subtitle.body-2(:class='$vuetify.theme.dark ? `grey--text text--lighten-2` : `grey--text text--darken-3`') {{ page.description || '-' }} v-divider v-list-item v-list-item-content v-list-item-title: .overline.grey--text Locale - v-list-item-subtitle.body-2.grey--text.text--darken-3 {{ page.locale }} + v-list-item-subtitle.body-2(:class='$vuetify.theme.dark ? `grey--text text--lighten-2` : `grey--text text--darken-3`') {{ page.locale }} v-list-item-action v-btn(icon, x-small) v-icon(color='grey') mdi-pencil @@ -76,7 +76,7 @@ v-list-item v-list-item-content v-list-item-title: .overline.grey--text Path - v-list-item-subtitle.body-2.grey--text.text--darken-3 {{ page.path }} + v-list-item-subtitle.body-2(:class='$vuetify.theme.dark ? `grey--text text--lighten-2` : `grey--text text--darken-3`') {{ page.path }} v-list-item-action v-btn(icon, x-small) v-icon(color='grey') mdi-pencil @@ -84,14 +84,14 @@ v-list-item v-list-item-content v-list-item-title: .overline.grey--text Editor - v-list-item-subtitle.body-2.grey--text.text--darken-3 {{ page.editor || '?' }} + v-list-item-subtitle.body-2(:class='$vuetify.theme.dark ? `grey--text text--lighten-2` : `grey--text text--darken-3`') {{ page.editor || '?' }} v-divider v-list-item v-list-item-content v-list-item-title: .overline.grey--text Content Type - v-list-item-subtitle.body-2.grey--text.text--darken-3 {{ page.contentType || '?' }} + v-list-item-subtitle.body-2(:class='$vuetify.theme.dark ? `grey--text text--lighten-2` : `grey--text text--darken-3`') {{ page.contentType || '?' }} - v-toolbar.elevation-2.mt-3.animated.fadeInUp.wait-p4s(color='white', dense) + v-toolbar.elevation-2.mt-3.animated.fadeInUp.wait-p4s(:color='$vuetify.theme.dark ? `grey darken-3-d5` : `white`', dense) v-spacer v-btn(color='primary', text, :href='`/` + page.locale + `/` + page.path') v-icon(left) mdi-text-subject @@ -124,7 +124,7 @@ v-icon(color='grey') mdi-account v-list-item-content v-list-item-title: .overline.grey--text Creator - v-list-item-subtitle.body-2.grey--text.text--darken-3 {{ page.creatorName }} #[em.caption ({{ page.creatorEmail }})] + v-list-item-subtitle.body-2(:class='$vuetify.theme.dark ? `grey--text text--lighten-2` : `grey--text text--darken-3`') {{ page.creatorName }} #[em.caption ({{ page.creatorEmail }})] v-list-item-action v-list-item-action-text {{ page.createdAt | moment('calendar') }} v-divider @@ -134,7 +134,7 @@ v-icon(color='grey') mdi-account v-list-item-content v-list-item-title: .overline.grey--text Last Editor - v-list-item-subtitle.body-2.grey--text.text--darken-3 {{ page.authorName }} #[em.caption ({{ page.authorEmail }})] + v-list-item-subtitle.body-2(:class='$vuetify.theme.dark ? `grey--text text--lighten-2` : `grey--text text--darken-3`') {{ page.authorName }} #[em.caption ({{ page.authorEmail }})] v-list-item-action v-list-item-action-text {{ page.updatedAt | moment('calendar') }} v-card.mt-3.animated.fadeInUp.wait-p4s diff --git a/client/components/common/search-results.vue b/client/components/common/search-results.vue index 95d57464..d9a42273 100644 --- a/client/components/common/search-results.vue +++ b/client/components/common/search-results.vue @@ -1,20 +1,20 @@