134 lines
4.0 KiB
HTML
134 lines
4.0 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
|
|
<meta name="description" content="">
|
|
<meta name="author" content="">
|
|
<link rel="icon" href="/favicon.ico">
|
|
|
|
|
|
<base href="">
|
|
|
|
<title>Vvveb -Two factor authentication</title>
|
|
|
|
<link href="css/admin.css" rel="stylesheet">
|
|
</head>
|
|
|
|
|
|
<body>
|
|
|
|
<div id="container">
|
|
|
|
<div class="sidebar" data-v-copy-from="index.html,.sidebar">
|
|
</div>
|
|
|
|
|
|
<div class="main">
|
|
|
|
<div class="clearfix top-header" data-v-copy-from="index.html,.top-header">
|
|
</div>
|
|
|
|
<form id="two-factor-auth-form" action="" method="post" class="settings" data-v-product>
|
|
<input type="hidden" name="action" id="action" value="save">
|
|
<input type="hidden" name="csrf" data-v-csrf>
|
|
|
|
<div class="actions">
|
|
<div class="title">
|
|
<h4 class="text-muted mt-2">
|
|
<img src="/plugins/two-factor-auth/two-factor-auth.svg" height="32">
|
|
<span>Two factor authentication</span>
|
|
</h4>
|
|
</div>
|
|
<div class="btns">
|
|
<a href="{$this.adminPath}index.php?module=plugin/plugins" title="Plugins list"
|
|
class="btn btn-icon btn-outline-secondary me-2">
|
|
<i class="la la-arrow-left"></i><span>Plugins list</span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
|
|
<div id="main-content">
|
|
|
|
<div class="notifications" data-v-notifications data-v-copy-from="index.html,.notifications"></div>
|
|
|
|
<div class="content clearfix two-factor-auth px-4">
|
|
|
|
|
|
<div class="" data-v-if="this.enabled">
|
|
<p>Enabled for this account</p>
|
|
<button name="action" value="disable" class="btn btn-danger btn-icon">
|
|
<i class="icon-key-outline"></i>
|
|
<span>Disable 2FA</span>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="row mb-3" data-v-if-not="this.enabled">
|
|
<div class="d-flex flex-wrap">
|
|
<div class="col-xs-12">
|
|
<img class="border p-2" src="" data-qrimage>
|
|
</div>
|
|
<div class="mx-4 my-2">
|
|
<ol class="p-3">
|
|
<li>Download and start the authenticator app</li>
|
|
<li>
|
|
<span>From the app scan the QR code</span>
|
|
</li>
|
|
<li>Enter the code and enable 2FA</li>
|
|
</ol>
|
|
|
|
<div class="form-label mt-4">Enter the 6 digit code from your authenticator app</div>
|
|
<div class="d-flex w-auto">
|
|
<input type="text" autocorrect="off" class="form-control w-auto me-2" size="7" maxlength="7" placeholder="6 digit code" id="input-code" autocomplete="off" value="" aria-label="6 digit code" name="settings[code]">
|
|
|
|
<button class="btn btn-primary btn-icon px-4">
|
|
<i class="icon-key-outline"></i> Enable 2FA
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<details>
|
|
<summary class="btn btn-outline-secondary btn-icon px-4 mt-2">
|
|
<i class="icon-keypad-outline"></i> Can't scan the code?
|
|
</summary>
|
|
<div class="mt-3">Copy this code and add it to your authenticator app</div>
|
|
<div class="input-group my-2 w-50">
|
|
<input type="text" autocorrect="off" class="form-control" size="32" maxlength="36" placeholder="Secret" id="input-secret" autocomplete="off" value="" aria-label="Code" name="settings[secret]" readonly data-secret>
|
|
<button class="btn btn-outline-secondary input-group-append" type="button" onclick="copyText('input-secret')"><i class="la la-copy la-lg"></i> Copy</button>
|
|
</div>
|
|
|
|
</details>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<script src="js/popper.min.js"></script>
|
|
<script src="js/bootstrap.min.js"></script>
|
|
<script id="admin-js" type="module" src="/js/admin.js"></script>
|
|
<script type="module" src="/js/admin.js"></script>
|
|
|
|
<script>
|
|
function copyText(id) {
|
|
let input = document.getElementById(id);
|
|
input.select();
|
|
document.execCommand("copy");
|
|
}
|
|
</script>
|
|
</script>
|
|
</body>
|
|
|
|
</html>
|