Spaces:
Runtime error
Runtime error
Update dashboard.html
Browse files- dashboard.html +10 -1
dashboard.html
CHANGED
|
@@ -721,7 +721,7 @@ input:checked + .slider:before {
|
|
| 721 |
<h4 style="margin-bottom:16px; font-size:15px; color:var(--accent)">💬 Command Messages</h4>
|
| 722 |
<div style="margin-bottom: 24px;">
|
| 723 |
<label style="display:block; font-size:13px; color:var(--text-dim); margin-bottom:8px">Friendly Command Text</label>
|
| 724 |
-
<textarea id="config-friendly-text" style="width:100%; height:100px; padding:12px; background:var(--bg); border:1px solid var(--border); border-radius:var(--radius-sm); color:white; font-family:monospace; font-size:13px; outline:none; resize:
|
| 725 |
<p style="font-size:12px; color:var(--text-dim); margin-top:8px">Use <code>{needed}</code> as a placeholder for the number of players needed.</p>
|
| 726 |
</div>
|
| 727 |
|
|
@@ -904,6 +904,10 @@ function openServerSettings(id, name) {
|
|
| 904 |
document.getElementById('config-post-enabled').checked = data.postEnabled !== false;
|
| 905 |
document.getElementById('config-friendly-text').value = data.friendlyText || "";
|
| 906 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 907 |
document.getElementById('config-cleanup-hours').value = data.cleanupHours || 2;
|
| 908 |
document.getElementById('config-lineup-cleanup-hours').value = data.lineupCleanupHours || 2;
|
| 909 |
document.getElementById('config-reminders-enabled').checked = !!data.remindersEnabled;
|
|
@@ -1029,6 +1033,11 @@ function escapeHtml(str) {
|
|
| 1029 |
d.textContent = str;
|
| 1030 |
return d.innerHTML;
|
| 1031 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1032 |
</script>
|
| 1033 |
</body>
|
| 1034 |
</html>
|
|
|
|
| 721 |
<h4 style="margin-bottom:16px; font-size:15px; color:var(--accent)">💬 Command Messages</h4>
|
| 722 |
<div style="margin-bottom: 24px;">
|
| 723 |
<label style="display:block; font-size:13px; color:var(--text-dim); margin-bottom:8px">Friendly Command Text</label>
|
| 724 |
+
<textarea id="config-friendly-text" oninput="autoResize(this)" style="width:100%; min-height:100px; padding:12px; background:var(--bg); border:1px solid var(--border); border-radius:var(--radius-sm); color:white; font-family:monospace; font-size:13px; outline:none; resize:none; overflow:hidden; transition: height 0.2s ease;"></textarea>
|
| 725 |
<p style="font-size:12px; color:var(--text-dim); margin-top:8px">Use <code>{needed}</code> as a placeholder for the number of players needed.</p>
|
| 726 |
</div>
|
| 727 |
|
|
|
|
| 904 |
document.getElementById('config-post-enabled').checked = data.postEnabled !== false;
|
| 905 |
document.getElementById('config-friendly-text').value = data.friendlyText || "";
|
| 906 |
|
| 907 |
+
// Auto-resize the textarea after setting value
|
| 908 |
+
const friendlyTextarea = document.getElementById('config-friendly-text');
|
| 909 |
+
setTimeout(() => autoResize(friendlyTextarea), 50);
|
| 910 |
+
|
| 911 |
document.getElementById('config-cleanup-hours').value = data.cleanupHours || 2;
|
| 912 |
document.getElementById('config-lineup-cleanup-hours').value = data.lineupCleanupHours || 2;
|
| 913 |
document.getElementById('config-reminders-enabled').checked = !!data.remindersEnabled;
|
|
|
|
| 1033 |
d.textContent = str;
|
| 1034 |
return d.innerHTML;
|
| 1035 |
}
|
| 1036 |
+
|
| 1037 |
+
function autoResize(el) {
|
| 1038 |
+
el.style.height = 'auto';
|
| 1039 |
+
el.style.height = el.scrollHeight + 'px';
|
| 1040 |
+
}
|
| 1041 |
</script>
|
| 1042 |
</body>
|
| 1043 |
</html>
|