Finish up Hook
This commit is contained in:
parent
835150578f
commit
1ad95b6de7
4 changed files with 18 additions and 5 deletions
|
@ -67,10 +67,13 @@ export default {
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
var component = this;
|
var component = this;
|
||||||
EventBus.$on('file-uploaded', function(txhash) {
|
EventBus.$on('HookFileUploaded', function(txhash) {
|
||||||
component.txhash = txhash;
|
component.txhash = txhash;
|
||||||
component.uploadDialog = true;
|
component.uploadDialog = true;
|
||||||
});
|
});
|
||||||
|
EventBus.$on('HookStepUpdate', function(step) {
|
||||||
|
component.activeStep = step;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
name: 'Hook'
|
name: 'Hook'
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<v-flex xs12 v-if="jsonData">
|
<v-flex xs12 v-if="jsonData">
|
||||||
<p class="subheading">Success! Here is the response for <strong>lbry://{{ address }}</strong>:</p>
|
<p class="subheading">Success! Here is the response for <strong>lbry://{{ address }}</strong>:</p>
|
||||||
<pre v-highlightjs="jsonData" class="json-example"><code class="json"></code></pre>
|
<pre v-highlightjs="jsonData" class="json-example"><code class="json"></code></pre>
|
||||||
<v-btn large v-on:click="$router.push('step-2')" class="mt-3">Go to next step</v-btn>
|
<v-btn large v-on:click="goTo(2)" class="mt-3">Go to next step</v-btn>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
<template v-if="!isLoading && !jsonData">
|
<template v-if="!isLoading && !jsonData">
|
||||||
<v-flex xs12>
|
<v-flex xs12>
|
||||||
|
@ -80,6 +80,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import EventBus from '../event-bus';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
@ -104,6 +106,9 @@ export default {
|
||||||
var component = this;
|
var component = this;
|
||||||
component.address = address;
|
component.address = address;
|
||||||
component.fetchMetadata();
|
component.fetchMetadata();
|
||||||
|
},
|
||||||
|
goTo (page) {
|
||||||
|
EventBus.$emit('HookStepUpdate', page);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
name: 'Step1'
|
name: 'Step1'
|
||||||
|
|
|
@ -105,7 +105,7 @@ export default {
|
||||||
},
|
},
|
||||||
submit () {
|
submit () {
|
||||||
// TODO: Do the upload
|
// TODO: Do the upload
|
||||||
EventBus.$emit('file-uploaded', 'txhashhere');
|
EventBus.$emit('HookFileUploaded', 'txhashhere');
|
||||||
},
|
},
|
||||||
imagesLoaded (instance) {
|
imagesLoaded (instance) {
|
||||||
var component = this;
|
var component = this;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<h1 class="display-2">Support your favorite content creators with LBRY</h1>
|
<h1 class="display-2">Support your favorite content creators with LBRY</h1>
|
||||||
<p class="subheading">Send LBRY coins to claim addresses and the owner will receive it in their wallet.</p>
|
<p class="subheading">Send LBRY coins to claim addresses and the owner will receive it in their wallet.</p>
|
||||||
<p class="subheading">To send LBC to someone, you need either their wallet address or claim ID.<br/>
|
<p class="subheading">To send LBC to someone, you need either their wallet address or claim ID.<br/>
|
||||||
You can get claim ID's by using resolve method in <router-link to="/">the first step</router-link><br/>
|
You can get claim ID's by using resolve method in <a href="#" v-on:click.stop="goTo(1)">the first step</a><br/>
|
||||||
Or you can use the examples below.</p>
|
Or you can use the examples below.</p>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
<v-flex xs12 sm8>
|
<v-flex xs12 sm8>
|
||||||
|
@ -88,6 +88,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import EventBus from '../event-bus';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
@ -99,7 +101,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
send: function() {
|
send () {
|
||||||
var component = this;
|
var component = this;
|
||||||
component.jsonData = '';
|
component.jsonData = '';
|
||||||
component.isLoading = true;
|
component.isLoading = true;
|
||||||
|
@ -113,6 +115,9 @@ export default {
|
||||||
var component = this;
|
var component = this;
|
||||||
component.address = address;
|
component.address = address;
|
||||||
component.send();
|
component.send();
|
||||||
|
},
|
||||||
|
goTo (page) {
|
||||||
|
EventBus.$emit('HookStepUpdate', page);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
name: 'Step3'
|
name: 'Step3'
|
||||||
|
|
Loading…
Reference in a new issue