diff options
author | Ev Bogue <ev@evbogue.com> | 2019-04-25 15:33:48 -0500 |
---|---|---|
committer | Ev Bogue <ev@evbogue.com> | 2019-04-25 15:33:48 -0500 |
commit | bb78d6fb69e32fcb403c592e11f33283f9ff632e (patch) | |
tree | 5fdb6dd19d8ef33d7143d9c5cd1f2394207ec331 /welcome.js | |
parent | 6c60ac6e55da99aac1958c87ee36a6acb4d399b6 (diff) |
major refactor -- new look and messages are stored as signatures - 1.3.0
Diffstat (limited to 'welcome.js')
-rw-r--r-- | welcome.js | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/welcome.js b/welcome.js deleted file mode 100644 index 342756a..0000000 --- a/welcome.js +++ /dev/null @@ -1,67 +0,0 @@ -function welcomeScreen (keys) { - var screen = document.getElementById('screen') - - var scroller = h('div', {id: 'scroller'}) - screen.appendChild(scroller) - - var message = h('div', {classList: 'message'}) - - scroller.appendChild(message) - - message.appendChild(h('h1', ['Welcome to Bogbook'])) - message.appendChild(h('p', ['Bogbook is a distributed blogging network of signed append-only feeds. We call them "bogs".'])) - message.appendChild(h('p', ['Please note: Bogbook is experimental software, not for use in producton environments. Expect bugs and breaking changes. Pull-requests are needed.'])) - message.appendChild(h('p', {innerHTML: marked('View the code: [http://github.com/bogbook/bog](http://github.com/bogbook/bog). Questions? [ev@evbogue.com](mailto:ev@evbogue.com).')})) - message.appendChild(h('hr')) - message.appendChild(h('h3', ['Get started'])) - message.appendChild(h('p', {innerHTML: marked('This is an ed25519 public/private signing keypair. It was generated using [TweetNaCl.js](https://tweetnacl.js.org/#/)')})) - message.appendChild(h('pre', [JSON.stringify(keys)])) - message.appendChild(h('p', ['Right now, this keypair exists only in memory. When you leave this page, the keypair will vanish forever. If you refresh this page you\'ll receive a new keypair.'])) - message.appendChild(h('p', {innerHTML: marked('To save this keypair, identify with a handle below. Once you identify, your public/private keypair will be stored in your browser using [localForage.js](https://localforage.github.io/localForage). Save your keypair somewhere safe to preserve your identity.')})) - message.appendChild(h('hr')) - message.appendChild(h('h3', ['Identify'])) - - var identify = h('input', {placeholder: 'Your Name'}) - - message.appendChild(h('div', [ - identify, - h('button', {onclick: function () { - if (identify.value) { - var toPublish = { - author: keys.publicKey, - type: 'name', - naming: keys.publicKey, - name: identify.value, - timestamp: Date.now() - } - - identify.value = '' - publish(toPublish, keys) - localforage.setItem('id', keys, function (err, published) { - if (published) { - location.hash = '' - location.reload() - } - }) - } - }}, ['Identify']) - ])) - message.appendChild(h('p', ['When you click [Identify], you will post your first message to your append-only bog, your ed25519 keypair will be saved in your browser, and the page will reload. Don\'t forget to back up your key! and happy bogging.'])) - message.appendChild(h('hr')) - message.appendChild(h('h3', ['Already have a key?'])) - message.appendChild(h('p', ['Import it here. Make sure to sync your existing feed from a Bogbook \'pub\' before posting a message.'])) - - var textarea = h('textarea', {placeholder: 'Import your existing ed25519 keypair'}) - message.appendChild(textarea) - message.appendChild(h('button', { - onclick: function () { - if (textarea.value) { - localforage.setItem('id', JSON.parse(textarea.value)) - location.hash = '' - location.reload() - } - } - }, ['Import Key'])) - - -} |