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
5495454c
Commit
5495454c
authored
Jun 14, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added merge request info to Web IDE sidebar
Closes #45187
parent
dc478a82
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
122 additions
and
1 deletion
+122
-1
app/assets/javascripts/ide/components/merge_requests/info.vue
...assets/javascripts/ide/components/merge_requests/info.vue
+97
-0
app/assets/javascripts/ide/components/panes/right.vue
app/assets/javascripts/ide/components/panes/right.vue
+24
-1
app/assets/javascripts/ide/constants.js
app/assets/javascripts/ide/constants.js
+1
-0
No files found.
app/assets/javascripts/ide/components/merge_requests/info.vue
0 → 100644
View file @
5495454c
<
script
>
import
{
mapGetters
}
from
'
vuex
'
;
import
Icon
from
'
../../../vue_shared/components/icon.vue
'
;
import
timeago
from
'
../../../vue_shared/mixins/timeago
'
;
import
tooltip
from
'
../../../vue_shared/directives/tooltip
'
;
const
states
=
{
open
:
'
open
'
,
closed
:
'
closed
'
,
};
export
default
{
directives
:
{
tooltip
,
},
components
:
{
Icon
,
},
mixins
:
[
timeago
],
computed
:
{
...
mapGetters
([
'
currentMergeRequest
'
]),
isOpen
()
{
return
this
.
currentMergeRequest
.
state
===
states
.
open
;
},
isClosed
()
{
return
this
.
currentMergeRequest
.
state
===
states
.
closed
;
},
authorUsername
()
{
return
`@
${
this
.
currentMergeRequest
.
author
.
username
}
`
;
},
iconName
()
{
return
this
.
isOpen
?
'
issue-open-m
'
:
'
close
'
;
},
},
};
</
script
>
<
template
>
<div
class=
"ide-merge-request-info"
>
<div
class=
"detail-page-header"
>
<div
class=
"detail-page-header-body"
>
<div
:class=
"
{
'status-box-open': isOpen,
'status-box-closed': isClosed
}"
class="issuable-status-box status-box d-flex h-100"
>
<icon
:name=
"iconName"
/>
</div>
<div
class=
"issuable-meta"
>
Opened
{{
timeFormated
(
currentMergeRequest
.
created_at
)
}}
by
<a
:href=
"currentMergeRequest.author.web_url"
class=
"author_link"
>
<img
:src=
"currentMergeRequest.author.avatar_url"
class=
"avatar avatar-inline s24"
/>
<strong
v-tooltip
:title=
"authorUsername"
>
{{
currentMergeRequest
.
author
.
name
}}
</strong>
</a>
</div>
</div>
</div>
<div
class=
"detail-page-description"
>
<h2
class=
"title"
>
{{
currentMergeRequest
.
title
}}
</h2>
<div
v-if=
"currentMergeRequest.description"
class=
"description"
>
<div
class=
"wiki"
>
<p
dir=
"auto"
>
{{
currentMergeRequest
.
description
}}
</p>
</div>
</div>
</div>
</div>
</
template
>
<
style
scoped
>
.ide-merge-request-info
{
overflow
:
auto
;
}
</
style
>
app/assets/javascripts/ide/components/panes/right.vue
View file @
5495454c
...
...
@@ -5,6 +5,7 @@ import Icon from '../../../vue_shared/components/icon.vue';
import
{
rightSidebarViews
}
from
'
../../constants
'
;
import
PipelinesList
from
'
../pipelines/list.vue
'
;
import
JobsDetail
from
'
../jobs/detail.vue
'
;
import
MergeRequestInfo
from
'
../merge_requests/info.vue
'
;
import
ResizablePanel
from
'
../resizable_panel.vue
'
;
export
default
{
...
...
@@ -16,9 +17,10 @@ export default {
PipelinesList
,
JobsDetail
,
ResizablePanel
,
MergeRequestInfo
,
},
computed
:
{
...
mapState
([
'
rightPane
'
]),
...
mapState
([
'
rightPane
'
,
'
currentMergeRequestId
'
]),
pipelinesActive
()
{
return
(
this
.
rightPane
===
rightSidebarViews
.
pipelines
||
...
...
@@ -54,6 +56,27 @@ export default {
</resizable-panel>
<nav
class=
"ide-activity-bar"
>
<ul
class=
"list-unstyled"
>
<li
v-if=
"currentMergeRequestId"
>
<button
v-tooltip
:title=
"__('Merge Request')"
:class=
"
{
active: rightPane === $options.rightSidebarViews.mergeRequestInfo
}"
data-container="body"
data-placement="left"
class="ide-sidebar-link is-right"
type="button"
@click="clickTab($event, $options.rightSidebarViews.mergeRequestInfo)"
>
<icon
:size=
"16"
name=
"book"
/>
</button>
</li>
<li>
<button
v-tooltip
...
...
app/assets/javascripts/ide/constants.js
View file @
5495454c
...
...
@@ -31,6 +31,7 @@ export const diffModes = {
export
const
rightSidebarViews
=
{
pipelines
:
'
pipelines-list
'
,
jobsDetail
:
'
jobs-detail
'
,
mergeRequestInfo
:
'
merge-request-info
'
,
};
export
const
stageKeys
=
{
...
...
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