Brozy123 commited on
Commit
d5d373a
·
verified ·
1 Parent(s): de4a460

Update dashboard.html

Browse files
Files changed (1) hide show
  1. dashboard.html +7 -1
dashboard.html CHANGED
@@ -589,8 +589,9 @@ body {
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>
@@ -741,6 +742,11 @@ function saveConfig() {
741
  }).catch(() => alert('❌ Network error saving settings.'));
742
  }
743
 
 
 
 
 
 
744
  function loadCommands() {
745
  fetch('/api/commands')
746
  .then(r => r.json())
 
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
+ <button class="invite-btn" onclick="detectTimezone()" style="background:var(--bg-card); color:var(--text-dim); border:1px solid var(--border); padding:0 15px; font-size:12px">Detect My Timezone</button>
593
  </div>
594
+ <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 ensures match times show correctly for everyone.</p>
595
  </div>
596
 
597
  <button class="invite-btn" onclick="saveConfig()" style="background:var(--accent); color:white; padding:12px 24px; width:100%">Save All Changes</button>
 
742
  }).catch(() => alert('❌ Network error saving settings.'));
743
  }
744
 
745
+ function detectTimezone() {
746
+ const offset = -(new Date().getTimezoneOffset() / 60);
747
+ document.getElementById('config-timezone').value = offset;
748
+ }
749
+
750
  function loadCommands() {
751
  fetch('/api/commands')
752
  .then(r => r.json())