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
Léo-Paul Géneau
gitlab-ce
Commits
6708ce25
Commit
6708ce25
authored
Aug 03, 2017
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix editor not working.
parent
1530b1e6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
4 deletions
+21
-4
app/assets/javascripts/repo/components/repo_editor.vue
app/assets/javascripts/repo/components/repo_editor.vue
+1
-1
app/assets/javascripts/repo/components/repo_preview.vue
app/assets/javascripts/repo/components/repo_preview.vue
+16
-0
app/assets/javascripts/repo/helpers/repo_helper.js
app/assets/javascripts/repo/helpers/repo_helper.js
+4
-3
No files found.
app/assets/javascripts/repo/components/repo_editor.vue
View file @
6708ce25
...
@@ -15,7 +15,7 @@ const RepoEditor = {
...
@@ -15,7 +15,7 @@ const RepoEditor = {
const
monacoInstance
=
this
.
monaco
.
editor
.
create
(
this
.
$el
,
{
const
monacoInstance
=
this
.
monaco
.
editor
.
create
(
this
.
$el
,
{
model
:
null
,
model
:
null
,
readOnly
:
tru
e
,
readOnly
:
fals
e
,
contextmenu
:
false
,
contextmenu
:
false
,
});
});
...
...
app/assets/javascripts/repo/components/repo_preview.vue
View file @
6708ce25
...
@@ -3,6 +3,22 @@ import RepoStore from '../stores/repo_store';
...
@@ -3,6 +3,22 @@ import RepoStore from '../stores/repo_store';
export
default
{
export
default
{
data
:
()
=>
RepoStore
,
data
:
()
=>
RepoStore
,
computed
:
{
html
()
{
return
this
.
activeFile
.
html
;
}
},
watch
:
{
html
()
{
this
.
$nextTick
(()
=>
{
$
(
this
.
$el
).
find
(
'
.file-content
'
).
syntaxHighlight
();
});
}
}
}
}
</
script
>
</
script
>
...
...
app/assets/javascripts/repo/helpers/repo_helper.js
View file @
6708ce25
...
@@ -160,8 +160,6 @@ const RepoHelper = {
...
@@ -160,8 +160,6 @@ const RepoHelper = {
Store
.
binaryMimeType
=
data
.
mime_type
;
Store
.
binaryMimeType
=
data
.
mime_type
;
// file might be undefined
// file might be undefined
RepoHelper
.
setBinaryDataAsBase64
(
data
);
RepoHelper
.
setBinaryDataAsBase64
(
data
);
const
rawUrl
=
RepoHelper
.
getRawURLFromBlobURL
(
file
.
url
||
Service
.
url
);
RepoHelper
.
setBinaryDataAsBase64
(
rawUrl
,
data
);
Store
.
setViewToPreview
();
Store
.
setViewToPreview
();
}
else
if
(
!
Store
.
isPreviewView
())
{
}
else
if
(
!
Store
.
isPreviewView
())
{
Service
.
getRaw
(
data
.
raw_path
)
Service
.
getRaw
(
data
.
raw_path
)
...
@@ -189,7 +187,10 @@ const RepoHelper = {
...
@@ -189,7 +187,10 @@ const RepoHelper = {
Store
.
addFilesToDirectory
(
file
,
Store
.
files
,
newDirectory
);
Store
.
addFilesToDirectory
(
file
,
Store
.
files
,
newDirectory
);
Store
.
prevURL
=
Service
.
blobURLtoParentTree
(
Service
.
url
);
Store
.
prevURL
=
Service
.
blobURLtoParentTree
(
Service
.
url
);
}
}
}).
catch
(
RepoHelper
.
loadingError
);
}).
catch
((
e
)
=>
{
console
.
log
(
e
)
RepoHelper
.
loadingError
()
});
},
},
setFile
(
data
,
file
)
{
setFile
(
data
,
file
)
{
...
...
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