Version 1.3 - Update Design and removed User

This commit is contained in:
Honey committed 2026-02-27 13:57:47 +01:00
1 parent 24eda1ae81
commit 3d9f4dfda0
13 files changed
+699 -802

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "ticketsystem",
"version": "1.2.0",
"version": "1.3",
"description": "",
"main": "server.js",
"scripts": {
-1
View File
@@ -191,7 +191,6 @@ document.addEventListener('DOMContentLoaded', () => {
<tr>
<td>${ticket.id}</td>
<td class="ticket-title">${escapeHtml(shortTitle)}</td>
<td>${escapeHtml(ticket.requester)}</td>
<td>${escapeHtml(ticket.category) || '-'}</td>
<td><span class="status-badge status-${statusClass}">${escapeHtml(ticket.status) || 'Unknown'}</span></td>
<td><span class="priority-badge priority-${priorityClass}">${escapeHtml(ticket.priority) || 'None'}</span></td>
+109 -176
View File
@@ -1,179 +1,124 @@
/* admin.css - Dark Mode Only */
/* ===== GLOBAL STYLES & VARIABLES ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
:root {
--primary-color: #4A90E2;
--primary-hover-color: #357ABD;
--secondary-color: #50E3C2;
--accent-color: #F5A623;
--success-color: #7ED321;
--danger-color: #D0021B;
--neutral-dark: #f0f0f0;
--neutral-medium: #cccccc;
--neutral-light: #999999;
--bg-color: #121212;
--card-bg-color: #1e1e1e;
--border-color: #2a2a2a;
--shadow-color: rgba(0, 0, 0, 0.5);
--text-color: #f5f5f5;
--link-color: var(--primary-color);
--font-family: 'Inter', sans-serif;
--border-radius: 8px;
--card-padding: 25px;
--input-padding: 12px 15px;
--transition-speed: 0.2s ease-in-out;
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: var(--font-family);
background-color: var(--bg-color);
color: var(--text-color);
font-size: 16px;
line-height: 1.6;
}
a {
color: var(--link-color);
text-decoration: none;
transition: color var(--transition-speed);
}
a:hover {
color: var(--primary-hover-color);
text-decoration: underline;
}
/* ===== UTILITY CLASSES ===== */
.container {
max-width: 1400px;
margin: auto;
padding: 20px 30px;
}
/* ===== HEADER ===== */
.header {
background: var(--card-bg-color);
padding: 20px var(--card-padding);
border-radius: var(--border-radius);
box-shadow: 0 2px 10px var(--shadow-color);
margin-bottom: 30px;
display: flex;
justify-content: space-between;
align-items: center;
gap: 20px;
}
.header h1 {
color: var(--primary-color);
font-size: 1.7rem;
font-weight: 700;
display: flex;
align-items: center;
}
.header h1 i {
margin-right: 12px;
}
/* ===== SECTION HEADER ===== */
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 25px;
flex-wrap: wrap;
gap: 15px;
}
.section-header h2 {
color: var(--neutral-dark);
font-size: 1.6rem;
font-weight: 700;
}
.section-header h2 i {
margin-right: 10px;
color: var(--primary-color);
}
/* admin.css - Glassmorphism + Gradient Design (Admin) */
/* NOTE: admin.html also loads user.css for shared base styles */
/* ===== STATS CARDS ===== */
.admin-stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 20px;
background: var(--card-bg-color);
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 16px;
background: var(--glass-bg);
backdrop-filter: blur(var(--card-blur));
-webkit-backdrop-filter: blur(var(--card-blur));
border: 1px solid var(--glass-border);
padding: var(--card-padding);
border-radius: var(--border-radius);
border-radius: var(--border-radius-lg);
margin-bottom: 30px;
box-shadow: 0 4px 15px var(--shadow-color);
box-shadow: var(--glass-shadow);
}
.stat-card {
text-align: center;
padding: 12px;
background: rgba(30, 30, 30, 0.3);
border-radius: var(--border-radius);
border: 1px solid rgba(148, 163, 184, 0.06);
transition: all var(--transition-speed);
}
.stat-card:hover {
border-color: rgba(99, 102, 241, 0.2);
background: rgba(99, 102, 241, 0.05);
}
.stat-value {
font-size: 2.5rem;
font-size: 2.4rem;
color: var(--primary-color);
font-weight: bold;
font-weight: 800;
line-height: 1.2;
}
font-weight: 800;
line-height: 1.2;
}
.stat-label {
font-size: 1rem;
font-size: 0.9rem;
color: var(--neutral-medium);
margin-top: 4px;
}
/* ===== FILTERS ===== */
.admin-filters {
display: flex;
flex-wrap: wrap;
gap: 15px;
gap: 12px;
}
.admin-filters input,
.admin-filters select {
padding: var(--input-padding);
background: #1c1c1c;
border: 1px solid var(--border-color);
background: rgba(30, 30, 30, 0.5);
backdrop-filter: blur(8px);
border: 1px solid var(--glass-border);
color: var(--text-color);
border-radius: var(--border-radius);
font-size: 0.95rem;
font-family: var(--font-family);
transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}
.admin-filters input:focus,
.admin-filters select:focus {
outline: none;
border-color: var(--primary-color);
box-shadow: 0 0 0 3px var(--primary-glow);
}
/* ===== TICKET TABLE STYLES (OPEN + CLOSED) ===== */
/* ===== TICKET TABLE ===== */
.admin-tickets-list {
background: var(--card-bg-color);
background: var(--glass-bg);
backdrop-filter: blur(var(--card-blur));
-webkit-backdrop-filter: blur(var(--card-blur));
border: 1px solid var(--glass-border);
padding: var(--card-padding);
border-radius: var(--border-radius);
border-radius: var(--border-radius-lg);
overflow-x: auto;
}
table {
width: 100%;
border-collapse: collapse;
font-size: 0.95rem;
}
table th,
table td {
table th, table td {
padding: 12px 15px;
text-align: left;
border-bottom: 1px solid var(--border-color);
border-bottom: 1px solid rgba(148, 163, 184, 0.08);
color: var(--text-color);
}
table th {
background: #1a1a1a;
background: rgba(30, 30, 30, 0.4);
color: var(--neutral-medium);
font-weight: 600;
text-transform: uppercase;
font-size: 0.8rem;
letter-spacing: 0.5px;
}
table tr {
transition: background var(--transition-speed);
}
table tbody tr:hover {
background: rgba(99, 102, 241, 0.05);
}
.empty-table {
text-align: center;
color: var(--neutral-light);
padding: 30px !important;
}
/* ===== TABLE ACTION BUTTONS ===== */
/* ===== TABLE BUTTONS ===== */
.table-actions {
display: flex;
gap: 8px;
justify-content: center;
}
.table-btn {
padding: 6px 10px;
padding: 7px 12px;
border-radius: var(--border-radius);
color: white;
font-size: 0.85rem;
@@ -181,76 +126,64 @@ table th {
align-items: center;
gap: 5px;
cursor: pointer;
border: none;
transition: all var(--transition-speed);
}
.view-btn {
background-color: var(--primary-color);
.table-btn.view-btn {
background: var(--primary-color);
}
.view-btn:hover {
background-color: var(--primary-hover-color);
.table-btn.view-btn:hover {
transform: translateY(-1px);
}
.delete-btn {
background-color: var(--danger-color);
.table-btn.delete-btn {
background: #ef4444;
}
.delete-btn:hover {
background-color: #a60014;
.table-btn.delete-btn:hover {
transform: translateY(-1px);
}
/* ===== BADGES ===== */
.status-Open { background-color: rgba(74, 144, 226, 0.15); color: #4A90E2; }
.status-In-Progress { background-color: rgba(245, 166, 35, 0.15); color: #F5A623; }
.status-On-Hold { background-color: rgba(155, 155, 155, 0.15); color: #9B9B9B; }
.status-Closed { background-color: rgba(126, 211, 33, 0.15); color: #7ED321; }
.priority-Low { background-color: rgba(80, 227, 194, 0.2); color: #50E3C2; }
.priority-Medium { background-color: rgba(74, 144, 226, 0.2); color: #4A90E2; }
.priority-High { background-color: rgba(245, 166, 35, 0.2); color: #F5A623; }
.priority-Urgent { background-color: rgba(208, 2, 27, 0.15); color: #D0021B; }
.status-badge,
.priority-badge {
padding: 0.25em 0.6em;
.status-badge, .priority-badge {
padding: 4px 12px;
border-radius: 9999px;
font-size: 0.82rem;
font-weight: 600;
white-space: nowrap;
}
/* ===== CLOSED TICKETS SECTION ===== */
.status-Open { background: rgba(99,102,241,0.15); color: #818cf8; }
.status-In-Progress { background: rgba(245,158,11,0.15); color: #fbbf24; }
.status-On-Hold { background: rgba(100,116,139,0.2); color: #94a3b8; }
.status-Closed { background: rgba(34,197,94,0.15); color: #4ade80; }
.priority-Low { background: rgba(6,182,212,0.15); color: #22d3ee; }
.priority-Medium { background: rgba(99,102,241,0.15); color: #818cf8; }
.priority-High { background: rgba(245,158,11,0.15); color: #fbbf24; }
.priority-Urgent { background: rgba(239,68,68,0.15); color: #f87171; }
/* ===== CLOSED TICKETS ===== */
.closed-tickets-section {
margin-top: 30px;
}
.closed-tickets-section .section-header h2 {
color: var(--success-color);
margin: 30px 30px 0;
position: relative;
z-index: 1;
}
/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
.container {
padding: 15px 20px;
}
.header {
flex-direction: column;
align-items: flex-start;
}
.section-header {
flex-direction: column;
align-items: flex-start;
gap: 10px;
}
.container { padding: 15px 20px; }
.header { flex-direction: column; align-items: flex-start; }
.section-header { flex-direction: column; align-items: flex-start; gap: 10px; }
.closed-tickets-section { margin: 20px 16px 0; }
}
@media (max-width: 480px) {
.header h1 {
font-size: 1.3rem;
}
.stat-value {
font-size: 2rem;
}
.btn-primary,
.btn-small {
width: 100%;
}
table {
font-size: 0.85rem;
}
table th,
table td {
padding: 8px 10px;
}
.header h1 { font-size: 1.3rem; }
.stat-value { font-size: 1.8rem; }
.admin-stats { grid-template-columns: repeat(2, 1fr); }
.btn-primary { width: 100%; }
table { font-size: 0.85rem; }
table th, table td { padding: 8px 10px; }
}
+4 -6
View File
@@ -13,12 +13,12 @@
<div class="container">
<header class="header">
<h1><i class="fas fa-ticket-alt"></i> Admin Dashboard</h1>
<div class="user-actions">
<span>Welcome, Admin!</span>
<img class="avatar" src="/assets/admin.jpg" alt="Admin Avatar">
<div class="header-right">
<button id="update-pfp-btn" class="btn-update-pfp small-btn">
<i class="fas fa-camera"></i> Update Picture
</button>
<span>Welcome, Admin!</span>
<img class="avatar" src="/assets/admin.jpg" alt="Admin Avatar">
<a href="/">User View</a>
</div>
</header>
@@ -91,7 +91,6 @@
<tr>
<th>ID</th>
<th>Title</th>
<th>Requester</th>
<th>Category</th>
<th>Status</th>
<th>Priority</th>
@@ -122,7 +121,6 @@
<tr>
<th>ID</th>
<th>Title</th>
<th>Requester</th>
<th>Category</th>
<th>Status</th>
<th>Priority</th>
@@ -139,7 +137,7 @@
</section>
<footer class="footer">
<p class="app-footer-text"></p>
<p class="app-footer-text">Ticket System by Honey</p>
</footer>
</div>
+23 -7
View File
@@ -12,15 +12,15 @@
<div class="container">
<header class="header">
<h1><i class="fas fa-ticket-alt"></i> My Tickets</h1>
<div class="user-actions">
<span>Hi Laila!</span>
<img class="avatar" src="/assets/user.jpg" alt="User Avatar">
<div class="header-right">
<button id="open-modal-btn" class="btn-primary small-btn">
<i class="fas fa-plus"></i> Create Ticket
</button>
<button id="update-pfp-btn" class="btn-update-pfp small-btn">
<i class="fas fa-camera"></i> Update Picture
</button>
<span>Hi Laila!</span>
<img class="avatar" src="/assets/user.jpg" alt="User Avatar">
</div>
</header>
@@ -38,6 +38,9 @@
<textarea id="description" rows="3" placeholder="Describe your issue..." required></textarea>
</div>
<div class="form-row">
<div class="form-group">
<select id="category"></select>
</div>
<div class="form-group">
<select id="priority">
<option value="Low">Low Priority</option>
@@ -46,9 +49,6 @@
<option value="Urgent">Urgent</option>
</select>
</div>
<div class="form-group">
<select id="category"></select>
</div>
</div>
<div class="form-group button-wrapper">
<button type="submit" class="btn-primary">
@@ -113,10 +113,26 @@
</main>
<footer class="footer">
<p class="app-footer-text"></p>
<p class="app-footer-text">Ticket System by Honey</p>
</footer>
</div>
<!-- Mobile Bottom Navigation -->
<nav class="mobile-bottom-nav">
<button onclick="window.scrollTo({top:0,behavior:'smooth'})">
<i class="fas fa-home"></i>Home
</button>
<button onclick="document.getElementById('search-input')?.focus()">
<i class="fas fa-search"></i>Search
</button>
<button class="nav-create" onclick="document.getElementById('open-modal-btn')?.click()">
<i class="fas fa-plus"></i>
</button>
<button onclick="document.getElementById('closed-toggle')?.click();document.getElementById('closed-toggle')?.scrollIntoView({behavior:'smooth'})">
<i class="fas fa-archive"></i>Closed
</button>
</nav>
<script src="user-script.js"></script>
<script src="version.js"></script>
</body>
+21 -33
View File
@@ -1,7 +1,7 @@
/* ==== ADMIN COMMENT STYLING ==== */
.comment.admin .comment-content {
background-color: var(--color-admin-highlight);
border-left: 4px solid var(--color-primary);
background-color: rgba(99, 102, 241, 0.08);
border-left: 3px solid var(--color-primary);
}
.comment.admin .comment-author::after {
content: " (Admin)";
@@ -19,18 +19,17 @@
}
.btn-secondary {
padding: 10px 16px;
border: none;
border: 1px solid rgba(99, 102, 241, 0.2);
border-radius: var(--radius);
cursor: pointer;
font-weight: 600;
transition: background 0.2s ease;
}
.btn-secondary {
background-color: var(--color-accent);
color: white;
transition: all 0.25s ease;
background: rgba(99, 102, 241, 0.15);
color: #818cf8;
}
.btn-secondary:hover {
background-color: #1976d2;
background: rgba(99, 102, 241, 0.25);
border-color: rgba(99, 102, 241, 0.3);
}
/* ==== CUSTOM ADMIN LAYOUT FIX ==== */
@@ -43,58 +42,47 @@
.ticket-info-grid {
grid-template-columns: repeat(3, 1fr);
}
}
/* GRID ADMIN SIDE ORDER */
.ticket-info-grid {
display: grid;
grid-template-columns: repeat(3, 1fr); /* 3 equal columns */
grid-template-rows: auto auto auto; /* 3 rows */
grid-template-columns: repeat(3, 1fr);
grid-template-rows: auto auto auto;
gap: 15px;
}
/* Requester: span all 3 columns on row 1 */
.info-item.requester {
/* Description: span all 3 columns on row 1 */
.info-item.description {
grid-column: 1 / 4;
grid-row: 1 / 2;
}
/* Description: span all 3 columns on row 2 */
.info-item.description {
grid-column: 1 / 4;
grid-row: 2 / 3;
}
/* Created, Updated, Time: row 3, columns 1-3 */
/* Created, Updated, Time: row 2 */
.info-item.created {
grid-column: 1 / 2;
grid-row: 3 / 4;
grid-row: 2 / 3;
}
.info-item.updated {
grid-column: 2 / 3;
grid-row: 3 / 4;
grid-row: 2 / 3;
}
/* Time div isn’t .info-item, so select it directly by nth-child */
.ticket-info-grid > div:nth-child(5) {
.ticket-info-grid > div:nth-child(4) {
grid-column: 3 / 4;
grid-row: 3 / 4;
display: flex;
align-items: center;
gap: 10px;
grid-row: 2 / 3;
}
/* Status, Priority, Category: row 4, columns 1-3 */
/* Status, Priority, Category: row 3 */
.info-item.status {
grid-column: 1 / 2;
grid-row: 4 / 5;
grid-row: 3 / 4;
}
.info-item.priority {
grid-column: 2 / 3;
grid-row: 4 / 5;
grid-row: 3 / 4;
}
.info-item.category {
grid-column: 3 / 4;
grid-row: 4 / 5;
grid-row: 3 / 4;
}
.forms-row {
-1
View File
@@ -52,7 +52,6 @@ document.addEventListener('DOMContentLoaded', async () => {
categorySelect.value = ticket.category || '';
document.getElementById('ticket-id-val').textContent = ticket.id;
document.getElementById('ticket-requester').textContent = ticket.requester;
document.getElementById('ticket-created').textContent = formatDateTime(ticket.created_at);
document.getElementById('ticket-updated').textContent = formatDateTime(ticket.updated_at);
totalTimeDisplay.textContent = formatMinutes(typeof ticket.total_time === 'number' ? ticket.total_time : 0);
-2
View File
@@ -14,7 +14,6 @@ document.addEventListener('DOMContentLoaded', () => {
const ticketStatus = document.getElementById('ticket-status-badge');
const ticketPriority = document.getElementById('priority-text');
const ticketDescription = document.getElementById('ticket-description-text');
const ticketRequester = document.getElementById('ticket-requester');
const ticketCreated = document.getElementById('ticket-created');
const ticketUpdated = document.getElementById('ticket-updated');
const ticketCategory = document.getElementById('ticket-category');
@@ -34,7 +33,6 @@ document.addEventListener('DOMContentLoaded', () => {
ticketIdElem.textContent = ticket.id;
ticketStatus.textContent = ticket.status;
ticketDescription.innerHTML = linkify(ticket.description || '');
ticketRequester.textContent = ticket.requester;
ticketCreated.textContent = formatDateTime(ticket.created_at);
ticketUpdated.textContent = formatDateTime(ticket.updated_at);
ticketPriority.textContent = ticket.priority;
+1 -5
View File
@@ -34,10 +34,6 @@
</div>
<div class="ticket-info-grid">
<div class="info-item requester">
<h4>Requester</h4>
<p id="ticket-requester">-</p>
</div>
<div class="info-item description">
<h3>Description</h3>
<p id="ticket-description-text">Loading...</p>
@@ -122,7 +118,7 @@
</main>
<footer class="footer">
<p class="app-footer-text"></p>
<p class="app-footer-text">Ticket System by Honey</p>
</footer>
</div>
+2 -8
View File
@@ -35,13 +35,7 @@
</div>
<div class="ticket-body">
<!-- Requester first -->
<div class="info-item requester">
<h4>Requester</h4>
<p id="ticket-requester">-</p>
</div>
<!-- Then description -->
<!-- Description -->
<h3>Description</h3>
<p id="ticket-description-text">Loading...</p>
@@ -110,7 +104,7 @@
</main>
<footer class="footer">
<p class="app-footer-text"></p>
<p class="app-footer-text">Ticket System by Honey</p>
</footer>
</div>
+193 -187
View File
@@ -1,86 +1,109 @@
/* ticket-view.css - Glassmorphism + Gradient Design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
:root {
--color-bg: #2e2e2e;
--color-surface: #3c3c3c;
--color-primary: #4caf50;
--color-primary-hover: #45a049;
--color-accent: #2196f3;
--color-text: #f5f5f5;
--color-muted: #b0b0b0;
--color-border: #4f4f4f;
--color-danger: #e53935;
--color-admin-highlight: #424242;
--radius: 8px;
--color-bg: #1a1a1a;
--color-surface: rgba(40, 40, 40, 0.6);
--color-primary: #6366f1;
--color-primary-hover: #818cf8;
--color-accent: #06b6d4;
--color-text: #d4d4d4;
--color-muted: #9a9a9a;
--color-border: rgba(255, 255, 255, 0.08);
--color-danger: #ef4444;
--color-admin-highlight: rgba(99, 102, 241, 0.05);
--glass-bg: rgba(40, 40, 40, 0.6);
--glass-border: rgba(255, 255, 255, 0.08);
--glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
--glass-blur: 16px;
--gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
--primary-glow: rgba(99, 102, 241, 0.25);
--radius: 12px;
--radius-lg: 16px;
--transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
*, *::before, *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: var(--color-bg);
font-family: 'Inter', sans-serif;
background: var(--color-bg);
color: var(--color-text);
line-height: 1.6;
padding: 20px;
min-height: 100vh;
}
a {
color: var(--color-accent);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a { color: var(--color-primary-hover); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--color-accent); }
/* ===== CONTAINER ===== */
.container {
max-width: 1200px;
margin: 0 auto;
background-color: var(--color-surface);
border-radius: var(--radius);
background: var(--glass-bg);
backdrop-filter: blur(var(--glass-blur));
-webkit-backdrop-filter: blur(var(--glass-blur));
border: 1px solid var(--glass-border);
border-radius: var(--radius-lg);
overflow: hidden;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
box-shadow: var(--glass-shadow);
position: relative;
z-index: 1;
}
/* ===== HEADER ===== */
.header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
border-bottom: 1px solid var(--color-border);
padding: 20px 24px;
background: var(--glass-bg);
backdrop-filter: blur(var(--glass-blur));
-webkit-backdrop-filter: blur(var(--glass-blur));
border-bottom: 1px solid var(--glass-border);
}
.header h1 {
font-size: 1.8rem;
font-size: 1.6rem;
display: flex;
align-items: center;
gap: 10px;
color: var(--color-text);
}
.header h1 i {
color: var(--color-primary-hover);
}
.back-link {
font-size: 1rem;
color: var(--color-muted);
transition: color var(--transition);
}
.back-link i {
margin-right: 5px;
}
.back-link:hover { color: var(--color-primary-hover); text-decoration: none; }
.back-link i { margin-right: 5px; }
.main-content {
padding: 20px;
}
/* ===== MAIN ===== */
.main-content { padding: 20px; }
.ticket-details-layout {
display: flex;
flex-direction: column;
gap: 20px;
}
@media (min-width: 900px) {
.ticket-details-layout {
flex-direction: row;
}
.ticket-details-layout { flex-direction: row; }
}
.ticket-details,
.ticket-activity {
background-color: var(--color-bg);
border: 1px solid var(--color-border);
border-radius: var(--radius);
background: rgba(30, 30, 30, 0.4);
backdrop-filter: blur(8px);
border: 1px solid var(--glass-border);
border-radius: var(--radius-lg);
padding: 20px;
flex: 1;
min-width: 0;
@@ -91,6 +114,7 @@ a:hover {
flex-direction: column;
height: 600px;
}
.tab-content {
display: none;
flex-direction: column;
@@ -98,9 +122,8 @@ a:hover {
overflow: hidden;
height: 100%;
}
.tab-content.active {
display: flex;
}
.tab-content.active { display: flex; }
#comments-container,
#history-container {
flex-grow: 1;
@@ -111,74 +134,21 @@ a:hover {
scrollbar-color: var(--color-primary) transparent;
}
#comments-container::-webkit-scrollbar,
#history-container::-webkit-scrollbar {
width: 8px;
}
#history-container::-webkit-scrollbar { width: 8px; }
#comments-container::-webkit-scrollbar-thumb,
#history-container::-webkit-scrollbar-thumb {
background-color: var(--color-primary);
background: rgba(99, 102, 241, 0.3);
border-radius: 4px;
}
/* ===== TICKET HEADER ===== */
.ticket-header {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
margin-bottom: 20px;
}
.ticket-header-left {
display: flex;
flex-direction: column;
gap: 10px;
max-width: 100%;
}
.ticket-header-right {
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 8px;
}
.ticket-header h2 {
font-size: 1.4rem;
font-weight: bold;
}
.ticket-status-priority-requester {
display: flex;
gap: 15px;
align-items: center;
margin-top: 5px;
flex-wrap: wrap;
}
.ticket-status,
.ticket-priority,
.ticket-requester,
.ticket-category {
padding: 6px 14px;
border-radius: 20px;
font-weight: bold;
font-size: 0.9rem;
white-space: nowrap;
display: inline-block;
overflow: visible;
max-width: 100%;
box-sizing: border-box;
}
.ticket-status {
background-color: var(--color-primary);
color: white;
}
.ticket-priority {
background-color: var(--color-accent);
color: white;
}
.ticket-requester,
.ticket-category {
background-color: var(--color-muted);
color: var(--color-bg);
}
.ticket-header h2 { font-size: 1.4rem; font-weight: bold; }
.ticket-meta {
margin-top: 10px;
font-size: 0.9rem;
@@ -188,101 +158,117 @@ a:hover {
gap: 20px;
}
.ticket-body h3 {
margin: 20px 0 10px;
.ticket-id span {
color: var(--color-primary-hover);
font-weight: 700;
font-size: 1.1rem;
}
#ticket-description-text {
white-space: pre-wrap;
word-wrap: break-word;
overflow-wrap: break-word;
max-width: 100%;
max-height: 200px;
overflow-y: auto;
overflow-x: hidden;
padding-right: 10px;
margin-bottom: 20px;
/* ===== BADGES ===== */
.ticket-status, .ticket-priority, .ticket-requester, .ticket-category {
padding: 6px 14px;
border-radius: 20px;
font-weight: 600;
font-size: 0.9rem;
white-space: nowrap;
display: inline-block;
}
@media (min-width: 600px) {
.ticket-info-grid {
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.ticket-status { background: rgba(99, 102, 241, 0.2); color: var(--color-primary-hover); }
.ticket-priority { background: rgba(6, 182, 212, 0.2); color: var(--color-accent); }
.ticket-requester, .ticket-category {
background: rgba(148, 163, 184, 0.15);
color: var(--color-muted);
}
/* ===== INFO GRID ===== */
.ticket-info-grid {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 15px;
}
@media (max-width: 600px) {
.ticket-info-grid { grid-template-columns: 1fr 1fr; }
}
.info-item { min-width: 0; overflow: hidden; }
.info-item h4 {
margin-bottom: 4px;
font-size: 1rem;
font-size: 0.85rem;
font-weight: 600;
color: var(--color-muted);
text-transform: uppercase;
letter-spacing: 0.5px;
}
.form-control {
width: 100%;
padding: 10px 12px;
border-radius: 6px;
border: 1px solid var(--color-border);
background-color: var(--color-surface);
border-radius: var(--radius);
border: 1px solid var(--glass-border);
background: rgba(30, 30, 30, 0.5);
backdrop-filter: blur(8px);
color: var(--color-text);
font-family: 'Inter', sans-serif;
font-size: 0.95rem;
transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
outline: none;
border-color: var(--color-primary);
box-shadow: 0 0 0 3px var(--primary-glow);
}
.ticket-info-grid {
display: grid;
grid-template-columns: 1fr 1fr 1fr; /* 3 columns */
gap: 15px;
grid-auto-rows: auto;
}
.ticket-info-grid .info-item {
min-width: 0;
overflow: hidden;
}
.info-item .form-control {
width: 100%;
box-sizing: border-box;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
#ticket-description-text {
white-space: pre-wrap;
word-wrap: break-word;
max-height: 200px;
overflow-y: auto;
padding-right: 10px;
margin-bottom: 20px;
}
/* ===== TABS ===== */
.tabs {
display: flex;
margin-bottom: 15px;
gap: 10px;
gap: 8px;
}
.tab-btn {
flex: 1;
padding: 10px;
border: none;
border: 1px solid var(--glass-border);
border-radius: var(--radius);
background-color: var(--color-surface);
background: rgba(30, 30, 30, 0.3);
color: var(--color-text);
cursor: pointer;
transition: background 0.2s ease;
}
.tab-btn:hover {
background-color: var(--color-border);
transition: all var(--transition);
font-family: 'Inter', sans-serif;
font-weight: 500;
}
.tab-btn:hover { background: rgba(99, 102, 241, 0.1); border-color: rgba(99, 102, 241, 0.2); }
.tab-btn.active {
background-color: var(--color-primary);
background: var(--color-primary);
border-color: transparent;
color: white;
font-weight: 600;
}
/* ===== COMMENTS ===== */
.comment {
display: flex;
align-items: flex-start;
gap: 16px;
margin-bottom: 20px;
max-width: 800px;
gap: 14px;
margin-bottom: 16px;
}
.comment-avatar {
width: 50px;
height: 50px;
width: 44px; height: 44px;
border-radius: 50%;
object-fit: cover;
flex-shrink: 0;
border: 2px solid var(--color-border);
box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}
.comment-content {
background-color: var(--color-surface);
background: rgba(30, 30, 30, 0.4);
border: 1px solid var(--glass-border);
padding: 12px 16px;
border-radius: var(--radius);
width: 100%;
@@ -294,59 +280,49 @@ a:hover {
margin-bottom: 5px;
font-size: 0.85rem;
}
.comment-author {
font-weight: bold;
}
.comment-date {
color: var(--color-muted);
font-size: 0.8rem;
}
.comment-text {
font-size: 0.95rem;
line-height: 1.5;
word-wrap: break-word;
}
.comment-author { font-weight: 600; }
.comment-date { color: var(--color-muted); font-size: 0.8rem; }
.comment-text { font-size: 0.95rem; line-height: 1.5; word-wrap: break-word; }
.comment-form {
display: flex;
flex-direction: column;
gap: 10px;
margin-bottom: 20px;
gap: 8px;
margin-bottom: 16px;
}
.comment-form input,
.comment-form textarea {
background-color: var(--color-surface);
background: rgba(30, 30, 30, 0.5);
color: var(--color-text);
border: 1px solid var(--color-border);
border: 1px solid var(--glass-border);
border-radius: var(--radius);
padding: 10px;
font-size: 1rem;
font-size: 0.95rem;
font-family: 'Inter', sans-serif;
transition: border-color var(--transition), box-shadow var(--transition);
}
.comment-form input:focus,
.comment-form textarea:focus {
outline: none;
border-color: var(--color-primary);
box-shadow: 0 0 0 3px var(--primary-glow);
}
/* ===== HISTORY ===== */
.history-item {
display: flex;
gap: 12px;
margin-bottom: 15px;
}
.history-icon {
font-size: 1.2rem;
color: var(--color-primary);
margin-bottom: 12px;
}
.history-icon { font-size: 1.2rem; color: var(--color-primary-hover); }
.history-content {
background-color: var(--color-surface);
background: rgba(30, 30, 30, 0.4);
border: 1px solid var(--glass-border);
padding: 10px 15px;
border-radius: var(--radius);
width: 100%;
}
.history-action {
font-weight: bold;
margin-bottom: 4px;
}
.history-action { font-weight: 600; margin-bottom: 4px; }
.history-meta {
display: flex;
justify-content: space-between;
@@ -354,21 +330,45 @@ a:hover {
color: var(--color-muted);
}
/* Post Comment Button Styling */
/* ===== BUTTONS ===== */
.btn-primary {
padding: 10px 16px;
background-color: var(--color-primary);
background: var(--color-primary);
color: white;
border: none;
border-radius: var(--radius);
cursor: pointer;
font-weight: 600;
transition: background 0.2s ease;
align-self: flex-start; /* damit er nicht breit wird */
font-family: 'Inter', sans-serif;
transition: all var(--transition);
align-self: flex-start;
}
.btn-primary:hover {
transform: translateY(-1px);
}
.btn-primaryt-btn:hover {
background-color: var(--color-primary-hover);
.btn-secondary {
padding: 10px 16px;
background: rgba(99, 102, 241, 0.15);
color: var(--color-primary-hover);
border: 1px solid rgba(99, 102, 241, 0.2);
border-radius: var(--radius);
cursor: pointer;
font-weight: 600;
font-family: 'Inter', sans-serif;
transition: all var(--transition);
}
.btn-secondary:hover {
background: rgba(99, 102, 241, 0.25);
border-color: rgba(99, 102, 241, 0.3);
}
.ticket-actions-bar {
display: flex;
gap: 10px;
margin-top: 20px;
}
.footer {
@@ -376,5 +376,11 @@ a:hover {
text-align: center;
font-size: 0.85rem;
color: var(--color-muted);
border-top: 1px solid var(--color-border);
border-top: 1px solid var(--glass-border);
}
/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(99, 102, 241, 0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99, 102, 241, 0.5); }
+1 -2
View File
@@ -237,14 +237,13 @@ document.addEventListener('DOMContentLoaded', () => {
<h3>${escapeHtml(ticket.title)} <span class="ticket-id">#${ticket.id}</span> <small class="total-time">Time: (${ticket.total_time} min)</small></h3>
<p class="description">${escapeHtml(ticket.description)}</p>
<div class="meta">
<span class="requester"><i class="fas fa-user"></i> ${escapeHtml(ticket.requester)}</span>
<span class="date"><i class="fas fa-calendar"></i> ${formatDate(ticket.created_at)}</span>
${ticket.category ? `<span class="category"><i class="fas fa-tag"></i> ${escapeHtml(ticket.category)}</span>` : ''}
</div>
<div class="status-row">
<div class="status status-${statusSafe.replace(/\s+/g, '-')}">
<i class="fas fa-circle"></i> ${escapeHtml(ticket.status)}
</div>
${ticket.category ? `<div class="category-badge"><i class="fas fa-tag"></i> ${escapeHtml(ticket.category)}</div>` : ''}
<div class="priority priority-${prioritySafe.replace(/\s+/g, '-')}">
<i class="fas fa-flag"></i> ${escapeHtml(prioritySafe)}
</div>
+344 -373
View File
File diff suppressed because it is too large. Load diff