feat: Add timezone setting in preferences + clickable logo

- Add timezone dropdown to settings modal with common timezones
- Save/load timezone preference per user
- Apply user's timezone preference after authentication
- Override system default with user preference if set
- Make dashboard logo clickable (returns to default filters)
- Show current timezone in settings

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-20 21:54:04 -05:00
parent 8b4ef2a7f5
commit c32e9c871b
3 changed files with 47 additions and 1 deletions

View File

@@ -45,6 +45,13 @@ function applyPreferences() {
document.body.classList.add(`table-${density}`);
}
// Timezone - use server default if not set
const timezone = userPreferences.timezone || window.APP_TIMEZONE || 'America/New_York';
const timezoneSelect = document.getElementById('userTimezone');
if (timezoneSelect) {
timezoneSelect.value = timezone;
}
// Notifications
const notificationsCheckbox = document.getElementById('notificationsEnabled');
if (notificationsCheckbox) {
@@ -71,6 +78,7 @@ async function saveSettings() {
default_status_filters: Array.from(document.querySelectorAll('[name="defaultFilters"]:checked'))
.map(cb => cb.value).join(','),
table_density: document.getElementById('tableDensity').value,
timezone: document.getElementById('userTimezone').value,
notifications_enabled: document.getElementById('notificationsEnabled').checked ? '1' : '0',
sound_effects: document.getElementById('soundEffects').checked ? '1' : '0',
toast_duration: document.getElementById('toastDuration').value