client/webserver/site/src/js/register.js
/* Swap this currently displayed form1 for form2 with an animation. */
Swap this currently displayed form1 for form2 with an animation.
Swap this currently displayed form1 for form2 with an animation .
async changeForm (form1, form2) {
    const shift = this.body.offsetWidth / 2
    await Doc.animate(animationLength, progress => {
      form1.style.right = `${progress * shift}px`
    }, 'easeInHard')
    Doc.hide(form1)
    form1.style.right = '0px'
    form2.style.right = -shift
    Doc.show(form2)
    form2.querySelector('input').focus()
    await Doc.animate(animationLength, progress => {
      form2.style.right = `${-shift + progress * shift}px`
    }, 'easeOutHard')
    form2.style.right = '0px'
  }
async changeForm ( form1 , form2 ) { const shift = this . body . offsetWidth / 2 await Doc . animate ( animationLength , progress => { form1 . style . right = ` ${ progress * shift } ` } , 'easeInHard' ) Doc . hide ( form1 ) form1 . style . right = '0px' form2 . style . right = - shift Doc . show ( form2 ) form2 . querySelector ( 'input' ) . focus ( ) await Doc . animate ( animationLength , progress => { form2 . style . right = ` ${ - shift + progress * shift } ` } , 'easeOutHard' ) form2 . style . right = '0px' }
Swap this currently displayed form1 for form2 with an animation.
Swap this currently displayed form1 for form2 with an animation .