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
4d61850c
Commit
4d61850c
authored
Jun 15, 2018
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removes unused imports and prettifies code
parent
8db7e253
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
15 deletions
+20
-15
app/assets/javascripts/merge_conflicts/merge_conflicts_bundle.js
...ets/javascripts/merge_conflicts/merge_conflicts_bundle.js
+20
-15
No files found.
app/assets/javascripts/merge_conflicts/merge_conflicts_bundle.js
View file @
4d61850c
/* eslint-disable new-cap, comma-dangle, no-new */
import
$
from
'
jquery
'
;
import
Vue
from
'
vue
'
;
import
Flash
from
'
../flash
'
;
import
create
Flash
from
'
../flash
'
;
import
initIssuableSidebar
from
'
../init_issuable_sidebar
'
;
import
'
./merge_conflict_store
'
;
import
MergeConflictsService
from
'
./merge_conflict_service
'
;
import
'
./mixins/line_conflict_utils
'
;
import
'
./mixins/line_conflict_actions
'
;
import
'
./components/diff_file_editor
'
;
import
'
./components/inline_conflict_lines
'
;
import
'
./components/parallel_conflict_lines
'
;
...
...
@@ -19,7 +15,7 @@ export default function initMergeConflicts() {
const
mergeConflictsStore
=
gl
.
mergeConflicts
.
mergeConflictsStore
;
const
mergeConflictsService
=
new
MergeConflictsService
({
conflictsPath
:
conflictsEl
.
dataset
.
conflictsPath
,
resolveConflictsPath
:
conflictsEl
.
dataset
.
resolveConflictsPath
resolveConflictsPath
:
conflictsEl
.
dataset
.
resolveConflictsPath
,
});
initIssuableSidebar
();
...
...
@@ -29,17 +25,26 @@ export default function initMergeConflicts() {
components
:
{
'
diff-file-editor
'
:
gl
.
mergeConflicts
.
diffFileEditor
,
'
inline-conflict-lines
'
:
gl
.
mergeConflicts
.
inlineConflictLines
,
'
parallel-conflict-lines
'
:
gl
.
mergeConflicts
.
parallelConflictLines
'
parallel-conflict-lines
'
:
gl
.
mergeConflicts
.
parallelConflictLines
,
},
data
:
mergeConflictsStore
.
state
,
computed
:
{
conflictsCountText
()
{
return
mergeConflictsStore
.
getConflictsCountText
();
},
readyToCommit
()
{
return
mergeConflictsStore
.
isReadyToCommit
();
},
commitButtonText
()
{
return
mergeConflictsStore
.
getCommitButtonText
();
},
showDiffViewTypeSwitcher
()
{
return
mergeConflictsStore
.
fileTextTypePresent
();
}
conflictsCountText
()
{
return
mergeConflictsStore
.
getConflictsCountText
();
},
readyToCommit
()
{
return
mergeConflictsStore
.
isReadyToCommit
();
},
commitButtonText
()
{
return
mergeConflictsStore
.
getCommitButtonText
();
},
showDiffViewTypeSwitcher
()
{
return
mergeConflictsStore
.
fileTextTypePresent
();
},
},
created
()
{
mergeConflictsService
.
fetchConflictsData
()
mergeConflictsService
.
fetchConflictsData
()
.
then
(({
data
})
=>
{
if
(
data
.
type
===
'
error
'
)
{
mergeConflictsStore
.
setFailedRequest
(
data
.
message
);
...
...
@@ -87,9 +92,9 @@ export default function initMergeConflicts() {
})
.
catch
(()
=>
{
mergeConflictsStore
.
setSubmitState
(
false
);
new
Flash
(
'
Failed to save merge conflicts resolutions. Please try again!
'
);
create
Flash
(
'
Failed to save merge conflicts resolutions. Please try again!
'
);
});
}
}
}
,
}
,
});
}
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