Skip to content

Commit 2c71de3

Browse files
authored
Merge pull request #25 from algonauti/23-remove-ember-logger
Remove Ember.Logger
2 parents c84514b + 8d2af88 commit 2c71de3

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

.eslintrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ module.exports = {
1515
browser: true
1616
},
1717
rules: {
18+
'no-console': 'off'
1819
},
1920
overrides: [
2021
// node files
+10-2
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
1-
import Ember from 'ember';
21
import Mixin from '@ember/object/mixin';
32

43
export default Mixin.create({
4+
55
actions: {
6+
7+
onCaptchaRendered() {
8+
console.info('reCaptcha just rendered');
9+
},
10+
611
onCaptchaResolved(reCaptchaResponse) {
712
window.swal(
813
'reCaptcha successfully resolved!',
914
'See reCaptcha response in the console logs',
1015
'success'
1116
);
12-
Ember.Logger.info('reCaptcha response:\n'+reCaptchaResponse);
17+
console.info('reCaptcha response:\n'+reCaptchaResponse);
1318
},
19+
1420
onCaptchaExpired() {
1521
window.swal({
1622
title: 'reCaptcha response expired!',
@@ -19,8 +25,10 @@ export default Mixin.create({
1925
this.transitionToRoute('index');
2026
});
2127
},
28+
2229
forceReset() {
2330
this.get('gRecaptcha').resetReCaptcha();
2431
}
2532
}
33+
2634
});
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
<h2>Google Defaults</h2>
2-
{{g-recaptcha onSuccess=(action "onCaptchaResolved") ref=(mut gRecaptcha) }}
2+
{{g-recaptcha
3+
onRender=(action "onCaptchaRendered")
4+
onSuccess=(action "onCaptchaResolved")
5+
ref=(mut gRecaptcha)
6+
}}
37
<p><a href="" {{action "forceReset"}}>Force reset</a></p>

0 commit comments

Comments
 (0)