Major Features: - Complete Naming Convention editor in Admin Panel - Define custom filename patterns for platform detection - Define custom filename patterns for aspect ratio detection - Patterns saved to naming_conventions.json (editable) - Test pattern functionality built-in - Auto-loads patterns from JSON on server startup - Factory reset now restores original patterns too UI Changes: - Remove L'Oréal references from app (now generic tool) - Changed title to "Social Media Platform Optimization Tool" - Renamed "Reload from Server" to "Refresh Display" - Added "Reset to Factory Defaults" button (red, double-confirm) - New Naming Conventions section in admin panel - Pattern editor with add/remove functionality Backend Enhancements: - Save/load naming conventions to JSON - GET /api/admin/naming-conventions (retrieve patterns) - POST /api/admin/naming-conventions (save patterns) - Factory defaults for patterns stored at startup - Patterns persist across server restarts - Detection logic now uses editable patterns Naming Convention Features: - Platform patterns: Map platform key to filename patterns - Aspect ratio patterns: Map ratio to filename patterns - Multiple patterns per platform/ratio supported - Test functionality to verify detection - Immediate application to main app Example patterns: - TikTok: _tiktok_, _tt_ - 16:9: _16x9_, _landscape_ - Meta: _meta_, _fb_, _ig_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
532 lines
9.4 KiB
CSS
532 lines
9.4 KiB
CSS
/* Admin Panel Additional Styles */
|
|
|
|
.header-actions {
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
.btn-link {
|
|
color: var(--primary-yellow);
|
|
text-decoration: none;
|
|
font-weight: 600;
|
|
padding: 0.5rem 1rem;
|
|
border: 2px solid var(--primary-yellow);
|
|
border-radius: 6px;
|
|
display: inline-block;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.btn-link:hover {
|
|
background-color: var(--primary-yellow);
|
|
color: var(--primary-black);
|
|
}
|
|
|
|
/* Metrics Section */
|
|
.metrics-section {
|
|
background-color: var(--secondary-black);
|
|
border-radius: 12px;
|
|
padding: 2rem;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.metrics-section h2 {
|
|
font-size: 1.75rem;
|
|
font-weight: 600;
|
|
color: var(--primary-yellow);
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.metrics-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
gap: 1.5rem;
|
|
}
|
|
|
|
.metric-card {
|
|
background-color: var(--primary-black);
|
|
border: 2px solid var(--border-color);
|
|
border-radius: 8px;
|
|
padding: 2rem;
|
|
text-align: center;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.metric-card:hover {
|
|
border-color: var(--primary-yellow);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.metric-value {
|
|
font-size: 3rem;
|
|
font-weight: 700;
|
|
color: var(--primary-yellow);
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.metric-label {
|
|
font-size: 0.875rem;
|
|
color: var(--text-secondary);
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* Actions Bar */
|
|
.actions-bar {
|
|
display: flex;
|
|
gap: 1rem;
|
|
margin-bottom: 2rem;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.actions-bar .btn-primary,
|
|
.actions-bar .btn-secondary {
|
|
flex: 1;
|
|
min-width: 200px;
|
|
}
|
|
|
|
.btn-danger {
|
|
background-color: transparent;
|
|
color: #ff0000;
|
|
border: 2px solid #ff0000;
|
|
}
|
|
|
|
.btn-danger:hover {
|
|
background-color: #ff0000;
|
|
color: white;
|
|
border-color: #ff0000;
|
|
}
|
|
|
|
/* Platforms Section */
|
|
.platforms-section {
|
|
margin-bottom: 3rem;
|
|
}
|
|
|
|
.platforms-section h2 {
|
|
font-size: 1.75rem;
|
|
font-weight: 600;
|
|
color: var(--primary-yellow);
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.platform-card {
|
|
background-color: var(--secondary-black);
|
|
border: 2px solid var(--border-color);
|
|
border-radius: 12px;
|
|
padding: 1.5rem;
|
|
margin-bottom: 1.5rem;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.platform-card:hover {
|
|
border-color: var(--primary-yellow);
|
|
}
|
|
|
|
.platform-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 1rem;
|
|
padding-bottom: 1rem;
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
.platform-title {
|
|
font-size: 1.5rem;
|
|
font-weight: 700;
|
|
color: var(--primary-yellow);
|
|
}
|
|
|
|
.platform-key {
|
|
font-size: 0.875rem;
|
|
color: var(--text-muted);
|
|
font-family: 'Courier New', monospace;
|
|
}
|
|
|
|
.platform-actions {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.btn-icon {
|
|
padding: 0.5rem 1rem;
|
|
background-color: transparent;
|
|
color: var(--primary-yellow);
|
|
border: 1px solid var(--primary-yellow);
|
|
border-radius: 6px;
|
|
font-family: 'Montserrat', sans-serif;
|
|
font-size: 0.875rem;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.btn-icon:hover {
|
|
background-color: var(--primary-yellow);
|
|
color: var(--primary-black);
|
|
}
|
|
|
|
.btn-icon.danger {
|
|
border-color: #ff0000;
|
|
color: #ff0000;
|
|
}
|
|
|
|
.btn-icon.danger:hover {
|
|
background-color: #ff0000;
|
|
color: white;
|
|
}
|
|
|
|
.platform-info {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
|
gap: 1rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.info-badge {
|
|
background-color: var(--primary-black);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 6px;
|
|
padding: 0.75rem;
|
|
}
|
|
|
|
.info-badge-label {
|
|
font-size: 0.75rem;
|
|
color: var(--text-muted);
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
|
|
.info-badge-value {
|
|
font-size: 1rem;
|
|
color: var(--text-primary);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.formats-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
.formats-table th,
|
|
.formats-table td {
|
|
padding: 0.75rem;
|
|
text-align: left;
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
.formats-table th {
|
|
background-color: var(--primary-black);
|
|
color: var(--primary-yellow);
|
|
font-weight: 600;
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.formats-table td {
|
|
color: var(--text-secondary);
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.formats-table tr:hover {
|
|
background-color: rgba(255, 196, 7, 0.05);
|
|
}
|
|
|
|
/* Naming Conventions Section */
|
|
.naming-section {
|
|
background-color: var(--secondary-black);
|
|
border-radius: 12px;
|
|
padding: 2rem;
|
|
margin-bottom: 3rem;
|
|
}
|
|
|
|
.naming-section h2 {
|
|
font-size: 1.75rem;
|
|
font-weight: 600;
|
|
color: var(--primary-yellow);
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.section-description {
|
|
color: var(--text-secondary);
|
|
margin-bottom: 2rem;
|
|
font-size: 0.9375rem;
|
|
}
|
|
|
|
.naming-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
|
|
gap: 2rem;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.naming-panel {
|
|
background-color: var(--primary-black);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 8px;
|
|
padding: 1.5rem;
|
|
}
|
|
|
|
.naming-panel h3 {
|
|
color: var(--primary-yellow);
|
|
font-size: 1.25rem;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.naming-panel .hint {
|
|
color: var(--text-muted);
|
|
font-size: 0.8125rem;
|
|
margin-bottom: 1rem;
|
|
display: block;
|
|
}
|
|
|
|
.pattern-item {
|
|
background-color: var(--secondary-black);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 6px;
|
|
padding: 1rem;
|
|
margin-bottom: 0.75rem;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.pattern-item:hover {
|
|
border-color: var(--primary-yellow);
|
|
}
|
|
|
|
.pattern-select {
|
|
flex: 0 0 180px;
|
|
}
|
|
|
|
.pattern-input {
|
|
flex: 1;
|
|
}
|
|
|
|
.pattern-remove {
|
|
flex: 0 0 auto;
|
|
background: none;
|
|
border: none;
|
|
color: #ff0000;
|
|
font-size: 1.25rem;
|
|
cursor: pointer;
|
|
padding: 0.25rem 0.5rem;
|
|
}
|
|
|
|
.pattern-remove:hover {
|
|
color: #ff6666;
|
|
}
|
|
|
|
.btn-sm {
|
|
padding: 0.5rem 1rem;
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.naming-actions {
|
|
display: flex;
|
|
gap: 1rem;
|
|
margin-top: 2rem;
|
|
}
|
|
|
|
.naming-actions .btn-primary,
|
|
.naming-actions .btn-secondary {
|
|
flex: 1;
|
|
}
|
|
|
|
/* Modal */
|
|
.modal {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background-color: rgba(0, 0, 0, 0.9);
|
|
z-index: 1000;
|
|
overflow-y: auto;
|
|
padding: 2rem;
|
|
}
|
|
|
|
.modal-content {
|
|
background-color: var(--secondary-black);
|
|
border: 2px solid var(--primary-yellow);
|
|
border-radius: 12px;
|
|
max-width: 900px;
|
|
margin: 0 auto;
|
|
padding: 0;
|
|
}
|
|
|
|
.modal-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 1.5rem;
|
|
border-bottom: 2px solid var(--border-color);
|
|
}
|
|
|
|
.modal-header h2 {
|
|
color: var(--primary-yellow);
|
|
font-size: 1.5rem;
|
|
margin: 0;
|
|
}
|
|
|
|
.modal-close {
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-primary);
|
|
font-size: 2rem;
|
|
cursor: pointer;
|
|
padding: 0;
|
|
width: 40px;
|
|
height: 40px;
|
|
line-height: 40px;
|
|
text-align: center;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.modal-close:hover {
|
|
color: var(--primary-yellow);
|
|
transform: rotate(90deg);
|
|
}
|
|
|
|
.modal-body {
|
|
padding: 2rem;
|
|
}
|
|
|
|
.form-group {
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.form-group label {
|
|
display: block;
|
|
font-size: 0.875rem;
|
|
font-weight: 600;
|
|
color: var(--text-secondary);
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.form-group h3 {
|
|
color: var(--primary-yellow);
|
|
font-size: 1.25rem;
|
|
margin: 2rem 0 1rem 0;
|
|
padding-top: 1rem;
|
|
border-top: 1px solid var(--border-color);
|
|
}
|
|
|
|
.format-config {
|
|
background-color: var(--primary-black);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 8px;
|
|
padding: 1rem;
|
|
margin-bottom: 1rem;
|
|
position: relative;
|
|
}
|
|
|
|
.format-config-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.format-config-title {
|
|
color: var(--primary-yellow);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.btn-remove {
|
|
background: none;
|
|
border: none;
|
|
color: #ff0000;
|
|
font-size: 1.5rem;
|
|
cursor: pointer;
|
|
padding: 0;
|
|
width: 30px;
|
|
height: 30px;
|
|
line-height: 30px;
|
|
text-align: center;
|
|
}
|
|
|
|
.btn-remove:hover {
|
|
color: #ff6666;
|
|
}
|
|
|
|
.format-fields {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
|
gap: 1rem;
|
|
}
|
|
|
|
.format-fields .form-group {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.modal-actions {
|
|
display: flex;
|
|
gap: 1rem;
|
|
margin-top: 2rem;
|
|
padding-top: 1.5rem;
|
|
border-top: 1px solid var(--border-color);
|
|
}
|
|
|
|
.modal-actions .btn-primary,
|
|
.modal-actions .btn-secondary {
|
|
flex: 1;
|
|
}
|
|
|
|
/* Success/Error Messages */
|
|
.message {
|
|
padding: 1rem;
|
|
border-radius: 6px;
|
|
margin-bottom: 1rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.message.success {
|
|
background-color: rgba(0, 255, 0, 0.1);
|
|
border: 2px solid #00ff00;
|
|
color: #00ff00;
|
|
}
|
|
|
|
.message.error {
|
|
background-color: rgba(255, 0, 0, 0.1);
|
|
border: 2px solid #ff0000;
|
|
color: #ff6666;
|
|
}
|
|
|
|
/* Empty State */
|
|
.empty-state {
|
|
text-align: center;
|
|
padding: 3rem;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.empty-state h3 {
|
|
color: var(--text-secondary);
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
/* Responsive */
|
|
@media (max-width: 768px) {
|
|
.modal {
|
|
padding: 1rem;
|
|
}
|
|
|
|
.platform-header {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.platform-actions {
|
|
width: 100%;
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
.actions-bar {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.actions-bar .btn-primary,
|
|
.actions-bar .btn-secondary {
|
|
width: 100%;
|
|
}
|
|
|
|
.format-fields {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|