This commit is contained in:
Liyas Thomas
2020-09-24 21:37:27 +05:30
33 changed files with 251 additions and 471 deletions

View File

@@ -17,8 +17,6 @@
</style>
<script>
const DEFAULT_THEME = "twilight"
import ace from "ace-builds"
import "ace-builds/webpack-resolver"
import "ace-builds/src-noconflict/ext-language_tools"
@@ -38,7 +36,7 @@ export default {
theme: {
type: String,
required: false,
default: null
default: null,
},
onRunGQLQuery: {
type: Function,
@@ -177,9 +175,11 @@ export default {
defineTheme() {
if (this.theme) {
return this.theme
} else {
return this.$store.state.postwoman.settings.THEME_ACE_EDITOR || DEFAULT_THEME
}
const strip = (str) => str.replace(/#/g, "").replace(/ /g, "").replace(/"/g, "")
return strip(
window.getComputedStyle(document.documentElement).getPropertyValue("--editor-theme")
)
},
setValidationSchema(schema) {