update
This commit is contained in:
@@ -49,18 +49,22 @@
|
||||
|
||||
<div class="container">
|
||||
<div class="card" style="margin-top: 20px; text-align: center; color: #888;">
|
||||
<small>System IP: <span id="system-ip">Loading...</span></small>
|
||||
<small>System IP: <span id="system-ip">Loading...</span>
|
||||
<button onclick="checkIp()" style="background: #444; color: white; border: none; padding: 2px 8px; border-radius: 4px; font-size: 0.8em; margin-left: 10px; cursor: pointer;">Check Again</button>
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
async function checkIp() {
|
||||
const el = document.getElementById('system-ip');
|
||||
el.textContent = 'Loading...';
|
||||
try {
|
||||
const response = await fetch('/system/ip');
|
||||
const data = await response.json();
|
||||
document.getElementById('system-ip').textContent = data.ip;
|
||||
el.textContent = data.ip;
|
||||
} catch (e) {
|
||||
document.getElementById('system-ip').textContent = 'Error';
|
||||
el.textContent = 'Error';
|
||||
}
|
||||
}
|
||||
checkIp();
|
||||
|
||||
Reference in New Issue
Block a user