2018-03-23 12:53:54 +01:00
|
|
|
<template>
|
2018-05-09 21:13:03 +02:00
|
|
|
<div id="hook">
|
|
|
|
<div id="hook-navigation">
|
|
|
|
<div class="step">
|
2018-04-20 15:17:16 +02:00
|
|
|
<a href="#" v-on:click="activeStep = 1" v-bind:class="{active: (activeStep==1)}">
|
2018-05-09 21:13:03 +02:00
|
|
|
<span class="number">1</span>
|
2018-03-23 12:53:54 +01:00
|
|
|
Resolve a claim
|
2018-04-20 15:17:16 +02:00
|
|
|
</a>
|
2018-05-09 21:13:03 +02:00
|
|
|
</div>
|
|
|
|
<div class="step">
|
2018-04-20 15:17:16 +02:00
|
|
|
<a href="#" v-on:click="activeStep = 2" v-bind:class="{active: (activeStep==2)}">
|
2018-05-09 21:13:03 +02:00
|
|
|
<span class="number">2</span>
|
2018-03-23 12:53:54 +01:00
|
|
|
Publish content
|
2018-04-20 15:17:16 +02:00
|
|
|
</a>
|
2018-05-09 21:13:03 +02:00
|
|
|
</div>
|
|
|
|
<div class="step">
|
2018-04-20 15:17:16 +02:00
|
|
|
<a href="#" v-on:click="activeStep = 3" v-bind:class="{active: (activeStep==3)}">
|
2018-05-09 21:13:03 +02:00
|
|
|
<span class="number">3</span>
|
2018-03-23 12:53:54 +01:00
|
|
|
Support with LBC
|
2018-04-20 15:17:16 +02:00
|
|
|
</a>
|
2018-05-09 21:13:03 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
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-03-23 12:53:54 +01:00
|
|
|
<v-dialog v-model="uploadDialog" hide-overlay persistent width="30rem">
|
|
|
|
<v-card>
|
|
|
|
<template v-if="confirmed">
|
|
|
|
<v-card-title class="headline">Your image has been published!</v-card-title>
|
|
|
|
<v-card-text><a v-bind:href="'https://explorer.lbry.io/tx/' + txhash" target="_blank">Check out your content on the LBRY blockchain explorer</a></v-card-text>
|
|
|
|
<v-card-actions>
|
|
|
|
<v-btn v-on:click="uploadDialog = false" flat>Dismiss this dialog</v-btn>
|
|
|
|
</v-card-actions>
|
|
|
|
</template>
|
|
|
|
<template v-else>
|
|
|
|
<v-card-title class="headline"><v-progress-circular indeterminate color="primary"></v-progress-circular> Waiting for confirmations...</v-card-title>
|
|
|
|
<v-card-text>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 mean time, go ahead and try the other steps!</v-card-text>
|
|
|
|
</template>
|
|
|
|
</v-card>
|
|
|
|
</v-dialog>
|
2018-05-09 21:13:03 +02:00
|
|
|
</div>
|
2018-03-23 12:53:54 +01:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
2018-05-07 11:04:54 +02:00
|
|
|
import Vue from 'vue'
|
|
|
|
import VueHighlightJS from 'vue-highlightjs'
|
|
|
|
|
2018-04-20 15:17:16 +02:00
|
|
|
import EventBus from '../event-bus';
|
2018-03-23 12:53:54 +01:00
|
|
|
|
2018-05-07 11:04:54 +02:00
|
|
|
Vue.use(VueHighlightJS)
|
|
|
|
|
2018-03-23 12:53:54 +01:00
|
|
|
export default {
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
uploadDialog: false,
|
|
|
|
txhash: '',
|
2018-04-20 15:17:16 +02:00
|
|
|
confirmed: false,
|
|
|
|
activeStep: 1
|
2018-03-23 12:53:54 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
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) {
|
2018-03-23 12:53:54 +01:00
|
|
|
component.txhash = txhash;
|
|
|
|
component.uploadDialog = true;
|
|
|
|
});
|
2018-04-27 12:30:56 +02:00
|
|
|
EventBus.$on('HookStepUpdate', function(step) {
|
|
|
|
component.activeStep = step;
|
|
|
|
});
|
2018-03-23 12:53:54 +01:00
|
|
|
},
|
|
|
|
name: 'Hook'
|
2018-05-09 21:13:03 +02:00
|
|
|
};
|
2018-03-23 12:53:54 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
2018-04-20 15:17:16 +02:00
|
|
|
@import '../scss/variables';
|
2018-03-23 12:53:54 +01:00
|
|
|
|
2018-04-20 15:17:16 +02:00
|
|
|
@import '../../node_modules/highlight.js/styles/monokai-sublime';
|
2018-03-23 12:53:54 +01:00
|
|
|
|
|
|
|
.dialog__content {
|
|
|
|
align-items: flex-end !important;
|
|
|
|
justify-content: right !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
#hook {
|
2018-04-17 12:24:56 +02:00
|
|
|
background: url(https://lbry.io/img/youtube/hero@2x.jpg) no-repeat center center;
|
|
|
|
background-size: cover;
|
2018-03-23 12:53:54 +01:00
|
|
|
color: $text-color;
|
2018-05-09 21:13:03 +02:00
|
|
|
text-align: center;
|
|
|
|
h1,
|
|
|
|
h2,
|
|
|
|
h3,
|
|
|
|
h4,
|
|
|
|
h5,
|
|
|
|
p {
|
2018-04-17 12:24:56 +02:00
|
|
|
color: white;
|
|
|
|
text-shadow: 0px 0px 1rem rgba(0,0,0,0.5);
|
|
|
|
a {
|
|
|
|
color: white;
|
|
|
|
}
|
|
|
|
}
|
2018-05-09 21:13:03 +02:00
|
|
|
input[type='text'] {
|
|
|
|
background: white;
|
|
|
|
padding: 0.5rem 0.5rem;
|
|
|
|
}
|
|
|
|
pre {
|
|
|
|
text-align: left;
|
|
|
|
}
|
2018-04-17 12:24:56 +02:00
|
|
|
.flex {
|
|
|
|
margin-bottom: 2rem;
|
|
|
|
}
|
2018-05-09 21:13:03 +02:00
|
|
|
.loader {
|
|
|
|
border: 16px solid #f3f3f3; /* Light grey */
|
|
|
|
border-top: 16px solid #3498db; /* Blue */
|
|
|
|
border-radius: 50%;
|
|
|
|
width: 120px;
|
|
|
|
height: 120px;
|
|
|
|
animation: spin 2s linear infinite;
|
|
|
|
}
|
|
|
|
.card {
|
|
|
|
width: 20%;
|
|
|
|
display: inline-block;
|
|
|
|
vertical-align: top;
|
|
|
|
background: white;
|
|
|
|
box-shadow: 0 0 5px 5px rgba(0,0,0,0.2);
|
|
|
|
margin: 0 2.5%;
|
|
|
|
img {
|
|
|
|
width: 100%;
|
|
|
|
height: 6rem;
|
|
|
|
object-fit: cover;
|
|
|
|
}
|
|
|
|
}
|
2018-03-23 12:53:54 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#hook-navigation {
|
2018-04-17 12:24:56 +02:00
|
|
|
margin-bottom: 1.5rem;
|
2018-03-23 12:53:54 +01:00
|
|
|
a {
|
|
|
|
text-decoration: none;
|
|
|
|
color: $text-color;
|
|
|
|
}
|
2018-04-20 15:17:16 +02:00
|
|
|
.active {
|
2018-03-23 12:53:54 +01:00
|
|
|
font-weight: bold;
|
|
|
|
.btn {
|
|
|
|
background: $primary-color !important;
|
|
|
|
color: white !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-09 21:13:03 +02:00
|
|
|
@keyframes spin {
|
|
|
|
0% { transform: rotate(0deg); }
|
|
|
|
100% { transform: rotate(360deg); }
|
|
|
|
}
|
|
|
|
|
2018-03-23 12:53:54 +01:00
|
|
|
</style>
|