mirror of
https://git.sr.ht/~iwakuralain/text0Nly
synced 2025-07-27 15:36:11 +00:00
rm api info + login/register systemd
This commit is contained in:
parent
53d15e1a04
commit
602811599d
@ -54,7 +54,6 @@ try {
|
||||
<div class="header">
|
||||
<h1>Text0Nly</h1>
|
||||
<div class="header-buttons">
|
||||
<a href="#" onclick="showApiInfo()">API Info</a>
|
||||
<a href="register.php">Register</a>
|
||||
</div>
|
||||
</div>
|
||||
@ -90,36 +89,7 @@ try {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="apiModal" class="modal">
|
||||
<div class="modal-content">
|
||||
<span class="close" onclick="hideApiInfo()">×</span>
|
||||
<h2>Message API</h2>
|
||||
<div class="api-info">
|
||||
<pre>curl -X POST http://localhost/api.php -H "Content-Type: application/json" -d '{
|
||||
"username": "name",
|
||||
"message": "text",
|
||||
"signature": "pgp_signature",
|
||||
"encrypted": true
|
||||
}'</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function showApiInfo() {
|
||||
document.getElementById('apiModal').style.display = 'block';
|
||||
}
|
||||
|
||||
function hideApiInfo() {
|
||||
document.getElementById('apiModal').style.display = 'none';
|
||||
}
|
||||
|
||||
window.onclick = function(event) {
|
||||
if (event.target == document.getElementById('apiModal')) {
|
||||
hideApiInfo();
|
||||
}
|
||||
}
|
||||
|
||||
setInterval(() => {
|
||||
fetch(window.location.href)
|
||||
.then(response => response.text())
|
||||
|
@ -106,25 +106,4 @@ button {
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.api-info pre {
|
||||
font-family: monospace;
|
||||
font-size: 1em;
|
||||
background: #f8f8f8;
|
||||
padding: 10px;
|
||||
margin: 0;
|
||||
border: 1px solid #eee;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
background: #fff;
|
||||
padding: 18px;
|
||||
max-width: 600px;
|
||||
margin: 40px auto;
|
||||
}
|
||||
|
||||
.close {
|
||||
font-size: 1.5em;
|
||||
cursor: pointer;
|
||||
color: #888;
|
||||
}
|
||||
.api-info, .api-info pre, .modal, .modal-content, .close { display: none !important; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user