BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
2041ee57
Commit
2041ee57
authored
Jun 19, 2017
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Shows plain text editor with contents of blob.
parent
c1281fe0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
13 deletions
+15
-13
repo_bundle.js
app/assets/javascripts/repo/repo_bundle.js
+0
-1
repo_editor.js
app/assets/javascripts/repo/repo_editor.js
+12
-7
repo_sidebar.js
app/assets/javascripts/repo/repo_sidebar.js
+2
-5
_blob.html.haml
app/views/projects/blob/_blob.html.haml
+1
-0
No files found.
app/assets/javascripts/repo/repo_bundle.js
View file @
2041ee57
/* global monaco */
import
Sidebar
from
'./repo_sidebar'
import
Editor
from
'./repo_editor'
import
Service
from
'./repo_service'
...
...
app/assets/javascripts/repo/repo_editor.js
View file @
2041ee57
/* 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
.
monaco
Editor
=
monaco
.
editor
.
create
(
document
.
getElementById
(
'ide'
),
{
model
:
null
}
)
console
.
log
(
"HELLLOOOO!!!"
)
this
.
initVue
();
});
}
initVue
()
{
const
editor
=
this
.
e
ditor
;
const
monacoEditor
=
this
.
monacoE
ditor
;
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())
}
}
}
...
...
app/assets/javascripts/repo/repo_sidebar.js
View file @
2041ee57
...
...
@@ -24,9 +24,5 @@ export default class RepoSidebar {
});
}
initVue
()
{
this
.
vue
=
new
Vue
({
});
}
initVue
()
{}
}
\ No newline at end of file
app/views/projects/blob/_blob.html.haml
View file @
2041ee57
...
...
@@ -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;"
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment