feat: initial frontend - React + TypeScript + Vite
- Login page with JWT auth - Dashboard with stats and charts - Issues list with pagination, filtering - Issue detail with comments, status transitions - Create issue form - Dark theme UI - Docker (nginx) with API proxy to backend - Sidebar navigation
This commit is contained in:
120
src/index.css
Normal file
120
src/index.css
Normal file
@@ -0,0 +1,120 @@
|
||||
:root {
|
||||
--bg: #0f1117;
|
||||
--bg-card: #1a1d27;
|
||||
--bg-hover: #22252f;
|
||||
--border: #2a2d37;
|
||||
--text: #e1e4ea;
|
||||
--text-dim: #8b8fa3;
|
||||
--accent: #3b82f6;
|
||||
--accent-hover: #2563eb;
|
||||
--success: #10b981;
|
||||
--warning: #f59e0b;
|
||||
--danger: #ef4444;
|
||||
--sidebar-w: 220px;
|
||||
}
|
||||
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); }
|
||||
a { color: var(--accent); text-decoration: none; }
|
||||
a:hover { text-decoration: underline; }
|
||||
|
||||
/* Layout */
|
||||
.app-layout { display: flex; min-height: 100vh; }
|
||||
.main-content { flex: 1; padding: 24px 32px; margin-left: var(--sidebar-w); }
|
||||
.loading { display: flex; align-items: center; justify-content: center; height: 100vh; font-size: 1.2rem; color: var(--text-dim); }
|
||||
|
||||
/* Sidebar */
|
||||
.sidebar { position: fixed; top: 0; left: 0; width: var(--sidebar-w); height: 100vh; background: var(--bg-card); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 16px 0; }
|
||||
.sidebar-header { padding: 8px 20px 24px; }
|
||||
.sidebar-header h1 { font-size: 1.2rem; }
|
||||
.nav-links { list-style: none; flex: 1; }
|
||||
.nav-links li a { display: block; padding: 10px 20px; color: var(--text-dim); transition: .15s; }
|
||||
.nav-links li a:hover, .nav-links li.active a { background: var(--bg-hover); color: var(--text); text-decoration: none; }
|
||||
.sidebar-footer { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; font-size: .85rem; color: var(--text-dim); }
|
||||
.sidebar-footer button { background: none; border: 1px solid var(--border); color: var(--text-dim); padding: 4px 10px; border-radius: 4px; cursor: pointer; }
|
||||
|
||||
/* Login */
|
||||
.login-page { display: flex; align-items: center; justify-content: center; height: 100vh; }
|
||||
.login-card { background: var(--bg-card); padding: 40px; border-radius: 12px; border: 1px solid var(--border); width: 360px; text-align: center; }
|
||||
.login-card h1 { margin-bottom: 8px; }
|
||||
.login-card .subtitle { color: var(--text-dim); margin-bottom: 24px; }
|
||||
.login-card form { display: flex; flex-direction: column; gap: 12px; }
|
||||
.login-card input { padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); font-size: .95rem; }
|
||||
.login-card button { padding: 10px; background: var(--accent); color: #fff; border: none; border-radius: 6px; font-size: 1rem; cursor: pointer; }
|
||||
.login-card button:hover { background: var(--accent-hover); }
|
||||
.error { color: var(--danger); font-size: .85rem; }
|
||||
|
||||
/* Stats */
|
||||
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin: 16px 0 24px; }
|
||||
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 8px; padding: 16px; text-align: center; }
|
||||
.stat-card.total { border-left-color: var(--success); }
|
||||
.stat-number { display: block; font-size: 1.8rem; font-weight: 700; }
|
||||
.stat-label { display: block; font-size: .8rem; color: var(--text-dim); margin-top: 4px; text-transform: capitalize; }
|
||||
|
||||
/* Bar chart */
|
||||
.bar-chart { margin: 12px 0; }
|
||||
.bar-row { display: flex; align-items: center; margin: 6px 0; }
|
||||
.bar-label { width: 70px; font-size: .85rem; color: var(--text-dim); text-transform: capitalize; }
|
||||
.bar { padding: 4px 10px; border-radius: 4px; color: #fff; font-size: .8rem; min-width: 30px; text-align: right; transition: .3s; }
|
||||
|
||||
/* Table */
|
||||
table { width: 100%; border-collapse: collapse; margin-top: 12px; }
|
||||
thead th { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--border); color: var(--text-dim); font-size: .8rem; text-transform: uppercase; }
|
||||
tbody td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
|
||||
tr.clickable { cursor: pointer; }
|
||||
tr.clickable:hover { background: var(--bg-hover); }
|
||||
.issue-title { font-weight: 500; max-width: 400px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
|
||||
/* Badges */
|
||||
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: .75rem; font-weight: 600; text-transform: capitalize; color: #fff; background: var(--text-dim); }
|
||||
.status-open { background: #3b82f6; }
|
||||
.status-in_progress { background: #f59e0b; }
|
||||
.status-resolved { background: #10b981; }
|
||||
.status-closed { background: #6b7280; }
|
||||
.status-blocked { background: #ef4444; }
|
||||
.priority-low { background: #6b7280; }
|
||||
.priority-medium { background: #3b82f6; }
|
||||
.priority-high { background: #f59e0b; }
|
||||
.priority-critical { background: #ef4444; }
|
||||
|
||||
/* Page header */
|
||||
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
|
||||
.btn-primary { background: var(--accent); color: #fff; border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-size: .9rem; }
|
||||
.btn-primary:hover { background: var(--accent-hover); }
|
||||
.btn-back { background: none; border: 1px solid var(--border); color: var(--text-dim); padding: 6px 12px; border-radius: 6px; cursor: pointer; margin-bottom: 16px; }
|
||||
|
||||
/* Filters */
|
||||
.filters { margin-bottom: 12px; display: flex; gap: 8px; }
|
||||
.filters select { padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-card); color: var(--text); }
|
||||
|
||||
/* Pagination */
|
||||
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
|
||||
.pagination button { padding: 6px 14px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text); border-radius: 6px; cursor: pointer; }
|
||||
.pagination button:disabled { opacity: .4; cursor: default; }
|
||||
|
||||
/* Issue detail */
|
||||
.issue-header { margin-bottom: 20px; }
|
||||
.issue-header h2 { margin-bottom: 8px; }
|
||||
.issue-meta { display: flex; gap: 8px; flex-wrap: wrap; }
|
||||
.tags { color: var(--accent); font-size: .85rem; }
|
||||
.section { margin: 20px 0; }
|
||||
.section h3 { margin-bottom: 8px; color: var(--text-dim); font-size: .9rem; text-transform: uppercase; }
|
||||
dl { display: grid; grid-template-columns: 120px 1fr; gap: 6px; }
|
||||
dt { color: var(--text-dim); font-size: .85rem; }
|
||||
dd { font-size: .9rem; }
|
||||
.actions { display: flex; gap: 8px; }
|
||||
.btn-transition { padding: 6px 14px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text); border-radius: 6px; cursor: pointer; text-transform: capitalize; }
|
||||
.btn-transition:hover { background: var(--bg-hover); }
|
||||
|
||||
/* Comments */
|
||||
.comment { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin-bottom: 8px; }
|
||||
.comment-meta { font-size: .8rem; color: var(--text-dim); margin-bottom: 4px; }
|
||||
.comment-form { margin-top: 12px; }
|
||||
.comment-form textarea { width: 100%; min-height: 80px; padding: 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); resize: vertical; margin-bottom: 8px; }
|
||||
.comment-form button { padding: 8px 16px; background: var(--accent); color: #fff; border: none; border-radius: 6px; cursor: pointer; }
|
||||
|
||||
/* Create Issue form */
|
||||
.create-issue form { max-width: 600px; display: flex; flex-direction: column; gap: 14px; }
|
||||
.create-issue label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--text-dim); }
|
||||
.create-issue input, .create-issue textarea, .create-issue select { padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); font-size: .95rem; }
|
||||
.create-issue textarea { min-height: 100px; resize: vertical; }
|
||||
Reference in New Issue
Block a user