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
75f69274
Commit
75f69274
authored
Jun 13, 2018
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removes merge conflicts vue code from globalnamespace
parent
7fc47fae
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
42 additions
and
57 deletions
+42
-57
app/assets/javascripts/merge_conflicts/components/inline_conflict_lines.js
...ripts/merge_conflicts/components/inline_conflict_lines.js
+6
-4
app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.js
...pts/merge_conflicts/components/parallel_conflict_lines.js
+3
-1
app/assets/javascripts/merge_conflicts/merge_conflict_service.js
...ets/javascripts/merge_conflicts/merge_conflict_service.js
+11
-18
app/assets/javascripts/merge_conflicts/merge_conflicts_bundle.js
...ets/javascripts/merge_conflicts/merge_conflicts_bundle.js
+2
-2
app/assets/javascripts/merge_conflicts/mixins/line_conflict_actions.js
...vascripts/merge_conflicts/mixins/line_conflict_actions.js
+7
-13
app/assets/javascripts/merge_conflicts/mixins/line_conflict_utils.js
...javascripts/merge_conflicts/mixins/line_conflict_utils.js
+13
-19
No files found.
app/assets/javascripts/merge_conflicts/components/inline_conflict_lines.js
View file @
75f69274
/* eslint-disable no-param-reassign
, comma-dangle
*/
/* eslint-disable no-param-reassign */
import
Vue
from
'
vue
'
;
import
actionsMixin
from
'
../mixins/line_conflict_actions
'
;
import
utilsMixin
from
'
../mixins/line_conflict_utils
'
;
(
(
global
)
=>
{
(
global
=>
{
global
.
mergeConflicts
=
global
.
mergeConflicts
||
{};
global
.
mergeConflicts
.
inlineConflictLines
=
Vue
.
extend
({
props
:
{
file
:
Object
file
:
Object
,
},
mixins
:
[
global
.
mergeConflicts
.
utils
,
global
.
mergeConflicts
.
actions
],
mixins
:
[
utilsMixin
,
actionsMixin
],
});
})(
window
.
gl
||
(
window
.
gl
=
{}));
app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.js
View file @
75f69274
/* eslint-disable no-param-reassign, comma-dangle */
import
Vue
from
'
vue
'
;
import
actionsMixin
from
'
../mixins/line_conflict_actions
'
;
import
utilsMixin
from
'
../mixins/line_conflict_utils
'
;
((
global
)
=>
{
global
.
mergeConflicts
=
global
.
mergeConflicts
||
{};
...
...
@@ -9,7 +11,7 @@ import Vue from 'vue';
props
:
{
file
:
Object
},
mixins
:
[
global
.
mergeConflicts
.
utils
,
global
.
mergeConflicts
.
actions
],
mixins
:
[
utilsMixin
,
actionsMixin
],
template
:
`
<table>
<tr class="line_holder parallel" v-for="section in file.parallelLines">
...
...
app/assets/javascripts/merge_conflicts/merge_conflict_service.js
View file @
75f69274
/* eslint-disable no-param-reassign, comma-dangle */
import
axios
from
'
../lib/utils/axios_utils
'
;
((
global
)
=>
{
global
.
mergeConflicts
=
global
.
mergeConflicts
||
{};
class
mergeConflictsService
{
constructor
(
options
)
{
this
.
conflictsPath
=
options
.
conflictsPath
;
this
.
resolveConflictsPath
=
options
.
resolveConflictsPath
;
}
fetchConflictsData
()
{
return
axios
.
get
(
this
.
conflictsPath
);
}
export
default
class
MergeConflictsService
{
constructor
(
options
)
{
this
.
conflictsPath
=
options
.
conflictsPath
;
this
.
resolveConflictsPath
=
options
.
resolveConflictsPath
;
}
submitResolveConflicts
(
data
)
{
return
axios
.
post
(
this
.
resolveConflictsPath
,
data
);
}
fetchConflictsData
()
{
return
axios
.
get
(
this
.
conflictsPath
);
}
global
.
mergeConflicts
.
mergeConflictsService
=
mergeConflictsService
;
})(
window
.
gl
||
(
window
.
gl
=
{}));
submitResolveConflicts
(
data
)
{
return
axios
.
post
(
this
.
resolveConflictsPath
,
data
);
}
}
app/assets/javascripts/merge_conflicts/merge_conflicts_bundle.js
View file @
75f69274
...
...
@@ -5,7 +5,7 @@ import Vue from 'vue';
import
Flash
from
'
../flash
'
;
import
initIssuableSidebar
from
'
../init_issuable_sidebar
'
;
import
'
./merge_conflict_store
'
;
import
'
./merge_conflict_service
'
;
import
MergeConflictsService
from
'
./merge_conflict_service
'
;
import
'
./mixins/line_conflict_utils
'
;
import
'
./mixins/line_conflict_actions
'
;
import
'
./components/diff_file_editor
'
;
...
...
@@ -17,7 +17,7 @@ export default function initMergeConflicts() {
const
INTERACTIVE_RESOLVE_MODE
=
'
interactive
'
;
const
conflictsEl
=
document
.
querySelector
(
'
#conflicts
'
);
const
mergeConflictsStore
=
gl
.
mergeConflicts
.
mergeConflictsStore
;
const
mergeConflictsService
=
new
gl
.
mergeConflicts
.
m
ergeConflictsService
({
const
mergeConflictsService
=
new
M
ergeConflictsService
({
conflictsPath
:
conflictsEl
.
dataset
.
conflictsPath
,
resolveConflictsPath
:
conflictsEl
.
dataset
.
resolveConflictsPath
});
...
...
app/assets/javascripts/merge_conflicts/mixins/line_conflict_actions.js
View file @
75f69274
/* eslint-disable no-param-reassign, comma-dangle */
((
global
)
=>
{
global
.
mergeConflicts
=
global
.
mergeConflicts
||
{};
global
.
mergeConflicts
.
actions
=
{
methods
:
{
handleSelected
(
file
,
sectionId
,
selection
)
{
gl
.
mergeConflicts
.
mergeConflictsStore
.
handleSelected
(
file
,
sectionId
,
selection
);
}
}
};
})(
window
.
gl
||
(
window
.
gl
=
{}));
export
default
{
methods
:
{
handleSelected
(
file
,
sectionId
,
selection
)
{
gl
.
mergeConflicts
.
mergeConflictsStore
.
handleSelected
(
file
,
sectionId
,
selection
);
},
},
};
app/assets/javascripts/merge_conflicts/mixins/line_conflict_utils.js
View file @
75f69274
/* eslint-disable no-param-reassign, quote-props, comma-dangle */
((
global
)
=>
{
global
.
mergeConflicts
=
global
.
mergeConflicts
||
{};
global
.
mergeConflicts
.
utils
=
{
methods
:
{
lineCssClass
(
line
)
{
return
{
'
head
'
:
line
.
isHead
,
'
origin
'
:
line
.
isOrigin
,
'
match
'
:
line
.
hasMatch
,
'
selected
'
:
line
.
isSelected
,
'
unselected
'
:
line
.
isUnselected
};
}
}
};
})(
window
.
gl
||
(
window
.
gl
=
{}));
export
default
{
methods
:
{
lineCssClass
(
line
)
{
return
{
head
:
line
.
isHead
,
origin
:
line
.
isOrigin
,
match
:
line
.
hasMatch
,
selected
:
line
.
isSelected
,
unselected
:
line
.
isUnselected
,
};
},
},
};
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