File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -243,7 +243,7 @@ textarea:focus,
243243 height : 76px !important ;
244244 }
245245 .m-captcha-style {
246- width : 50 % ;
246+ max- width: 450 px ;
247247 }
248248}
249249
Original file line number Diff line number Diff line change @@ -34,13 +34,18 @@ export async function initCaptcha() {
3434 break ;
3535 }
3636 case 'm-captcha' : {
37- const { default : mCaptcha } = await import ( /* webpackChunkName: "mcaptcha-vanilla-glue" */ '@mcaptcha/vanilla-glue' ) ;
38- // @ts -expect-error
37+ const mCaptcha = await import ( /* webpackChunkName: "mcaptcha-vanilla-glue" */ '@mcaptcha/vanilla-glue' ) ;
38+
39+ // FIXME: the mCaptcha code is not right, it's a miracle that the wrong code could run
40+ // * the "vanilla-glue" has some problems with es6 module.
41+ // * the INPUT_NAME is a "const", it should not be changed.
42+ // * the "mCaptcha.default" is actually the "Widget".
43+
44+ // @ts -expect-error TS2540: Cannot assign to 'INPUT_NAME' because it is a read-only property.
3945 mCaptcha . INPUT_NAME = 'm-captcha-response' ;
4046 const instanceURL = captchaEl . getAttribute ( 'data-instance-url' ) ;
4147
42- // @ts -expect-error
43- mCaptcha . default ( {
48+ new mCaptcha . default ( {
4449 siteKey : {
4550 instanceUrl : new URL ( instanceURL ) ,
4651 key : siteKey ,
You can’t perform that action at this time.
0 commit comments