Commit dddeb7fb98e0194b937bf2f3b00e5562f55b6c7c
rewind to previous code - localStorage wasn't being written to
Jolyon committed on 11/18/2017, 7:14:26 AMParent: abe6aa04afdbe964c7cafbf65516ebf7a4cef7b3
Files changed
src/components/Settings.vue | changed |
src/components/Settings.vue | ||
---|---|---|
@@ -1,38 +1,25 @@ | ||
1 | 1 … | <template> |
2 | 2 … | <fieldset class="row"> |
3 | 3 … | <div class="col-sm-12"> |
4 | 4 … | <p> |
5 | - <h5>Private Identity</h5> | |
6 | - <div class="input-group"> | |
7 | - <span class="input-group-addon" id="identity-value"> | |
8 | - secret | |
9 | - </span> | |
10 | - <b-form-textarea class="form-control" | |
11 | - v-model.trim="identity.value" | |
12 | - @input="updateValue(identity.key, $event.target.value)" | |
13 | - placeholder="~/.ssb secret" | |
14 | - aria-label="~/.ssb secret" | |
15 | - aria-describedby="identity-value"> | |
16 | - </b-form-textarea> | |
17 | - </div> | |
18 | - </p> | |
5 … | + <h5>Private Identity</h5> | |
6 … | + <div class="input-group"> | |
7 … | + <span class="input-group-addon" id="identity-key">key</span> | |
8 … | + <input type="text" class="form-control" v-model.trim="identity.key" placeholder="~/.ssb secret localStorage key" aria-label="~/.ssb secret localStorage key" aria-describedby="identity-key"> | |
9 … | + <span class="input-group-addon" id="identity-value">value</span> | |
10 … | + <input type="text" class="form-control" v-model.trim="identity.value" @input="updateValue(identity.key, $event.target.value)" placeholder="~/.ssb secret" aria-label="~/.ssb secret" aria-describedby="identity-value"> | |
11 … | + </div> | |
12 … | + </p> | |
19 | 13 … | <p> |
20 | - <h5>Websocket URL</h5> | |
21 | - <div class="input-group"> | |
22 | - <span class="input-group-addon" id="remoteWebsocket-value"> | |
23 | - {{remoteWebsocket.key}} | |
24 | - </span> | |
25 | - <b-form-textarea class="form-control" | |
26 | - v-model.trim="remoteWebsocket.value" | |
27 | - @input="updateValue(remoteWebsocket.key, | |
28 | - $event.target.value)" | |
29 | - placeholder="websocket url" | |
30 | - aria-label="remoteWebsocket-value" | |
31 | - aria-describedby="remoteWebsocket-value"> | |
32 | - </b-form-textarea> | |
33 | - </div> | |
34 | - </p> | |
14 … | + <h5>Websocket URL</h5> | |
15 … | + <div class="input-group"> | |
16 … | + <span class="input-group-addon" id="remoteWebsocket-key">key</span> | |
17 … | + <input type="text" class="form-control" v-model.trim="remoteWebsocket.key" placeholder="remote websocket localStorage key" aria-label="remote websocket localStorage key" aria-describedby="identity-key"> | |
18 … | + <span class="input-group-addon" id="remoteWebsocket-value">value</span> | |
19 … | + <input type="text" class="form-control" v-model.trim="remoteWebsocket.value" @input="updateValue(remoteWebsocket.key, $event.target.value)" placeholder="websocket url" aria-label="remoteWebsocket-value" aria-describedby="remoteWebsocket-value"> | |
20 … | + </div> | |
21 … | + </p> | |
35 | 22 … | <p> |
36 | 23 … | A fresh keypair is generated automatically on first load. |
37 | 24 … | If you have an existing scuttleverse identity, you can paste it in above. |
38 | 25 … | </p> |
@@ -42,10 +29,10 @@ | ||
42 | 29 … | </p> |
43 | 30 … | <p> |
44 | 31 … | Be careful to never share the private part of the keypair with anyone. They could impersonate you! |
45 | 32 … | </p> |
46 | - </div> | |
47 | - </fieldset> | |
33 … | + </div> | |
34 … | + </fieldset> | |
48 | 35 … | </template> |
49 | 36 … | |
50 | 37 … | <script> |
51 | 38 … | export default { |
@@ -60,11 +47,11 @@ | ||
60 | 47 … | } |
61 | 48 … | }, |
62 | 49 … | created() { |
63 | 50 … | this.identity.value = |
64 | - localStorage["/.ssb/secret"] || 'the secret goes here' | |
51 … | + localStorage["/.ssb/secret"] || "the secret goes here" | |
65 | 52 … | this.remoteWebsocket.value = |
66 | - localStorage["remote"] || 'sbot ws.getAddress goes here' | |
53 … | + localStorage["remote"] || "sbot ws.getAddress goes here" | |
67 | 54 … | }, |
68 | 55 … | methods: { |
69 | 56 … | updateValue(key, value) { |
70 | 57 … | if(key === 'remote') { |
Built with git-ssb-web