firewalletbrowser/templates/send.html

128 lines
8.8 KiB
HTML
Raw Normal View History

2023-12-28 16:04:45 +11:00
<!DOCTYPE html>
<html data-bs-theme="dark" lang="en">
2023-12-28 16:04:45 +11:00
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<title>Send - FireWallet</title>
<link rel="icon" type="image/png" sizes="900x768" href="/assets/img/favicon.png">
<link rel="icon" type="image/png" sizes="900x768" href="/assets/img/favicon.png">
<link rel="icon" type="image/png" sizes="900x768" href="/assets/img/favicon.png">
<link rel="icon" type="image/png" sizes="900x768" href="/assets/img/favicon.png">
<link rel="icon" type="image/png" sizes="900x768" href="/assets/img/favicon.png">
<link rel="stylesheet" href="/assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i&amp;display=swap">
<link rel="stylesheet" href="/assets/fonts/fontawesome-all.min.css">
2023-12-28 16:58:11 +11:00
<link rel="stylesheet" href="/assets/fonts/material-icons.min.css">
2023-12-28 18:04:38 +11:00
<link rel="stylesheet" href="/assets/css/styles.min.css">
2023-12-28 16:04:45 +11:00
</head>
<body id="page-top">
<div id="wrapper">
<nav class="navbar align-items-start sidebar sidebar-dark accordion bg-gradient-primary p-0 navbar-dark toggled" style="background: var(--bs-primary-border-subtle);">
2023-12-28 16:32:20 +11:00
<div class="container-fluid d-flex flex-column p-0"><a class="navbar-brand d-flex justify-content-center align-items-center sidebar-brand m-0" href="/">
2023-12-28 16:04:45 +11:00
<div class="sidebar-brand-icon"><img src="/assets/img/favicon.png" width="44"></div>
<div class="sidebar-brand-text mx-3"><span>FireWallet</span></div>
</a>
<hr class="sidebar-divider my-0">
<ul class="navbar-nav text-light" id="accordionSidebar">
<li class="nav-item"><a class="nav-link" href="/"><i class="fas fa-tachometer-alt"></i><span>Dashboard</span></a></li>
<li class="nav-item"><a class="nav-link" href="/tx"><i class="fas fa-table"></i><span>Transactions</span></a></li>
2023-12-28 18:04:38 +11:00
<li class="nav-item"><a class="nav-link" href="/send"><i class="material-icons">send</i><span>Send HNS</span></a></li>
<li class="nav-item"><a class="nav-link" href="/receive"><i class="material-icons">call_received</i><span>Receive</span></a></li>
2024-02-02 21:40:02 +11:00
<li class="nav-item"><a class="nav-link" href="/plugins"><i class="material-icons">code</i><span>Plugins</span></a><a class="nav-link" href="/settings"><i class="material-icons">settings</i><span>Settings</span></a></li>
2023-12-28 16:04:45 +11:00
</ul>
<div class="text-center d-none d-md-inline"><button class="btn rounded-circle border-0" id="sidebarToggle" type="button"></button></div>
</div>
</nav>
<div class="d-flex flex-column" id="content-wrapper" style="background: var(--bs-primary);">
2023-12-28 16:04:45 +11:00
<div id="content">
<nav class="navbar navbar-expand shadow mb-4 topbar static-top navbar-light" style="background: var(--bs-primary-text-emphasis);">
2023-12-28 16:04:45 +11:00
<div class="container-fluid"><button class="btn btn-link d-md-none rounded-circle me-3" id="sidebarToggleTop" type="button"><i class="fas fa-bars"></i></button>
2023-12-28 18:04:38 +11:00
<form class="d-none d-sm-inline-block me-auto ms-md-3 my-2 my-md-0 mw-100 navbar-search" action="/search" method="get">
<div class="input-group"><input class="bg-light form-control border-0 small" type="text" placeholder="Search for domain" name="q" value="{{search_term}}" style="color: var(--bs-dark-text-emphasis);background: var(--bs-light);"><button class="btn btn-primary py-0" type="submit"><i class="fas fa-search"></i></button></div>
</form><span style="color: var(--bs-dark);">Sync: {{sync}}%</span>
2023-12-28 16:04:45 +11:00
<ul class="navbar-nav flex-nowrap ms-auto">
<li class="nav-item dropdown d-sm-none no-arrow"><a class="dropdown-toggle nav-link" aria-expanded="false" data-bs-toggle="dropdown" href="#"><i class="fas fa-search"></i></a>
<div class="dropdown-menu dropdown-menu-end p-3 animated--grow-in" aria-labelledby="searchDropdown">
<form class="me-auto navbar-search w-100" action="/search" method="get">
<div class="input-group"><input class="bg-light form-control border-0 small" type="text" placeholder="Search for ..." name="q" value="{{search_term}}">
2023-12-28 16:04:45 +11:00
<div class="input-group-append"><button class="btn btn-primary py-0" type="button"><i class="fas fa-search"></i></button></div>
</div>
</form>
</div>
</li>
<li class="nav-item dropdown no-arrow">
<div class="nav-item dropdown no-arrow"><a class="dropdown-toggle nav-link" aria-expanded="false" data-bs-toggle="dropdown" href="#"><span class="d-none d-lg-inline me-2 small" style="color: var(--bs-dark);">{{account}}</span><img class="border rounded-circle img-profile" src="/assets/img/HNS.png"></a>
2023-12-28 16:04:45 +11:00
<div class="dropdown-menu shadow dropdown-menu-end animated--grow-in"><a class="dropdown-item" href="/logout"><i class="fas fa-sign-out-alt fa-sm fa-fw me-2 text-gray-400"></i>&nbsp;Logout</a></div>
</div>
</li>
</ul>
</div>
</nav>
<div class="container-fluid text-center">
<h3 class="text-center text-dark mb-1">Send HNS</h3><span style="color: rgb(255,0,0);">{{message}}</span>
</div>
<form style="margin: auto;max-width: 400px;margin-top: 50px;" method="post">
<div style="margin-top: 25px;"><label class="form-label">Send to</label><input class="form-control" type="text" id="address" placeholder="Address or @domain" name="address" value="{{address}}"><span id="addressValid"></span><script>
function checkAddress(inputValue) {
// Make API request to "/checkaddress"
var apiUrl = '/checkaddress?address=' + encodeURIComponent(inputValue);
fetch(apiUrl)
.then(response => response.json())
.then(data => {
// Update the content of the span with the response data
var addressCheckSpan = document.getElementById('addressValid');
addressCheckSpan.textContent = data.result; // You can replace 'addressInfo' with the actual property you receive from the API
})
.catch(error => {
console.error('Error fetching data:', error);
});
}
// Function to handle input field blur event
function handleBlur() {
var inputField = document.getElementById('address');
var inputValue = inputField.value;
// Check if the input value is not empty
if (inputValue.trim() !== '') {
checkAddress(inputValue);
} else {
var addressCheckSpan = document.getElementById('addressValid');
addressCheckSpan.textContent = 'Invalid address';
}
}
// Add a blur event listener to the input field
var inputField = document.getElementById('address');
inputField.addEventListener('blur', handleBlur);
</script></div>
<div style="margin-top: 25px;"><label class="form-label">Amount</label><input class="form-control" type="text" id="amount" placeholder="0.00000" name="amount" style="margin-bottom: 10px;" value="{{amount}}"><span>Available to send: {{max}} HNS</span><button class="btn btn-secondary btn-sm" id="maxButton" type="button" style="margin-left: 25px;">Send Max</button><script>
2023-12-28 16:04:45 +11:00
// Function to fill in the form input
function fillInput() {
// Get the input field and set its value
var inputField = document.getElementById('amount');
inputField.value = '{{max}}';
}
// Add a click event listener to the button
var fillButton = document.getElementById('maxButton');
fillButton.addEventListener('click', fillInput);
</script></div>
<div class="text-center" style="margin-top: 25px;"><input class="btn btn-secondary" type="submit" value="Send"></div>
2023-12-28 16:04:45 +11:00
</form>
</div>
<footer class="sticky-footer" style="background: var(--bs-primary-text-emphasis);">
2023-12-28 16:04:45 +11:00
<div class="container my-auto">
<div class="text-center my-auto copyright"><span>Copyright © FireWallet 2024</span></div>
2023-12-28 16:04:45 +11:00
</div>
</footer>
</div><a class="border rounded d-inline scroll-to-top" href="#page-top"><i class="fas fa-angle-up"></i></a>
</div>
<script src="/assets/bootstrap/js/bootstrap.min.js"></script>
<script src="/assets/js/script.min.js"></script>
</body>
</html>