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
aaa7dbb4
Commit
aaa7dbb4
authored
Mar 29, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed alignment with icons
fixed icon not showing correctly in tab
parent
28cda3eb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
51 deletions
+54
-51
app/assets/javascripts/ide/components/changed_file_icon.vue
app/assets/javascripts/ide/components/changed_file_icon.vue
+3
-3
app/assets/javascripts/ide/components/repo_tab.vue
app/assets/javascripts/ide/components/repo_tab.vue
+49
-48
app/assets/stylesheets/pages/repo.scss
app/assets/stylesheets/pages/repo.scss
+2
-0
No files found.
app/assets/javascripts/ide/components/changed_file_icon.vue
View file @
aaa7dbb4
...
...
@@ -34,11 +34,11 @@ export default {
const
type
=
this
.
file
.
tempFile
?
'
addition
'
:
'
modification
'
;
if
(
this
.
file
.
changed
&&
!
this
.
file
.
staged
)
{
return
`
u
nstaged
${
type
}
`
;
return
`
U
nstaged
${
type
}
`
;
}
else
if
(
!
this
.
file
.
changed
&&
this
.
file
.
staged
)
{
return
`
s
taged
${
type
}
`
;
return
`
S
taged
${
type
}
`
;
}
else
if
(
this
.
file
.
changed
&&
this
.
file
.
staged
)
{
return
`
u
nstaged and staged
${
pluralize
(
type
)}
`
;
return
`
U
nstaged and staged
${
pluralize
(
type
)}
`
;
}
return
undefined
;
...
...
app/assets/javascripts/ide/components/repo_tab.vue
View file @
aaa7dbb4
<
script
>
import
{
mapActions
}
from
'
vuex
'
;
import
{
mapActions
}
from
'
vuex
'
;
import
fileIcon
from
'
~/vue_shared/components/file_icon.vue
'
;
import
icon
from
'
~/vue_shared/components/icon.vue
'
;
import
fileStatusIcon
from
'
./repo_file_status_icon.vue
'
;
import
changedFileIcon
from
'
./changed_file_icon.vue
'
;
import
fileIcon
from
'
~/vue_shared/components/file_icon.vue
'
;
import
icon
from
'
~/vue_shared/components/icon.vue
'
;
import
fileStatusIcon
from
'
./repo_file_status_icon.vue
'
;
import
changedFileIcon
from
'
./changed_file_icon.vue
'
;
export
default
{
components
:
{
fileStatusIcon
,
fileIcon
,
icon
,
changedFileIcon
,
export
default
{
components
:
{
fileStatusIcon
,
fileIcon
,
icon
,
changedFileIcon
,
},
props
:
{
tab
:
{
type
:
Object
,
required
:
true
,
},
props
:
{
tab
:
{
type
:
Object
,
required
:
true
,
},
},
data
()
{
return
{
tabMouseOver
:
false
,
};
},
computed
:
{
closeLabel
()
{
if
(
this
.
fileHasChanged
)
{
return
`
${
this
.
tab
.
name
}
changed`
;
}
return
`Close
${
this
.
tab
.
name
}
`
;
},
data
()
{
return
{
tabMouseOver
:
false
,
};
showChangedIcon
()
{
return
this
.
fileHasChanged
?
!
this
.
tabMouseOver
:
false
;
},
computed
:
{
closeLabel
()
{
if
(
this
.
tab
.
changed
||
this
.
tab
.
tempFile
)
{
return
`
${
this
.
tab
.
name
}
changed`
;
}
return
`Close
${
this
.
tab
.
name
}
`
;
},
showChangedIcon
()
{
return
this
.
tab
.
changed
?
!
this
.
tabMouseOver
:
false
;
},
fileHasChanged
()
{
return
this
.
tab
.
changed
||
this
.
tab
.
tempFile
||
this
.
tab
.
staged
;
},
},
methods
:
{
...
mapActions
([
'
closeFile
'
,
]),
clickFile
(
tab
)
{
this
.
$router
.
push
(
`/project
${
tab
.
url
}
`
);
},
mouseOverTab
()
{
if
(
this
.
tab
.
changed
)
{
this
.
tabMouseOver
=
true
;
}
},
mouseOutTab
()
{
if
(
this
.
tab
.
changed
)
{
this
.
tabMouseOver
=
false
;
}
},
methods
:
{
...
mapActions
([
'
closeFile
'
]),
clickFile
(
tab
)
{
this
.
$router
.
push
(
`/project
${
tab
.
url
}
`
);
},
};
mouseOverTab
()
{
if
(
this
.
fileHasChanged
)
{
this
.
tabMouseOver
=
true
;
}
},
mouseOutTab
()
{
if
(
this
.
fileHasChanged
)
{
this
.
tabMouseOver
=
false
;
}
},
},
};
</
script
>
<
template
>
...
...
app/assets/stylesheets/pages/repo.scss
View file @
aaa7dbb4
...
...
@@ -498,6 +498,7 @@
.multi-file-commit-panel-header-title
{
display
:
flex
;
flex
:
1
;
padding-left
:
$grid-size
;
svg
{
margin-right
:
$gl-btn-padding
;
...
...
@@ -770,6 +771,7 @@
&
:not
(
.is-collapsed
)
{
flex
:
1
;
min-height
:
140px
;
}
}
...
...
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