BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
3 deletions
+53
-3
repo_file.js
app/assets/javascripts/repo/repo_file.js
+7
-2
repo_sidebar.js
app/assets/javascripts/repo/repo_sidebar.js
+12
-0
variables.scss
app/assets/stylesheets/framework/variables.scss
+1
-0
repo.scss
app/assets/stylesheets/pages/repo.scss
+30
-0
_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>
<i class='fa' :class='file.icon'></i>
<a :href='file.url' @click.prevent='linkClicked(file)'>{{file.name}}</a>
<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