2019-05-13 22:02:10 +02:00
import { setupLoginModal } from "./setupListeners" ;
export function renderLoginForm ( ) {
const loginModal = document . createElement ( 'section' ) ;
loginModal . classList . add ( 'modal' ) ;
loginModal . id = 'loginModal' ;
loginModal . innerHTML = ` <div class="modal-background"></div>
< div class = "modal-content" > < a class = "close-button" > & times ; & # xFE0E ; < / a >
< section >
< div class = "split two" >
< div >
< h2 > Log In < / h 2 >
< label > Email < br >
2019-05-17 19:39:00 +02:00
< input type = "email" required id = "loginEmail" maxlength = "100" >
2019-05-13 22:02:10 +02:00
< / l a b e l >
< label > Password < br >
2019-05-17 19:39:00 +02:00
< input type = "password" required id = "loginPassword" maxlength = "100" >
2019-05-13 22:02:10 +02:00
< / l a b e l >
< section id = "loginErrorMessages" > < / s e c t i o n >
< a id = "loginSubmit" class = "button" > Log In < / a > < b r >
< a id = "forgotPasswordButton" class = "small button" > Forgot Password ? < / a >
< / d i v >
< div >
< h2 > Create a New Account < / h 2 >
< p > Creating an account allows you to save and switch between as many dictionaries as you need and access them from any device for free ! If you have a dictionary you ' ve been working on loaded already , it will automatically be uploaded to your account when you log in for the first time . < / p >
< p > Plus if you allow us to send you emails , we 'll make sure that you' re the first to hear about any new features that get added or if any of our policies change for any reason . We ' ll never spam you or sell your information . < / p >
< p > By creating an account , you are indicating that you agree to the Terms of Service and that you understand Lexiconga ' s Privacy Policy . < / p >
< label > Email < br >
2019-05-17 19:39:00 +02:00
< input type = "email" id = "createNewEmail" maxlength = "100" >
2019-05-13 22:02:10 +02:00
< / l a b e l >
< label > Password < br >
2019-05-17 19:39:00 +02:00
< input type = "password" id = "createNewPassword" maxlength = "100" >
2019-05-13 22:02:10 +02:00
< / l a b e l >
< label > Confirm Password < br >
2019-05-17 19:39:00 +02:00
< input type = "password" id = "createNewConfirm" maxlength = "100" >
2019-05-13 22:02:10 +02:00
< / l a b e l >
< label > Public Name < br >
2019-05-17 19:39:00 +02:00
< input type = "text" id = "createNewPublicName" maxlength = "50" >
2019-05-13 22:02:10 +02:00
< / l a b e l >
< label > Allow Emails
< input type = "checkbox" id = "createNewAllowEmails" >
< / l a b e l >
2019-05-15 01:22:17 +02:00
< section id = "createAccountErrorMessages" > < / s e c t i o n >
2019-05-13 22:02:10 +02:00
< a id = "createAccountSubmit" class = "button" > Create Account < / a >
< / d i v >
< / d i v >
< / s e c t i o n >
< / d i v > ` ;
document . body . appendChild ( loginModal ) ;
setupLoginModal ( loginModal ) ;
2019-05-17 20:23:40 +02:00
}
export function renderAccountSettings ( ) {
const accountSettingsColumn = document . getElementById ( 'accountSettings' ) ;
const accountSettingsHTML = ` <h3>Account Settings</h3>
< label > Email Address < br > < input id = "accountSettingsEmail" required maxlength = "100" > < / l a b e l >
< label > Public Name < br > < input id = "accountSettingsPublicName" placeholder = "Someone" maxlength = "50" > < / l a b e l >
< label > Allow Emails < input type = "checkbox" id = "accountSettingsAllowEmails" > < / l a b e l >
< label > Change Dictionary < br > < select id = "accountSettingsChangeDictionary" > < / s e l e c t > < / l a b e l >
< h4 > Request Your Data < / h 4 >
< p >
Per your < a href = "https://www.eugdpr.org/" target = "_blank" > GDPR < / a > r i g h t s i n A r t i c l e s 1 3 – 1 5 a n d 2 0 , w e a l l o w y o u t o r e q u e s t a n y a n d a l l d a t a w e h a v e s t o r e d a b o u t y o u . T h e o n l y d a t a w e h a v e a b o u t y o u p e r s o n a l l y i s y o u r e m a i l a d d r e s s a n d y o u r P u b l i c N a m e , i f y o u d e c i d e d t o s e t o n e . A l l o t h e r d a t a ( y o u r D i c t i o n a r y d a t a ) i s v i s i b l e a n d a c c e s s i b l e v i a t h e E x p o r t b u t t o n u n d e r y o u r D i c t i o n a r y ' s S e t t i n g s . S e n d a n e m a i l t o h e l p @ l e x i c o n . g a t o r e q u e s t y o u r i n f o r m a t i o n .
< / p >
< h4 > Delete Your Account < / h 4 >
< p >
Per your < a href = "https://www.eugdpr.org/" target = "_blank" > GDPR < / a > r i g h t s i n A r t i c l e s 1 7 , i f y o u w i s h f o r y o u r a c c o u n t t o b e d e l e t e d , p l e a s e c o n t a c t u s a t h e l p @ l e x i c o n . g a , a n d w e w i l l d e l e t e y o u r a c c o u n t a n d a l l a s s o c i a t e d d i c t i o n a r i e s a n d w o r d s a s q u i c k l y a s p o s s i b l e . N o t e t h a t y o u c a n d e l e t e d i c t i o n a r i e s y o u r s e l f v i a y o u r D i c t i o n a r y ' s S e t t i n g s .
< / p >
< p >
Anything that is deleted from our system is permanently and irretrievably removed from our system and cannot be restored , though search engines or internet archives may retain a cached version of your content ( there is nothing we can do about this , and you will need to seek out removal of that information by directly contacting the services that are caching your data ) .
< / p >
` ;
accountSettingsColumn . innerHTML = accountSettingsHTML ;
2019-05-13 22:02:10 +02:00
}