From 8e5dbe95887bf7a2c4cd11ef818342cf7130c462 Mon Sep 17 00:00:00 2001 From: Ev Bogue Date: Wed, 10 Apr 2019 19:14:47 -0500 Subject: save keys from localStorage oblivion --- app.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app.js b/app.js index 2b2f05b..f2e0765 100644 --- a/app.js +++ b/app.js @@ -117,6 +117,16 @@ function route () { scroller.appendChild(keyMessage) + if (localStorage['id']) { + + var oldKey = h('div', {classlist: 'message'}) + + oldKey.appendChild(h('You had a key in localStorage. Import it to the new database by pasting it into the box above.')) + oldKey.appendChild(h('pre', {style: 'width: 80%'}, [h('code', [JSON.stringify(localStorage['id'])])])) + + scroller.appendChild(oldKey) + } + var pubMessage = h('div', {classList: 'message'}) var newPub = h('input', {placeholder: 'Add a new pub. Ex: ws://bogbook.com/'}) -- cgit v1.2.3-70-g09d2