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
7fdd4656
Commit
7fdd4656
authored
Jul 24, 2017
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds loading to individual files.
parent
403fdf7f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
8 deletions
+9
-8
app/assets/javascripts/repo/repo_file.vue
app/assets/javascripts/repo/repo_file.vue
+2
-2
app/assets/javascripts/repo/repo_helper.js
app/assets/javascripts/repo/repo_helper.js
+3
-2
app/assets/javascripts/repo/repo_sidebar.js
app/assets/javascripts/repo/repo_sidebar.js
+2
-2
app/assets/stylesheets/pages/repo.scss
app/assets/stylesheets/pages/repo.scss
+2
-2
No files found.
app/assets/javascripts/repo/repo_file.vue
View file @
7fdd4656
...
...
@@ -41,10 +41,10 @@ export default RepoFile;
<
template
>
<tr
v-if=
"!loading.tree || hasFiles"
:class=
"
{'active': activeFile.url === file.url}">
<td>
<td
@
click.prevent=
"linkClicked(file)"
>
<i
class=
"fa"
v-if=
"!file.loading"
:class=
"file.icon"
:style=
"
{'margin-left': file.level * 10 + 'px'}">
</i>
<i
class=
"fa fa-spinner fa-spin"
v-if=
"file.loading"
:style=
"
{'margin-left': file.level * 10 + 'px'}">
</i>
<a
:href=
"file.url"
@
click.prevent=
"linkClicked(file)"
class=
"repo-file-name"
:title=
"file.url"
>
{{
file
.
name
}}
</a>
<a
:href=
"file.url"
class=
"repo-file-name"
:title=
"file.url"
>
{{
file
.
name
}}
</a>
</td>
<td
v-if=
"!isMini"
class=
"hidden-sm hidden-xs"
>
...
...
app/assets/javascripts/repo/repo_helper.js
View file @
7fdd4656
...
...
@@ -87,7 +87,6 @@ const RepoHelper = {
const
fileIndex
=
indexOfFile
+
1
;
const
file
=
newFile
;
file
.
level
=
inDirectory
.
level
+
1
;
oldList
.
splice
(
fileIndex
,
0
,
file
);
});
...
...
@@ -140,7 +139,7 @@ const RepoHelper = {
}
})
.
catch
(()
=>
{
RepoHelper
.
setLoading
(
false
,
loadingData
);
//
RepoHelper.setLoading(false, loadingData);
RepoHelper
.
loadingError
();
});
},
...
...
@@ -179,6 +178,8 @@ const RepoHelper = {
};
},
scrollTabsRight
()
{
// wait for the transition. 0.1 seconds.
setTimeout
(()
=>
{
...
...
app/assets/javascripts/repo/repo_sidebar.js
View file @
7fdd4656
...
...
@@ -43,10 +43,11 @@ export default class RepoSidebar {
linkClicked
(
clickedFile
)
{
let
url
=
''
;
let
file
=
clickedFile
;
file
.
loading
=
true
;
if
(
typeof
file
===
'
object
'
)
{
file
.
loading
=
true
;
if
(
file
.
type
===
'
tree
'
&&
file
.
opened
)
{
file
=
Store
.
removeChildFilesOfTree
(
file
);
file
.
loading
=
false
;
}
else
{
url
=
file
.
url
;
Service
.
url
=
url
;
...
...
@@ -63,7 +64,6 @@ export default class RepoSidebar {
url
=
file
;
Service
.
url
=
url
;
Helper
.
getContent
(
null
,
()
=>
{
file
.
loading
=
false
;
Helper
.
scrollTabsRight
();
});
}
...
...
app/assets/stylesheets/pages/repo.scss
View file @
7fdd4656
...
...
@@ -40,8 +40,7 @@
}
.cursor
{
background
:
$black
;
border-color
:
$black
;
display
:
none
!
important
;
}
}
...
...
@@ -173,6 +172,7 @@
tr
{
animation
:
fadein
0
.5s
;
cursor
:
pointer
;
&
.repo-file-options
td
{
padding
:
0
;
...
...
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