aboutsummaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'app.js')
-rw-r--r--app.js10
1 files changed, 6 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)
}
}
}