extends ../layouts/main
block content


  div(uk-grid).uk-flex-middle
    .uk-width-expand
      h1.margin-remove Tokens
        section.uk-section.uk-section-default.uk-section-xsmall
          .uk-container 
            .uk-text-small
              h4 This is where you will regenerate OTP tokens for your admin account and destroy your old OTP account.
        //- .uk-width-auto
          button(
              type="button",
              data-user= user._id,
              onclick="return dtp.adminApp.generateOTPTokens(event);",
            ).uk-button.dtp-button-danger
              +renderButtonIcon('fa-repeat', 'Generate OTP Tokens')
      //- regenerate route should set this so tokens can be viewed once.
      if otpRegen 
        section.uk-section.uk-section-default.uk-section-xsmall
          .uk-container 
            h3 You should save these tokens in a safe place. This is the only time you will see them.
            p These tokens should be saved in a safe place so you can get into your account should you lose your 2FA device
            each token of tokens
              ul.uk-list.uk-list-divider
                li
                  .uk-text-small= token.token
