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
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
Show 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 {
...
@@ -48,6 +48,10 @@ export default {
required
:
false
,
required
:
false
,
default
:
null
,
default
:
null
,
},
},
keyPrefix
:
{
type
:
String
,
required
:
true
,
},
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -118,7 +122,7 @@ export default {
...
@@ -118,7 +122,7 @@ export default {
<list-item
<list-item
:file=
"file"
:file=
"file"
:action-component=
"itemActionComponent"
:action-component=
"itemActionComponent"
:key-prefix=
"
title
"
:key-prefix=
"
keyPrefix
"
:staged-list=
"stagedList"
:staged-list=
"stagedList"
:active-file-key=
"activeFileKey"
:active-file-key=
"activeFileKey"
/>
/>
...
...
app/assets/javascripts/ide/components/commit_sidebar/list_item.vue
View file @
9d9d952c
...
@@ -45,7 +45,7 @@ export default {
...
@@ -45,7 +45,7 @@ export default {
return
`multi-file-
${
this
.
file
.
tempFile
?
'
addition
'
:
'
modified
'
}
append-right-8`
;
return
`multi-file-
${
this
.
file
.
tempFile
?
'
addition
'
:
'
modified
'
}
append-right-8`
;
},
},
fullKey
()
{
fullKey
()
{
return
`
${
this
.
keyPrefix
.
toLowerCase
()
}
-
${
this
.
file
.
key
}
`
;
return
`
${
this
.
keyPrefix
}
-
${
this
.
file
.
key
}
`
;
},
},
isActive
()
{
isActive
()
{
return
this
.
activeFileKey
===
this
.
fullKey
;
return
this
.
activeFileKey
===
this
.
fullKey
;
...
@@ -62,7 +62,7 @@ export default {
...
@@ -62,7 +62,7 @@ export default {
openFileInEditor
()
{
openFileInEditor
()
{
return
this
.
openPendingTab
({
return
this
.
openPendingTab
({
file
:
this
.
file
,
file
:
this
.
file
,
keyPrefix
:
this
.
keyPrefix
.
toLowerCase
()
,
keyPrefix
:
this
.
keyPrefix
,
}).
then
(
changeViewer
=>
{
}).
then
(
changeViewer
=>
{
if
(
changeViewer
)
{
if
(
changeViewer
)
{
this
.
updateViewer
(
viewerTypes
.
diff
);
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';
...
@@ -6,7 +6,7 @@ import DeprecatedModal from '~/vue_shared/components/deprecated_modal.vue';
import
CommitFilesList
from
'
./commit_sidebar/list.vue
'
;
import
CommitFilesList
from
'
./commit_sidebar/list.vue
'
;
import
EmptyState
from
'
./commit_sidebar/empty_state.vue
'
;
import
EmptyState
from
'
./commit_sidebar/empty_state.vue
'
;
import
*
as
consts
from
'
../stores/modules/commit/constants
'
;
import
*
as
consts
from
'
../stores/modules/commit/constants
'
;
import
{
activityBarViews
}
from
'
../constants
'
;
import
{
activityBarViews
,
stageKeys
}
from
'
../constants
'
;
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -47,7 +47,7 @@ export default {
...
@@ -47,7 +47,7 @@ export default {
if
(
this
.
lastOpenedFile
)
{
if
(
this
.
lastOpenedFile
)
{
this
.
openPendingTab
({
this
.
openPendingTab
({
file
:
this
.
lastOpenedFile
,
file
:
this
.
lastOpenedFile
,
keyPrefix
:
this
.
lastOpenedFile
.
changed
?
'
unstaged
'
:
'
staged
'
,
keyPrefix
:
this
.
lastOpenedFile
.
changed
?
stageKeys
.
unstaged
:
stageKeys
.
staged
,
})
})
.
then
(
changeViewer
=>
{
.
then
(
changeViewer
=>
{
if
(
changeViewer
)
{
if
(
changeViewer
)
{
...
@@ -66,6 +66,7 @@ export default {
...
@@ -66,6 +66,7 @@ export default {
return
this
.
updateCommitAction
(
consts
.
COMMIT_TO_NEW_BRANCH
).
then
(()
=>
this
.
commitChanges
());
return
this
.
updateCommitAction
(
consts
.
COMMIT_TO_NEW_BRANCH
).
then
(()
=>
this
.
commitChanges
());
},
},
},
},
stageKeys
,
};
};
</
script
>
</
script
>
...
@@ -92,6 +93,7 @@ export default {
...
@@ -92,6 +93,7 @@ export default {
class=
"is-first"
class=
"is-first"
icon-name=
"unstaged"
icon-name=
"unstaged"
:title=
"__('Unstaged')"
:title=
"__('Unstaged')"
:key-prefix=
"$options.stageKeys.unstaged"
:file-list=
"changedFiles"
:file-list=
"changedFiles"
action=
"stageAllChanges"
action=
"stageAllChanges"
:action-btn-text=
"__('Stage all')"
:action-btn-text=
"__('Stage all')"
...
@@ -101,6 +103,7 @@ export default {
...
@@ -101,6 +103,7 @@ export default {
<commit-files-list
<commit-files-list
icon-name=
"staged"
icon-name=
"staged"
:title=
"__('Staged')"
:title=
"__('Staged')"
:key-prefix=
"$options.stageKeys.staged"
:file-list=
"stagedFiles"
:file-list=
"stagedFiles"
action=
"unstageAllChanges"
action=
"unstageAllChanges"
:action-btn-text=
"__('Unstage all')"
:action-btn-text=
"__('Unstage all')"
...
...
app/assets/javascripts/ide/constants.js
View file @
9d9d952c
...
@@ -25,3 +25,8 @@ export const rightSidebarViews = {
...
@@ -25,3 +25,8 @@ export const rightSidebarViews = {
pipelines
:
'
pipelines-list
'
,
pipelines
:
'
pipelines-list
'
,
jobsDetail
:
'
jobs-detail
'
,
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', () => {
...
@@ -18,6 +18,7 @@ describe('Multi-file editor commit sidebar list', () => {
actionBtnText
:
'
stage all
'
,
actionBtnText
:
'
stage all
'
,
itemActionComponent
:
'
stage-button
'
,
itemActionComponent
:
'
stage-button
'
,
activeFileKey
:
'
staged-testing
'
,
activeFileKey
:
'
staged-testing
'
,
keyPrefix
:
'
staged
'
,
});
});
vm
.
$store
.
state
.
rightPanelCollapsed
=
false
;
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