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
b91d400e
Commit
b91d400e
authored
May 02, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
created computed props
removed unused parameters
parent
b8bda4ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
app/assets/javascripts/ide/components/repo_file.vue
app/assets/javascripts/ide/components/repo_file.vue
+8
-2
app/assets/javascripts/ide/stores/actions/file.js
app/assets/javascripts/ide/stores/actions/file.js
+1
-1
No files found.
app/assets/javascripts/ide/components/repo_file.vue
View file @
b91d400e
...
...
@@ -83,6 +83,12 @@ export default {
'
is-open
'
:
this
.
file
.
opened
,
};
},
showTreeChangesCount
()
{
return
this
.
isTree
&&
this
.
changesCount
>
0
&&
!
this
.
file
.
opened
;
},
showChangedFileIcon
()
{
return
this
.
file
.
changed
||
this
.
file
.
tempFile
||
this
.
file
.
staged
;
},
},
updated
()
{
if
(
this
.
file
.
type
===
'
blob
'
&&
this
.
file
.
active
)
{
...
...
@@ -140,7 +146,7 @@ export default {
v-if=
"file.mrChange"
/>
<span
v-if=
"
isTree && changesCount > 0 && !file.opened
"
v-if=
"
showTreeChangesCount
"
class=
"ide-tree-changes"
>
{{
changesCount
}}
...
...
@@ -155,7 +161,7 @@ export default {
/>
</span>
<changed-file-icon
v-else-if=
"
file.changed || file.tempFile || file.staged
"
v-else-if=
"
showChangedFileIcon
"
:file=
"file"
:show-tooltip=
"true"
:show-staged-icon=
"true"
...
...
app/assets/javascripts/ide/stores/actions/file.js
View file @
b91d400e
...
...
@@ -117,7 +117,7 @@ export const getRawFileData = ({ state, commit, dispatch }, { path, baseSha }) =
});
};
export
const
changeFileContent
=
({
state
,
commit
,
dispatch
,
getters
},
{
path
,
content
})
=>
{
export
const
changeFileContent
=
({
state
,
commit
},
{
path
,
content
})
=>
{
const
file
=
state
.
entries
[
path
];
commit
(
types
.
UPDATE_FILE_CONTENT
,
{
path
,
content
});
...
...
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