git ssb

0+

ev / minbase



Tree: b62ecd6f843b26f37e70c7b6d65c71db35bbf922

Files: b62ecd6f843b26f37e70c7b6d65c71db35bbf922 / modules / identify.js

1463 bytesRaw
1var h = require('hyperscript')
2var u = require('../util')
3var pull = require('pull-stream')
4var Scroller = require('../pull-scroll')
5var id = require('../keys').id
6
7exports.needs = {
8 publish: 'first',
9 avatar_edit: 'first'
10}
11
12exports.gives = {
13 screen_view: true
14}
15
16exports.create = function (api) {
17 return {
18 screen_view: function (path, sbot) {
19 if(path === 'Identify') {
20 if(process.title === 'browser') {
21 var identify = h('input.identify', {placeholder: 'Your Name', name: 'namespace'})
22 var div = h('div.column.scroller', {style: 'overflow: auto;'},
23 h('div.scroller__wrapper',
24 h('div.column.scroller__content',
25 h('h1', 'You\'re in! Now, you need a name'),
26 h('p', {innerHTML: '<p>You\'ve just generated a new public/private keypair: <pre><code>' + localStorage['browser/.ssb/secret'] + '</code></pre> You\'re the only person with access to the private key. If you want to hang onto this identity, save this key somewhere safe.<hr />'}),
27 h('p', {innerHTML: 'Right now, you\'re only identified by your public key: <code>' + id + '</code></p><p>Start by giving yourself a name:'},
28 api.avatar_edit(id),
29 h('p', {innerHTML: 'Once you\'re done, navigate to <a href="./index.html">your feed</a>.'})
30 )
31 )
32 )
33 )
34 return div
35 }
36 }
37 }
38 }
39}
40
41

Built with git-ssb-web