Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
fcda816b
Commit
fcda816b
authored
Jul 29, 2017
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ide' of gitlab.com:gitlab-org/gitlab-ce into ide
parents
7b2b281d
62303530
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
18 deletions
+19
-18
app/assets/javascripts/repo/index.js
app/assets/javascripts/repo/index.js
+12
-1
app/assets/javascripts/repo/repo_editor.vue
app/assets/javascripts/repo/repo_editor.vue
+6
-16
spec/javascripts/repo/repo_editor_spec.js
spec/javascripts/repo/repo_editor_spec.js
+1
-1
No files found.
app/assets/javascripts/repo/index.js
View file @
fcda816b
...
...
@@ -9,10 +9,21 @@ import RepoCommitSection from './repo_commit_section.vue';
import
RepoTabs
from
'
./repo_tabs.vue
'
;
import
RepoFileButtons
from
'
./repo_file_buttons.vue
'
;
import
RepoBinaryViewer
from
'
./repo_binary_viewer.vue
'
;
import
{
repoEditorLoader
}
from
'
./repo_editor
'
;
import
RepoEditor
from
'
./repo_editor.vue
'
;
import
monacoLoader
from
'
./monaco_loader
'
;
import
RepoMixin
from
'
./repo_mixin
'
;
import
PopupDialog
from
'
../vue_shared/components/popup_dialog.vue
'
function
repoEditorLoader
()
{
return
new
Promise
((
resolve
)
=>
{
monacoLoader
([
'
vs/editor/editor.main
'
],
()
=>
{
Store
.
monaco
=
monaco
;
resolve
(
RepoEditor
);
});
});
}
function
addEventsForNonVueEls
()
{
$
(
document
).
on
(
'
change
'
,
'
.dropdown
'
,
()
=>
{
Store
.
targetBranch
=
$
(
'
.project-refs-target-form input[name="ref"]
'
).
val
();
...
...
app/assets/javascripts/repo/repo_editor.
js
→
app/assets/javascripts/repo/repo_editor.
vue
View file @
fcda816b
<
script
>
/* global monaco */
import
Store
from
'
./repo_store
'
;
import
Helper
from
'
./repo_helper
'
;
import
monacoLoader
from
'
./monaco_loader
'
;
const
RepoEditor
=
{
data
:
()
=>
Store
,
template
:
'
<div id="ide"></div>
'
,
mounted
()
{
const
monacoInstance
=
this
.
monaco
.
editor
.
create
(
this
.
$el
,
{
model
:
null
,
...
...
@@ -106,17 +104,9 @@ const RepoEditor = {
},
};
function
repoEditorLoader
()
{
return
new
Promise
((
resolve
)
=>
{
monacoLoader
([
'
vs/editor/editor.main
'
],
()
=>
{
Store
.
monaco
=
monaco
;
resolve
(
RepoEditor
);
});
});
}
export
default
RepoEditor
;
</
script
>
export
{
RepoEditor
as
default
,
repoEditorLoader
,
};
<
template
>
<div
id=
"ide"
></div>
</
template
>
spec/javascripts/repo/repo_editor_spec.js
View file @
fcda816b
import
Vue
from
'
vue
'
;
import
repoEditor
from
'
~/repo/repo_editor
'
;
import
repoEditor
from
'
~/repo/repo_editor
.vue
'
;
import
RepoStore
from
'
~/repo/repo_store
'
;
describe
(
'
RepoEditor
'
,
()
=>
{
...
...
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