git ssb

3+

dangerousbeans / scuttle-vue



Tree: 82418e8c0eab5c0b94532a1f8612097db1fc1bb4

Files: 82418e8c0eab5c0b94532a1f8612097db1fc1bb4 / modules / identify.js

1460 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