Skip to content
Snippets Groups Projects
Commit 5a4788be authored by Otto Zaiser's avatar Otto Zaiser
Browse files

Agregando input de Enlance para copiar

parent 281daaba
No related branches found
No related tags found
No related merge requests found
<!DOCTYPE html><html lang=es><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=favicon.ico><link href="https://fonts.googleapis.com/css?family=Raleway:400,400i,700,700i" rel=stylesheet><link rel=stylesheet href=static/css/bootstrap.min.css><link rel=stylesheet href=static/css/style.css><link rel=stylesheet href=static/css/tsa2.css><title>Sello de Tiempo - Blockchain Federal Argentina</title><link href=tsa2.js rel=preload as=script></head><body><noscript><b>Lo sentimos pero el sello de tiempo no funciona sin JavaScript. Por favor, habilitalo para continuar.</b></noscript><nav id=navbar role=banner class="navbar navbar-default"><div class=container><div class=navbar-header><a class="logo navbar-btn pull-left" href=/ rel=home><img id=logo src=static/images/logo.svg alt="Blockchain Federal Argentina"></a></div></div></nav><main><div class=container><div class=tsa2><h1>Sello de Tiempo</h1><p>El servicio de Sello de Tiempo de BFA permite demostrar que el contenido de cualquier documento digital existió en un momento y que desde entonces, no ha cambiado. Al sellar un archivo, cualquiera podrá verificar el día y la hora en que su hash fue almacenado en Blockchain Federal Argentina. Tené en cuenta que el documento seleccionado nunca se sube a la red, garantizando su privacidad.</p><p class=font_small><a href=https://bfa.ar/sello>Si tenés un archivo con Recibo Digital (.rd) verificalo aquí</a></p><div id=app apiurl=http://200.108.146.180:3000 lb_00=" El archivo " lb_01=" fue enviado con éxito para ser sellado" lb_02="Se ha producido un error al intentar sellar " lb_03=" se encuentra sellado por: " lb_04=" en el bloque " lb_05="No se ha podido verificar el archivo " lb_06="Volver a Sellar o Verificar" lb_07=Cargando lb_08="Arrastrá archivos aquí<br>ó" lb_09="Seleccioná archivos <span class='sr-only'>para Sellar o Verificar</span>" lb_10="Nombre del archivo: " lb_11="Hash del archivo: " lb_12=Sellar lb_13=Verificar lb_14="Seleccionar otros archivos" lb_15=" Copiar URL de verificación"></div></div></div><script src=tsa2.js></script></main></body></html>
\ No newline at end of file
<!DOCTYPE html><html lang=es><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=favicon.ico><link href="https://fonts.googleapis.com/css?family=Raleway:400,400i,700,700i" rel=stylesheet><link rel=stylesheet href=static/css/bootstrap.min.css><link rel=stylesheet href=static/css/style.css><link rel=stylesheet href=static/css/tsa2.css><title>Sello de Tiempo - Blockchain Federal Argentina</title><link href=tsa2.js rel=preload as=script></head><body><noscript><b>Lo sentimos pero el sello de tiempo no funciona sin JavaScript. Por favor, habilitalo para continuar.</b></noscript><nav id=navbar role=banner class="navbar navbar-default"><div class=container><div class=navbar-header><a class="logo navbar-btn pull-left" href=/ rel=home><img id=logo src=static/images/logo.svg alt="Blockchain Federal Argentina"></a></div></div></nav><main><div class=container><div class=tsa2><h1>Sello de Tiempo</h1><p>El servicio de Sello de Tiempo de BFA permite demostrar que el contenido de cualquier documento digital existió en un momento y que desde entonces, no ha cambiado. Al sellar un archivo, cualquiera podrá verificar el día y la hora en que su hash fue almacenado en Blockchain Federal Argentina. Tené en cuenta que el documento seleccionado nunca se sube a la red, garantizando su privacidad.</p><p class=font_small><a href=https://bfa.ar/sello>Si tenés un archivo con Recibo Digital (.rd) verificalo aquí</a></p><div id=app apiurl=http://200.108.146.180:3000 lb_00=" El archivo " lb_01=" fue enviado con éxito para ser sellado" lb_02="Se ha producido un error al intentar sellar " lb_03=" se encuentra sellado por: " lb_04=" en el bloque " lb_05="No se ha podido verificar el archivo " lb_06="Volver a Sellar o Verificar" lb_07=Cargando lb_08="Arrastrá archivos aquí<br>ó" lb_09="Seleccioná archivos <span class='sr-only'>para Sellar o Verificar</span>" lb_10="Nombre del archivo: " lb_11="Hash del archivo: " lb_12=Sellar lb_13=Verificar lb_14="Seleccionar otros archivos" lb_15=" Copiar" lb_16="Enlace de verificación"></div></div></div><script src=tsa2.js></script></main></body></html>
\ No newline at end of file
source diff could not be displayed: it is too large. Options to address this: view the blob.
This diff is collapsed.
......@@ -48,7 +48,9 @@
lb_12="Sellar"
lb_13="Verificar"
lb_14="Seleccionar otros archivos"
lb_15=" Copiar URL de verificación"
lb_15=" Copiar"
lb_16="Enlace de verificación"
></div>
</div>
</div>
......
......@@ -14,10 +14,18 @@
<p><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> <span v-html="lb_00"></span> <b>{{value.fileName}}</b> <span v-html="lb_03"></span></p>
<ul>
<li v-for="(stamp, index) in value.stamps" :key="index">
<b>{{ stamp.whostamped }}</b> <span v-html="lb_04"></span> <b>{{ stamp.blocknumber }}</b> {{ convertTime(stamp.blocktimestamp) }}
<span class="hash"><b>{{ stamp.whostamped }}</b></span> <span v-html="lb_04"></span> <b>{{ stamp.blocknumber }}</b> {{ convertTime(stamp.blocktimestamp) }}
</li>
</ul>
<p><button class="btn btn-default btn-sm copiar" v-on:click="copiarURL(index)"><span class="glyphicon glyphicon-copy text-success" aria-hidden="true"></span> <span v-html="lb_15"></span></button></p>
<div class="copiar">
<div class="input-group">
<label class="sr-only" v-html="lb_16"></label>
<input class="form-control input-sm" type="textfield" readonly :value="getHashURL(index)" :id="'id_'+index" >
<span class="input-group-btn">
<button class="btn btn-default btn-sm" v-on:click="copiarURL(index)"><span class="glyphicon glyphicon-copy text-success" aria-hidden="true"></span> <span v-html="lb_15"></span></button>
</span>
</div>
</div>
</div>
<div v-else class="fail-verify alert alert-danger" role="alert" >
<p><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> <span v-html="lb_05"></span> <b>{{value.fileName}}</b></p>
......@@ -28,13 +36,20 @@
<div v-if="state=='verified'" class="success-verify alert alert-success" role="alert">
<p><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> <span v-html="this.lb_00"></span> <b>{{archivo}}</b> <span v-html="this.lb_03"></span></p>
<ul>
<li v-for="stamp in stamps" v-bind:key="stamp.whostamped">
<b>{{ stamp.whostamped }}</b> <span v-html="lb_04"></span> <b>{{ stamp.blocknumber }}</b> {{ convertTime(stamp.blocktimestamp) }}
<li v-for="(stamp, index) in stamps" :key="index">
<span class="hash"><b>{{ stamp.whostamped }}</b></span> <span v-html="lb_04"></span> <b>{{ stamp.blocknumber }}</b> {{ convertTime(stamp.blocktimestamp) }}
</li>
</ul>
<p><button class="btn btn-default btn-sm copiar" v-on:click="copiarCurrentURL"><span class="glyphicon glyphicon-copy text-success" aria-hidden="true"></span> <span v-html="lb_15"></span></button></p>
<div class="copiar">
<div class="input-group">
<label class="sr-only" v-html="lb_16"></label>
<input class="form-control input-sm" type="textfield" readonly :value="getHashURL(null)" id="id_single">
<span class="input-group-btn">
<button class="btn btn-default btn-sm" v-on:click="copiarURL(null)"><span class="glyphicon glyphicon-copy text-success" aria-hidden="true"></span> <span v-html="lb_15"></span></button>
</span>
</div>
</div>
</div>
<div v-if="state=='failed-verification'" class="fail-verify alert alert-danger">
<p><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> <span v-html="this.lb_05"></span> <b>{{archivo}}</b></p>
</div>
......@@ -84,7 +99,8 @@
'lb_12',
'lb_13',
'lb_14',
'lb_15'
'lb_15',
'lb_16'
],
computed: {
hash () {
......@@ -125,17 +141,27 @@
},
onFilename (value) {
this.archivo = value
},
getHashURL(index){
var url;
if (index == null){
url = window.location.href;
}else{
url = window.location.href+'hash/'+this.allFiles[index].hash;
}
return url;
},
copiarURL(index){
this.copiar(window.location.href+'hash/'+this.allFiles[index].hash);
},
copiarCurrentURL(){
this.copiar(window.location.href);
if (index == null){
// this.copiar(window.location.href);
this.copiar('id_single');
}else{
// this.copiar(window.location.href+'hash/'+this.allFiles[index].hash);
this.copiar('id_'+index);
}
},
copiar(t){
var copyText = document.createElement("textarea");
copyText.value = t;
document.body.appendChild(copyText);
copiar(id){
var copyText = document.getElementById(id);
copyText.focus();
/* Select the text field */
copyText.select();
......@@ -143,7 +169,6 @@
/* Copy the text inside the text field */
document.execCommand("copy");
//console.log("Copied the text: " + copyText.value);
document.body.removeChild(copyText);
},
convertTime(timestamp){
var date = new Date(timestamp*1000)
......
......@@ -39,6 +39,7 @@ new Vue({
lb_13: this.$el.attributes.lb_13.value,
lb_14: this.$el.attributes.lb_14.value,
lb_15: this.$el.attributes.lb_15.value,
lb_16: this.$el.attributes.lb_16.value,
}
})
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment