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
c2e34bab
Commit
c2e34bab
authored
Jun 27, 2017
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds popstate
parent
d04f4a9b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
3 deletions
+52
-3
app/assets/javascripts/repo/repo_file.js
app/assets/javascripts/repo/repo_file.js
+7
-2
app/assets/javascripts/repo/repo_sidebar.js
app/assets/javascripts/repo/repo_sidebar.js
+12
-0
app/assets/stylesheets/framework/variables.scss
app/assets/stylesheets/framework/variables.scss
+1
-0
app/assets/stylesheets/pages/repo.scss
app/assets/stylesheets/pages/repo.scss
+29
-0
app/views/projects/tree/_tree_content.html.haml
app/views/projects/tree/_tree_content.html.haml
+3
-1
No files found.
app/assets/javascripts/repo/repo_file.js
View file @
c2e34bab
let
RepoFile
=
{
template
:
`
<li>
<div class='col-md-4'>
<i class='fa' :class='file.icon'></i>
<a :href='file.url' @click.prevent='linkClicked(file)'>{{file.name}}</a>
</div>
<div class="col-md-4">
<span>{{JSON.stringify(file)}}</span>
</div>
</li>
`
,
props
:
{
...
...
app/assets/javascripts/repo/repo_sidebar.js
View file @
c2e34bab
...
...
@@ -18,9 +18,21 @@ export default class RepoSidebar {
'
repo-file
'
:
RepoFile
,
},
created
()
{
this
.
addPopEventListener
();
},
data
:
()
=>
Store
,
methods
:
{
addPopEventListener
()
{
window
.
addEventListener
(
'
popstate
'
,
()
=>
{
this
.
linkClicked
({
url
:
location
.
href
});
});
},
linkClicked
(
file
)
{
Service
.
url
=
file
.
url
;
Helper
.
getContent
();
...
...
app/assets/stylesheets/framework/variables.scss
View file @
c2e34bab
...
...
@@ -76,6 +76,7 @@ $red-900: #711e11;
$black
:
#000
;
$black-transparent
:
rgba
(
0
,
0
,
0
,
0
.3
);
$almost-black
:
#242424
;
$border-white-light
:
darken
(
$white-light
,
$darken-border-factor
);
$border-white-normal
:
darken
(
$white-normal
,
$darken-border-factor
);
...
...
app/assets/stylesheets/pages/repo.scss
View file @
c2e34bab
...
...
@@ -2,6 +2,25 @@
display
:
none
;
}
.fade-enter-active
,
.fade-leave-active
{
transition
:
opacity
.5s
}
.fade-enter
,
.fade-leave-to
/*
.fade-leave-active
in
<
2
.1.8
*/
{
opacity
:
0
}
.tree-content-holder
{
border
:
1px
solid
$border-color
;
border-radius
:
$border-radius-default
;
color
:
$almost-black
;
header
{
background
:
$gray-light
;
padding
:
10px
25px
;
border-bottom
:
1px
solid
$border-color
;
font-size
:
$code_font_size
;
}
#sidebar
{
ul
{
list-style-type
:
none
;
...
...
@@ -9,6 +28,16 @@
li
{
border-bottom
:
1px
solid
$border-gray-normal
;
padding
:
10px
20px
;
a
{
color
:
$almost-black
;
}
.fa
{
font-size
:
$code_font_size
;
margin-right
:
5px
;
}
}
}
}
}
\ No newline at end of file
app/views/projects/tree/_tree_content.html.haml
View file @
c2e34bab
.tree-content-holder
%header
Project
#sidebar
%ul
%repo-file
{
"v-for"
=>
"file in files
"
,
":file"
=>
"file"
,
"@linkclicked"
=>
"linkClicked(file)"
}
%repo-file
{
"v-for"
=>
"file in files"
,
":key"
=>
"file.id
"
,
":file"
=>
"file"
,
"@linkclicked"
=>
"linkClicked(file)"
}
#ide
{
data:
{
url:
repo_url
},
style:
"height:400px;"
}
-
if
tree
.
readme
...
...
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