Commit dfb739655cdd396a5a50012f250f79114e0dbcf8
Merge branch 'ev-fixes' of ssb://%s9mSFATE4RGyJx9wgH22lBrvD4CgUQW4yeguSWWjtqc=.sha256
Ev Bogue committed on 12/21/2016, 6:02:53 PMParent: ad7b66e2e6872075e269025508b686b5753c8c08
Parent: b1fc586afe1b02db034fa275db35c84c915ff42f
Files changed
modules_extra/key.js | changed |
style.css | changed |
modules_extra/key.js | ||
---|---|---|
@@ -2,28 +2,22 @@ | ||
2 | 2 … | var u = require('../util') |
3 | 3 … | var pull = require('pull-stream') |
4 | 4 … | var Scroller = require('pull-scroll') |
5 | 5 … | |
6 | -//var plugs = require('../plugs') | |
7 | -// var message_render = plugs.first(exports.message_render = []) | |
8 | -// var message_compose = plugs.first(exports.message_compose = []) | |
9 | -// var sbot_log = plugs.first(exports.sbot_log = []) | |
10 | - | |
11 | - | |
12 | 6 … | exports.gives = { |
13 | 7 … | menu_items: true, screen_view: true |
14 | 8 … | } |
15 | 9 … | |
16 | 10 … | exports.create = function (api) { |
17 | 11 … | return { |
18 | 12 … | menu_items: function () { |
19 | - return h('a', {href: '#/key'}, '/key') | |
13 … | + return h('a', {href: '#/key'}, 'Import/Export') | |
20 | 14 … | }, |
21 | 15 … | screen_view: function (path, sbot) { |
22 | 16 … | if(path === '/key') { |
23 | 17 … | if(process.title === 'browser') { |
24 | - var importKey = h('textarea', {placeholder: 'import an existing public/private key', name: 'textarea'}) | |
25 | - var importRemote = h('textarea', {placeholder: 'import an existing remote', name: 'textarea'}) | |
18 … | + var importKey = h('textarea.import', {placeholder: 'import an existing public/private key', name: 'textarea'}) | |
19 … | + var importRemote = h('textarea.import', {placeholder: 'import an existing remote', name: 'textarea'}) | |
26 | 20 … | var content = h('div.column.scroller__content') |
27 | 21 … | var div = h('div.column.scroller', |
28 | 22 … | {style: {'overflow':'auto'}}, |
29 | 23 … | h('div.scroller__wrapper', |
@@ -35,18 +29,32 @@ | ||
35 | 29 … | h('button', {onclick: function (e){ |
36 | 30 … | localStorage['browser/.ssb/secret'] = importKey.value.replace(/\s+/g, ' ') |
37 | 31 … | alert('Your public/private key has been updated') |
38 | 32 … | e.preventDefault() |
33 … | + location.reload() | |
39 | 34 … | }}, 'Import'), |
40 | - h('p', {innerHTML: 'Your ws remote is: <pre>' + localStorage.remote + '</pre>'}), | |
35 … | + h('button', {onclick: function (e){ | |
36 … | + localStorage['browser/.ssb/secret'] = '' | |
37 … | + alert('Your public/private key has been deleted') | |
38 … | + e.preventDefault() | |
39 … | + location.reload() | |
40 … | + }}, 'Delete') | |
41 … | + ), | |
42 … | + h('p', {innerHTML: 'Your remote pub is: <pre>' + localStorage.remote + '</pre>'}), | |
41 | 43 … | h('form', |
42 | 44 … | importRemote, |
43 | 45 … | h('button', {onclick: function (e){ |
44 | 46 … | localStorage.remote = importRemote.value |
45 | - alert('Your websocket remote has been updated') | |
47 … | + alert('Your remote pub has been updated') | |
46 | 48 … | e.preventDefault() |
47 | - }}, 'Import') | |
48 | - ) | |
49 … | + location.reload() | |
50 … | + }}, 'Import'), | |
51 … | + h('button', {onclick: function (e){ | |
52 … | + localStorage.remote = '' | |
53 … | + alert('Your remote pub has been deleted') | |
54 … | + e.preventDefault() | |
55 … | + location.reload() | |
56 … | + }}, 'Delete') | |
49 | 57 … | ) |
50 | 58 … | ) |
51 | 59 … | ) |
52 | 60 … | ) |
style.css | ||
---|---|---|
@@ -101,8 +101,12 @@ | ||
101 | 101 … | border-radius: .2em; |
102 | 102 … | font-family: sans-serif; |
103 | 103 … | } |
104 | 104 … | |
105 … | +textarea.import { | |
106 … | + width: 97%; | |
107 … | +} | |
108 … | + | |
105 | 109 … | input:focus, .compose:focus, .message:focus, button:focus { |
106 | 110 … | outline: none; |
107 | 111 … | border-color: #0088cc; |
108 | 112 … | box-shadow: 0 0 4px #0088cc; |
Built with git-ssb-web