Phase 4: Light mode removal + CreateTicketView restructuring
## Light Mode Removal & Optimization - Removed theme toggle functionality from dashboard.js - Forced dark mode only (terminal aesthetic) - Cleaned up .theme-toggle CSS class and styles - Removed body.light-mode CSS rules from all view files - Simplified user-header styles to use static dark colors - Removed CSS custom properties (--header-bg, --header-text, --border-color) - Removed margin-right for theme toggle button (no longer needed) ## CreateTicketView Complete Restructuring - Added user header with back link and user info - Restructured into 6 vertical nested ASCII sections: 1. Form Header - Create New Ticket introduction 2. Template Selection - Optional template dropdown 3. Basic Information - Title input field 4. Ticket Metadata - Status, Priority, Category, Type (4-column) 5. Detailed Description - Main textarea 6. Form Actions - Create/Cancel buttons - Each section wrapped in ascii-section-header → ascii-content → ascii-frame-inner - Added ASCII dividers between all sections - Added ╚╝ bottom corner characters to outer frame - Improved error message styling with priority-1 color - Added helpful placeholder text and hints ## Files Modified - assets/css/dashboard.css: Removed theme toggle CSS (~19 lines) - assets/js/dashboard.js: Removed initThemeToggle() and forced dark mode - views/DashboardView.php: Simplified user-header CSS (removed light mode) - views/TicketView.php: Simplified user-header CSS (removed light mode) - views/CreateTicketView.php: Complete restructuring (98→242 lines) ## Code Quality - Maintained all existing functionality and event handlers - Kept all class names for JavaScript compatibility - Consistent nested frame structure across all pages - Zero breaking changes to backend or business logic - Optimized by removing ~660 unused lines total 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1288,25 +1288,6 @@ input[type="checkbox"]:checked {
|
||||
}
|
||||
|
||||
/* ===== UTILITY STYLES ===== */
|
||||
.theme-toggle {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
right: 20px;
|
||||
z-index: 100;
|
||||
padding: 12px;
|
||||
border-radius: 50%;
|
||||
background: var(--bg-secondary);
|
||||
border: 1px solid var(--border-color);
|
||||
cursor: pointer;
|
||||
box-shadow: var(--shadow);
|
||||
font-size: 1.2em;
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.theme-toggle:hover {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.ticket-link {
|
||||
font-family: 'Courier New', monospace;
|
||||
font-weight: bold;
|
||||
|
||||
@@ -37,12 +37,11 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
}
|
||||
|
||||
// Initialize for all pages
|
||||
initThemeToggle();
|
||||
initSettingsModal();
|
||||
|
||||
// Load saved theme preference
|
||||
const savedTheme = localStorage.getItem('theme') || 'light';
|
||||
document.documentElement.setAttribute('data-theme', savedTheme);
|
||||
|
||||
// Force dark mode only (terminal aesthetic - no theme switching)
|
||||
document.documentElement.setAttribute('data-theme', 'dark');
|
||||
document.body.classList.add('dark-mode');
|
||||
});
|
||||
|
||||
function initTableSorting() {
|
||||
@@ -178,19 +177,6 @@ function saveSettings() {
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
function initThemeToggle() {
|
||||
const toggle = document.createElement('button');
|
||||
toggle.className = 'theme-toggle';
|
||||
toggle.innerHTML = '🌓';
|
||||
toggle.onclick = () => {
|
||||
const currentTheme = document.documentElement.getAttribute('data-theme');
|
||||
const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
|
||||
document.documentElement.setAttribute('data-theme', newTheme);
|
||||
localStorage.setItem('theme', newTheme);
|
||||
};
|
||||
document.body.appendChild(toggle);
|
||||
}
|
||||
|
||||
function initStatusFilter() {
|
||||
const filterContainer = document.createElement('div');
|
||||
filterContainer.className = 'status-filter-container';
|
||||
|
||||
Reference in New Issue
Block a user