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
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
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
=
global
.
mergeConflicts
||
{};
global
.
mergeConflicts
.
inlineConflictLines
=
Vue
.
extend
({
global
.
mergeConflicts
.
inlineConflictLines
=
Vue
.
extend
({
props
:
{
props
:
{
file
:
Object
file
:
Object
,
},
},
mixins
:
[
global
.
mergeConflicts
.
utils
,
global
.
mergeConflicts
.
actions
],
mixins
:
[
utilsMixin
,
actionsMixin
],
});
});
})(
window
.
gl
||
(
window
.
gl
=
{}));
})(
window
.
gl
||
(
window
.
gl
=
{}));
app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.js
View file @
75f69274
/* eslint-disable no-param-reassign, comma-dangle */
/* eslint-disable no-param-reassign, comma-dangle */
import
Vue
from
'
vue
'
;
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
=
global
.
mergeConflicts
||
{};
...
@@ -9,7 +11,7 @@ import Vue from 'vue';
...
@@ -9,7 +11,7 @@ import Vue from 'vue';
props
:
{
props
:
{
file
:
Object
file
:
Object
},
},
mixins
:
[
global
.
mergeConflicts
.
utils
,
global
.
mergeConflicts
.
actions
],
mixins
:
[
utilsMixin
,
actionsMixin
],
template
:
`
template
:
`
<table>
<table>
<tr class="line_holder parallel" v-for="section in file.parallelLines">
<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
'
;
import
axios
from
'
../lib/utils/axios_utils
'
;
((
global
)
=>
{
export
default
class
MergeConflictsService
{
global
.
mergeConflicts
=
global
.
mergeConflicts
||
{};
constructor
(
options
)
{
this
.
conflictsPath
=
options
.
conflictsPath
;
class
mergeConflictsService
{
this
.
resolveConflictsPath
=
options
.
resolveConflictsPath
;
constructor
(
options
)
{
}
this
.
conflictsPath
=
options
.
conflictsPath
;
this
.
resolveConflictsPath
=
options
.
resolveConflictsPath
;
}
fetchConflictsData
()
{
return
axios
.
get
(
this
.
conflictsPath
);
}
submitResolveConflicts
(
data
)
{
fetchConflictsData
()
{
return
axios
.
post
(
this
.
resolveConflictsPath
,
data
);
return
axios
.
get
(
this
.
conflictsPath
);
}
}
}
global
.
mergeConflicts
.
mergeConflictsService
=
mergeConflictsService
;
submitResolveConflicts
(
data
)
{
})(
window
.
gl
||
(
window
.
gl
=
{}));
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';
...
@@ -5,7 +5,7 @@ import Vue from 'vue';
import
Flash
from
'
../flash
'
;
import
Flash
from
'
../flash
'
;
import
initIssuableSidebar
from
'
../init_issuable_sidebar
'
;
import
initIssuableSidebar
from
'
../init_issuable_sidebar
'
;
import
'
./merge_conflict_store
'
;
import
'
./merge_conflict_store
'
;
import
'
./merge_conflict_service
'
;
import
MergeConflictsService
from
'
./merge_conflict_service
'
;
import
'
./mixins/line_conflict_utils
'
;
import
'
./mixins/line_conflict_utils
'
;
import
'
./mixins/line_conflict_actions
'
;
import
'
./mixins/line_conflict_actions
'
;
import
'
./components/diff_file_editor
'
;
import
'
./components/diff_file_editor
'
;
...
@@ -17,7 +17,7 @@ export default function initMergeConflicts() {
...
@@ -17,7 +17,7 @@ export default function initMergeConflicts() {
const
INTERACTIVE_RESOLVE_MODE
=
'
interactive
'
;
const
INTERACTIVE_RESOLVE_MODE
=
'
interactive
'
;
const
conflictsEl
=
document
.
querySelector
(
'
#conflicts
'
);
const
conflictsEl
=
document
.
querySelector
(
'
#conflicts
'
);
const
mergeConflictsStore
=
gl
.
mergeConflicts
.
mergeConflictsStore
;
const
mergeConflictsStore
=
gl
.
mergeConflicts
.
mergeConflictsStore
;
const
mergeConflictsService
=
new
gl
.
mergeConflicts
.
m
ergeConflictsService
({
const
mergeConflictsService
=
new
M
ergeConflictsService
({
conflictsPath
:
conflictsEl
.
dataset
.
conflictsPath
,
conflictsPath
:
conflictsEl
.
dataset
.
conflictsPath
,
resolveConflictsPath
:
conflictsEl
.
dataset
.
resolveConflictsPath
resolveConflictsPath
:
conflictsEl
.
dataset
.
resolveConflictsPath
});
});
...
...
app/assets/javascripts/merge_conflicts/mixins/line_conflict_actions.js
View file @
75f69274
/* eslint-disable no-param-reassign, comma-dangle */
export
default
{
methods
:
{
((
global
)
=>
{
handleSelected
(
file
,
sectionId
,
selection
)
{
global
.
mergeConflicts
=
global
.
mergeConflicts
||
{};
gl
.
mergeConflicts
.
mergeConflictsStore
.
handleSelected
(
file
,
sectionId
,
selection
);
},
global
.
mergeConflicts
.
actions
=
{
},
methods
:
{
};
handleSelected
(
file
,
sectionId
,
selection
)
{
gl
.
mergeConflicts
.
mergeConflictsStore
.
handleSelected
(
file
,
sectionId
,
selection
);
}
}
};
})(
window
.
gl
||
(
window
.
gl
=
{}));
app/assets/javascripts/merge_conflicts/mixins/line_conflict_utils.js
View file @
75f69274
/* eslint-disable no-param-reassign, quote-props, comma-dangle */
export
default
{
methods
:
{
((
global
)
=>
{
lineCssClass
(
line
)
{
global
.
mergeConflicts
=
global
.
mergeConflicts
||
{};
return
{
head
:
line
.
isHead
,
global
.
mergeConflicts
.
utils
=
{
origin
:
line
.
isOrigin
,
methods
:
{
match
:
line
.
hasMatch
,
lineCssClass
(
line
)
{
selected
:
line
.
isSelected
,
return
{
unselected
:
line
.
isUnselected
,
'
head
'
:
line
.
isHead
,
};
'
origin
'
:
line
.
isOrigin
,
},
'
match
'
:
line
.
hasMatch
,
},
'
selected
'
:
line
.
isSelected
,
};
'
unselected
'
:
line
.
isUnselected
};
}
}
};
})(
window
.
gl
||
(
window
.
gl
=
{}));
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