git ssb

16+

Dominic / patchbay



Commit dfb739655cdd396a5a50012f250f79114e0dbcf8

Merge branch 'ev-fixes' of ssb://%s9mSFATE4RGyJx9wgH22lBrvD4CgUQW4yeguSWWjtqc=.sha256

Ev Bogue committed on 12/21/2016, 6:02:53 PM
Parent: ad7b66e2e6872075e269025508b686b5753c8c08
Parent: b1fc586afe1b02db034fa275db35c84c915ff42f

Files changed

modules_extra/key.jschanged
style.csschanged
modules_extra/key.jsView
@@ -2,28 +2,22 @@
22 var u = require('../util')
33 var pull = require('pull-stream')
44 var Scroller = require('pull-scroll')
55
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-
126 exports.gives = {
137 menu_items: true, screen_view: true
148 }
159
1610 exports.create = function (api) {
1711 return {
1812 menu_items: function () {
19- return h('a', {href: '#/key'}, '/key')
13 + return h('a', {href: '#/key'}, 'Import/Export')
2014 },
2115 screen_view: function (path, sbot) {
2216 if(path === '/key') {
2317 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'})
2620 var content = h('div.column.scroller__content')
2721 var div = h('div.column.scroller',
2822 {style: {'overflow':'auto'}},
2923 h('div.scroller__wrapper',
@@ -35,18 +29,32 @@
3529 h('button', {onclick: function (e){
3630 localStorage['browser/.ssb/secret'] = importKey.value.replace(/\s+/g, ' ')
3731 alert('Your public/private key has been updated')
3832 e.preventDefault()
33 + location.reload()
3934 }}, '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>'}),
4143 h('form',
4244 importRemote,
4345 h('button', {onclick: function (e){
4446 localStorage.remote = importRemote.value
45- alert('Your websocket remote has been updated')
47 + alert('Your remote pub has been updated')
4648 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')
4957 )
5058 )
5159 )
5260 )
style.cssView
@@ -101,8 +101,12 @@
101101 border-radius: .2em;
102102 font-family: sans-serif;
103103 }
104104
105 +textarea.import {
106 + width: 97%;
107 +}
108 +
105109 input:focus, .compose:focus, .message:focus, button:focus {
106110 outline: none;
107111 border-color: #0088cc;
108112 box-shadow: 0 0 4px #0088cc;

Built with git-ssb-web