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
9d9d952c
Commit
9d9d952c
authored
Jun 13, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved strings into constants file
parent
b2cb0c6c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
5 deletions
+18
-5
app/assets/javascripts/ide/components/commit_sidebar/list.vue
...assets/javascripts/ide/components/commit_sidebar/list.vue
+5
-1
app/assets/javascripts/ide/components/commit_sidebar/list_item.vue
...s/javascripts/ide/components/commit_sidebar/list_item.vue
+2
-2
app/assets/javascripts/ide/components/repo_commit_section.vue
...assets/javascripts/ide/components/repo_commit_section.vue
+5
-2
app/assets/javascripts/ide/constants.js
app/assets/javascripts/ide/constants.js
+5
-0
spec/javascripts/ide/components/commit_sidebar/list_spec.js
spec/javascripts/ide/components/commit_sidebar/list_spec.js
+1
-0
No files found.
app/assets/javascripts/ide/components/commit_sidebar/list.vue
View file @
9d9d952c
...
...
@@ -48,6 +48,10 @@ export default {
required
:
false
,
default
:
null
,
},
keyPrefix
:
{
type
:
String
,
required
:
true
,
},
},
data
()
{
return
{
...
...
@@ -118,7 +122,7 @@ export default {
<list-item
:file=
"file"
:action-component=
"itemActionComponent"
:key-prefix=
"
title
"
:key-prefix=
"
keyPrefix
"
:staged-list=
"stagedList"
:active-file-key=
"activeFileKey"
/>
...
...
app/assets/javascripts/ide/components/commit_sidebar/list_item.vue
View file @
9d9d952c
...
...
@@ -45,7 +45,7 @@ export default {
return
`multi-file-
${
this
.
file
.
tempFile
?
'
addition
'
:
'
modified
'
}
append-right-8`
;
},
fullKey
()
{
return
`
${
this
.
keyPrefix
.
toLowerCase
()
}
-
${
this
.
file
.
key
}
`
;
return
`
${
this
.
keyPrefix
}
-
${
this
.
file
.
key
}
`
;
},
isActive
()
{
return
this
.
activeFileKey
===
this
.
fullKey
;
...
...
@@ -62,7 +62,7 @@ export default {
openFileInEditor
()
{
return
this
.
openPendingTab
({
file
:
this
.
file
,
keyPrefix
:
this
.
keyPrefix
.
toLowerCase
()
,
keyPrefix
:
this
.
keyPrefix
,
}).
then
(
changeViewer
=>
{
if
(
changeViewer
)
{
this
.
updateViewer
(
viewerTypes
.
diff
);
...
...
app/assets/javascripts/ide/components/repo_commit_section.vue
View file @
9d9d952c
...
...
@@ -6,7 +6,7 @@ import DeprecatedModal from '~/vue_shared/components/deprecated_modal.vue';
import
CommitFilesList
from
'
./commit_sidebar/list.vue
'
;
import
EmptyState
from
'
./commit_sidebar/empty_state.vue
'
;
import
*
as
consts
from
'
../stores/modules/commit/constants
'
;
import
{
activityBarViews
}
from
'
../constants
'
;
import
{
activityBarViews
,
stageKeys
}
from
'
../constants
'
;
export
default
{
components
:
{
...
...
@@ -47,7 +47,7 @@ export default {
if
(
this
.
lastOpenedFile
)
{
this
.
openPendingTab
({
file
:
this
.
lastOpenedFile
,
keyPrefix
:
this
.
lastOpenedFile
.
changed
?
'
unstaged
'
:
'
staged
'
,
keyPrefix
:
this
.
lastOpenedFile
.
changed
?
stageKeys
.
unstaged
:
stageKeys
.
staged
,
})
.
then
(
changeViewer
=>
{
if
(
changeViewer
)
{
...
...
@@ -66,6 +66,7 @@ export default {
return
this
.
updateCommitAction
(
consts
.
COMMIT_TO_NEW_BRANCH
).
then
(()
=>
this
.
commitChanges
());
},
},
stageKeys
,
};
</
script
>
...
...
@@ -92,6 +93,7 @@ export default {
class=
"is-first"
icon-name=
"unstaged"
:title=
"__('Unstaged')"
:key-prefix=
"$options.stageKeys.unstaged"
:file-list=
"changedFiles"
action=
"stageAllChanges"
:action-btn-text=
"__('Stage all')"
...
...
@@ -101,6 +103,7 @@ export default {
<commit-files-list
icon-name=
"staged"
:title=
"__('Staged')"
:key-prefix=
"$options.stageKeys.staged"
:file-list=
"stagedFiles"
action=
"unstageAllChanges"
:action-btn-text=
"__('Unstage all')"
...
...
app/assets/javascripts/ide/constants.js
View file @
9d9d952c
...
...
@@ -25,3 +25,8 @@ export const rightSidebarViews = {
pipelines
:
'
pipelines-list
'
,
jobsDetail
:
'
jobs-detail
'
,
};
export
const
stageKeys
=
{
unstaged
:
'
unstaged
'
,
staged
:
'
staged
'
,
};
spec/javascripts/ide/components/commit_sidebar/list_spec.js
View file @
9d9d952c
...
...
@@ -18,6 +18,7 @@ describe('Multi-file editor commit sidebar list', () => {
actionBtnText
:
'
stage all
'
,
itemActionComponent
:
'
stage-button
'
,
activeFileKey
:
'
staged-testing
'
,
keyPrefix
:
'
staged
'
,
});
vm
.
$store
.
state
.
rightPanelCollapsed
=
false
;
...
...
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