Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
d5d2d7b2
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,体验更适合开发者的 AI 搜索 >>
提交
d5d2d7b2
编写于
12月 11, 2017
作者:
W
Winnie Hellmann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename recaptcha-dialog to recaptcha-modal
上级
bf22eb61
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
18 addition
and
18 deletion
+18
-18
app/assets/javascripts/issue_show/components/app.vue
app/assets/javascripts/issue_show/components/app.vue
+5
-5
app/assets/javascripts/issue_show/components/description.vue
app/assets/javascripts/issue_show/components/description.vue
+3
-3
app/assets/javascripts/vue_shared/components/recaptcha_modal.vue
...ets/javascripts/vue_shared/components/recaptcha_modal.vue
+2
-2
app/assets/javascripts/vue_shared/mixins/recaptcha_modal_implementor.js
...ascripts/vue_shared/mixins/recaptcha_modal_implementor.js
+2
-2
app/assets/stylesheets/framework/modal.scss
app/assets/stylesheets/framework/modal.scss
+1
-1
spec/javascripts/issue_show/components/app_spec.js
spec/javascripts/issue_show/components/app_spec.js
+3
-3
spec/javascripts/issue_show/components/description_spec.js
spec/javascripts/issue_show/components/description_spec.js
+2
-2
未找到文件。
app/assets/javascripts/issue_show/components/app.vue
浏览文件 @
d5d2d7b2
...
...
@@ -9,7 +9,7 @@ import titleComponent from './title.vue';
import
descriptionComponent
from
'
./description.vue
'
;
import
editedComponent
from
'
./edited.vue
'
;
import
formComponent
from
'
./form.vue
'
;
import
RecaptchaDialogImplementor
from
'
../../vue_shared/mixins/recaptcha_dialog
_implementor
'
;
import
recaptchaModalImplementor
from
'
../../vue_shared/mixins/recaptcha_modal
_implementor
'
;
export
default
{
props
:
{
...
...
@@ -152,7 +152,7 @@ export default {
},
mixins
:
[
RecaptchaDialog
Implementor
,
recaptchaModal
Implementor
,
],
methods
:
{
...
...
@@ -197,7 +197,7 @@ export default {
});
},
closeRecaptcha
Dialog
()
{
closeRecaptcha
Modal
()
{
this
.
store
.
setFormState
({
updateLoading
:
false
,
});
...
...
@@ -273,10 +273,10 @@ export default {
:enable-autocomplete=
"enableAutocomplete"
/>
<recaptcha-
dialog
<recaptcha-
modal
v-show=
"showRecaptcha"
:html=
"recaptchaHTML"
@
close=
"closeRecaptcha
Dialog
"
@
close=
"closeRecaptcha
Modal
"
/>
</div>
<div
v-else
>
...
...
app/assets/javascripts/issue_show/components/description.vue
浏览文件 @
d5d2d7b2
<
script
>
import
animateMixin
from
'
../mixins/animate
'
;
import
TaskList
from
'
../../task_list
'
;
import
RecaptchaDialogImplementor
from
'
../../vue_shared/mixins/recaptcha_dialog
_implementor
'
;
import
recaptchaModalImplementor
from
'
../../vue_shared/mixins/recaptcha_modal
_implementor
'
;
export
default
{
mixins
:
[
animateMixin
,
RecaptchaDialog
Implementor
,
recaptchaModal
Implementor
,
],
props
:
{
...
...
@@ -126,7 +126,7 @@
>
</textarea>
<recaptcha-
dialog
<recaptcha-
modal
v-show=
"showRecaptcha"
:html=
"recaptchaHTML"
@
close=
"closeRecaptcha"
...
...
app/assets/javascripts/vue_shared/components/recaptcha_
dialog
.vue
→
app/assets/javascripts/vue_shared/components/recaptcha_
modal
.vue
浏览文件 @
d5d2d7b2
...
...
@@ -2,7 +2,7 @@
import
modal
from
'
./modal.vue
'
;
export
default
{
name
:
'
recaptcha-
dialog
'
,
name
:
'
recaptcha-
modal
'
,
props
:
{
html
:
{
...
...
@@ -67,7 +67,7 @@ export default {
<
template
>
<modal
kind=
"warning"
class=
"recaptcha-
dialog js-recaptcha-dialog
"
class=
"recaptcha-
modal js-recaptcha-modal
"
:hide-footer=
"true"
:title=
"__('Please solve the reCAPTCHA')"
@
toggle=
"close"
...
...
app/assets/javascripts/vue_shared/mixins/recaptcha_
dialog
_implementor.js
→
app/assets/javascripts/vue_shared/mixins/recaptcha_
modal
_implementor.js
浏览文件 @
d5d2d7b2
import
RecaptchaDialog
from
'
../components/recaptcha_dialog
.vue
'
;
import
recaptchaModal
from
'
../components/recaptcha_modal
.vue
'
;
export
default
{
data
()
{
...
...
@@ -9,7 +9,7 @@ export default {
},
components
:
{
RecaptchaDialog
,
recaptchaModal
,
},
methods
:
{
...
...
app/assets/stylesheets/framework/modal.scss
浏览文件 @
d5d2d7b2
...
...
@@ -55,7 +55,7 @@ body.modal-open {
}
}
.recaptcha-
dialog
.recaptcha-form
{
.recaptcha-
modal
.recaptcha-form
{
display
:
inline-block
;
.recaptcha
{
...
...
spec/javascripts/issue_show/components/app_spec.js
浏览文件 @
d5d2d7b2
...
...
@@ -272,10 +272,10 @@ describe('Issuable output', () => {
});
});
it
(
'
opens recaptcha
dialog
if update rejected as spam
'
,
(
done
)
=>
{
it
(
'
opens recaptcha
modal
if update rejected as spam
'
,
(
done
)
=>
{
function
mockScriptSrc
()
{
const
recaptchaChild
=
vm
.
$children
.
find
(
child
=>
child
.
$options
.
_componentTag
===
'
recaptcha-
dialog
'
);
// eslint-disable-line no-underscore-dangle
.
find
(
child
=>
child
.
$options
.
_componentTag
===
'
recaptcha-
modal
'
);
// eslint-disable-line no-underscore-dangle
recaptchaChild
.
scriptSrc
=
'
//scriptsrc
'
;
}
...
...
@@ -302,7 +302,7 @@ describe('Issuable output', () => {
.
then
(
promise
)
.
then
(()
=>
setTimeoutPromise
())
.
then
(()
=>
{
modal
=
vm
.
$el
.
querySelector
(
'
.js-recaptcha-
dialog
'
);
modal
=
vm
.
$el
.
querySelector
(
'
.js-recaptcha-
modal
'
);
expect
(
modal
.
style
.
display
).
not
.
toEqual
(
'
none
'
);
expect
(
modal
.
querySelector
(
'
.g-recaptcha
'
).
textContent
).
toEqual
(
'
recaptcha_html
'
);
...
...
spec/javascripts/issue_show/components/description_spec.js
浏览文件 @
d5d2d7b2
...
...
@@ -54,7 +54,7 @@ describe('Description component', () => {
it
(
'
opens recaptcha dialog if update rejected as spam
'
,
(
done
)
=>
{
let
modal
;
const
recaptchaChild
=
vm
.
$children
.
find
(
child
=>
child
.
$options
.
_componentTag
===
'
recaptcha-
dialog
'
);
// eslint-disable-line no-underscore-dangle
.
find
(
child
=>
child
.
$options
.
_componentTag
===
'
recaptcha-
modal
'
);
// eslint-disable-line no-underscore-dangle
recaptchaChild
.
scriptSrc
=
'
//scriptsrc
'
;
...
...
@@ -64,7 +64,7 @@ describe('Description component', () => {
vm
.
$nextTick
()
.
then
(()
=>
{
modal
=
vm
.
$el
.
querySelector
(
'
.js-recaptcha-
dialog
'
);
modal
=
vm
.
$el
.
querySelector
(
'
.js-recaptcha-
modal
'
);
expect
(
modal
.
style
.
display
).
not
.
toEqual
(
'
none
'
);
expect
(
modal
.
querySelector
(
'
.g-recaptcha
'
).
textContent
).
toEqual
(
'
recaptcha_html
'
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录