Spaces:
Runtime error
Runtime error
Update dashboard.html
Browse files- dashboard.html +14 -3
dashboard.html
CHANGED
|
@@ -581,10 +581,19 @@ body {
|
|
| 581 |
<label style="display:block; font-size:13px; color:var(--text-dim); margin-bottom:8px">Command Prefix</label>
|
| 582 |
<div style="display:flex; gap:10px">
|
| 583 |
<input type="text" id="config-prefix" placeholder="!" style="width:100px; padding:12px; background:var(--bg); border:1px solid var(--border); border-radius:var(--radius-sm); color:white; font-size:16px; outline:none">
|
| 584 |
-
<button class="invite-btn" onclick="saveConfig()" style="background:var(--accent); color:white; padding:0 24px">Save Changes</button>
|
| 585 |
</div>
|
| 586 |
-
<p style="font-size:12px; color:var(--text-dim); margin-top:10px">The prefix used to trigger message-based commands
|
| 587 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 588 |
</div>
|
| 589 |
</div>
|
| 590 |
</div>
|
|
@@ -708,17 +717,19 @@ function openServerSettings(id, name) {
|
|
| 708 |
.then(r => r.json())
|
| 709 |
.then(data => {
|
| 710 |
document.getElementById('config-prefix').value = data.prefix || '!';
|
|
|
|
| 711 |
});
|
| 712 |
}
|
| 713 |
|
| 714 |
function saveConfig() {
|
| 715 |
if (!activeGuildId) return;
|
| 716 |
const prefix = document.getElementById('config-prefix').value;
|
|
|
|
| 717 |
|
| 718 |
fetch('/api/config/' + activeGuildId, {
|
| 719 |
method: 'POST',
|
| 720 |
headers: { 'Content-Type': 'application/json' },
|
| 721 |
-
body: JSON.stringify({ prefix })
|
| 722 |
})
|
| 723 |
.then(r => r.json())
|
| 724 |
.then(data => {
|
|
|
|
| 581 |
<label style="display:block; font-size:13px; color:var(--text-dim); margin-bottom:8px">Command Prefix</label>
|
| 582 |
<div style="display:flex; gap:10px">
|
| 583 |
<input type="text" id="config-prefix" placeholder="!" style="width:100px; padding:12px; background:var(--bg); border:1px solid var(--border); border-radius:var(--radius-sm); color:white; font-size:16px; outline:none">
|
|
|
|
| 584 |
</div>
|
| 585 |
+
<p style="font-size:12px; color:var(--text-dim); margin-top:10px">The prefix used to trigger message-based commands.</p>
|
| 586 |
</div>
|
| 587 |
+
|
| 588 |
+
<div style="margin-bottom: 20px;">
|
| 589 |
+
<label style="display:block; font-size:13px; color:var(--text-dim); margin-bottom:8px">Timezone Offset (UTC)</label>
|
| 590 |
+
<div style="display:flex; gap:10px">
|
| 591 |
+
<input type="number" id="config-timezone" placeholder="0" style="width:100px; padding:12px; background:var(--bg); border:1px solid var(--border); border-radius:var(--radius-sm); color:white; font-size:16px; outline:none">
|
| 592 |
+
</div>
|
| 593 |
+
<p style="font-size:12px; color:var(--text-dim); margin-top:10px">Set this to your server's timezone (e.g. 3 for UTC+3). This fixes match times.</p>
|
| 594 |
+
</div>
|
| 595 |
+
|
| 596 |
+
<button class="invite-btn" onclick="saveConfig()" style="background:var(--accent); color:white; padding:12px 24px; width:100%">Save All Changes</button>
|
| 597 |
</div>
|
| 598 |
</div>
|
| 599 |
</div>
|
|
|
|
| 717 |
.then(r => r.json())
|
| 718 |
.then(data => {
|
| 719 |
document.getElementById('config-prefix').value = data.prefix || '!';
|
| 720 |
+
document.getElementById('config-timezone').value = data.timezone || 0;
|
| 721 |
});
|
| 722 |
}
|
| 723 |
|
| 724 |
function saveConfig() {
|
| 725 |
if (!activeGuildId) return;
|
| 726 |
const prefix = document.getElementById('config-prefix').value;
|
| 727 |
+
const timezone = parseInt(document.getElementById('config-timezone').value) || 0;
|
| 728 |
|
| 729 |
fetch('/api/config/' + activeGuildId, {
|
| 730 |
method: 'POST',
|
| 731 |
headers: { 'Content-Type': 'application/json' },
|
| 732 |
+
body: JSON.stringify({ prefix, timezone })
|
| 733 |
})
|
| 734 |
.then(r => r.json())
|
| 735 |
.then(data => {
|