mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2024-11-19 18:11:30 +01:00
aef01e2566
Ideally, these need to be moved to the lnfaucet template
327 lines
9.1 KiB
HTML
327 lines
9.1 KiB
HTML
<!DOCTYPE html>
|
|
<html style="background-color:grey;">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<title>LNBits Wallet</title>
|
|
<meta
|
|
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
|
|
name="viewport"
|
|
/>
|
|
<!-- Bootstrap 3.3.2 -->
|
|
<link
|
|
rel="stylesheet"
|
|
media="screen"
|
|
href="{{ url_for('static', filename='bootstrap/css/bootstrap.min.css') }}"
|
|
/>
|
|
<!-- FontAwesome 4.3.0 -->
|
|
<link
|
|
href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"
|
|
rel="stylesheet"
|
|
type="text/css"
|
|
/>
|
|
<!-- Ionicons 2.0.0 -->
|
|
<link
|
|
href="http://code.ionicframework.com/ionicons/2.0.0/css/ionicons.min.css"
|
|
rel="stylesheet"
|
|
type="text/css"
|
|
/>
|
|
|
|
<!-- Theme style -->
|
|
<link
|
|
rel="stylesheet"
|
|
media="screen"
|
|
href="{{ url_for('static', filename='dist/css/AdminLTE.min.css') }}"
|
|
/>
|
|
<!-- AdminLTE Skins. Choose a skin from the css/skins
|
|
folder instead of downloading all of them to reduce the load. -->
|
|
|
|
<link
|
|
rel="stylesheet"
|
|
media="screen"
|
|
href="{{ url_for('static', filename='dist/css/skins/_all-skins.min.css') }}"
|
|
/>
|
|
|
|
<!-- iCheck -->
|
|
<link
|
|
rel="stylesheet"
|
|
media="screen"
|
|
href="{{ url_for('static', filename='plugins/iCheck/flat/blue.css') }}"
|
|
/>
|
|
|
|
<!-- Morris chart -->
|
|
<link
|
|
rel="stylesheet"
|
|
media="screen"
|
|
href="{{ url_for('static', filename='plugins/morris/morris.css') }}"
|
|
/>
|
|
|
|
<!-- jvectormap -->
|
|
<link
|
|
rel="stylesheet"
|
|
media="screen"
|
|
href="{{ url_for('static', filename='plugins/jvectormap/jquery-jvectormap-1.2.2.css') }}"
|
|
/>
|
|
|
|
<!-- Date Picker -->
|
|
<link
|
|
rel="stylesheet"
|
|
media="screen"
|
|
href="{{ url_for('static', filename='plugins/datepicker/datepicker3.css') }}"
|
|
/>
|
|
|
|
<!-- Daterange picker -->
|
|
<link
|
|
rel="stylesheet"
|
|
media="screen"
|
|
href="{{ url_for('static', filename='plugins/daterangepicker/daterangepicker-bs3.css') }}"
|
|
/>
|
|
|
|
<!-- bootstrap wysihtml5 - text editor -->
|
|
<link
|
|
rel="stylesheet"
|
|
media="screen"
|
|
href="{{ url_for('static', filename='plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') }}"
|
|
/>
|
|
|
|
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
|
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
|
<!--[if lt IE 9]>
|
|
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
|
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
|
|
<![endif]-->
|
|
|
|
<style>
|
|
.small-box > .small-box-footer {
|
|
text-align: left;
|
|
padding-left: 10px;
|
|
}
|
|
|
|
#loadingMessage {
|
|
text-align: center;
|
|
padding: 40px;
|
|
background-color: #eee;
|
|
}
|
|
|
|
#canvas {
|
|
width: 100%;
|
|
}
|
|
|
|
#output {
|
|
margin-top: 20px;
|
|
background: #eee;
|
|
padding: 10px;
|
|
padding-bottom: 0;
|
|
}
|
|
|
|
#output div {
|
|
padding-bottom: 10px;
|
|
word-wrap: break-word;
|
|
}
|
|
|
|
#noQRFound {
|
|
text-align: center;
|
|
}
|
|
.layout-boxed {
|
|
background: white;
|
|
}
|
|
</style>
|
|
|
|
<!-- jQuery 2.1.3 -->
|
|
<script src="{{ url_for('static', filename='plugins/jQuery/jQuery-2.1.3.min.js') }}"></script>
|
|
<!-- jQuery UI 1.11.2 -->
|
|
<script
|
|
src="http://code.jquery.com/ui/1.11.2/jquery-ui.min.js"
|
|
type="text/javascript"
|
|
></script>
|
|
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
|
|
<script>
|
|
$.widget.bridge('uibutton', $.ui.button)
|
|
</script>
|
|
<!-- Bootstrap 3.3.2 JS -->
|
|
<script
|
|
src="{{ url_for('static', filename='bootstrap/js/bootstrap.min.js') }}"
|
|
type="text/javascript"
|
|
></script>
|
|
<!-- Morris.js charts -->
|
|
<script src="http://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
|
|
<script
|
|
src="{{ url_for('static', filename='plugins/morris/morris.min.js') }}"
|
|
type="text/javascript"
|
|
></script>
|
|
<!-- Sparkline -->
|
|
<script
|
|
src="{{ url_for('static', filename='plugins/sparkline/jquery.sparkline.min.js') }}"
|
|
type="text/javascript"
|
|
></script>
|
|
<!-- jvectormap -->
|
|
<script
|
|
src="{{ url_for('static', filename='plugins/jvectormap/jquery-jvectormap-1.2.2.min.js') }}"
|
|
type="text/javascript"
|
|
></script>
|
|
<script
|
|
src="{{ url_for('static', filename='plugins/jvectormap/jquery-jvectormap-world-mill-en.js') }}"
|
|
type="text/javascript"
|
|
></script>
|
|
<!-- jQuery Knob Chart -->
|
|
<script
|
|
src="{{ url_for('static', filename='plugins/knob/jquery.knob.js') }}"
|
|
type="text/javascript"
|
|
></script>
|
|
<!-- daterangepicker -->
|
|
<script
|
|
src="{{ url_for('static', filename='plugins/daterangepicker/daterangepicker.js') }}"
|
|
type="text/javascript"
|
|
></script>
|
|
<!-- datepicker -->
|
|
<script
|
|
src="{{ url_for('static', filename='plugins/datepicker/bootstrap-datepicker.js') }}"
|
|
type="text/javascript"
|
|
></script>
|
|
<!-- Bootstrap WYSIHTML5 -->
|
|
<script
|
|
src="{{ url_for('static', filename='plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js') }}"
|
|
type="text/javascript"
|
|
></script>
|
|
<!-- iCheck -->
|
|
<script
|
|
src="{{ url_for('static', filename='plugins/iCheck/icheck.min.js') }}"
|
|
type="text/javascript"
|
|
></script>
|
|
<!-- Slimscroll -->
|
|
<script
|
|
src="{{ url_for('static', filename='plugins/slimScroll/jquery.slimscroll.min.js') }}"
|
|
type="text/javascript"
|
|
></script>
|
|
<!-- FastClick -->
|
|
<script src="{{ url_for('static', filename='plugins/fastclick/fastclick.min.js') }}"></script>
|
|
<!-- AdminLTE App -->
|
|
<script
|
|
src="{{ url_for('static', filename='dist/js/app.min.js') }}"
|
|
type="text/javascript"
|
|
></script>
|
|
|
|
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
|
|
<script
|
|
src="{{ url_for('static', filename='dist/js/pages/dashboard.js') }}"
|
|
type="text/javascript"
|
|
></script>
|
|
|
|
<!-- AdminLTE for demo purposes -->
|
|
<script
|
|
src="{{ url_for('static', filename='dist/js/demo.js') }}"
|
|
type="text/javascript"
|
|
></script>
|
|
|
|
<script
|
|
src="{{ url_for('static', filename='plugins/datatables/jquery.dataTables.js') }}"
|
|
type="text/javascript"
|
|
></script>
|
|
<link
|
|
rel="stylesheet"
|
|
href="//cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.css"
|
|
/>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.min.js"></script>
|
|
<script
|
|
src="{{ url_for('static', filename='plugins/jscam/JS.js') }}"
|
|
type="text/javascript"
|
|
></script>
|
|
<script
|
|
src="{{ url_for('static', filename='plugins/jscam/qrcode.min.js') }}"
|
|
type="text/javascript"
|
|
></script>
|
|
<script
|
|
src="{{ url_for('static', filename='plugins/bolt11/decoder.js') }}"
|
|
type="text/javascript"
|
|
></script>
|
|
<script
|
|
src="{{ url_for('static', filename='plugins/bolt11/utils.js') }}"
|
|
type="text/javascript"
|
|
></script>
|
|
</head>
|
|
<body class="skin-white layout-boxed sidebar-collapse sidebar-open">
|
|
<div class="wrapper">
|
|
|
|
<style>
|
|
body {
|
|
width: 210mm;
|
|
/* to centre page on screen*/
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
background-color:white;
|
|
}
|
|
.layout-boxed .wrapper {
|
|
box-shadow: none;
|
|
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div id="allqrs"></div>
|
|
|
|
|
|
</body>
|
|
|
|
<script>
|
|
function getAjax(url, thekey, success) {
|
|
var xhr = window.XMLHttpRequest
|
|
? new XMLHttpRequest()
|
|
: new ActiveXObject('Microsoft.XMLHTTP')
|
|
xhr.open('GET', url, true)
|
|
xhr.onreadystatechange = function() {
|
|
if (xhr.readyState > 3 && xhr.status == 200) {
|
|
success(xhr.responseText)
|
|
}
|
|
}
|
|
xhr.setRequestHeader('Grpc-Metadata-macaroon', thekey)
|
|
xhr.setRequestHeader('Content-Type', 'application/json')
|
|
|
|
xhr.send()
|
|
return xhr
|
|
}
|
|
|
|
window.user_fau = {{ user_fau | megajson | safe }}
|
|
|
|
|
|
function drawwithdraw(data, id) {
|
|
|
|
new QRCode(document.getElementById(id), {
|
|
text: data,
|
|
width: 120,
|
|
height: 120,
|
|
colorDark: '#000000',
|
|
colorLight: '#ffffff',
|
|
correctLevel: QRCode.CorrectLevel.M
|
|
} )
|
|
|
|
|
|
}
|
|
lnurlar = {{ lnurlar|tojson }}
|
|
lnurlamt = user_fau["inc"]
|
|
console.log(user_fau)
|
|
allqr = ""
|
|
|
|
for (i = 0; i < lnurlamt; i++) {
|
|
allqr += "<div style='float:left;padding:20px; background-image: url(/static/note.jpg); width: 500px;height: 248px;'><div style='width:120px;float:right;margin-top:-16px;margin-right:-19px;background-color: white;'><div id='qrcode" + i + "'></div><center><p>{{user_fau[7]}} FREE SATS! <br/> <small style='font-size: 52%;'>SCAN AND FOLLOW LINK OR<br/>USE LN BITCOIN WALLET</small></p></center></div></div>"
|
|
}
|
|
|
|
document.getElementById("allqrs").innerHTML = allqr
|
|
|
|
if (typeof lnurlar[1] != 'undefined'){
|
|
for (i = 0; i < lnurlamt; i++) {
|
|
drawwithdraw(lnurlar[i], "qrcode" + i)
|
|
}
|
|
window.print()
|
|
}
|
|
else{
|
|
for (i = 0; i < lnurlamt; i++) {
|
|
drawwithdraw(lnurlar[0], "qrcode" + i)
|
|
}
|
|
window.print()
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
</html> |