2020-12-15 12:30:45 +03:00
< div class = " w-full max-w-3xl mt-4 mx-auto flex " >
< % = if @has_pin do % >
2020-12-16 12:57:28 +03:00
< % = form_for @conn , " /activate " , [ class : " w-full max-w-lg mx-auto bg-white dark:bg-gray-800 shadow-md rounded px-8 py-6 mb-4 mt-8 " ] , fn f -> % >
< h2 class = " text-xl font-black dark:text-gray-100 " > Activate your account < / h2 >
2020-12-15 12:30:45 +03:00
2020-12-16 12:57:28 +03:00
< div class = " mt-2 text-sm text-gray-500 dark:text-gray-200 leading-tight " >
2020-12-15 12:30:45 +03:00
Please enter the 4 - digit code we sent to < b > < % = @conn . assigns [ :current_user ] . email % > < / b >
< / div >
< div class = " mt-12 flex items-stretch flex-grow " >
< div >
2021-05-10 13:28:47 +03:00
< % = text_input f , :code , class : " tracking-widest font-medium shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-36 px-8 border-gray-300 dark:border-gray-500 rounded-l-md dark:text-gray-200 dark:bg-gray-900 " , oninput : " this.value=this.value.replace(/[^0-9]/g, ''); if (this.value.length >= 4) document.getElementById('submit').focus() " , onclick : " this.select(); " , maxlength : " 4 " , placeholder : " •••• " , style : " letter-spacing: 10px; " , required : " required " % >
2020-12-15 12:30:45 +03:00
< / div >
< button id = " submit " class = " button rounded-l-none " > Activate & rarr ; < / button >
< / div >
< % = error_tag ( assigns , :error ) % >
2020-12-16 12:57:28 +03:00
< div class = " mt-16 text-sm dark:text-gray-100 " >
2020-12-15 12:30:45 +03:00
Didn ' t receive an email?
< / div >
2021-04-01 10:43:32 +03:00
< ol class = " list-disc text-xs text-gray-500 leading-tight space-y-1 mt-1 " >
2020-12-28 18:20:35 +03:00
< li > Check your spam folder < / li >
< li > < % = link ( " Send a new code " , class : " underline text-indigo-600 " , to : " /activate/request-code " , method : :post ) % > to < % = @conn . assigns [ :current_user ] . email % > < / li >
2021-10-12 16:53:13 +03:00
< % = if Application . get_env ( :plausible , :is_selfhost ) do % >
< li > Ask on our < % = link ( " community-supported forum " , to : " https://github.com/plausible/analytics/discussions " , class : " text-indigo-600 underline " ) % > < / li >
< % else % >
< li > Contact < a class = " underline text-indigo-600 " href = " mailto:support@plausible.io " > support @plausible . io < / a > if the problem persists < / li >
< % end % >
2020-12-28 18:20:35 +03:00
< / ol >
2021-04-01 10:43:32 +03:00
< div class = " mt-4 text-sm dark:text-gray-100 " >
Entered the wrong email address?
< / div >
< ul class = " list-disc text-xs text-gray-500 leading-tight mt-1 " >
< li >
< % = link ( " Delete this account " , class : " underline text-indigo-600 " , to : " /me?redirect=/register " , method : " delete " , data : [ confirm : " Deleting your account cannot be reversed. Are you sure? " ] ) % > and start over
< / li >
< / ul >
2020-12-15 12:30:45 +03:00
< % end % >
< % else % >
2020-12-16 12:57:28 +03:00
< div class = " w-full max-w-lg mx-auto bg-white dark:bg-gray-800 shadow-md rounded px-8 py-6 mb-4 mt-8 " >
< h2 class = " text-xl font-black dark:text-gray-100 " > Activate your account < / h2 >
2020-12-15 12:30:45 +03:00
2020-12-16 12:57:28 +03:00
< div class = " mt-2 text-sm text-gray-500 dark:text-gray-200 leading-tight " >
2020-12-15 12:30:45 +03:00
A 4 - digit activation code will be sent to < b > < % = @conn . assigns [ :current_user ] . email % > < / b >
< / div >
< % = error_tag ( assigns , :error ) % >
< % = button ( " Request activation code " , to : " /activate/request-code " , method : :post , class : " button mt-12 " ) % >
< / div >
< % end % >
2021-06-25 11:33:00 +03:00
< % = if ! @has_invitation do % >
2021-06-16 15:00:07 +03:00
< div class = " pt-12 pl-8 hidden md:block " >
< % = render ( PlausibleWeb.AuthView , " _onboarding_steps.html " , current_step : 1 ) % >
< / div >
< % end % >
2020-12-15 12:30:45 +03:00
< / div >