🧪 Tests: 73 → 130 (+57 tests) - Upload API, labels sync, commit history (401/400/502/cached) - File create/update (sha=null, sha=abc) - Admin delete cascade (12 tests: oauth, tags, workspaces, pages…) - Gitea status (linked/unlinked/disconnect) - OAuth link mode (session, redirect, callback) 🔒 Sécurité - ContentSecurityPolicyMiddleware (CSP headers) - RateLimitMiddleware (100 req/min/IP) - Pydantic models: ErrorResponse, SuccessResponse - Input validation upload (10MB, allowed extensions) - Pydantic request models 🎨 UX - static/css/design-tokens.css (500 lines, thèmes + skeletons) - Toast system: 16 alert() remplacés par toast() - 59 lignes CSS dupliquées retirées (6 templates) - Skeletons cohérents sur toutes les vues ⚡ Performance - Cache TTL sur get_file_commits (consistant avec les autres méthodes)
501 lines
10 KiB
CSS
501 lines
10 KiB
CSS
/* ═══════════════════════════════════════════════════════════
|
|
FlowDeck — Design Tokens & System
|
|
Theme variables, light/dark mode, skeletons, toasts, shared UI
|
|
═══════════════════════════════════════════════════════════ */
|
|
|
|
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
|
|
|
|
/* ═══════════ THEME VARIABLES (Dark — default) ═══════════ */
|
|
:root {
|
|
/* ===== Background ===== */
|
|
--bg-primary: #191919;
|
|
--bg-secondary: #1f1f1f;
|
|
--bg-sidebar: #222222;
|
|
--bg-tertiary: #333333;
|
|
--bg-hover: #2a2a2a;
|
|
--bg-active: #2F2E2E;
|
|
--bg-modal: #252525;
|
|
|
|
/* ===== Text ===== */
|
|
--text-primary: #FFFFFF;
|
|
--text-secondary: #A0A0A0;
|
|
--text-dim: #6B6B6B;
|
|
--text-muted: #4A4A4A;
|
|
--text: #FFFFFF;
|
|
|
|
/* ===== Borders ===== */
|
|
--border: #333333;
|
|
--border-color: rgba(255,255,255,0.06);
|
|
--border-light: #3a3a3a;
|
|
--border-strong: #4a4a4a;
|
|
|
|
/* ===== Accent Colors ===== */
|
|
--blue: #3366CC;
|
|
--blue-bg: #1a2744;
|
|
--green: #00CC66;
|
|
--green-bg: #1a332a;
|
|
--yellow: #FFD700;
|
|
--orange: #D9730D;
|
|
--red: #E03E3E;
|
|
--purple: #9B72F0;
|
|
--pink: #E255A1;
|
|
--gray: #787774;
|
|
--brown: #9D6E4A;
|
|
|
|
--accent: #2383E2;
|
|
--accent-hover: #1a6bc0;
|
|
--danger: #E03E3E;
|
|
--danger-hover: #C93535;
|
|
|
|
/* ===== Typography ===== */
|
|
--font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
--font-mono: 'SF Mono', 'Fira Code', monospace;
|
|
|
|
/* ===== Dimensions ===== */
|
|
--sidebar-width: 240px;
|
|
--sidebar-collapsed: 0px;
|
|
--topbar-height: 40px;
|
|
--radius-sm: 4px;
|
|
--radius-md: 6px;
|
|
--radius-lg: 8px;
|
|
--radius: 8px;
|
|
|
|
/* ===== Spacing ===== */
|
|
--space-xs: 4px;
|
|
--space-sm: 8px;
|
|
--space-md: 12px;
|
|
--space-lg: 16px;
|
|
--space-xl: 24px;
|
|
|
|
/* ===== Transitions ===== */
|
|
--transition: 0.15s ease;
|
|
|
|
/* ===== Toast colors ===== */
|
|
--toast-success-bg: #0F7B6C;
|
|
--toast-success-text: #FFFFFF;
|
|
--toast-error-bg: #E03E3E;
|
|
--toast-error-text: #FFFFFF;
|
|
--toast-info-bg: #2383E2;
|
|
--toast-info-text: #FFFFFF;
|
|
}
|
|
|
|
/* ═══════════ LIGHT THEME ═══════════ */
|
|
[data-theme="light"] {
|
|
--bg-primary: #FFFFFF;
|
|
--bg-secondary: #FBFBFA;
|
|
--bg-sidebar: #F7F6F3;
|
|
--bg-tertiary: #EDEDEC;
|
|
--bg-hover: #EFEFEE;
|
|
--bg-active: #E8E7E4;
|
|
--bg-modal: #FFFFFF;
|
|
|
|
--text-primary: #1A1A1A;
|
|
--text-secondary: #6B6B6B;
|
|
--text-dim: #9B9B9B;
|
|
--text-muted: #B0B0B0;
|
|
--text: #37352F;
|
|
|
|
--border: #E0E0E0;
|
|
--border-color: rgba(0,0,0,0.06);
|
|
--border-light: #EDEDEC;
|
|
--border-strong: #CCCBC8;
|
|
|
|
--blue-bg: #E8F0FE;
|
|
--green-bg: #E6F4EA;
|
|
}
|
|
|
|
/* ═══════════ RESET ADDITIONS ═══════════ */
|
|
[x-cloak] { display: none !important; }
|
|
|
|
/* ═══════════ SKELETON LOADING ═══════════ */
|
|
.skeleton {
|
|
background: var(--bg-tertiary);
|
|
animation: skeleton-pulse 1.5s ease-in-out infinite;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
@keyframes skeleton-pulse {
|
|
0%, 100% { opacity: 1; }
|
|
50% { opacity: .5; }
|
|
}
|
|
|
|
/* Skeleton variants for different contexts */
|
|
.skeleton-card {
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
padding: 20px;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.skeleton-card .skeleton-line {
|
|
height: 14px;
|
|
margin-bottom: 10px;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.skeleton-card .skeleton-line:last-child { margin-bottom: 0; }
|
|
|
|
.skeleton-file {
|
|
padding: 16px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
background: var(--bg-secondary);
|
|
max-height: 70vh;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.skeleton-line {
|
|
background: var(--bg-tertiary);
|
|
animation: skeleton-pulse 1.5s ease-in-out infinite;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.skeleton-table {
|
|
overflow: hidden;
|
|
}
|
|
|
|
.skeleton-table .skeleton-line {
|
|
height: 40px;
|
|
margin-bottom: 2px;
|
|
border-radius: 0;
|
|
}
|
|
|
|
/* ═══════════ TOAST NOTIFICATIONS ═══════════ */
|
|
.toast-container {
|
|
position: fixed;
|
|
bottom: 24px;
|
|
right: 24px;
|
|
z-index: 9999;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.toast {
|
|
padding: 12px 20px;
|
|
border-radius: 8px;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
font-family: var(--font-sans);
|
|
max-width: 400px;
|
|
box-shadow: 0 8px 24px rgba(0,0,0,.4);
|
|
pointer-events: auto;
|
|
animation: toast-slide-in 0.25s ease-out;
|
|
backdrop-filter: blur(4px);
|
|
}
|
|
|
|
.toast-success {
|
|
background: var(--toast-success-bg);
|
|
color: var(--toast-success-text);
|
|
}
|
|
|
|
.toast-error {
|
|
background: var(--toast-error-bg);
|
|
color: var(--toast-error-text);
|
|
}
|
|
|
|
.toast-info {
|
|
background: var(--toast-info-bg);
|
|
color: var(--toast-info-text);
|
|
}
|
|
|
|
@keyframes toast-slide-in {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(12px) scale(0.96);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0) scale(1);
|
|
}
|
|
}
|
|
|
|
/* ═══════════ SHARED BUTTONS ═══════════ */
|
|
.btn {
|
|
padding: 8px 16px;
|
|
border-radius: 8px;
|
|
font-size: 13px;
|
|
cursor: pointer;
|
|
font-weight: 500;
|
|
border: 1px solid var(--border);
|
|
background: transparent;
|
|
color: var(--text-dim);
|
|
font-family: var(--font-sans);
|
|
transition: background var(--transition), color var(--transition);
|
|
}
|
|
|
|
.btn:hover {
|
|
background: var(--bg-tertiary);
|
|
color: var(--text);
|
|
}
|
|
|
|
.btn-primary {
|
|
padding: 8px 16px;
|
|
border-radius: 8px;
|
|
font-size: 13px;
|
|
cursor: pointer;
|
|
border: none;
|
|
font-weight: 500;
|
|
font-family: var(--font-sans);
|
|
background: var(--accent);
|
|
color: #fff;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background: var(--accent-hover);
|
|
}
|
|
|
|
.btn-primary:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.btn-danger {
|
|
background: rgba(255,80,80,.15);
|
|
color: var(--danger);
|
|
border: none;
|
|
padding: 8px 16px;
|
|
border-radius: 8px;
|
|
font-size: 13px;
|
|
cursor: pointer;
|
|
font-weight: 500;
|
|
font-family: var(--font-sans);
|
|
}
|
|
|
|
.btn-danger:hover {
|
|
background: rgba(255,80,80,.25);
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: var(--bg-tertiary);
|
|
color: var(--text);
|
|
border: 1px solid var(--border);
|
|
padding: 8px 16px;
|
|
border-radius: 8px;
|
|
font-size: 13px;
|
|
cursor: pointer;
|
|
font-weight: 500;
|
|
font-family: var(--font-sans);
|
|
transition: background var(--transition);
|
|
}
|
|
|
|
.btn-secondary:hover {
|
|
background: var(--bg-hover);
|
|
}
|
|
|
|
.btn-sm {
|
|
padding: 4px 8px;
|
|
font-size: 11px;
|
|
border-radius: 6px;
|
|
border: 1px solid var(--border);
|
|
background: transparent;
|
|
color: var(--text-dim);
|
|
cursor: pointer;
|
|
font-family: var(--font-sans);
|
|
}
|
|
|
|
.btn-sm:hover {
|
|
background: var(--bg-tertiary);
|
|
color: var(--text);
|
|
}
|
|
|
|
.btn-sm-danger {
|
|
color: var(--danger);
|
|
border-color: rgba(255,80,80,.3);
|
|
}
|
|
|
|
.btn-new {
|
|
border: 1px dashed var(--border-strong);
|
|
background: transparent;
|
|
color: var(--text-secondary);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: var(--radius);
|
|
}
|
|
|
|
.btn-new:hover {
|
|
background: var(--bg-tertiary);
|
|
color: var(--text);
|
|
}
|
|
|
|
/* ═══════════ SHARED FORMS ═══════════ */
|
|
.settings-input {
|
|
background: var(--bg-tertiary);
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
color: var(--text);
|
|
font-size: 13px;
|
|
padding: 6px 10px;
|
|
outline: none;
|
|
width: 100%;
|
|
font-family: var(--font-sans);
|
|
}
|
|
|
|
.settings-input:focus {
|
|
border-color: var(--accent);
|
|
box-shadow: 0 0 0 2px rgba(35,131,226,.25);
|
|
}
|
|
|
|
.settings-select {
|
|
background: var(--bg-tertiary);
|
|
color: var(--text);
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
padding: 6px 10px;
|
|
font-size: 13px;
|
|
outline: none;
|
|
cursor: pointer;
|
|
min-width: 140px;
|
|
font-family: var(--font-sans);
|
|
}
|
|
|
|
.settings-select:focus {
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
/* ═══════════ SHARED DIALOGS ═══════════ */
|
|
.dialog-overlay {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(0,0,0,.6);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 500;
|
|
}
|
|
|
|
.dialog-box {
|
|
background: var(--bg-primary);
|
|
border: 1px solid var(--border);
|
|
border-radius: 18px;
|
|
padding: 24px;
|
|
width: 400px;
|
|
max-width: 90vw;
|
|
}
|
|
|
|
.dialog-box h3 {
|
|
margin-bottom: 16px;
|
|
color: var(--text);
|
|
}
|
|
|
|
.dialog-input {
|
|
width: 100%;
|
|
padding: 10px 12px;
|
|
background: var(--bg-tertiary);
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
color: var(--text);
|
|
font-size: 14px;
|
|
margin-bottom: 12px;
|
|
outline: none;
|
|
font-family: var(--font-sans);
|
|
}
|
|
|
|
.dialog-input:focus {
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
.dialog-actions {
|
|
display: flex;
|
|
gap: 8px;
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
/* ═══════════ MODAL ═══════════ */
|
|
.modal-overlay {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(0,0,0,.85);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 999;
|
|
}
|
|
|
|
.modal-box {
|
|
background: var(--bg-primary);
|
|
border: 1px solid var(--border);
|
|
border-radius: 12px;
|
|
padding: 24px;
|
|
min-width: 320px;
|
|
box-shadow: 0 12px 40px rgba(0,0,0,.8);
|
|
}
|
|
|
|
.modal-box h3 {
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
color: var(--text);
|
|
}
|
|
|
|
/* ═══════════ DROPDOWN ═══════════ */
|
|
.dropdown-panel {
|
|
display: none;
|
|
position: absolute;
|
|
background: var(--bg-primary);
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
box-shadow: 0 8px 24px rgba(0,0,0,.5);
|
|
z-index: 300;
|
|
min-width: 180px;
|
|
padding: 4px 0;
|
|
}
|
|
|
|
.dropdown-panel.visible {
|
|
display: block;
|
|
}
|
|
|
|
.dropdown-option {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 6px 12px;
|
|
font-size: 13px;
|
|
color: var(--text);
|
|
cursor: pointer;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.dropdown-option:hover {
|
|
background: var(--bg-hover);
|
|
}
|
|
|
|
/* ═══════════ EMPTY STATE ═══════════ */
|
|
.empty-state {
|
|
text-align: center;
|
|
padding: 60px 20px;
|
|
color: var(--text-dim);
|
|
}
|
|
|
|
.empty-state h2 {
|
|
font-size: 18px;
|
|
margin-bottom: 8px;
|
|
color: var(--text);
|
|
}
|
|
|
|
/* ═══════════ TEXT UTILITIES ═══════════ */
|
|
.text-dim { color: var(--text-dim); }
|
|
.text-xs { font-size: 12px; }
|
|
.text-secondary { color: var(--text-secondary); }
|
|
|
|
/* ═══════════ PASSWORD TOGGLE ═══════════ */
|
|
.pw-wrapper {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.pw-toggle {
|
|
position: absolute;
|
|
right: 6px;
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
font-size: 16px;
|
|
padding: 4px;
|
|
color: var(--text-dim);
|
|
font-family: var(--font-sans);
|
|
}
|