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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
2a7bfacf
Commit
2a7bfacf
authored
May 03, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improved success message after commit with new sidebar
parent
93f0eb07
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
54 additions
and
38 deletions
+54
-38
app/assets/javascripts/ide/components/activity_bar.vue
app/assets/javascripts/ide/components/activity_bar.vue
+2
-2
app/assets/javascripts/ide/components/commit_sidebar/actions.vue
...ets/javascripts/ide/components/commit_sidebar/actions.vue
+1
-1
app/assets/javascripts/ide/components/commit_sidebar/form.vue
...assets/javascripts/ide/components/commit_sidebar/form.vue
+3
-7
app/assets/javascripts/ide/components/commit_sidebar/success_message.vue
...scripts/ide/components/commit_sidebar/success_message.vue
+1
-7
app/assets/javascripts/ide/components/ide_side_bar.vue
app/assets/javascripts/ide/components/ide_side_bar.vue
+21
-2
app/assets/javascripts/ide/components/repo_commit_section.vue
...assets/javascripts/ide/components/repo_commit_section.vue
+1
-4
app/assets/javascripts/ide/components/repo_editor.vue
app/assets/javascripts/ide/components/repo_editor.vue
+1
-0
app/assets/javascripts/ide/stores/getters.js
app/assets/javascripts/ide/stores/getters.js
+4
-0
app/assets/stylesheets/pages/repo.scss
app/assets/stylesheets/pages/repo.scss
+20
-15
No files found.
app/assets/javascripts/ide/components/activity_bar.vue
View file @
2a7bfacf
...
...
@@ -51,7 +51,7 @@ export default {
/>
</button>
</li>
<li
v-show=
"hasChanges"
>
<li>
<button
type=
"button"
class=
"ide-sidebar-link js-ide-review-mode"
...
...
@@ -65,7 +65,7 @@ export default {
/>
</button>
</li>
<li>
<li
v-show=
"hasChanges"
>
<button
type=
"button"
class=
"ide-sidebar-link js-ide-commit-mode"
...
...
app/assets/javascripts/ide/components/commit_sidebar/actions.vue
View file @
2a7bfacf
<
script
>
import
{
map
Getters
,
map
State
}
from
'
vuex
'
;
import
{
mapState
}
from
'
vuex
'
;
import
{
sprintf
,
__
}
from
'
~/locale
'
;
import
*
as
consts
from
'
../../stores/modules/commit/constants
'
;
import
RadioGroup
from
'
./radio_group.vue
'
;
...
...
app/assets/javascripts/ide/components/commit_sidebar/form.vue
View file @
2a7bfacf
...
...
@@ -21,13 +21,10 @@ export default {
};
},
computed
:
{
...
mapState
([
'
lastCommitMsg
'
,
'
changedFiles
'
,
'
stagedFiles
'
,
'
currentActivityView
'
]),
...
mapState
([
'
changedFiles
'
,
'
stagedFiles
'
,
'
currentActivityView
'
,
'
lastCommitMsg
'
]),
...
mapState
(
'
commit
'
,
[
'
commitMessage
'
,
'
submitCommitLoading
'
]),
...
mapGetters
([
'
hasChanges
'
]),
...
mapGetters
([
'
hasChanges
'
,
'
someUncommitedChanges
'
]),
...
mapGetters
(
'
commit
'
,
[
'
commitButtonDisabled
'
,
'
discardDraftButtonDisabled
'
]),
someUncommitedChanges
()
{
return
!!
(
this
.
changedFiles
.
length
||
this
.
stagedFiles
.
length
);
},
overviewText
()
{
return
sprintf
(
__
(
...
...
@@ -126,8 +123,7 @@ export default {
ref=
"formEl"
>
<success-message
v-if=
"lastCommitMsg && !someUncommitedChanges"
:committed-state-svg-path=
"committedStateSvgPath"
v-show=
"(lastCommitMsg && someUncommitedChanges)"
/>
<commit-message-field
:text=
"commitMessage"
...
...
app/assets/javascripts/ide/components/commit_sidebar/success_message.vue
View file @
2a7bfacf
...
...
@@ -2,14 +2,8 @@
import
{
mapState
}
from
'
vuex
'
;
export
default
{
props
:
{
committedStateSvgPath
:
{
type
:
String
,
required
:
true
,
},
},
computed
:
{
...
mapState
([
'
lastCommitMsg
'
]),
...
mapState
([
'
lastCommitMsg
'
,
'
committedStateSvgPath
'
]),
},
};
</
script
>
...
...
app/assets/javascripts/ide/components/ide_side_bar.vue
View file @
2a7bfacf
...
...
@@ -11,6 +11,8 @@ import ActivityBar from './activity_bar.vue';
import
CommitSection
from
'
./repo_commit_section.vue
'
;
import
CommitForm
from
'
./commit_sidebar/form.vue
'
;
import
IdeReview
from
'
./ide_review.vue
'
;
import
SuccessMessage
from
'
./commit_sidebar/success_message.vue
'
;
import
{
activityBarViews
}
from
'
../constants
'
;
export
default
{
components
:
{
...
...
@@ -25,10 +27,24 @@ export default {
IdeTree
,
CommitForm
,
IdeReview
,
SuccessMessage
,
},
computed
:
{
...
mapState
([
'
loading
'
,
'
currentBranchId
'
,
'
currentActivityView
'
]),
...
mapGetters
([
'
currentProject
'
]),
...
mapState
([
'
loading
'
,
'
currentBranchId
'
,
'
currentActivityView
'
,
'
changedFiles
'
,
'
stagedFiles
'
,
'
lastCommitMsg
'
,
]),
...
mapGetters
([
'
currentProject
'
,
'
someUncommitedChanges
'
]),
showSuccessMessage
()
{
return
(
this
.
currentActivityView
===
activityBarViews
.
edit
&&
(
this
.
lastCommitMsg
&&
!
this
.
someUncommitedChanges
)
);
},
},
};
</
script
>
...
...
@@ -96,6 +112,9 @@ export default {
/>
</div>
<commit-form
/>
<success-message
v-show=
"showSuccessMessage"
/>
</
template
>
</div>
</resizable-panel>
...
...
app/assets/javascripts/ide/components/repo_commit_section.vue
View file @
2a7bfacf
...
...
@@ -27,14 +27,11 @@ export default {
'
unusedSeal
'
,
]),
...
mapState
(
'
commit
'
,
[
'
commitMessage
'
,
'
submitCommitLoading
'
]),
...
mapGetters
([
'
lastOpenedFile
'
,
'
hasChanges
'
]),
...
mapGetters
([
'
lastOpenedFile
'
,
'
hasChanges
'
,
'
someUncommitedChanges
'
]),
...
mapGetters
(
'
commit
'
,
[
'
commitButtonDisabled
'
,
'
discardDraftButtonDisabled
'
]),
showStageUnstageArea
()
{
return
!!
(
this
.
someUncommitedChanges
||
this
.
lastCommitMsg
||
!
this
.
unusedSeal
);
},
someUncommitedChanges
()
{
return
!!
(
this
.
changedFiles
.
length
||
this
.
stagedFiles
.
length
);
},
},
watch
:
{
hasChanges
()
{
...
...
app/assets/javascripts/ide/components/repo_editor.vue
View file @
2a7bfacf
...
...
@@ -26,6 +26,7 @@ export default {
'
getStagedFile
'
,
'
isEditModeActive
'
,
'
isCommitModeActive
'
,
'
isReviewModeActive
'
,
]),
shouldHideEditor
()
{
return
this
.
file
&&
this
.
file
.
binary
&&
!
this
.
file
.
content
;
...
...
app/assets/javascripts/ide/stores/getters.js
View file @
2a7bfacf
...
...
@@ -59,6 +59,10 @@ export const lastOpenedFile = state =>
export
const
isEditModeActive
=
state
=>
state
.
currentActivityView
===
activityBarViews
.
edit
;
export
const
isCommitModeActive
=
state
=>
state
.
currentActivityView
===
activityBarViews
.
commit
;
export
const
isReviewModeActive
=
state
=>
state
.
currentActivityView
===
activityBarViews
.
review
;
export
const
someUncommitedChanges
=
state
=>
!!
(
state
.
changedFiles
.
length
||
state
.
stagedFiles
.
length
);
// prevent babel-plugin-rewire from generating an invalid default during karma tests
export
default
()
=>
{};
app/assets/stylesheets/pages/repo.scss
View file @
2a7bfacf
...
...
@@ -443,6 +443,7 @@
}
.multi-file-commit-panel-inner
{
position
:
relative
;
display
:
flex
;
flex-direction
:
column
;
height
:
100%
;
...
...
@@ -485,7 +486,6 @@
margin-bottom
:
0
;
border-bottom
:
1px
solid
$white-dark
;
padding
:
$gl-btn-padding
$gl-padding
;
min-height
:
56px
;
}
.multi-file-commit-panel-header-title
{
...
...
@@ -612,24 +612,14 @@
.btn
{
font-size
:
$gl-font-size
;
}
.multi-file-commit-panel-success-message
{
top
:
0
;
}
}
.multi-file-commit-panel-bottom
{
position
:
relative
;
.multi-file-commit-panel-success-message
{
position
:
absolute
;
top
:
1px
;
left
:
3px
;
bottom
:
0
;
right
:
0
;
z-index
:
10
;
background
:
$gray-light
;
overflow
:
auto
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
}
}
.dirty-diff
{
...
...
@@ -870,6 +860,7 @@
.ide-activity-bar
{
position
:
relative
;
flex
:
0
0
60px
;
z-index
:
1
;
}
.ide-file-finder-overlay
{
...
...
@@ -1032,3 +1023,17 @@
.ide-new-modal-label
{
line-height
:
34px
;
}
.multi-file-commit-panel-success-message
{
position
:
absolute
;
top
:
61px
;
left
:
1px
;
bottom
:
0
;
right
:
0
;
z-index
:
10
;
background
:
$white-light
;
overflow
:
auto
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
}
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