move imports for styles and select light or dark theme for editor depending on if dark mode is enabled

This commit is contained in:
sadnub
2021-11-16 20:45:42 -05:00
parent 877e08cca1
commit c105fd0c3e
3 changed files with 10 additions and 15 deletions

View File

@@ -41,7 +41,7 @@
<v-ace-editor
v-model:value="formSnippet.code"
:lang="formSnippet.shell === 'cmd' ? 'batchfile' : formSnippet.shell"
theme="tomorrow_night"
:theme="$q.dark.isActive ? 'tomorrow_night_eighties' : 'tomorrow'"
:style="{ height: `${maximized ? '80vh' : '70vh'}` }"
wrap
/>
@@ -61,14 +61,9 @@ import { useDialogPluginComponent } from "quasar";
import { saveScriptSnippet, editScriptSnippet } from "@/api/scripts";
import { notifySuccess } from "@/utils/notify";
// ace editor imports
// ui imports
import { VAceEditor } from "vue3-ace-editor";
import "ace-builds/src-noconflict/mode-powershell";
import "ace-builds/src-noconflict/mode-python";
import "ace-builds/src-noconflict/mode-batchfile";
import "ace-builds/src-noconflict/theme-tomorrow_night";
// static data
import { shellOptions } from "@/composables/scripts";