aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app.js10
-rw-r--r--index.html1
2 files changed, 7 insertions, 4 deletions
diff --git a/app.js b/app.js
index 3b8e2f3..3b93d9a 100644
--- a/app.js
+++ b/app.js
@@ -14,8 +14,10 @@ function keyPage (keys) {
// delete key button
message.appendChild(h('button', {
onclick: function () {
- localStorage['id'] = ''
- location.reload()
+ localforage.removeItem('id', function () {
+
+ location.reload()
+ })
}
}, ['Delete Key']))
@@ -134,7 +136,7 @@ localforage.getItem('id', function (err, keys) {
var navbar = h('div', {classList: 'navbar'}, [
h('div', {classList: 'internal'}, [
- h('li', [h('a', {href: '/'}, ['Home'])]),
+ h('li', [h('a', {href: '/#'}, ['Home'])]),
h('li', [h('a', {href: '#' + keys.publicKey}, [getName(keys.publicKey)])]),
h('li', [h('a', {href: '/#key'}, ['Key'])])
])
@@ -157,7 +159,7 @@ localforage.getItem('id', function (err, keys) {
location.reload()
}, 10)
} else {
- welcomeScreen()
+ welcomeScreen(keys)
}
}
}
diff --git a/index.html b/index.html
index d4cd82f..f713fab 100644
--- a/index.html
+++ b/index.html
@@ -11,6 +11,7 @@
<script src="./lib/localforage.min.js"></script>
<script src="./lib/marked.min.js"></script>
<script src="lib.js"></script>
+ <script src="welcome.js"></script>
<script src="render.js"></script>
<script src="app.js"></script>
</body>