mirror of
https://github.com/Luzifer/vault-otp-ui.git
synced 2024-11-08 16:20:06 +00:00
143 lines
6.1 KiB
HTML
143 lines
6.1 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">
|
|
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
|
<title>Vault OTP-UI</title>
|
|
|
|
<link rel="manifest" href="static/manifest.json">
|
|
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.3.1/dist/css/bootstrap.min.css"
|
|
integrity="sha256-YLGeXaapI0/5IgZopewRJcFXomhRMlYYjugPLSyNjTY=" crossorigin="anonymous">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootswatch@4.3.1/dist/flatly/bootstrap.min.css"
|
|
integrity="sha256-0mhswpc4tUm8b+EHmWyk817AlGI+X5NmVsKbJkQ342c=" crossorigin="anonymous">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-vue@2.0.0/dist/bootstrap-vue.min.css"
|
|
integrity="sha256-98fnCXYEILg6wOwaFWPVePJcizsYZG2U+N95WSWsG3g=" crossorigin="anonymous">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css"
|
|
integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous">
|
|
|
|
<style>
|
|
body { font-size: 16px; padding-top: 90px; }
|
|
i { margin-right: 0.4em; }
|
|
.initLoader i { margin-right: unset; }
|
|
.alert { background-image: none; }
|
|
.badge { background-color: #2980b9; color: #ddd; font-size: 15px; font-weight: bold; margin-top: 3px; }
|
|
.center { text-align: center; }
|
|
.fixed { bottom: 0; position: fixed; width: 100%; z-index: 999; }
|
|
.jumbotron h2 { text-align: center; }
|
|
.otp-item { cursor: pointer; }
|
|
.otp-item i { width: 1.1em; }
|
|
.pbar { background-color: #18BC9C; height: 100%; }
|
|
.pcontainer { background-color: #E74C3C; border-width: 1px 0 1px 0; border-color: #333; height: 3px; position: absolute; bottom: 0; left: 0; width: 100%; z-index: 999; }
|
|
</style>
|
|
|
|
</head>
|
|
<body>
|
|
|
|
<div id="application">
|
|
|
|
<nav class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
|
|
<div class="container-fluid">
|
|
<a class="navbar-brand mr-5" href="#">Vault OTP-UI</a>
|
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
|
|
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
|
<form class="form-inline mr-auto">
|
|
<input type="text" class="form-control" placeholder="Filter" v-model="filter">
|
|
</form>
|
|
<ul class="navbar-nav my-2 my-lg-0">
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="https://github.com/Luzifer/vault-otp-ui"><i class="fa fa-github" aria-hidden="true"></i> Source on Github</a>
|
|
</li>
|
|
</ul>
|
|
</div><!-- /.navbar-collapse -->
|
|
</div><!-- /.container-fluid -->
|
|
|
|
<div class="pcontainer">
|
|
<div class="pbar" :style="{ width: `${timeLeftPerc}%` }" id="timer"></div>
|
|
</div>
|
|
</nav>
|
|
|
|
|
|
<div v-if="signedIn">
|
|
|
|
<div class="container">
|
|
|
|
<div class="row justify-content-md-center">
|
|
<div class="col-xs-10 col-md-4 center initLoader" v-if="loading">
|
|
<i class="fa fa-refresh fa-spin fa-5x"></i><br>
|
|
</div>
|
|
<div class="w-100"></div>
|
|
<div class="col-xs-12 col-sm-8 col-md-6 col-lg-6">
|
|
<div class="list-group" id="keylist">
|
|
|
|
<a
|
|
class="list-group-item d-flex justify-content-between align-items-center otp-item"
|
|
v-for="item in filteredItems"
|
|
:key="item.name"
|
|
v-clipboard:copy="item.code"
|
|
v-clipboard:success="() => codeCopyResult(true)"
|
|
v-clipboard:error="() => codeCopyResult(false)"
|
|
>
|
|
<span>
|
|
<i :class="`fa fa-fw fa-${item.icon}`"></i>
|
|
<span class="title">{{ item.name }}</span>
|
|
</span>
|
|
<span class="badge">{{ formatCode(item.code) }}</span>
|
|
</a>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div v-else>
|
|
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-xs-12 col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3 col-lg-6 col-lg-offset-3">
|
|
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">Please sign in!</div>
|
|
<div class="panel-body">
|
|
<p>
|
|
Use Github authentication to sign into your Vault instance and get access to your one-time passwords:
|
|
</p>
|
|
<p class="center">
|
|
<a :href="authUrl" class="btn btn-primary"><i class="fa fa-github" aria-hidden="true"></i> Sign-in with Github</a>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div> <!-- /#login -->
|
|
|
|
</div> <!-- /#application -->
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.min.js"
|
|
integrity="sha256-chlNFSVx3TdcQ2Xlw7SvnbLAavAQLO0Y/LBiWX04viY="
|
|
crossorigin="anonymous"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap-vue@2.0.0/dist/bootstrap-vue.min.js"
|
|
integrity="sha256-Hv63vpX6fRHvM0UYK/NJMbAZ81/6IHQfkkq5BSHYXP8="
|
|
crossorigin="anonymous"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/vue-clipboard2@0.3.1/dist/vue-clipboard.min.js"
|
|
integrity="sha256-XvHL1mhvDUwfYL9UgYaEG0TBKZg3J9uScjUDG6oCS6k="
|
|
crossorigin="anonymous"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/axios@0.19.0/dist/axios.min.js"
|
|
integrity="sha256-S1J4GVHHDMiirir9qsXWc8ZWw74PHHafpsHp5PXtjTs="
|
|
crossorigin="anonymous"></script>
|
|
|
|
<script src="vars.js"></script>
|
|
<script src="application.js"></script>
|
|
|
|
</body>
|
|
</html>
|