git ssb

3+

dangerousbeans / scuttle-vue



Commit dddeb7fb98e0194b937bf2f3b00e5562f55b6c7c

rewind to previous code - localStorage wasn't being written to

Jolyon committed on 11/18/2017, 7:14:26 AM
Parent: abe6aa04afdbe964c7cafbf65516ebf7a4cef7b3

Files changed

src/components/Settings.vuechanged
src/components/Settings.vueView
@@ -1,38 +1,25 @@
11 <template>
22 <fieldset class="row">
33 <div class="col-sm-12">
44 <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>
1913 <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>
3522 <p>
3623 A fresh keypair is generated automatically on first load.
3724 If you have an existing scuttleverse identity, you can paste it in above.
3825 </p>
@@ -42,10 +29,10 @@
4229 </p>
4330 <p>
4431 Be careful to never share the private part of the keypair with anyone. They could impersonate you!
4532 </p>
46- </div>
47- </fieldset>
33 + </div>
34 + </fieldset>
4835 </template>
4936
5037 <script>
5138 export default {
@@ -60,11 +47,11 @@
6047 }
6148 },
6249 created() {
6350 this.identity.value =
64- localStorage["/.ssb/secret"] || 'the secret goes here'
51 + localStorage["/.ssb/secret"] || "the secret goes here"
6552 this.remoteWebsocket.value =
66- localStorage["remote"] || 'sbot ws.getAddress goes here'
53 + localStorage["remote"] || "sbot ws.getAddress goes here"
6754 },
6855 methods: {
6956 updateValue(key, value) {
7057 if(key === 'remote') {

Built with git-ssb-web