BigW Consortium Gitlab

Commit 2041ee57 by Jacob Schatz

Shows plain text editor with contents of blob.

parent c1281fe0
/* global monaco */
import Sidebar from './repo_sidebar'
import Editor from './repo_editor'
import Service from './repo_service'
......
/* global monaco */
import Vue from 'vue';
import Store from './repo_store'
......@@ -9,26 +10,30 @@ export default class RepoEditor {
initMonaco() {
window.require.config({ paths: { vs: '/monaco-editor/min/vs' } });
window.require(['vs/editor/editor.main'], () => {
this.monaco = monaco.
create(
this.monacoEditor = monaco.editor
.create(
document.getElementById('ide'), {
model: null
}
)
console.log("HELLLOOOO!!!")
this.initVue();
});
}
initVue() {
const editor = this.editor;
const monacoEditor = this.monacoEditor;
this.vue = new Vue({
el: '#ide',
data: () => Store,
created () {
if(this.blobRaw !== ''){
console.log('models', this.monaco.getModels());
console.log(monacoEditor)
monacoEditor.setModel(
monaco.editor.createModel(
this.blobRaw,
'plain'
)
);
}
},
......@@ -37,7 +42,7 @@ export default class RepoEditor {
if(this.isTree) {
} else {
// this.blobRaw
console.log('models', editor.getModels())
// console.log('models', editor.getModels())
}
}
}
......
......@@ -24,9 +24,5 @@ export default class RepoSidebar {
});
}
initVue() {
this.vue = new Vue({
});
}
initVue() {}
}
\ No newline at end of file
......@@ -8,4 +8,5 @@
= render "projects/blob/auxiliary_viewer", blob: blob
#blob-content-holder.blob-content-holder
%p hi
#ide{ data: { url: repo_url }, style: "height:400px;" }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment