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
Boxiang Sun
gitlab-ce
Commits
51a936fb
Commit
51a936fb
authored
Jul 15, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Further eslint fixes
parent
69618e30
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
13 deletions
+11
-13
app/assets/javascripts/repo/repo_binary_viewer.js
app/assets/javascripts/repo/repo_binary_viewer.js
+2
-2
app/assets/javascripts/repo/repo_editor.js
app/assets/javascripts/repo/repo_editor.js
+2
-2
app/assets/javascripts/repo/repo_helper.js
app/assets/javascripts/repo/repo_helper.js
+5
-7
app/assets/javascripts/repo/repo_service.js
app/assets/javascripts/repo/repo_service.js
+1
-1
app/assets/javascripts/repo/repo_sidebar.js
app/assets/javascripts/repo/repo_sidebar.js
+1
-1
No files found.
app/assets/javascripts/repo/repo_binary_viewer.js
View file @
51a936fb
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
Store
from
'
./repo_store
'
;
import
Store
from
'
./repo_store
'
;
import
Flash
from
'
../flash
'
;
import
{
loadingError
}
from
'
./repo_helper
'
;
export
default
class
RepoBinaryViewer
{
export
default
class
RepoBinaryViewer
{
constructor
()
{
constructor
()
{
...
@@ -45,7 +45,7 @@ export default class RepoBinaryViewer {
...
@@ -45,7 +45,7 @@ export default class RepoBinaryViewer {
this
.
binaryTypes
.
png
=
true
;
this
.
binaryTypes
.
png
=
true
;
break
;
break
;
default
:
default
:
new
Flash
(
'
Blob could not be loaded
'
);
// eslint-disable-line no-new
loadingError
();
break
;
break
;
}
}
},
},
...
...
app/assets/javascripts/repo/repo_editor.js
View file @
51a936fb
...
@@ -13,10 +13,10 @@ export default class RepoEditor {
...
@@ -13,10 +13,10 @@ export default class RepoEditor {
this
.
vue
.
$watch
(
'
activeFile.lineNumber
'
,
()
=>
{
this
.
vue
.
$watch
(
'
activeFile.lineNumber
'
,
()
=>
{
console
.
log
(
'
cahnged
'
);
console
.
log
(
'
cahnged
'
);
});
});
this
.
monacoEditor
.
onMouseUp
(
this
.
onMonacoEditorMouseUp
);
this
.
monacoEditor
.
onMouseUp
(
RepoEditor
.
onMonacoEditorMouseUp
);
}
}
onMonacoEditorMouseUp
(
e
)
{
static
onMonacoEditorMouseUp
(
e
)
{
if
(
e
.
target
.
element
.
className
===
'
line-numbers
'
)
{
if
(
e
.
target
.
element
.
className
===
'
line-numbers
'
)
{
location
.
hash
=
`L
${
e
.
target
.
position
.
lineNumber
}
`
;
location
.
hash
=
`L
${
e
.
target
.
position
.
lineNumber
}
`
;
Store
.
activeLine
=
e
.
target
.
position
.
lineNumber
;
Store
.
activeLine
=
e
.
target
.
position
.
lineNumber
;
...
...
app/assets/javascripts/repo/repo_helper.js
View file @
51a936fb
...
@@ -24,14 +24,12 @@ const RepoHelper = {
...
@@ -24,14 +24,12 @@ const RepoHelper = {
},
},
blobURLtoParent
(
url
)
{
blobURLtoParent
(
url
)
{
let
joined
=
''
;
const
split
=
url
.
split
(
'
/
'
);
const
split
=
url
.
split
(
'
/
'
);
split
.
pop
();
split
.
pop
();
const
blobIndex
=
split
.
indexOf
(
'
blob
'
);
const
blobIndex
=
split
.
indexOf
(
'
blob
'
);
if
(
blobIndex
>
-
1
)
{
if
(
blobIndex
>
-
1
)
{
split
[
blobIndex
]
=
'
tree
'
;
split
[
blobIndex
]
=
'
tree
'
;
}
}
joined
=
split
.
join
(
'
/
'
);
return
split
.
join
(
'
/
'
);
return
split
.
join
(
'
/
'
);
},
},
...
@@ -60,10 +58,9 @@ const RepoHelper = {
...
@@ -60,10 +58,9 @@ const RepoHelper = {
},
},
resetBinaryTypes
()
{
resetBinaryTypes
()
{
let
s
=
''
;
Object
.
keys
(
Store
.
binaryTypes
).
forEach
((
typeKey
)
=>
{
for
(
s
in
Store
.
binaryTypes
)
{
Store
.
binaryTypes
[
typeKey
]
=
false
;
Store
.
binaryTypes
[
s
]
=
false
;
});
}
},
},
setActiveFile
(
file
)
{
setActiveFile
(
file
)
{
...
@@ -160,7 +157,8 @@ const RepoHelper = {
...
@@ -160,7 +157,8 @@ const RepoHelper = {
},
},
// may be tree or file.
// may be tree or file.
getContent
(
file
)
{
getContent
(
treeOrFile
)
{
let
file
=
treeOrFile
;
const
loadingData
=
this
.
setLoading
(
true
);
const
loadingData
=
this
.
setLoading
(
true
);
Service
.
getContent
()
Service
.
getContent
()
.
then
((
response
)
=>
{
.
then
((
response
)
=>
{
...
...
app/assets/javascripts/repo/repo_service.js
View file @
51a936fb
...
@@ -23,7 +23,7 @@ const RepoService = {
...
@@ -23,7 +23,7 @@ const RepoService = {
getContent
(
url
)
{
getContent
(
url
)
{
if
(
url
)
{
if
(
url
)
{
return
axios
.
get
(
url
,
this
.
paramsWithRich
(
url
,
params
));
return
axios
.
get
(
url
,
this
.
paramsWithRich
(
url
,
this
.
params
));
}
}
return
axios
.
get
(
this
.
url
,
this
.
paramsWithRich
(
this
.
url
,
this
.
params
));
return
axios
.
get
(
this
.
url
,
this
.
paramsWithRich
(
this
.
url
,
this
.
params
));
},
},
...
...
app/assets/javascripts/repo/repo_sidebar.js
View file @
51a936fb
import
Vue
from
'
vue
'
;
import
Service
from
'
./repo_service
'
;
import
Service
from
'
./repo_service
'
;
import
Helper
from
'
./repo_helper
'
;
import
Helper
from
'
./repo_helper
'
;
import
Vue
from
'
vue
'
;
import
Store
from
'
./repo_store
'
;
import
Store
from
'
./repo_store
'
;
import
RepoPreviousDirectory
from
'
./repo_prev_directory
'
;
import
RepoPreviousDirectory
from
'
./repo_prev_directory
'
;
import
RepoFileOptions
from
'
./repo_file_options
'
;
import
RepoFileOptions
from
'
./repo_file_options
'
;
...
...
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