Created convention file for frontend and adjusted current project files (#277)
Reviewed-on: #277 Reviewed-by: Mikolaj Widla <widlam@noreply.example.com> Co-authored-by: Adam Bem <adam.bem@zoho.eu> Co-committed-by: Adam Bem <adam.bem@zoho.eu>
This commit is contained in:
@@ -7,12 +7,6 @@ import {xml} from '@codemirror/lang-xml'
|
||||
import {json} from '@codemirror/lang-json'
|
||||
import {html} from '@codemirror/lang-html'
|
||||
|
||||
function isDarkModeSet(){
|
||||
return localStorage.theme == "dark";
|
||||
}
|
||||
|
||||
const theme : string = inject('theme')! ;
|
||||
|
||||
const props= defineProps({
|
||||
code : {
|
||||
type: String,
|
||||
@@ -30,21 +24,25 @@ const emit = defineEmits(
|
||||
]
|
||||
)
|
||||
|
||||
const theme : string = inject('theme')!;
|
||||
let extensions = parseExtensions();
|
||||
|
||||
onBeforeUpdate( () => { extensions = parseExtensions(); } )
|
||||
|
||||
function dataUpdated(newData:String){
|
||||
emit('update:updatedCode',newData)
|
||||
}
|
||||
|
||||
function selectTheme() {
|
||||
if (isDarkModeSet()) {
|
||||
if (isDarkModeSet())
|
||||
return oneDark;
|
||||
}
|
||||
else {
|
||||
else
|
||||
return espresso;
|
||||
}
|
||||
}
|
||||
|
||||
let extensions = parseExtensions();
|
||||
|
||||
function isDarkModeSet(){
|
||||
return localStorage.theme == "dark";
|
||||
}
|
||||
|
||||
function parseExtensions(){
|
||||
return [
|
||||
@@ -68,7 +66,7 @@ function parseLanguage(name: String){
|
||||
}
|
||||
|
||||
|
||||
onBeforeUpdate( () => { extensions = parseExtensions(); } )
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user