Download admin.html from Unmid/yt: direct link, hf CLI and curl.
- Browser
- Download file 1.25 kB
-
https://huggingface.co/spaces/Unmid/yt/resolve/main/admin.html
- Command line
-
hf download hf://spaces/Unmid/yt/admin.html
-
curl -L -o admin.html https://huggingface.co/spaces/Unmid/yt/resolve/main/admin.html
1.25 kB
| <html> | |
| <head> | |
| <title>Void City Admin</title> | |
| <style> | |
| body { background: #222; color: white; font-family: sans-serif; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; } | |
| button { padding: 20px 40px; font-size: 24px; margin: 10px; cursor: pointer; border: none; border-radius: 5px; } | |
| .start { background: #2ecc71; color: white; } | |
| .stop { background: #e74c3c; color: white; } | |
| </style> | |
| <script src="https://cdn.socket.io/4.7.4/socket.io.min.js"></script> | |
| </head> | |
| <body> | |
| <h1>Admin Control Panel</h1> | |
| <button class="start" onclick="send('start_tournament')">Start Tournament</button> | |
| <button class="stop" onclick="send('stop_tournament')">Stop & Show Results</button> | |
| <script> | |
| // Use the same token as the client for simplicity in this MVP | |
| // In prod, you'd want a separate admin auth mechanism | |
| const token = sessionStorage.getItem('game_token'); | |
| const socket = io({ auth: { token: token } }); | |
| function send(cmd) { | |
| if(confirm("Are you sure?")) { | |
| socket.emit('admin_cmd', { cmd: cmd }); | |
| } | |
| } | |
| </script> | |
| </body> | |
| </html> |