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
Jérome Perrin
gitlab-ce
Commits
d5d2d7b2
Commit
d5d2d7b2
authored
Dec 11, 2017
by
Winnie Hellmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename recaptcha-dialog to recaptcha-modal
parent
bf22eb61
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
18 deletions
+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
No files found.
app/assets/javascripts/issue_show/components/app.vue
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
'
);
...
...
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