310 lines
10 KiB
HTML
310 lines
10 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>About Printio</title>
|
|
<link rel="icon" type="image/x-icon" href="/static/images/favicon.ico">
|
|
<link rel="stylesheet" href="/static/css/styles.css">
|
|
<link rel="stylesheet" href="/static/fontawesome/css/all.min.css">
|
|
<style>
|
|
h1 {
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
label, select, #media-sizes, button {
|
|
margin: 5px 0;
|
|
text-align: center;
|
|
}
|
|
|
|
select {
|
|
padding: 3px;
|
|
font-size: 1.1em;
|
|
}
|
|
|
|
#media-sizes ul {
|
|
list-style-type: none;
|
|
padding: 0;
|
|
}
|
|
|
|
#media-sizes li {
|
|
display: flex;
|
|
align-items: center;
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
#media-sizes input[type="checkbox"] {
|
|
transform: scale(1.5);
|
|
margin-right: 12px;
|
|
}
|
|
|
|
#media-sizes span {
|
|
font-size: 1.2em;
|
|
}
|
|
|
|
button {
|
|
background-color: blue;
|
|
color: white;
|
|
padding: 10px 20px;
|
|
border: none;
|
|
border-radius: 5px;
|
|
font-size: 1.2em;
|
|
cursor: pointer;
|
|
}
|
|
|
|
button:hover {
|
|
background-color: darkblue;
|
|
}
|
|
|
|
p {
|
|
display: block;
|
|
margin-top: 1em;
|
|
margin-bottom: 1em;
|
|
margin-left: 0;
|
|
margin-right: 0;
|
|
}
|
|
|
|
.license-section {
|
|
margin-top: 30px;
|
|
text-align: center;
|
|
}
|
|
|
|
.license-status {
|
|
font-size: 1.1em;
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.license-input {
|
|
margin-top: 10px;
|
|
text-align: left;
|
|
}
|
|
|
|
.license-input input {
|
|
padding: 10px;
|
|
width: 300px;
|
|
font-size: 1.1em;
|
|
margin-right: 10px;
|
|
}
|
|
|
|
.license-input button {
|
|
background-color: #4CAF50;
|
|
padding: 10px 20px;
|
|
font-size: 1.1em;
|
|
cursor: pointer;
|
|
border-radius: 5px;
|
|
border: none;
|
|
}
|
|
|
|
.license-input button:hover {
|
|
background-color: #45a049;
|
|
}
|
|
|
|
/* New Styles for Layout */
|
|
.content-wrapper {
|
|
display: flex;
|
|
}
|
|
|
|
.left-column {
|
|
width: 280px;
|
|
padding-right: 20px;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.right-column {
|
|
width: 70%;
|
|
}
|
|
|
|
.info-box {
|
|
padding: 15px;
|
|
margin-bottom: 20px;
|
|
border: 1px solid #ccc;
|
|
border-radius: 5px;
|
|
}
|
|
|
|
.license-box {
|
|
padding: 15px;
|
|
border: 1px solid #ccc;
|
|
border-radius: 5px;
|
|
}
|
|
#p {
|
|
margin-left: 10px;
|
|
}
|
|
</style>
|
|
<script src="/static/js/crypto-js.min.js"></script>
|
|
</head>
|
|
<body>
|
|
<div id="navbar"></div>
|
|
<script>
|
|
fetch('/static/html/nav.html')
|
|
.then(response => response.text())
|
|
.then(data => {
|
|
document.getElementById('navbar').innerHTML = data;
|
|
});
|
|
</script>
|
|
|
|
<div class="content-wrapper">
|
|
<div class="left-column">
|
|
<div class="info-box">
|
|
<h3>System Info</h3>
|
|
<p>Version: {{info.software_version}}
|
|
<p>CPU %: {{info.cpu}}</p>
|
|
<p>CPU T: {{info.cpu_t}}</p>
|
|
<p>Disk Size: {{info.disk_size}}</p>
|
|
<p>Disk Used: {{info.disk_used}}</p>
|
|
<p>RAM Size: {{info.ram_size}}</p>
|
|
<p>RAM Used: {{info.ram_used}}</p>
|
|
<p>Up Time: {{info.uptime}}</p>
|
|
</div>
|
|
|
|
<div class="license-box">
|
|
<h3>License Info </h3>
|
|
<p>License: {{info.license}}</p>
|
|
<!--p>Image Magic: {{info.image_magic}}</p-->
|
|
<!--p>Hashtag: {{info.hash}}</p-->
|
|
<!--p>Drop Folder: {{info.drop_folder}}</p-->
|
|
</div>
|
|
</div>
|
|
|
|
<div class="right-column">
|
|
<h1>About Printio</h1>
|
|
<p>
|
|
Printio is a professional printing solution designed for seamless
|
|
printing from iPads. It is particularly popular in the photobooth
|
|
industry, supporting a wide range of sublimation printers. Printio
|
|
is compatible with well-known brands such as DNP, Sinfonia, Hiti,
|
|
and Mitsubishi, as well as many other printers, including Zebra label
|
|
printers, and most HP and Epson models. This versatility makes Printio
|
|
an ideal choice for diverse printing needs.
|
|
</p>
|
|
<p>
|
|
Warning: Unauthorized reproduction or distribution of this product
|
|
is strictly prohibited and may result in severe civil and criminal
|
|
penalties.
|
|
</p>
|
|
<a href="https://www.ataphotobooths.com/knowledge-base/category/printio-setup/" target="_blank">Printio Help: Click me!</a>
|
|
<div></div>
|
|
<img src="/static/images/printio_help_qr.jpg" alt="Printio" style="width: 120px; margin-top: 20px;">
|
|
|
|
|
|
<div class="license-section" {{info.hidden}}>
|
|
<div class="license-input">
|
|
<label>__________________________________________________________</label>
|
|
</div>
|
|
<div class="license-input">
|
|
<label for="activation-serial">ID Code:</label>
|
|
<input type="text" id="idcode" value={{info.idcode}} readonly>
|
|
<button onclick="copyToClipboard()">Copy</button>
|
|
</div>
|
|
<div class="license-input">
|
|
<label for="activation-serial">SerialNo</label>
|
|
<input type="password" id="license-password" placeholder="Enter Activation Key">
|
|
<button onclick="activateLicense()">Activate</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
function encryptPassword(password) {
|
|
// Simple encryption using CryptoJS (you can replace with your method)
|
|
return password;
|
|
}
|
|
|
|
function activateLicense() {
|
|
const password = document.getElementById('license-password').value;
|
|
const encryptedPassword = encryptPassword(password);
|
|
fetch('/activate', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
},
|
|
body: JSON.stringify({ pass: encryptedPassword })
|
|
})
|
|
.then(response => response.json())
|
|
.then(data => {
|
|
console.log("Activation result:", data);
|
|
if (data.reply == true) {
|
|
alert("Activation Successful!!!");
|
|
window.location.href = "/about"; // Redirect to /about page
|
|
} else {
|
|
alert("Activation Failed.... Try Again");
|
|
}
|
|
})
|
|
.catch(error => {
|
|
console.error("Error during activation attempt:", error);
|
|
alert("Error during activation attempt.");
|
|
});
|
|
}
|
|
|
|
|
|
function copyToClipboard() {
|
|
const idCode = document.getElementById('idcode');
|
|
|
|
// Check if the element exists
|
|
if (!idCode) {
|
|
console.error('Element with ID "idcode" not found');
|
|
alert('Error: Could not find the text to copy');
|
|
return;
|
|
}
|
|
|
|
// Get the value or text content (depending on element type)
|
|
const textToCopy = idCode.value || idCode.textContent || '';
|
|
console.log('Text to copy:', textToCopy);
|
|
|
|
// Ensure there's something to copy
|
|
if (!textToCopy) {
|
|
console.warn('No text to copy');
|
|
alert('Nothing to copy');
|
|
return;
|
|
}
|
|
|
|
// First, try the Clipboard API if available
|
|
if (navigator.clipboard && navigator.clipboard.writeText) {
|
|
console.log('Attempting to use Clipboard API');
|
|
navigator.clipboard.writeText(textToCopy)
|
|
.then(() => {
|
|
console.log('Clipboard API success');
|
|
alert('ID code copied to clipboard');
|
|
})
|
|
.catch(err => {
|
|
console.error('Clipboard API failed:', err);
|
|
attemptFallbackCopy(textToCopy);
|
|
});
|
|
} else {
|
|
console.log('Clipboard API unavailable, using fallback');
|
|
attemptFallbackCopy(textToCopy);
|
|
}
|
|
}
|
|
|
|
function attemptFallbackCopy(textToCopy) {
|
|
try {
|
|
// Create a temporary textarea for copying
|
|
const tempTextarea = document.createElement('textarea');
|
|
tempTextarea.value = textToCopy;
|
|
tempTextarea.style.position = 'fixed'; // Prevent scrolling issues
|
|
tempTextarea.style.opacity = '0'; // Make it invisible
|
|
document.body.appendChild(tempTextarea);
|
|
tempTextarea.focus();
|
|
tempTextarea.select();
|
|
|
|
// Attempt to copy
|
|
const successful = document.execCommand('copy');
|
|
document.body.removeChild(tempTextarea);
|
|
|
|
if (successful) {
|
|
console.log('Fallback copy successful');
|
|
//alert('ID code copied to clipboard (using fallback)');
|
|
} else {
|
|
console.warn('Fallback copy failed: execCommand returned false');
|
|
alert('Failed to copy to clipboard: Copy command unsuccessful');
|
|
}
|
|
} catch (err) {
|
|
console.error('Fallback copy error:', err);
|
|
alert('Failed to copy to clipboard: ' + err.message);
|
|
}
|
|
}
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|