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
0ea359d2
Commit
0ea359d2
authored
Mar 25, 2018
by
Tim Zallmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes to Formatting to all Files
parent
f00a971a
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
32 additions
and
202 deletions
+32
-202
app/assets/javascripts/api.js
app/assets/javascripts/api.js
+5
-27
app/assets/javascripts/ide/components/repo_editor.vue
app/assets/javascripts/ide/components/repo_editor.vue
+3
-17
app/assets/javascripts/ide/components/repo_file.vue
app/assets/javascripts/ide/components/repo_file.vue
+1
-4
app/assets/javascripts/ide/components/repo_tabs.vue
app/assets/javascripts/ide/components/repo_tabs.vue
+1
-2
app/assets/javascripts/ide/lib/common/model.js
app/assets/javascripts/ide/lib/common/model.js
+3
-12
app/assets/javascripts/ide/lib/editor.js
app/assets/javascripts/ide/lib/editor.js
+2
-7
app/assets/javascripts/ide/services/index.js
app/assets/javascripts/ide/services/index.js
+0
-3
app/assets/javascripts/ide/stores/actions.js
app/assets/javascripts/ide/stores/actions.js
+3
-7
app/assets/javascripts/ide/stores/actions/merge_request.js
app/assets/javascripts/ide/stores/actions/merge_request.js
+2
-41
app/assets/javascripts/ide/stores/actions/tree.js
app/assets/javascripts/ide/stores/actions/tree.js
+6
-26
app/assets/javascripts/ide/stores/mutation_types.js
app/assets/javascripts/ide/stores/mutation_types.js
+0
-3
app/assets/javascripts/ide/stores/mutations.js
app/assets/javascripts/ide/stores/mutations.js
+2
-7
app/assets/javascripts/ide/stores/mutations/merge_request.js
app/assets/javascripts/ide/stores/mutations/merge_request.js
+3
-28
app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue
.../vue_merge_request_widget/components/mr_widget_header.vue
+1
-18
No files found.
app/assets/javascripts/api.js
View file @
0ea359d2
...
...
@@ -11,12 +11,8 @@ const Api = {
projectPath
:
'
/api/:version/projects/:id
'
,
projectLabelsPath
:
'
/:namespace_path/:project_path/labels
'
,
mergeRequestPath
:
'
/api/:version/projects/:id/merge_requests/:mrid
'
,
mergeRequestChangesPath
:
'
/api/:version/projects/:id/merge_requests/:mrid/changes
'
,
mergeRequestVersionsPath
:
'
/api/:version/projects/:id/merge_requests/:mrid/versions
'
,
mergeRequestVersionPath
:
'
/api/:version/projects/:id/merge_requests/:mrid/version/:versionid
'
,
mergeRequestChangesPath
:
'
/api/:version/projects/:id/merge_requests/:mrid/changes
'
,
mergeRequestVersionsPath
:
'
/api/:version/projects/:id/merge_requests/:mrid/versions
'
,
groupLabelsPath
:
'
/groups/:namespace_path/-/labels
'
,
licensePath
:
'
/api/:version/templates/licenses/:key
'
,
gitignorePath
:
'
/api/:version/templates/gitignores/:key
'
,
...
...
@@ -96,10 +92,7 @@ const Api = {
// Return single project
project
(
projectPath
)
{
const
url
=
Api
.
buildUrl
(
Api
.
projectPath
).
replace
(
'
:id
'
,
encodeURIComponent
(
projectPath
),
);
const
url
=
Api
.
buildUrl
(
Api
.
projectPath
).
replace
(
'
:id
'
,
encodeURIComponent
(
projectPath
));
return
axios
.
get
(
url
);
},
...
...
@@ -129,15 +122,6 @@ const Api = {
return
axios
.
get
(
url
);
},
mergeRequestVersion
(
projectPath
,
mergeRequestId
,
versionId
)
{
const
url
=
Api
.
buildUrl
(
Api
.
mergeRequestVersionPath
)
.
replace
(
'
:id
'
,
encodeURIComponent
(
projectPath
))
.
replace
(
'
:mrid
'
,
mergeRequestId
)
.
replace
(
'
:versionid
'
,
versionId
);
return
axios
.
get
(
url
);
},
newLabel
(
namespacePath
,
projectPath
,
data
,
callback
)
{
let
url
;
...
...
@@ -146,10 +130,7 @@ const Api = {
.
replace
(
'
:namespace_path
'
,
namespacePath
)
.
replace
(
'
:project_path
'
,
projectPath
);
}
else
{
url
=
Api
.
buildUrl
(
Api
.
groupLabelsPath
).
replace
(
'
:namespace_path
'
,
namespacePath
,
);
url
=
Api
.
buildUrl
(
Api
.
groupLabelsPath
).
replace
(
'
:namespace_path
'
,
namespacePath
);
}
return
axios
...
...
@@ -175,10 +156,7 @@ const Api = {
commitMultiple
(
id
,
data
)
{
// see https://docs.gitlab.com/ce/api/commits.html#create-a-commit-with-multiple-files-and-actions
const
url
=
Api
.
buildUrl
(
Api
.
commitPath
).
replace
(
'
:id
'
,
encodeURIComponent
(
id
),
);
const
url
=
Api
.
buildUrl
(
Api
.
commitPath
).
replace
(
'
:id
'
,
encodeURIComponent
(
id
));
return
axios
.
post
(
url
,
JSON
.
stringify
(
data
),
{
headers
:
{
'
Content-Type
'
:
'
application/json; charset=utf-8
'
,
...
...
app/assets/javascripts/ide/components/repo_editor.vue
View file @
0ea359d2
...
...
@@ -13,12 +13,7 @@ export default {
},
},
computed
:
{
...
mapState
([
'
leftPanelCollapsed
'
,
'
rightPanelCollapsed
'
,
'
viewer
'
,
'
delayViewerUpdated
'
,
]),
...
mapState
([
'
leftPanelCollapsed
'
,
'
rightPanelCollapsed
'
,
'
viewer
'
,
'
delayViewerUpdated
'
]),
...
mapGetters
([
'
currentMergeRequest
'
]),
shouldHideEditor
()
{
return
this
.
file
&&
this
.
file
.
binary
&&
!
this
.
file
.
raw
;
...
...
@@ -71,9 +66,7 @@ export default {
this
.
getRawFileData
({
path
:
this
.
file
.
path
,
baseSha
:
this
.
currentMergeRequest
?
this
.
currentMergeRequest
.
baseCommitSha
:
''
,
baseSha
:
this
.
currentMergeRequest
?
this
.
currentMergeRequest
.
baseCommitSha
:
''
,
})
.
then
(()
=>
{
const
viewerPromise
=
this
.
delayViewerUpdated
...
...
@@ -87,14 +80,7 @@ export default {
this
.
createEditorInstance
();
})
.
catch
(
err
=>
{
flash
(
'
Error setting up monaco. Please try again.
'
,
'
alert
'
,
document
,
null
,
false
,
true
,
);
flash
(
'
Error setting up monaco. Please try again.
'
,
'
alert
'
,
document
,
null
,
false
,
true
);
throw
err
;
});
},
...
...
app/assets/javascripts/ide/components/repo_file.vue
View file @
0ea359d2
...
...
@@ -56,10 +56,7 @@ export default {
...
mapActions
([
'
toggleTreeOpen
'
,
'
updateDelayViewerUpdated
'
]),
clickFile
()
{
// Manual Action if a tree is selected/opened
if
(
this
.
isTree
&&
this
.
$router
.
currentRoute
.
path
===
`/project
${
this
.
file
.
url
}
`
)
{
if
(
this
.
isTree
&&
this
.
$router
.
currentRoute
.
path
===
`/project
${
this
.
file
.
url
}
`
)
{
this
.
toggleTreeOpen
(
this
.
file
.
path
);
}
...
...
app/assets/javascripts/ide/components/repo_tabs.vue
View file @
0ea359d2
...
...
@@ -35,8 +35,7 @@ export default {
updated
()
{
if
(
!
this
.
$refs
.
tabsScroller
)
return
;
this
.
showShadow
=
this
.
$refs
.
tabsScroller
.
scrollWidth
>
this
.
$refs
.
tabsScroller
.
offsetWidth
;
this
.
showShadow
=
this
.
$refs
.
tabsScroller
.
scrollWidth
>
this
.
$refs
.
tabsScroller
.
offsetWidth
;
},
methods
:
{
...
mapActions
([
'
updateViewer
'
]),
...
...
app/assets/javascripts/ide/lib/common/model.js
View file @
0ea359d2
...
...
@@ -38,10 +38,7 @@ export default class Model {
this
.
dispose
=
this
.
dispose
.
bind
(
this
);
eventHub
.
$on
(
`editor.update.model.dispose.
${
this
.
file
.
path
}
`
,
this
.
dispose
);
eventHub
.
$on
(
`editor.update.model.content.
${
this
.
file
.
path
}
`
,
this
.
updateContent
,
);
eventHub
.
$on
(
`editor.update.model.content.
${
this
.
file
.
path
}
`
,
this
.
updateContent
);
}
get
url
()
{
...
...
@@ -92,13 +89,7 @@ export default class Model {
this
.
disposable
.
dispose
();
this
.
events
.
clear
();
eventHub
.
$off
(
`editor.update.model.dispose.
${
this
.
file
.
path
}
`
,
this
.
dispose
,
);
eventHub
.
$off
(
`editor.update.model.content.
${
this
.
file
.
path
}
`
,
this
.
updateContent
,
);
eventHub
.
$off
(
`editor.update.model.dispose.
${
this
.
file
.
path
}
`
,
this
.
dispose
);
eventHub
.
$off
(
`editor.update.model.content.
${
this
.
file
.
path
}
`
,
this
.
updateContent
);
}
}
app/assets/javascripts/ide/lib/editor.js
View file @
0ea359d2
...
...
@@ -121,10 +121,7 @@ export default class Editor {
}
setupMonacoTheme
()
{
this
.
monaco
.
editor
.
defineTheme
(
gitlabTheme
.
themeName
,
gitlabTheme
.
monacoTheme
,
);
this
.
monaco
.
editor
.
defineTheme
(
gitlabTheme
.
themeName
,
gitlabTheme
.
monacoTheme
);
this
.
monaco
.
editor
.
setTheme
(
'
gitlab
'
);
}
...
...
@@ -172,8 +169,6 @@ export default class Editor {
onPositionChange
(
cb
)
{
if
(
!
this
.
instance
.
onDidChangeCursorPosition
)
return
;
this
.
disposable
.
add
(
this
.
instance
.
onDidChangeCursorPosition
(
e
=>
cb
(
this
.
instance
,
e
)),
);
this
.
disposable
.
add
(
this
.
instance
.
onDidChangeCursorPosition
(
e
=>
cb
(
this
.
instance
,
e
)));
}
}
app/assets/javascripts/ide/services/index.js
View file @
0ea359d2
...
...
@@ -49,9 +49,6 @@ export default {
getProjectMergeRequestVersions
(
projectId
,
mergeRequestId
)
{
return
Api
.
mergeRequestVersions
(
projectId
,
mergeRequestId
);
},
getProjectMergeRequestVersion
(
projectId
,
mergeRequestId
,
versionId
)
{
return
Api
.
mergeRequestVersion
(
projectId
,
mergeRequestId
,
versionId
);
},
getBranchData
(
projectId
,
currentBranchId
)
{
return
Api
.
branchSingle
(
projectId
,
currentBranchId
);
},
...
...
app/assets/javascripts/ide/stores/actions.js
View file @
0ea359d2
...
...
@@ -6,8 +6,7 @@ import FilesDecoratorWorker from './workers/files_decorator_worker';
export
const
redirectToUrl
=
(
_
,
url
)
=>
visitUrl
(
url
);
export
const
setInitialData
=
({
commit
},
data
)
=>
commit
(
types
.
SET_INITIAL_DATA
,
data
);
export
const
setInitialData
=
({
commit
},
data
)
=>
commit
(
types
.
SET_INITIAL_DATA
,
data
);
export
const
discardAllChanges
=
({
state
,
commit
,
dispatch
})
=>
{
state
.
changedFiles
.
forEach
(
file
=>
{
...
...
@@ -43,14 +42,11 @@ export const createTempEntry = (
)
=>
new
Promise
(
resolve
=>
{
const
worker
=
new
FilesDecoratorWorker
();
const
fullName
=
name
.
slice
(
-
1
)
!==
'
/
'
&&
type
===
'
tree
'
?
`
${
name
}
/`
:
name
;
const
fullName
=
name
.
slice
(
-
1
)
!==
'
/
'
&&
type
===
'
tree
'
?
`
${
name
}
/`
:
name
;
if
(
state
.
entries
[
name
])
{
flash
(
`The name "
${
name
.
split
(
'
/
'
)
.
pop
()}
" is already taken in this directory.`
,
`The name "
${
name
.
split
(
'
/
'
).
pop
()}
" is already taken in this directory.`
,
'
alert
'
,
document
,
null
,
...
...
app/assets/javascripts/ide/stores/actions/merge_request.js
View file @
0ea359d2
...
...
@@ -2,7 +2,6 @@ import flash from '~/flash';
import
service
from
'
../../services
'
;
import
*
as
types
from
'
../mutation_types
'
;
// eslint-disable-next-line import/prefer-default-export
export
const
getMergeRequestData
=
(
{
commit
,
state
,
dispatch
},
{
projectId
,
mergeRequestId
,
force
=
false
}
=
{},
...
...
@@ -32,16 +31,12 @@ export const getMergeRequestData = (
}
});
// eslint-disable-next-line import/prefer-default-export
export
const
getMergeRequestChanges
=
(
{
commit
,
state
,
dispatch
},
{
projectId
,
mergeRequestId
,
force
=
false
}
=
{},
)
=>
new
Promise
((
resolve
,
reject
)
=>
{
if
(
!
state
.
projects
[
projectId
].
mergeRequests
[
mergeRequestId
].
changes
.
length
||
force
)
{
if
(
!
state
.
projects
[
projectId
].
mergeRequests
[
mergeRequestId
].
changes
.
length
||
force
)
{
service
.
getProjectMergeRequestChanges
(
projectId
,
mergeRequestId
)
.
then
(
res
=>
res
.
data
)
...
...
@@ -67,11 +62,7 @@ export const getMergeRequestVersions = (
{
projectId
,
mergeRequestId
,
force
=
false
}
=
{},
)
=>
new
Promise
((
resolve
,
reject
)
=>
{
if
(
!
state
.
projects
[
projectId
].
mergeRequests
[
mergeRequestId
].
versions
.
length
||
force
)
{
if
(
!
state
.
projects
[
projectId
].
mergeRequests
[
mergeRequestId
].
versions
.
length
||
force
)
{
service
.
getProjectMergeRequestVersions
(
projectId
,
mergeRequestId
)
.
then
(
res
=>
res
.
data
)
...
...
@@ -91,33 +82,3 @@ export const getMergeRequestVersions = (
resolve
(
state
.
projects
[
projectId
].
mergeRequests
[
mergeRequestId
].
versions
);
}
});
// eslint-disable-next-line import/prefer-default-export
export
const
getMergeRequestNotes
=
(
{
commit
,
state
,
dispatch
},
{
projectId
,
mergeRequestId
,
force
=
false
}
=
{},
)
=>
new
Promise
((
resolve
,
reject
)
=>
{
if
(
!
state
.
projects
[
projectId
].
mergeRequests
[
mergeRequestId
].
notes
||
force
)
{
service
.
getProjectMergeRequestNotes
(
projectId
,
mergeRequestId
)
.
then
(
res
=>
res
.
data
)
.
then
(
data
=>
{
commit
(
types
.
SET_MERGE_REQUEST_NOTES
,
{
projectPath
:
projectId
,
mergeRequestId
,
notes
:
data
,
});
resolve
(
data
);
})
.
catch
(()
=>
{
flash
(
'
Error loading merge request notes. Please try again.
'
);
reject
(
new
Error
(
`Merge Request Notes not loaded
${
projectId
}
`
));
});
}
else
{
resolve
(
state
.
projects
[
projectId
].
mergeRequests
[
mergeRequestId
].
notes
);
}
});
app/assets/javascripts/ide/stores/actions/tree.js
View file @
0ea359d2
...
...
@@ -23,17 +23,13 @@ export const handleTreeEntryAction = ({ commit, dispatch }, row) => {
}
};
export
const
getLastCommitData
=
(
{
state
,
commit
,
dispatch
,
getters
},
tree
=
state
,
)
=>
{
export
const
getLastCommitData
=
({
state
,
commit
,
dispatch
,
getters
},
tree
=
state
)
=>
{
if
(
!
tree
||
tree
.
lastCommitPath
===
null
||
!
tree
.
lastCommitPath
)
return
;
service
.
getTreeLastCommit
(
tree
.
lastCommitPath
)
.
then
(
res
=>
{
const
lastCommitPath
=
normalizeHeaders
(
res
.
headers
)[
'
MORE-LOGS-URL
'
]
||
null
;
const
lastCommitPath
=
normalizeHeaders
(
res
.
headers
)[
'
MORE-LOGS-URL
'
]
||
null
;
commit
(
types
.
SET_LAST_COMMIT_URL
,
{
tree
,
url
:
lastCommitPath
});
...
...
@@ -41,11 +37,7 @@ export const getLastCommitData = (
})
.
then
(
data
=>
{
data
.
forEach
(
lastCommit
=>
{
const
entry
=
findEntry
(
tree
.
tree
,
lastCommit
.
type
,
lastCommit
.
file_name
,
);
const
entry
=
findEntry
(
tree
.
tree
,
lastCommit
.
type
,
lastCommit
.
file_name
);
if
(
entry
)
{
commit
(
types
.
SET_LAST_COMMIT_DATA
,
{
entry
,
lastCommit
});
...
...
@@ -54,15 +46,10 @@ export const getLastCommitData = (
dispatch
(
'
getLastCommitData
'
,
tree
);
})
.
catch
(()
=>
flash
(
'
Error fetching log data.
'
,
'
alert
'
,
document
,
null
,
false
,
true
),
);
.
catch
(()
=>
flash
(
'
Error fetching log data.
'
,
'
alert
'
,
document
,
null
,
false
,
true
));
};
export
const
getFiles
=
(
{
state
,
commit
,
dispatch
},
{
projectId
,
branchId
}
=
{},
)
=>
export
const
getFiles
=
({
state
,
commit
,
dispatch
},
{
projectId
,
branchId
}
=
{})
=>
new
Promise
((
resolve
,
reject
)
=>
{
if
(
!
state
.
trees
[
`
${
projectId
}
/
${
branchId
}
`
])
{
const
selectedProject
=
state
.
projects
[
projectId
];
...
...
@@ -99,14 +86,7 @@ export const getFiles = (
});
})
.
catch
(
e
=>
{
flash
(
'
Error loading tree data. Please try again.
'
,
'
alert
'
,
document
,
null
,
false
,
true
,
);
flash
(
'
Error loading tree data. Please try again.
'
,
'
alert
'
,
document
,
null
,
false
,
true
);
reject
(
e
);
});
}
else
{
...
...
app/assets/javascripts/ide/stores/mutation_types.js
View file @
0ea359d2
...
...
@@ -16,8 +16,6 @@ export const SET_MERGE_REQUEST = 'SET_MERGE_REQUEST';
export
const
SET_CURRENT_MERGE_REQUEST
=
'
SET_CURRENT_MERGE_REQUEST
'
;
export
const
SET_MERGE_REQUEST_CHANGES
=
'
SET_MERGE_REQUEST_CHANGES
'
;
export
const
SET_MERGE_REQUEST_VERSIONS
=
'
SET_MERGE_REQUEST_VERSIONS
'
;
export
const
SET_MERGE_REQUEST_VERSION
=
'
SET_MERGE_REQUEST_VERSION
'
;
export
const
SET_MERGE_REQUEST_NOTES
=
'
SET_MERGE_REQUEST_NOTES
'
;
// Branch Mutation Types
export
const
SET_BRANCH
=
'
SET_BRANCH
'
;
...
...
@@ -49,6 +47,5 @@ export const SET_CURRENT_BRANCH = 'SET_CURRENT_BRANCH';
export
const
SET_ENTRIES
=
'
SET_ENTRIES
'
;
export
const
CREATE_TMP_ENTRY
=
'
CREATE_TMP_ENTRY
'
;
export
const
SET_FILE_MR_CHANGE
=
'
SET_FILE_MR_CHANGE
'
;
export
const
SET_FILE_TARGET_BRANCH
=
'
SET_FILE_TARGET_BRANCH
'
;
export
const
UPDATE_VIEWER
=
'
UPDATE_VIEWER
'
;
export
const
UPDATE_DELAY_VIEWER_CHANGE
=
'
UPDATE_DELAY_VIEWER_CHANGE
'
;
app/assets/javascripts/ide/stores/mutations.js
View file @
0ea359d2
...
...
@@ -12,10 +12,7 @@ export default {
[
types
.
TOGGLE_LOADING
](
state
,
{
entry
,
forceValue
=
undefined
})
{
if
(
entry
.
path
)
{
Object
.
assign
(
state
.
entries
[
entry
.
path
],
{
loading
:
forceValue
!==
undefined
?
forceValue
:
!
state
.
entries
[
entry
.
path
].
loading
,
loading
:
forceValue
!==
undefined
?
forceValue
:
!
state
.
entries
[
entry
.
path
].
loading
,
});
}
else
{
Object
.
assign
(
entry
,
{
...
...
@@ -84,9 +81,7 @@ export default {
if
(
!
foundEntry
)
{
Object
.
assign
(
state
.
trees
[
`
${
projectId
}
/
${
branchId
}
`
],
{
tree
:
state
.
trees
[
`
${
projectId
}
/
${
branchId
}
`
].
tree
.
concat
(
data
.
treeList
,
),
tree
:
state
.
trees
[
`
${
projectId
}
/
${
branchId
}
`
].
tree
.
concat
(
data
.
treeList
),
});
}
},
...
...
app/assets/javascripts/ide/stores/mutations/merge_request.js
View file @
0ea359d2
...
...
@@ -6,10 +6,7 @@ export default {
currentMergeRequestId
,
});
},
[
types
.
SET_MERGE_REQUEST
](
state
,
{
projectPath
,
mergeRequestId
,
mergeRequest
},
)
{
[
types
.
SET_MERGE_REQUEST
](
state
,
{
projectPath
,
mergeRequestId
,
mergeRequest
})
{
// Add client side properties
Object
.
assign
(
mergeRequest
,
{
active
:
true
,
...
...
@@ -24,37 +21,15 @@ export default {
},
});
},
[
types
.
SET_MERGE_REQUEST_CHANGES
](
state
,
{
projectPath
,
mergeRequestId
,
changes
},
)
{
[
types
.
SET_MERGE_REQUEST_CHANGES
](
state
,
{
projectPath
,
mergeRequestId
,
changes
})
{
Object
.
assign
(
state
.
projects
[
projectPath
].
mergeRequests
[
mergeRequestId
],
{
changes
,
});
},
[
types
.
SET_MERGE_REQUEST_VERSIONS
](
state
,
{
projectPath
,
mergeRequestId
,
versions
},
)
{
[
types
.
SET_MERGE_REQUEST_VERSIONS
](
state
,
{
projectPath
,
mergeRequestId
,
versions
})
{
Object
.
assign
(
state
.
projects
[
projectPath
].
mergeRequests
[
mergeRequestId
],
{
versions
,
baseCommitSha
:
versions
.
length
?
versions
[
0
].
base_commit_sha
:
null
,
});
},
[
types
.
SET_MERGE_REQUEST_VERSION
](
state
,
{
projectPath
,
mergeRequestId
,
changes
},
)
{
Object
.
assign
(
state
.
projects
[
projectPath
].
mergeRequests
[
mergeRequestId
],
{
changes
,
});
},
[
types
.
SET_MERGE_REQUEST_NOTES
](
state
,
{
projectPath
,
mergeRequestId
,
notes
},
)
{
Object
.
assign
(
state
.
projects
[
projectPath
].
mergeRequests
[
mergeRequestId
],
{
notes
,
});
},
};
app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue
View file @
0ea359d2
...
...
@@ -24,11 +24,7 @@ export default {
return
this
.
mr
.
divergedCommitsCount
>
0
;
},
commitsText
()
{
return
n__
(
'
%d commit behind
'
,
'
%d commits behind
'
,
this
.
mr
.
divergedCommitsCount
,
);
return
n__
(
'
%d commit behind
'
,
'
%d commits behind
'
,
this
.
mr
.
divergedCommitsCount
);
},
branchNameClipboardData
()
{
// This supports code in app/assets/javascripts/copy_to_clipboard.js that
...
...
@@ -45,11 +41,6 @@ export default {
isTargetBranchLong
()
{
return
this
.
isBranchTitleLong
(
this
.
mr
.
targetBranch
);
},
webIdePath
()
{
return
`
${
gon
.
relative_url_root
}
/-/ide/project
${
this
.
mr
.
statusPath
.
replace
(
'
.json
'
,
''
)}
`
;
},
},
methods
:
{
isBranchTitleLong
(
branchTitle
)
{
...
...
@@ -105,14 +96,6 @@ export default {
</div>
<div
v-if=
"mr.isOpen"
>
<a
:disabled=
"mr.sourceBranchRemoved"
:href=
"webIdePath"
class=
"btn btn-sm btn-default inline js-web-ide"
type=
"button"
>
{{
s__
(
"
mrWidget|Open in Web IDE
"
)
}}
</a>
<button
data-target=
"#modal_merge_info"
data-toggle=
"modal"
...
...
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