From 44eefa9beabaf618f64b8508336a54159f43c9ca Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Tue, 19 Jan 2021 10:52:41 +0300 Subject: [PATCH] Global setting for live editor visibility --- src/main.js | 2 +- src/views/liveeditor/LiveEditor.vue | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main.js b/src/main.js index 104fc6638..368775c7e 100644 --- a/src/main.js +++ b/src/main.js @@ -110,7 +110,7 @@ router.beforeEach(function (to, from, next) { const app = createApp(App); -app.config.globalProperties.$appState = reactive({inputStyle: 'outlined', darkTheme: false}); +app.config.globalProperties.$appState = reactive({inputStyle: 'outlined', darkTheme: false, codeSandbox: false}); app.use(PrimeVue, {ripple: true}); app.use(ToastService); diff --git a/src/views/liveeditor/LiveEditor.vue b/src/views/liveeditor/LiveEditor.vue index 0c9f23caf..fb388f9ba 100644 --- a/src/views/liveeditor/LiveEditor.vue +++ b/src/views/liveeditor/LiveEditor.vue @@ -1,5 +1,5 @@ @@ -45,7 +45,7 @@ export default { activeButtonIndex: { type: String, default: null - }, + } }, methods: { postSandboxParameters() { @@ -494,6 +494,11 @@ img.flag { return this.createSandboxParameters(`${name}${extension}`, _files, extDependencies); } + }, + computed: { + showEditor() { + return this.$appState.codeSandbox; + } } } \ No newline at end of file