aboutsummaryrefslogtreecommitdiff
path: root/views.js
diff options
context:
space:
mode:
Diffstat (limited to 'views.js')
-rw-r--r--views.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/views.js b/views.js
index b3cd061..7727204 100644
--- a/views.js
+++ b/views.js
@@ -17,7 +17,9 @@ function profilePage (src, keys) {
profile.appendChild(h('a', {href: '#' + src}, [getName(src, keys)]))
- profile.appendChild(h('div', [
+ profile.appendChild(h('br'))
+
+ var identify = h('div', [
input,
h('button', {
onclick: function () {
@@ -35,7 +37,16 @@ function profilePage (src, keys) {
})
}
}, ['Identify'])
- ]))
+ ])
+
+ var identifyButton = h('button', {
+ onclick: function () {
+ profile.appendChild(identify)
+ identifyButton.parentNode.removeChild(identifyButton)
+ }
+ }, ['Identify ' + keys.publicKey.substring(0, 10) + '...'])
+
+ profile.appendChild(identifyButton)
localforage.getItem('subscriptions').then(function (subs) {
if (subs.includes(src)) {