Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
75f69274
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
75f69274
编写于
6月 13, 2018
作者:
F
Filipa Lacerda
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Removes merge conflicts vue code from globalnamespace
上级
7fc47fae
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
42 addition
and
57 deletion
+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
未找到文件。
app/assets/javascripts/merge_conflicts/components/inline_conflict_lines.js
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
,
};
},
},
};
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录