git ssb

1+

ev / minbay



Commit 21595a9ee2f161523d147e03172bdc0078f31f14

abstract key.js into npm module

Ev Bogue committed on 1/12/2018, 2:18:29 AM
Parent: 6838fdf4fb2e310ec1cb2a003ef7a7c4ee646fb8

Files changed

.gitignorechanged
modules/key.jsdeleted
package-lock.jsonchanged
package.jsonchanged
style.css.jsondeleted
.gitignoreView
@@ -1,4 +1,4 @@
11 node_modules
22 npm-debug.log
33 build
4-minbay.css.json
4 +style.css.json
modules/key.jsView
@@ -1,64 +1,0 @@
1-var h = require('hyperscript')
2-
3-exports.gives = {
4- app: { view: true }
5-}
6-
7-exports.needs = {
8-}
9-
10-exports.create = function (api) {
11- return { app: {
12- view: function (path) {
13- if(path !== 'key') return
14- var importKey = h('textarea.import', {placeholder: 'import an existing public/private key', name: 'textarea'})
15- var importRemote = h('input.import', {placeholder: 'import an existing remote', name: 'textarea'})
16- var div = h('div.content',
17- h('div.message',
18- h('h1', 'Your Key'),
19- h('p', {innerHTML: 'Your secret key is: <pre><code>' + localStorage['/.ssb/secret'] + '</code></pre>'},
20- h('button', {onclick: function (e){
21- localStorage['/.ssb/secret'] = ''
22- alert('Your public/private key has been deleted')
23- e.preventDefault()
24- location.hash = ""
25- location.reload()
26- }}, 'Delete Key')
27- ),
28- h('hr'),
29- h('p', {innerHTML: 'Your remote pub is: <pre>' + localStorage.remote + '</pre>'},
30- h('button', {onclick: function (e){
31- localStorage.remote = ''
32- alert('Your remote pub has been deleted')
33- e.preventDefault()
34- location.hash = ""
35- location.reload()
36- }}, 'Delete Pub')
37- ),
38- h('hr'),
39- h('form.column',
40- importKey,
41- importRemote,
42- h('button', {onclick: function (e){
43- if(importKey.value) {
44- localStorage['/.ssb/secret'] = importKey.value.replace(/\s+/g, ' ')
45- e.preventDefault()
46- alert('Your key has been updated')
47- }
48- if(importRemote.value) {
49- localStorage.remote = importRemote.value
50- e.preventDefault()
51- alert('Your remote pub has been updated')
52- }
53- location.hash = ""
54- location.reload()
55- }}, 'Import')
56- )
57- )
58- )
59- return div
60- }
61- }}
62-}
63-
64-
package-lock.jsonView
The diff is too large to show. Use a local git client to view these changes.
Old file size: 213109 bytes
New file size: 241472 bytes
package.jsonView
@@ -1,8 +1,8 @@
11 {
22 "name": "minbay",
33 "description": "a minimal lite client for secure scuttlebutt",
4- "version": "3.6.1",
4 + "version": "3.7.0",
55 "homepage": "https://github.com/evbogue/minbay",
66 "repository": {
77 "type": "git",
88 "url": "git://github.com/evbogue/minbay.git"
@@ -14,8 +14,9 @@
1414 "human-time": "0.0.1",
1515 "hyperloadmore": "^1.1.0",
1616 "hyperscript": "^2.0.2",
1717 "opener": "^1.4.3",
18 + "patchapp-key": "^1.0.1",
1819 "patchapp-threads": "^2.2.0",
1920 "patchavatar-names": "^1.0.0",
2021 "patchavatar-raw": "^1.0.0",
2122 "patchcompose": "^1.2.1",
style.css.jsonView
@@ -1,1 +1,0 @@
1-".timestamp {\n float: right;\n}\n\n.Avatar img {\n vertical-align: top;\n width: 26px; height: 26px;\n margin-bottom: 1ex; margin-right: .5ex;\n border-radius: 3px;\n}\n\n.Avatar__header img {\n width: 75px;\n}\n\n.navless {\n width: 100%;\n position: absolute;\n overflow-y: hidden;\n top: 0; left: 0; right: 0; bottom: 0;\n}\n\n.markdown img {\n max-width: 100%;\n}\n\n.hyperscroll > * {\n max-width: 670px;\n margin: auto;\n}\n\n\nhtml, body {\n background: #f7f7f9;\n font-family: sans-serif;\n margin: 0;\n font-size: 14px; line-height: 20px;\n color: #333;\n}\n\np {\n margin-bottom: 10px;\n word-break: break-word;\n margin-top: .35ex;\n}\n\na {\n color: #0088cc;\n text-decoration: none;\n}\n\na:hover,\na:focus {\n color: #005580;\n text-decoration: underline;\n}\n\ncode,\npre {\n padding: 0 3px 2px;\n font-size: 12px;\n color: #333333;\n word-break: break-all;\n word-wrap: break-word;\n}\n\ncode {\n padding: 2px 4px;\n color: #d14;\n background-color: #f7f7f9;\n}\n\npre {\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 20px;\n white-space: pre-wrap;\n background-color: #f5f5f5;\n border: 1px solid #ccc;\n border: 1px solid rgba(0, 0, 0, 0.15);\n border-radius: 4px;\n}\n\ninput, textarea {\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n transition: border linear 0.2s, box-shadow linear 0.2s;\n border: 1px solid #eee;\n color: #555;\n border-radius: 4px;\n}\n\ninput {\n width: 206px;\n height: 20px;\n padding: 4px 6px;\n font-size: 14px;\n line-height: 20px;\n color: #555555;\n vertical-align: middle;\n}\n\ninput.search {\n margin-right: 5px;\n height: 14px;\n width: 96px;\n background: #f5f5f5;\n}\n\nbutton.btn-search {\n margin-right: 1em;\n}\n\n\n.compose {\n max-width: 670px;\n margin-left: auto;\n margin-right: auto;\n}\n\n.theme {\n height: 20em;\n width: 100%;\n}\n\ntextarea {\n width: 100%;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n transition: border linear 0.2s, box-shadow linear 0.2s;\n padding: 4px 6px;\n font-size: 1em;\n margin: 0;\n margin-bottom: .3em;\n border-radius: 4px;\n}\n\ntextarea:focus, {\n border-color: rgba(82, 168, 236, 0.8);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);\n}\n\n\n.message, .message > * {\n animation: fadein .5s;\n}\n\n@keyframes fadein {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n.message {\n border: 1px solid #eee;\n max-width: 100%;\n padding: .5em;\n margin-top: .5em;\n background: white;\n border-radius: 4px;\n}\n\n/*.content, .patchthreads__container {\n margin-top: 3em;\n}*/\n\n.navbar a {\n color: #999;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\n\n.navbar a:hover, .navbar a:focus {\n color: #fff;\n text-decoration: none;\n}\n\n.navbar {\n width: 100%;\n position: fixed;\n z-index: 1000;\n margin: 0;\n padding-top: .3em;\n padding-bottom: .1;\n left: 0; right: 0;\n top: 0;\n background: #1b1b1b;\n background: linear-gradient(#222, #111);\n border-bottom: 1px solid #252525;\n}\n\n.navbar .internal {\n max-width: 680px;\n margin-left: auto;\n margin-right: auto;\n}\n\n.navbar li {\n margin-top: .3em;\n float: left;\n padding-right: .6em;\n padding-left: .3em;\n list-style-type: none;\n}\n/* aesthetic */\n\nbody, input, button, p, li, h1, h2, h3, h4, h5, h6, textarea {\n font-family: \"Source Sans Pro\", sans-serif;\n}\n\n.btn {\n margin-right: 4px;\n display: inline-block;\n *display: inline;\n padding: 4px 12px;\n margin-bottom: 0;\n *margin-left: .3em;\n font-size: 14px;\n line-height: 20px;\n color: #333333;\n text-align: center;\n text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);\n vertical-align: middle;\n cursor: pointer;\n background-color: #f5f5f5;\n *background-color: #e6e6e6;\n background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);\n background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));\n background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);\n background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);\n background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);\n background-repeat: repeat-x;\n border: 1px solid #cccccc;\n *border: 0;\n border-color: #e6e6e6 #e6e6e6 #bfbfbf;\n border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n border-bottom-color: #b3b3b3;\n -webkit-border-radius: 4px;\n -moz-border-radius: 4px;\n border-radius: 4px;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\n *zoom: 1;\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);\n -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n\n\n.btn:hover,\n.btn:focus,\n.btn:active,\n.btn.active,\n.btn.disabled,\n.btn[disabled] {\n color: #333333;\n background-color: #e6e6e6;\n *background-color: #d9d9d9;\n}\n\n.btn:active,\n.btn.active {\n background-color: #cccccc \\9;\n}\n\n.btn:first-child {\n *margin-left: 0;\n}\n\n.btn:hover,\n.btn:focus {\n color: #333333;\n text-decoration: none;\n background-position: 0 -15px;\n -webkit-transition: background-position 0.1s linear;\n -moz-transition: background-position 0.1s linear;\n -o-transition: background-position 0.1s linear;\n transition: background-position 0.1s linear;\n}\n\n.btn:focus {\n outline: thin dotted #333;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n\n.btn.active,\n.btn:active {\n background-image: none;\n outline: 0;\n -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);\n -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);\n box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n\n.btn-primary {\n color: #ffffff;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n background-color: #006dcc;\n *background-color: #0044cc;\n background-image: -moz-linear-gradient(top, #0088cc, #0044cc);\n background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));\n background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);\n background-image: -o-linear-gradient(top, #0088cc, #0044cc);\n background-image: linear-gradient(to bottom, #0088cc, #0044cc);\n background-repeat: repeat-x;\n border-color: #0044cc #0044cc #002a80;\n border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\n}\n\n.btn-primary:hover,\n.btn-primary:focus,\n.btn-primary:active,\n.btn-primary.active,\n.btn-primary.disabled,\n.btn-primary[disabled] {\n color: #ffffff;\n background-color: #0044cc;\n *background-color: #003bb3;\n}\n\n.btn-primary:active,\n.btn-primary.active {\n background-color: #003399 \\9;\n}\n.btn-success {\n color: #ffffff;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n background-color: #5bb75b;\n *background-color: #51a351;\n background-image: -moz-linear-gradient(top, #62c462, #51a351);\n background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));\n background-image: -webkit-linear-gradient(top, #62c462, #51a351);\n background-image: -o-linear-gradient(top, #62c462, #51a351);\n background-image: linear-gradient(to bottom, #62c462, #51a351);\n background-repeat: repeat-x;\n border-color: #51a351 #51a351 #387038;\n border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\n}\n\n.btn-success:hover,\n.btn-success:focus,\n.btn-success:active,\n.btn-success.active,\n.btn-success.disabled,\n.btn-success[disabled] {\n color: #ffffff;\n background-color: #51a351;\n *background-color: #499249;\n}\n\n.btn-success:active,\n.btn-success.active {\n background-color: #408140 \\9;\n}\n\n\n.btn-danger {\n color: #ffffff;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n background-color: #da4f49;\n *background-color: #bd362f;\n background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);\n background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));\n background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f);\n background-image: -o-linear-gradient(top, #ee5f5b, #bd362f);\n background-image: linear-gradient(to bottom, #ee5f5b, #bd362f);\n background-repeat: repeat-x;\n border-color: #bd362f #bd362f #802420;\n border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\n}\n\n.btn-danger:hover,\n.btn-danger:focus,\n.btn-danger:active,\n.btn-danger.active,\n.btn-danger.disabled,\n.btn-danger[disabled] {\n color: #ffffff;\n background-color: #bd362f;\n *background-color: #a9302a;\n}\n\n.btn-danger:active,\n.btn-danger.active {\n background-color: #942a25 \\9;\n}\n\n\n"

Built with git-ssb-web