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
Léo-Paul Géneau
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 {
...
@@ -21,13 +21,22 @@ export default {
required
:
false
,
required
:
false
,
default
:
false
,
default
:
false
,
},
},
showStagedIcon
:
{
type
:
Boolean
,
required
:
false
,
default
:
false
,
},
},
},
computed
:
{
computed
:
{
changedIcon
()
{
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
()
{
changedIconClass
()
{
return
`multi-
${
this
.
changedIcon
}
`
;
return
`multi-
${
this
.
changedIcon
}
prepend-left-5 pull-left
`
;
},
},
tooltipTitle
()
{
tooltipTitle
()
{
if
(
!
this
.
showTooltip
)
return
undefined
;
if
(
!
this
.
showTooltip
)
return
undefined
;
...
@@ -63,6 +72,13 @@ export default {
...
@@ -63,6 +72,13 @@ export default {
class=
"ide-file-changed-icon"
class=
"ide-file-changed-icon"
>
>
<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"
:name=
"changedIcon"
:size=
"12"
:size=
"12"
:css-classes=
"changedIconClass"
:css-classes=
"changedIconClass"
...
...
app/assets/javascripts/ide/components/commit_sidebar/list.vue
View file @
8fba385e
...
@@ -45,6 +45,11 @@ export default {
...
@@ -45,6 +45,11 @@ export default {
type
:
String
,
type
:
String
,
required
:
true
,
required
:
true
,
},
},
stagedList
:
{
type
:
Boolean
,
required
:
false
,
default
:
false
,
},
},
},
computed
:
{
computed
:
{
...
mapState
([
'
rightPanelCollapsed
'
]),
...
mapState
([
'
rightPanelCollapsed
'
]),
...
@@ -134,6 +139,7 @@ export default {
...
@@ -134,6 +139,7 @@ export default {
:file=
"file"
:file=
"file"
:action-component=
"itemActionComponent"
:action-component=
"itemActionComponent"
:key-prefix=
"title"
:key-prefix=
"title"
:staged-list=
"stagedList"
/>
/>
</li>
</li>
</ul>
</ul>
...
...
app/assets/javascripts/ide/components/commit_sidebar/list_collapsed.vue
View file @
8fba385e
...
@@ -51,6 +51,12 @@ export default {
...
@@ -51,6 +51,12 @@ export default {
titleTooltip
()
{
titleTooltip
()
{
return
sprintf
(
__
(
'
%{title} changes
'
),
{
title
:
this
.
title
});
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
>
</
script
>
...
@@ -80,7 +86,7 @@ export default {
...
@@ -80,7 +86,7 @@ export default {
class=
"append-bottom-10"
class=
"append-bottom-10"
>
>
<icon
<icon
name=
"file-addition
"
:name=
"additionIconName
"
:size=
"18"
:size=
"18"
:css-classes=
"addedFilesIconClass"
:css-classes=
"addedFilesIconClass"
/>
/>
...
@@ -94,7 +100,7 @@ export default {
...
@@ -94,7 +100,7 @@ export default {
class=
"prepend-top-10 append-bottom-10"
class=
"prepend-top-10 append-bottom-10"
>
>
<icon
<icon
name=
"file-modified
"
:name=
"modifiedIconName
"
:size=
"18"
:size=
"18"
:css-classes=
"modifiedFilesClass"
:css-classes=
"modifiedFilesClass"
/>
/>
...
...
app/assets/javascripts/ide/components/commit_sidebar/list_item.vue
View file @
8fba385e
...
@@ -24,13 +24,19 @@ export default {
...
@@ -24,13 +24,19 @@ export default {
required
:
false
,
required
:
false
,
default
:
''
,
default
:
''
,
},
},
stagedList
:
{
type
:
Boolean
,
required
:
false
,
default
:
false
,
},
},
},
computed
:
{
computed
:
{
iconName
()
{
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
()
{
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
:
{
methods
:
{
...
...
app/assets/javascripts/ide/components/repo_commit_section.vue
View file @
8fba385e
...
@@ -85,6 +85,7 @@ export default {
...
@@ -85,6 +85,7 @@ export default {
:action-btn-text=
"__('Unstage all')"
:action-btn-text=
"__('Unstage all')"
item-action-component=
"unstage-button"
item-action-component=
"unstage-button"
:show-toggle=
"false"
:show-toggle=
"false"
:staged-list=
"true"
/>
/>
<form
<form
class=
"form-horizontal multi-file-commit-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 {
...
@@ -105,6 +105,7 @@ export default {
v-if=
"file.changed || file.tempFile || file.staged"
v-if=
"file.changed || file.tempFile || file.staged"
:file=
"file"
:file=
"file"
:show-tooltip=
"true"
:show-tooltip=
"true"
:show-staged-icon=
"true"
class=
"prepend-top-5 pull-right"
class=
"prepend-top-5 pull-right"
/>
/>
</span>
</span>
...
...
app/assets/javascripts/ide/components/repo_tab.vue
View file @
8fba385e
...
@@ -32,7 +32,7 @@ export default {
...
@@ -32,7 +32,7 @@ export default {
return
`Close
${
this
.
tab
.
name
}
`
;
return
`Close
${
this
.
tab
.
name
}
`
;
},
},
showChangedIcon
()
{
showChangedIcon
()
{
return
this
.
tab
.
c
hanged
?
!
this
.
tabMouseOver
:
false
;
return
this
.
fileHasC
hanged
?
!
this
.
tabMouseOver
:
false
;
},
},
fileHasChanged
()
{
fileHasChanged
()
{
return
this
.
tab
.
changed
||
this
.
tab
.
tempFile
||
this
.
tab
.
staged
;
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) => {
...
@@ -166,10 +166,7 @@ export const discardFileChanges = ({ state, commit }, path) => {
commit
(
types
.
TOGGLE_FILE_OPEN
,
path
);
commit
(
types
.
TOGGLE_FILE_OPEN
,
path
);
}
}
eventHub
.
$emit
(
`editor.update.model.content.
${
file
.
key
}
`
,
{
eventHub
.
$emit
(
`editor.update.model.new.content.
${
file
.
key
}
`
,
file
.
content
);
content
:
file
.
raw
,
changed
:
false
,
});
};
};
export
const
stageChange
=
({
commit
,
state
},
path
)
=>
{
export
const
stageChange
=
({
commit
,
state
},
path
)
=>
{
...
...
app/assets/javascripts/ide/stores/mutations/file.js
View file @
8fba385e
...
@@ -57,7 +57,9 @@ export default {
...
@@ -57,7 +57,9 @@ export default {
});
});
},
},
[
types
.
UPDATE_FILE_CONTENT
](
state
,
{
path
,
content
})
{
[
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
],
{
Object
.
assign
(
state
.
entries
[
path
],
{
content
,
content
,
...
@@ -91,8 +93,10 @@ export default {
...
@@ -91,8 +93,10 @@ export default {
});
});
},
},
[
types
.
DISCARD_FILE_CHANGES
](
state
,
path
)
{
[
types
.
DISCARD_FILE_CHANGES
](
state
,
path
)
{
const
stagedFile
=
state
.
stagedFiles
.
find
(
f
=>
f
.
path
===
path
);
Object
.
assign
(
state
.
entries
[
path
],
{
Object
.
assign
(
state
.
entries
[
path
],
{
content
:
state
.
entries
[
path
].
raw
,
content
:
sta
gedFile
?
stagedFile
.
content
:
sta
te
.
entries
[
path
].
raw
,
changed
:
false
,
changed
:
false
,
});
});
},
},
...
...
app/assets/stylesheets/pages/repo.scss
View file @
8fba385e
...
@@ -608,11 +608,13 @@
...
@@ -608,11 +608,13 @@
}
}
}
}
.multi-file-addition
{
.multi-file-additions
,
.multi-file-additions-solid
{
fill
:
$green-500
;
fill
:
$green-500
;
}
}
.multi-file-modified
{
.multi-file-modified
,
.multi-file-modified-solid
{
fill
:
$orange-500
;
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