From 74aa09f39c5a1dacbb3b53d6786f6cdee4ca56cc Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Sat, 1 Dec 2018 23:03:14 -0500 Subject: [PATCH] fix: dark mode handling --- client/components/admin.vue | 4 +- client/components/admin/admin-contribute.vue | 6 +- client/components/common/nav-header.vue | 2 +- client/components/common/page-selector.vue | 7 ++- client/components/editor.vue | 3 +- client/components/editor/editor-markdown.vue | 4 ++ .../editor/editor-modal-properties.vue | 5 +- client/components/history.vue | 5 +- client/components/source.vue | 11 +++- client/scss/base/base.scss | 27 +++++++++ client/scss/base/material.scss | 33 +---------- client/themes/default/components/page.vue | 29 +++++----- client/themes/default/scss/app.scss | 57 +++++++++++++++++++ server/models/pages.js | 6 +- server/views/editor.pug | 25 ++++---- server/views/page.pug | 2 +- wiki.js | 8 +++ 17 files changed, 156 insertions(+), 78 deletions(-) diff --git a/client/components/admin.vue b/client/components/admin.vue index 2c2d0e77..90f7be93 100644 --- a/client/components/admin.vue +++ b/client/components/admin.vue @@ -22,7 +22,7 @@ v-list-tile-avatar: v-icon insert_drive_file v-list-tile-title {{ $t('admin:pages.title') }} v-list-tile-action - v-chip(small, disabled, color='grey lighten-4') + v-chip(small, disabled, :color='darkMode ? `grey darken-3-d4` : `grey lighten-4`') .caption.grey--text 123 v-list-tile(to='/theme') v-list-tile-avatar: v-icon palette @@ -36,7 +36,7 @@ v-list-tile-avatar: v-icon perm_identity v-list-tile-title {{ $t('admin:users.title') }} v-list-tile-action - v-chip(small, disabled, color='grey lighten-4') + v-chip(small, disabled, :color='darkMode ? `grey darken-3-d4` : `grey lighten-4`') .caption.grey--text 1 v-divider.my-2 v-subheader.pl-4 {{ $t('admin:nav.modules') }} diff --git a/client/components/admin/admin-contribute.vue b/client/components/admin/admin-contribute.vue index a2902015..7760347d 100644 --- a/client/components/admin/admin-contribute.vue +++ b/client/components/admin/admin-contribute.vue @@ -22,12 +22,12 @@ v-subheader {{ $t('admin:contribute.fundOurWork') }} .body-1.pl-3 {{ $t('admin:contribute.openCollective') }} v-card-actions.ml-2 - v-btn(outline, color='primary', href='https://opencollective.com/wikijs') + v-btn(outline, :color='darkMode ? `blue lighten-1` : `primary`', href='https://opencollective.com/wikijs') v-icon(left) local_atm span {{ $t('admin:contribute.makeADonation') }} .body-1.mt-3.pl-3 {{ $t('admin:contribute.tshirts') }} v-card-actions.ml-2 - v-btn(outline, color='primary', href='https://wikijs.threadless.com') + v-btn(outline, :color='darkMode ? `blue lighten-1` : `primary`', href='https://wikijs.threadless.com') v-icon(left) shopping_cart span {{ $t('admin:contribute.shop') }} v-divider.mt-3 @@ -94,6 +94,7 @@