-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
90 lines (89 loc) · 3.68 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>JS-Pass</title>
<!-- store files local -->
<script src="FileSaver.min.js"></script>
<script src="Blob.js"></script>
<!-- angularjs -->
<script src="angular.min.js"></script>
<style type="text/css">
.tab-box {
border: 1px solid black;
padding: 10px;
margin: 10px;
border-radius: 3px;
}
.tab-box .tab-menu {
list-style-type: none;
}
.tab-box .tab-menu li {
float: left;
padding: 5px;
border-radius: 3px;
margin-right: 5px;
margin-bottom: 10px;
border: 1px solid black;
background-color: #ddd;
cursor: pointer;
}
.tab-box .tab-menu li:hover {
box-shadow: 1px 1px 5px #bbb;
}
.tab-box .tab-content {
clear: both;
}
.list .remove-x {
float: right;
}
.list .item:hover {
background-color: #bbb;
cursor: pointer;
}
</style>
</head>
<body ng-app="jsPass">
<div ng-controller="KeysView" class="tab-box">
<lu class="tab-menu">
<li ng-click="show('generate_key')">Generate Key</li>
<li ng-click="show('private_key')">Private Key</li>
<li ng-click="show('public_key')">Public Key</li>
</lu>
<div class="tab-content">
<div ng-show="view == 'generate_key'">
<form name="generate_key_form">
<h2>Generate Key</h2>
<label for="generate_key_name">Name: </label><input type="text" id="generate_key_name" ng-model="name" required /><br/>
<label for="generate_key_mail">E-Mail: </label><input type="email" id="generate_key_mail" ng-model="email" /><br/>
<label for="generate_key_password">Password: </label><input type="password" id="generate_key_password" ng-model="password" /><br/>
{{ user() }} <br />
<button ng-click="generate_key()">Generate Key Pair</button>
</form>
</div>
<div ng-show="view == 'private_key' || view == 'public_key'">
<h2>{{ key_title }}</h2>
<textarea style="width: 560px;height: 200px;" ng-model="key" ng-blur="store_key()"></textarea>
<p>
<a href="#" ng-click="key_download()">Download</a>,
Upload: <input type="file" onchange="angular.element(this).scope().upload_key(this);" name="file" />
</p>
</div>
</div>
</div>
<div ng-controller="DecrypedView" class="tab-box">
<label for="decrypt_password">Password: </label><input type="password" id="decrypt_password" ng-model="password" /><br/>
<form ng-submit="add_item()">
<div><input ng-model="new_item"> <button type="submit">Add</button></div>
</form>
<div style="width: 566px;" class="list">
<div ng-repeat="item in items" ng-click="load(item)" class="item">{{ item.name }}<div ng-click="remove(item.name)" class="remove-x">x</div></div>
</div>
<textarea ng-model="content" style="width: 560px;height: 200px;" ng-blur="store()" ng-disabled="!selected"></textarea><br />
<button ng-click="store()">Store</button>
</div>
<script src="./jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="./openpgp.js" type="text/javascript" charset="utf-8"></script>
<script src="./example.js" type="text/javascript" charset="utf-8"></script>
</body>
</html>