lbry.tech/content/.vuepress/components/Hook.vue

90 lines
2.7 KiB
Vue
Raw Normal View History

<template>
2018-05-11 20:01:39 +02:00
<div class="hook" id="hook">
<nav class="hook__navigation" id="hook-navigation">
<div class="inner-wrap">
<a href="#" v-on:click.prevent="activeStep = 1" class="hook__navigation__step" v-bind:class="{active: (activeStep==1)}">
2018-05-09 21:13:03 +02:00
<span class="number">1</span>
Resolve a claim
2018-04-20 15:17:16 +02:00
</a>
2018-05-11 20:01:39 +02:00
<a href="#" v-on:click.prevent="activeStep = 2" class="hook__navigation__step" v-bind:class="{active: (activeStep==2)}">
2018-05-09 21:13:03 +02:00
<span class="number">2</span>
Publish content
2018-04-20 15:17:16 +02:00
</a>
2018-05-11 20:01:39 +02:00
<a href="#" v-on:click.prevent="activeStep = 3" class="hook__navigation__step" v-bind:class="{active: (activeStep==3)}">
2018-05-09 21:13:03 +02:00
<span class="number">3</span>
Support with LBC
2018-04-20 15:17:16 +02:00
</a>
2018-05-09 21:13:03 +02:00
</div>
2018-05-11 20:01:39 +02:00
</nav>
2018-04-20 15:17:16 +02:00
<Step1 v-if="activeStep == 1"></Step1>
<Step2 v-if="activeStep == 2"></Step2>
<Step3 v-if="activeStep == 3"></Step3>
2018-05-11 20:01:39 +02:00
2018-05-10 10:25:47 +02:00
<div class="modal" v-model="uploadDialog" v-if="uploadDialog != false">
<template v-if="confirmed">
<h3>Your image has been published!</h3>
<p><a v-bind:href="'https://explorer.lbry.io/tx/' + txhash" target="_blank">Check out your content on the LBRY blockchain explorer</a></p>
<a href="#" class="__button-black" v-on:click="uploadDialog = false">Dismiss this dialog</a>
</template>
2018-05-11 20:01:39 +02:00
2018-05-10 10:25:47 +02:00
<template v-else>
2018-05-11 20:01:39 +02:00
<h3><div class="loader small"></div>&nbsp;Waiting for confirmation...</h3>
<p>Your image was uploaded to the LBRY network but we are currently waiting for the first confirmation. This should take just a few minutes. In the meantime, go ahead and try the other steps!</p>
2018-05-10 10:25:47 +02:00
</template>
</div>
2018-05-09 21:13:03 +02:00
</div>
</template>
<script>
2018-05-07 11:04:54 +02:00
import Vue from 'vue'
2018-04-20 15:17:16 +02:00
import EventBus from '../event-bus';
export default {
data () {
return {
uploadDialog: false,
txhash: '',
2018-04-20 15:17:16 +02:00
confirmed: false,
activeStep: 1
}
},
watch: {
uploadDialog: function() {
var component = this;
if(this.uploadDialog) {
// Simulate confirmation
setTimeout(function() {
component.confirmed = true;
}, 10000)
}
}
},
created () {
var component = this;
2018-04-27 12:30:56 +02:00
EventBus.$on('HookFileUploaded', function(txhash) {
component.txhash = txhash;
component.uploadDialog = true;
});
2018-04-27 12:30:56 +02:00
EventBus.$on('HookStepUpdate', function(step) {
component.activeStep = step;
});
},
name: 'Hook'
2018-05-09 21:13:03 +02:00
};
</script>
<style lang="scss">
2018-05-30 11:20:33 +02:00
@import "../../../node_modules/highlight.js/styles/monokai-sublime";
2018-05-11 20:01:39 +02:00
@import "../scss/init/colors";
@import "../scss/init/extends";
@import "../scss/init/mixins";
2018-05-11 21:06:43 +02:00
@import "../scss/partials/animation";
2018-05-11 20:01:39 +02:00
@import "../scss/pages/page";
@import "../scss/pages/hook";
</style>