Implemented comprehensive prompt management system with the following features: 🎨 Core Nodes: - Prompt Saver: Save prompts with metadata, lock/unlock mechanism - Smart Text Input: Automatic change detection (new vs edit) - Prompt Library Browser: Search, filter, load prompts - Export Manager: Export/import database, statistics, cleanup 💾 Database Features: - JSON storage with base64-encoded thumbnails (150x150px) - Cross-platform path handling (Windows/Linux/macOS) - Automatic deduplication by hash - Merge functionality with conflict resolution - Auto-cleanup of old unrated prompts 🖼️ Thumbnail System: - Up to 3 thumbnails per prompt - Lock/unlock mechanism for preserving favorite images - Automatic thumbnail updates on generation - Base64 encoding for single-file portability 🎯 Key Features: - Category and tag management - Rating system (0-5 stars) - Generation history tracking - PNG metadata extraction - Search and filter capabilities - Statistics and analytics 🌐 UI Components: - JavaScript extensions for visual feedback - CSS styling for modern interface - Pulsing unlock button animation - Color-coded change detection - Custom node styling 📚 Documentation: - Comprehensive README with usage examples - Troubleshooting guide - Advanced configuration options - Merge logic explanation All components are fully functional and ready for testing.
374 lines
6.7 KiB
CSS
374 lines
6.7 KiB
CSS
/**
|
|
* Prompt Library Styles
|
|
* Custom styling for Prompting System nodes
|
|
*/
|
|
|
|
/* Prompt Saver Node */
|
|
.comfy-node.PromptSaver {
|
|
border: 2px solid #6b6bff;
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.comfy-node.PromptSaver .locked-indicator {
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
padding: 8px;
|
|
border-radius: 4px;
|
|
text-align: center;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.comfy-node.PromptSaver .locked-indicator.unlocked {
|
|
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
|
|
animation: pulse 2s ease-in-out infinite;
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0%, 100% {
|
|
opacity: 0.7;
|
|
transform: scale(1);
|
|
}
|
|
50% {
|
|
opacity: 1;
|
|
transform: scale(1.05);
|
|
}
|
|
}
|
|
|
|
/* Smart Text Input Node */
|
|
.comfy-node.SmartTextInput {
|
|
border: 2px solid #4ecdc4;
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.comfy-node.SmartTextInput.new-prompt {
|
|
animation: flash-red 0.5s ease-out;
|
|
}
|
|
|
|
.comfy-node.SmartTextInput.edit-prompt {
|
|
animation: flash-blue 0.5s ease-out;
|
|
}
|
|
|
|
@keyframes flash-red {
|
|
0% { background-color: rgba(255, 107, 107, 0.3); }
|
|
100% { background-color: transparent; }
|
|
}
|
|
|
|
@keyframes flash-blue {
|
|
0% { background-color: rgba(78, 205, 196, 0.3); }
|
|
100% { background-color: transparent; }
|
|
}
|
|
|
|
/* Library Browser Node */
|
|
.comfy-node.PromptLibraryBrowser {
|
|
border: 2px solid #ffd700;
|
|
border-radius: 8px;
|
|
min-width: 600px;
|
|
min-height: 400px;
|
|
}
|
|
|
|
.prompt-library-container {
|
|
padding: 16px;
|
|
background: #1a1a2e;
|
|
border-radius: 8px;
|
|
color: #e0e0e0;
|
|
}
|
|
|
|
.prompt-library-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 16px;
|
|
padding-bottom: 12px;
|
|
border-bottom: 2px solid #ffd700;
|
|
}
|
|
|
|
.prompt-library-title {
|
|
font-size: 20px;
|
|
font-weight: bold;
|
|
color: #ffd700;
|
|
}
|
|
|
|
.prompt-library-stats {
|
|
font-size: 14px;
|
|
color: #a0a0a0;
|
|
}
|
|
|
|
.prompt-search-bar {
|
|
display: flex;
|
|
gap: 12px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.prompt-search-input {
|
|
flex: 1;
|
|
padding: 8px 12px;
|
|
background: #16213e;
|
|
border: 1px solid #4a4a6a;
|
|
border-radius: 4px;
|
|
color: #e0e0e0;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.prompt-search-input:focus {
|
|
outline: none;
|
|
border-color: #ffd700;
|
|
}
|
|
|
|
.prompt-filter-button {
|
|
padding: 8px 16px;
|
|
background: #4a4a6a;
|
|
border: none;
|
|
border-radius: 4px;
|
|
color: #e0e0e0;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.prompt-filter-button:hover {
|
|
background: #6a6a8a;
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.prompt-filter-button.active {
|
|
background: #ffd700;
|
|
color: #1a1a2e;
|
|
}
|
|
|
|
.prompt-results {
|
|
max-height: 500px;
|
|
overflow-y: auto;
|
|
padding-right: 8px;
|
|
}
|
|
|
|
.prompt-result-item {
|
|
background: #16213e;
|
|
border: 1px solid #4a4a6a;
|
|
border-radius: 6px;
|
|
padding: 12px;
|
|
margin-bottom: 12px;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.prompt-result-item:hover {
|
|
border-color: #ffd700;
|
|
transform: translateX(4px);
|
|
box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
|
|
}
|
|
|
|
.prompt-result-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.prompt-result-id {
|
|
font-weight: bold;
|
|
color: #ffd700;
|
|
font-size: 16px;
|
|
}
|
|
|
|
.prompt-result-rating {
|
|
color: #ffaa00;
|
|
font-size: 18px;
|
|
}
|
|
|
|
.prompt-result-category {
|
|
display: inline-block;
|
|
background: #4a4a6a;
|
|
padding: 4px 8px;
|
|
border-radius: 4px;
|
|
font-size: 12px;
|
|
margin-right: 8px;
|
|
}
|
|
|
|
.prompt-result-text {
|
|
color: #e0e0e0;
|
|
font-size: 14px;
|
|
margin: 8px 0;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.prompt-result-tags {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 6px;
|
|
margin: 8px 0;
|
|
}
|
|
|
|
.prompt-tag {
|
|
background: #2a2a4a;
|
|
padding: 3px 8px;
|
|
border-radius: 12px;
|
|
font-size: 11px;
|
|
color: #a0a0ff;
|
|
}
|
|
|
|
.prompt-result-thumbnails {
|
|
display: flex;
|
|
gap: 8px;
|
|
margin: 12px 0;
|
|
}
|
|
|
|
.prompt-thumbnail {
|
|
width: 80px;
|
|
height: 80px;
|
|
border-radius: 4px;
|
|
object-fit: cover;
|
|
border: 2px solid transparent;
|
|
transition: all 0.2s;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.prompt-thumbnail:hover {
|
|
border-color: #ffd700;
|
|
transform: scale(1.1);
|
|
}
|
|
|
|
.prompt-thumbnail.locked {
|
|
border-color: #ff6b6b;
|
|
box-shadow: 0 0 8px rgba(255, 107, 107, 0.5);
|
|
}
|
|
|
|
.prompt-result-actions {
|
|
display: flex;
|
|
gap: 8px;
|
|
margin-top: 12px;
|
|
}
|
|
|
|
.prompt-action-button {
|
|
padding: 6px 12px;
|
|
background: #4a4a6a;
|
|
border: none;
|
|
border-radius: 4px;
|
|
color: #e0e0e0;
|
|
cursor: pointer;
|
|
font-size: 12px;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.prompt-action-button:hover {
|
|
background: #6a6a8a;
|
|
}
|
|
|
|
.prompt-action-button.primary {
|
|
background: #ffd700;
|
|
color: #1a1a2e;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.prompt-action-button.primary:hover {
|
|
background: #ffed4e;
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
.prompt-action-button.danger {
|
|
background: #ff6b6b;
|
|
}
|
|
|
|
.prompt-action-button.danger:hover {
|
|
background: #ff5252;
|
|
}
|
|
|
|
/* Export Manager Node */
|
|
.comfy-node.ExportManager {
|
|
border: 2px solid #6bff6b;
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.export-button {
|
|
padding: 12px 24px;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
border: none;
|
|
border-radius: 6px;
|
|
color: white;
|
|
font-weight: bold;
|
|
font-size: 14px;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
width: 100%;
|
|
margin: 8px 0;
|
|
}
|
|
|
|
.export-button:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
|
|
}
|
|
|
|
.export-button:active {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
/* Custom scrollbar */
|
|
.prompt-results::-webkit-scrollbar {
|
|
width: 8px;
|
|
}
|
|
|
|
.prompt-results::-webkit-scrollbar-track {
|
|
background: #16213e;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.prompt-results::-webkit-scrollbar-thumb {
|
|
background: #4a4a6a;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.prompt-results::-webkit-scrollbar-thumb:hover {
|
|
background: #6a6a8a;
|
|
}
|
|
|
|
/* Loading animation */
|
|
.loading-spinner {
|
|
display: inline-block;
|
|
width: 20px;
|
|
height: 20px;
|
|
border: 3px solid rgba(255, 215, 0, 0.3);
|
|
border-radius: 50%;
|
|
border-top-color: #ffd700;
|
|
animation: spin 1s ease-in-out infinite;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
/* Toast notifications */
|
|
.prompt-toast {
|
|
position: fixed;
|
|
bottom: 20px;
|
|
right: 20px;
|
|
background: #16213e;
|
|
border: 2px solid #ffd700;
|
|
border-radius: 8px;
|
|
padding: 16px 24px;
|
|
color: #e0e0e0;
|
|
font-size: 14px;
|
|
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
|
|
animation: slide-in 0.3s ease-out;
|
|
z-index: 10000;
|
|
}
|
|
|
|
@keyframes slide-in {
|
|
from {
|
|
transform: translateX(400px);
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
transform: translateX(0);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
.prompt-toast.success {
|
|
border-color: #6bff6b;
|
|
}
|
|
|
|
.prompt-toast.error {
|
|
border-color: #ff6b6b;
|
|
}
|
|
|
|
.prompt-toast.info {
|
|
border-color: #4ecdc4;
|
|
}
|