Skip to content

Commit c55198a

Browse files
authored
Fix lost by migration code (#5226)
Recaptcha missing mount event.
1 parent 4bea070 commit c55198a

3 files changed

Lines changed: 18 additions & 2 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "stylelint-config-apostrophe",
3+
"rules": {
4+
"scale-unlimited/declaration-strict-value": "off"
5+
}
6+
}

packages/login-recaptcha/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
"description": " Adds reCAPTCHA v3 to Apostrophe login pages",
55
"main": "index.js",
66
"scripts": {
7-
"lint": "npm run eslint",
7+
"lint": "npm run eslint && npm run stylelint",
88
"eslint": "eslint .",
9+
"stylelint": "stylelint ui/**/*.{scss,vue}",
910
"test": "npm run lint && mocha"
1011
},
1112
"repository": {
@@ -20,6 +21,8 @@
2021
"apostrophe": "workspace:^",
2122
"eslint": "^9.39.1",
2223
"eslint-config-apostrophe": "workspace:^",
23-
"mocha": "^7.2.0"
24+
"mocha": "^7.2.0",
25+
"stylelint": "^16.0.0",
26+
"stylelint-config-apostrophe": "workspace:^"
2427
}
2528
}

packages/login-recaptcha/ui/apos/components/AposRecaptcha.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ export default {
2424
: this.$emit('block');
2525
}
2626
},
27+
mounted() {
28+
if (!window.grecaptcha) {
29+
this.addScript();
30+
}
31+
32+
this.executeRecaptcha();
33+
},
2734
methods: {
2835
addScript() {
2936
const scriptElem = document.createElement('script');

0 commit comments

Comments
 (0)