Added settings menu
This commit is contained in:
@@ -75,6 +75,7 @@ function formatDetails($details, $actionType) {
|
||||
<?php if ($GLOBALS['currentUser']['is_admin']): ?>
|
||||
<span class="admin-badge">Admin</span>
|
||||
<?php endif; ?>
|
||||
<button class="settings-icon" title="Settings (Alt+S)" onclick="openSettingsModal()">⚙</button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -322,5 +323,127 @@ function formatDetails($details, $actionType) {
|
||||
};
|
||||
console.log('Ticket data loaded:', window.ticketData);
|
||||
</script>
|
||||
|
||||
<!-- Settings Modal (same as dashboard) -->
|
||||
<div class="settings-modal" id="settingsModal" style="display: none;">
|
||||
<div class="settings-backdrop" onclick="closeSettingsModal()"></div>
|
||||
<div class="settings-content">
|
||||
<span class="bottom-left-corner">╚</span>
|
||||
<span class="bottom-right-corner">╝</span>
|
||||
|
||||
<div class="settings-header">
|
||||
<h3>⚙ System Preferences</h3>
|
||||
<button class="close-settings" onclick="closeSettingsModal()">✗</button>
|
||||
</div>
|
||||
|
||||
<div class="settings-body">
|
||||
<!-- Display Preferences -->
|
||||
<div class="settings-section">
|
||||
<h4>╔══ Display Preferences ══╗</h4>
|
||||
|
||||
<div class="setting-row">
|
||||
<label for="rowsPerPage">Rows per page:</label>
|
||||
<select id="rowsPerPage" class="setting-select">
|
||||
<option value="15">15</option>
|
||||
<option value="25">25</option>
|
||||
<option value="50">50</option>
|
||||
<option value="100">100</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="setting-row">
|
||||
<label for="defaultFilters">Default status filters:</label>
|
||||
<div class="checkbox-group">
|
||||
<label><input type="checkbox" name="defaultFilters" value="Open" checked> Open</label>
|
||||
<label><input type="checkbox" name="defaultFilters" value="Pending" checked> Pending</label>
|
||||
<label><input type="checkbox" name="defaultFilters" value="In Progress" checked> In Progress</label>
|
||||
<label><input type="checkbox" name="defaultFilters" value="Closed"> Closed</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="setting-row">
|
||||
<label for="tableDensity">Table density:</label>
|
||||
<select id="tableDensity" class="setting-select">
|
||||
<option value="compact">Compact</option>
|
||||
<option value="normal" selected>Normal</option>
|
||||
<option value="comfortable">Comfortable</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Notifications -->
|
||||
<div class="settings-section">
|
||||
<h4>╔══ Notifications ══╗</h4>
|
||||
|
||||
<div class="setting-row">
|
||||
<label>
|
||||
<input type="checkbox" id="notificationsEnabled" checked>
|
||||
Enable browser notifications
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="setting-row">
|
||||
<label>
|
||||
<input type="checkbox" id="soundEffects" checked>
|
||||
Sound effects
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="setting-row">
|
||||
<label for="toastDuration">Toast duration:</label>
|
||||
<select id="toastDuration" class="setting-select">
|
||||
<option value="3000" selected>3 seconds</option>
|
||||
<option value="5000">5 seconds</option>
|
||||
<option value="10000">10 seconds</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Keyboard Shortcuts -->
|
||||
<div class="settings-section">
|
||||
<h4>╔══ Keyboard Shortcuts ══╗</h4>
|
||||
<div class="shortcuts-list">
|
||||
<div class="shortcut-item">
|
||||
<kbd>Ctrl/Cmd + E</kbd> <span>Toggle edit mode</span>
|
||||
</div>
|
||||
<div class="shortcut-item">
|
||||
<kbd>Ctrl/Cmd + S</kbd> <span>Save changes</span>
|
||||
</div>
|
||||
<div class="shortcut-item">
|
||||
<kbd>Alt + S</kbd> <span>Open settings</span>
|
||||
</div>
|
||||
<div class="shortcut-item">
|
||||
<kbd>ESC</kbd> <span>Cancel/Close</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- User Info (Read-only) -->
|
||||
<div class="settings-section">
|
||||
<h4>╔══ User Information ══╗</h4>
|
||||
<div class="user-info-grid">
|
||||
<div><strong>Display Name:</strong></div>
|
||||
<div><?php echo htmlspecialchars($GLOBALS['currentUser']['display_name'] ?? 'N/A'); ?></div>
|
||||
|
||||
<div><strong>Username:</strong></div>
|
||||
<div><?php echo htmlspecialchars($GLOBALS['currentUser']['username']); ?></div>
|
||||
|
||||
<div><strong>Email:</strong></div>
|
||||
<div><?php echo htmlspecialchars($GLOBALS['currentUser']['email'] ?? 'N/A'); ?></div>
|
||||
|
||||
<div><strong>Role:</strong></div>
|
||||
<div><?php echo $GLOBALS['currentUser']['is_admin'] ? 'Administrator' : 'User'; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="settings-footer">
|
||||
<button class="btn btn-primary" onclick="saveSettings()">Save Preferences</button>
|
||||
<button class="btn btn-secondary" onclick="closeSettingsModal()">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="<?php echo $GLOBALS['config']['ASSETS_URL']; ?>/js/settings.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user