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
Jérome Perrin
gitlab-ce
Commits
8fba385e
Commit
8fba385e
authored
Apr 09, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated icons
fixed bug where unstaged file when discarded would not take staged file changes
parent
3af57c3c
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
54 additions
and
15 deletions
+54
-15
app/assets/javascripts/ide/components/changed_file_icon.vue
app/assets/javascripts/ide/components/changed_file_icon.vue
+18
-2
app/assets/javascripts/ide/components/commit_sidebar/list.vue
...assets/javascripts/ide/components/commit_sidebar/list.vue
+6
-0
app/assets/javascripts/ide/components/commit_sidebar/list_collapsed.vue
...ascripts/ide/components/commit_sidebar/list_collapsed.vue
+8
-2
app/assets/javascripts/ide/components/commit_sidebar/list_item.vue
...s/javascripts/ide/components/commit_sidebar/list_item.vue
+8
-2
app/assets/javascripts/ide/components/repo_commit_section.vue
...assets/javascripts/ide/components/repo_commit_section.vue
+1
-0
app/assets/javascripts/ide/components/repo_file.vue
app/assets/javascripts/ide/components/repo_file.vue
+1
-0
app/assets/javascripts/ide/components/repo_tab.vue
app/assets/javascripts/ide/components/repo_tab.vue
+1
-1
app/assets/javascripts/ide/stores/actions/file.js
app/assets/javascripts/ide/stores/actions/file.js
+1
-4
app/assets/javascripts/ide/stores/mutations/file.js
app/assets/javascripts/ide/stores/mutations/file.js
+6
-2
app/assets/stylesheets/pages/repo.scss
app/assets/stylesheets/pages/repo.scss
+4
-2
No files found.
app/assets/javascripts/ide/components/changed_file_icon.vue
View file @
8fba385e
...
...
@@ -21,13 +21,22 @@ export default {
required
:
false
,
default
:
false
,
},
showStagedIcon
:
{
type
:
Boolean
,
required
:
false
,
default
:
false
,
},
},
computed
:
{
changedIcon
()
{
return
this
.
file
.
tempFile
?
'
file-addition
'
:
'
file-modified
'
;
const
prefix
=
this
.
file
.
staged
&&
!
this
.
showStagedIcon
?
'
-solid
'
:
''
;
return
this
.
file
.
tempFile
?
`file-additions
${
prefix
}
`
:
`file-modified
${
prefix
}
`
;
},
stagedIcon
()
{
return
`
${
this
.
changedIcon
}
-solid`
;
},
changedIconClass
()
{
return
`multi-
${
this
.
changedIcon
}
`
;
return
`multi-
${
this
.
changedIcon
}
prepend-left-5 pull-left
`
;
},
tooltipTitle
()
{
if
(
!
this
.
showTooltip
)
return
undefined
;
...
...
@@ -63,6 +72,13 @@ export default {
class=
"ide-file-changed-icon"
>
<icon
v-if=
"file.staged && showStagedIcon"
:name=
"stagedIcon"
:size=
"12"
:css-classes=
"changedIconClass"
/>
<icon
v-if=
"file.changed || file.tempFile || (file.staged && !showStagedIcon)"
:name=
"changedIcon"
:size=
"12"
:css-classes=
"changedIconClass"
...
...
app/assets/javascripts/ide/components/commit_sidebar/list.vue
View file @
8fba385e
...
...
@@ -45,6 +45,11 @@ export default {
type
:
String
,
required
:
true
,
},
stagedList
:
{
type
:
Boolean
,
required
:
false
,
default
:
false
,
},
},
computed
:
{
...
mapState
([
'
rightPanelCollapsed
'
]),
...
...
@@ -134,6 +139,7 @@ export default {
:file=
"file"
:action-component=
"itemActionComponent"
:key-prefix=
"title"
:staged-list=
"stagedList"
/>
</li>
</ul>
...
...
app/assets/javascripts/ide/components/commit_sidebar/list_collapsed.vue
View file @
8fba385e
...
...
@@ -51,6 +51,12 @@ export default {
titleTooltip
()
{
return
sprintf
(
__
(
'
%{title} changes
'
),
{
title
:
this
.
title
});
},
additionIconName
()
{
return
this
.
title
.
toLowerCase
()
===
'
staged
'
?
'
file-additions-solid
'
:
'
file-additions
'
;
},
modifiedIconName
()
{
return
this
.
title
.
toLowerCase
()
===
'
staged
'
?
'
file-modified-solid
'
:
'
file-modified
'
;
},
},
};
</
script
>
...
...
@@ -80,7 +86,7 @@ export default {
class=
"append-bottom-10"
>
<icon
name=
"file-addition
"
:name=
"additionIconName
"
:size=
"18"
:css-classes=
"addedFilesIconClass"
/>
...
...
@@ -94,7 +100,7 @@ export default {
class=
"prepend-top-10 append-bottom-10"
>
<icon
name=
"file-modified
"
:name=
"modifiedIconName
"
:size=
"18"
:css-classes=
"modifiedFilesClass"
/>
...
...
app/assets/javascripts/ide/components/commit_sidebar/list_item.vue
View file @
8fba385e
...
...
@@ -24,13 +24,19 @@ export default {
required
:
false
,
default
:
''
,
},
stagedList
:
{
type
:
Boolean
,
required
:
false
,
default
:
false
,
},
},
computed
:
{
iconName
()
{
return
this
.
file
.
tempFile
?
'
file-addition
'
:
'
file-modified
'
;
const
prefix
=
this
.
stagedList
?
'
-solid
'
:
''
;
return
this
.
file
.
tempFile
?
`file-additions
${
prefix
}
`
:
`file-modified
${
prefix
}
`
;
},
iconClass
()
{
return
`multi-file-
${
this
.
file
.
tempFile
?
'
addition
'
:
'
modified
'
}
append-right-8`
;
return
`multi-file-
${
this
.
file
.
tempFile
?
'
addition
s
'
:
'
modified
'
}
append-right-8`
;
},
},
methods
:
{
...
...
app/assets/javascripts/ide/components/repo_commit_section.vue
View file @
8fba385e
...
...
@@ -85,6 +85,7 @@ export default {
:action-btn-text=
"__('Unstage all')"
item-action-component=
"unstage-button"
:show-toggle=
"false"
:staged-list=
"true"
/>
<form
class=
"form-horizontal multi-file-commit-form"
...
...
app/assets/javascripts/ide/components/repo_file.vue
View file @
8fba385e
...
...
@@ -105,6 +105,7 @@ export default {
v-if=
"file.changed || file.tempFile || file.staged"
:file=
"file"
:show-tooltip=
"true"
:show-staged-icon=
"true"
class=
"prepend-top-5 pull-right"
/>
</span>
...
...
app/assets/javascripts/ide/components/repo_tab.vue
View file @
8fba385e
...
...
@@ -32,7 +32,7 @@ export default {
return
`Close
${
this
.
tab
.
name
}
`
;
},
showChangedIcon
()
{
return
this
.
tab
.
c
hanged
?
!
this
.
tabMouseOver
:
false
;
return
this
.
fileHasC
hanged
?
!
this
.
tabMouseOver
:
false
;
},
fileHasChanged
()
{
return
this
.
tab
.
changed
||
this
.
tab
.
tempFile
||
this
.
tab
.
staged
;
...
...
app/assets/javascripts/ide/stores/actions/file.js
View file @
8fba385e
...
...
@@ -166,10 +166,7 @@ export const discardFileChanges = ({ state, commit }, path) => {
commit
(
types
.
TOGGLE_FILE_OPEN
,
path
);
}
eventHub
.
$emit
(
`editor.update.model.content.
${
file
.
key
}
`
,
{
content
:
file
.
raw
,
changed
:
false
,
});
eventHub
.
$emit
(
`editor.update.model.new.content.
${
file
.
key
}
`
,
file
.
content
);
};
export
const
stageChange
=
({
commit
,
state
},
path
)
=>
{
...
...
app/assets/javascripts/ide/stores/mutations/file.js
View file @
8fba385e
...
...
@@ -57,7 +57,9 @@ export default {
});
},
[
types
.
UPDATE_FILE_CONTENT
](
state
,
{
path
,
content
})
{
const
changed
=
content
!==
state
.
entries
[
path
].
raw
;
const
stagedFile
=
state
.
stagedFiles
.
find
(
f
=>
f
.
path
===
path
);
const
rawContent
=
stagedFile
?
stagedFile
.
content
:
state
.
entries
[
path
].
raw
;
const
changed
=
content
!==
rawContent
;
Object
.
assign
(
state
.
entries
[
path
],
{
content
,
...
...
@@ -91,8 +93,10 @@ export default {
});
},
[
types
.
DISCARD_FILE_CHANGES
](
state
,
path
)
{
const
stagedFile
=
state
.
stagedFiles
.
find
(
f
=>
f
.
path
===
path
);
Object
.
assign
(
state
.
entries
[
path
],
{
content
:
state
.
entries
[
path
].
raw
,
content
:
sta
gedFile
?
stagedFile
.
content
:
sta
te
.
entries
[
path
].
raw
,
changed
:
false
,
});
},
...
...
app/assets/stylesheets/pages/repo.scss
View file @
8fba385e
...
...
@@ -608,11 +608,13 @@
}
}
.multi-file-addition
{
.multi-file-additions
,
.multi-file-additions-solid
{
fill
:
$green-500
;
}
.multi-file-modified
{
.multi-file-modified
,
.multi-file-modified-solid
{
fill
:
$orange-500
;
}
...
...
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