From 3fb1a2f008eeb91c30ab6bb89bff939f5c5e24d4 Mon Sep 17 00:00:00 2001 From: Denis Gukov Date: Thu, 30 Jun 2022 02:59:48 +0500 Subject: [PATCH] fix(fe): colors for dark mode --- web2/src/assets/scss/main.scss | 8 ++++++++ web2/src/components/ProjectForm.vue | 2 +- web2/src/components/SurveyVars.vue | 9 +++++++-- web2/src/components/TemplateForm.vue | 4 ++-- web2/src/scss/variables.scss | 12 ++++++++++++ web2/vue.config.js | 5 +++++ 6 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 web2/src/scss/variables.scss diff --git a/web2/src/assets/scss/main.scss b/web2/src/assets/scss/main.scss index 5e556acc..9008788f 100644 --- a/web2/src/assets/scss/main.scss +++ b/web2/src/assets/scss/main.scss @@ -58,3 +58,11 @@ $mdi-font-path: "~@mdi/font/fonts"; } @import '~vuetify/src/styles/main'; + +.v-application.theme--dark .v-overlay__scrim { + background: white !important; +} + +.v-bottom-sheet > .v-sheet.theme--dark { + background: #212121; +} diff --git a/web2/src/components/ProjectForm.vue b/web2/src/components/ProjectForm.vue index e48beaae..939bac69 100644 --- a/web2/src/components/ProjectForm.vue +++ b/web2/src/components/ProjectForm.vue @@ -35,7 +35,7 @@ label="Max number of parallel tasks (Optional)" :disabled="formSaving" :rules="[ - v => Math.floor(v) == v || 'Must be integer', + v => (v == null || v === '' || Math.floor(v) === v) || 'Must be integer', v => (v == null || v === '' || v >= 0) || 'Must be 0 or greater', ]" hint="Should be 0 or greater, 0 - unlimited." diff --git a/web2/src/components/SurveyVars.vue b/web2/src/components/SurveyVars.vue index f323c889..7b975927 100644 --- a/web2/src/components/SurveyVars.vue +++ b/web2/src/components/SurveyVars.vue @@ -5,7 +5,7 @@ hide-overlay width="300" > - + @@ -59,7 +59,12 @@
+ font-size: 12px;" + :style="{ + 'border-color': $vuetify.theme.dark ? + 'rgba(200, 200, 200, 0.38)' : + 'rgba(0, 0, 0, 0.38)' + }"> Survey Variables - + /* eslint-disable import/no-extraneous-dependencies,import/extensions */ -import ItemFormBase from '@/components/ItemFormBase'; import axios from 'axios'; import { codemirror } from 'vue-codemirror'; +import ItemFormBase from '@/components/ItemFormBase'; import 'codemirror/lib/codemirror.css'; import 'codemirror/mode/vue/vue.js'; import 'codemirror/addon/lint/json-lint.js'; diff --git a/web2/src/scss/variables.scss b/web2/src/scss/variables.scss new file mode 100644 index 00000000..768c724b --- /dev/null +++ b/web2/src/scss/variables.scss @@ -0,0 +1,12 @@ +$material-dark: ( + 'background': #1E1E1E, + 'app-bar': transparent, + 'toolbar': transparent, +); + +$material-light: ( + 'app-bar': transparent, + 'toolbar': transparent, +); + +$tabs-bar-background-color: 'toolbar'; diff --git a/web2/vue.config.js b/web2/vue.config.js index 0b1e62d5..ab3fa86d 100644 --- a/web2/vue.config.js +++ b/web2/vue.config.js @@ -1,4 +1,9 @@ module.exports = { + configureWebpack: { + devServer: { + historyApiFallback: true, + }, + }, chainWebpack: (config) => { config.plugin('html') .tap((args) => {