Commit 52dd6889 authored by Ms Kimsible's avatar Ms Kimsible
Browse files

Use MTCaptcha mini

parent 60fbd3a3
...@@ -20,17 +20,18 @@ function initMTC(registerHook, peertubeHelpers) { ...@@ -20,17 +20,18 @@ function initMTC(registerHook, peertubeHelpers) {
window.mtcaptchaConfig = { window.mtcaptchaConfig = {
'sitekey': s['mtcaptcha-site-key'], 'sitekey': s['mtcaptcha-site-key'],
'render': 'explicit', 'render': 'explicit',
'widgetSize': 'mini',
'miniFormWidth': 265,
'miniFormHeight': 42,
'customStyle': { 'customStyle': {
'cardColor': '#FAFAFA', 'cardColor': '#FAFAFA',
'inputTextColor': '#444444', 'cardBorder': '#C6C6C6',
'msgTextColor': '#777777',
'invalidMsgTextColor': '#F74E39',
'inputBackgroundColor': '#FAFAFA', 'inputBackgroundColor': '#FAFAFA',
'inputBorderColor': { 'inputBorderColor': {
'byDefault': '#FAFAFA', 'byDefault': '#C6C6C6',
'hover': '#FAFAFA', 'hover': '#C6C6C6',
'active': '#FAFAFA' 'active': '#C6C6C6'
} }
}, },
'verified-callback': state => window.MTCaptchaLoadCallbackResponse = state.verifiedToken, 'verified-callback': state => window.MTCaptchaLoadCallbackResponse = state.verifiedToken,
'renderQueue': [] 'renderQueue': []
...@@ -72,6 +73,7 @@ async function insertMTCaptchaContainer (stepperSelector) { ...@@ -72,6 +73,7 @@ async function insertMTCaptchaContainer (stepperSelector) {
const div = document.createElement('div') const div = document.createElement('div')
div.id = `mtcaptcha-${Math.random().toString(16).slice(2)}` div.id = `mtcaptcha-${Math.random().toString(16).slice(2)}`
div.classList.add('mtcaptcha') div.classList.add('mtcaptcha')
div.style = 'width:270px;height:85px;display:flex;align-items:center;margin:auto'
stepper.appendChild(div) stepper.appendChild(div)
return div.id return div.id
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment