From 3db2bee4c108858ea9ac3417f1645a9b05d80940 Mon Sep 17 00:00:00 2001 From: Ev Bogue Date: Fri, 19 Apr 2019 13:41:50 -0500 Subject: fix little bugs --- app.js | 10 ++++++---- index.html | 1 + 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 @@ + -- cgit v1.2.3-70-g09d2