git ssb

3+

dangerousbeans / scuttle-vue



Commit 2a4bb663353af0f625171ce58950db0e955f1c42

update localStorage instructions, strip quotes when saving to localStorage

Jolyon committed on 11/17/2017, 8:39:18 AM
Parent: f07a001dc982815ea0ac680cecb40d4c6d71c9f6

Files changed

README.mdchanged
src/components/Settings.vuechanged
README.mdView
@@ -56,12 +56,16 @@
5656 cat ~/.ssb/private
5757
5858 # place these in browser storage (until this part is built in the app)
5959
60 +# On the settings page:
61 +
62 +# Copy & paste your keypair from ~.ssb/secret
63 +
6064 localStorage.setItem("/.ssb/secret", '{"curve":"ed25519","public":"IZckcDcgB....."}')
6165
62-localStorage.setItem("browser/.ssb/secret", '{"curve":"ed25519","public":"IZckcDcgB....."}')
66 +# Paste the websocket address from running in terminal:
6367
68 +sbot ws.getAdress
69 +
6470 localStorage.setItem("remote", 'ws://localhost:8989~shs:TXKFQ.....=')
6571 ```
66-
67-```
src/components/Settings.vueView
@@ -21,24 +21,27 @@
2121 export default {
2222 data() {
2323 return {
2424 identity: {
25- key: "/.ssb/secret"
25 + key: '/.ssb/secret'
2626 },
2727 remoteWebsocket: {
28- key: "remote"
28 + key: 'remote'
2929 }
30- };
30 + }
3131 },
3232 created() {
3333 this.identity.value =
34- localStorage["/.ssb/secret"] || "the secret goes here";
34 + localStorage["/.ssb/secret"] || "the secret goes here"
3535 this.remoteWebsocket.value =
36- localStorage["remote"] || "sbot ws.getAddress goes here";
36 + localStorage["remote"] || "sbot ws.getAddress goes here"
3737 },
3838 methods: {
3939 updateValue(key, value) {
40- localStorage[key] = value;
40 + if(key === 'remote') {
41 + value = value.replace(/['"]+/g, '')
42 + }
43 + localStorage[key] = value
4144 }
4245 }
43-};
46 +}
4447 </script>

Built with git-ssb-web