mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 05:28:59 +01:00 
			
		
		
		
	yes, now the failed embeddings section at least looks passable
This commit is contained in:
		
							parent
							
								
									ee7b2283de
								
							
						
					
					
						commit
						d4cfc65b27
					
				@ -877,34 +877,37 @@ export default class AiSettingsWidget extends OptionsWidget {
 | 
				
			|||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // Use the application's note-list-item styling
 | 
					            // Use the application's native note-list-item styling without custom font styles
 | 
				
			||||||
            const $item = $(`
 | 
					            const $item = $(`
 | 
				
			||||||
                <div class="note-list-item">
 | 
					                <div class="note-list-item">
 | 
				
			||||||
                    <div class="note-book-card p-2">
 | 
					                    <div class="note-book-card p-2">
 | 
				
			||||||
                        <div class="d-flex w-100 justify-content-between">
 | 
					                        <div class="note-book-content">
 | 
				
			||||||
                            <div>
 | 
					                            <div class="note-book-title">
 | 
				
			||||||
                                <div class="d-flex align-items-center">
 | 
					                                <span class="note-title">${note.title || note.noteId}</span>
 | 
				
			||||||
                                    <h6 class="mb-1">${note.title || note.noteId}</h6>
 | 
					 | 
				
			||||||
                                <span class="badge ${badgeClass} ml-2">${badgeText}</span>
 | 
					                                <span class="badge ${badgeClass} ml-2">${badgeText}</span>
 | 
				
			||||||
                            </div>
 | 
					                            </div>
 | 
				
			||||||
                                <p class="text-muted mb-1 small">
 | 
					                            <div class="note-book-excerpt">
 | 
				
			||||||
                                    ${isPermanentlyFailed ?
 | 
					                                <div class="note-detail-field">
 | 
				
			||||||
                                      `<strong>Status:</strong> Permanently failed` :
 | 
					                                    <span class="note-detail-label">${isPermanentlyFailed ? 'Status:' : 'Attempts:'}</span>
 | 
				
			||||||
                                      `<strong>Attempts:</strong> ${note.attempts}`}
 | 
					                                    <span class="note-detail-value">${isPermanentlyFailed ? 'Permanently failed' : note.attempts}</span>
 | 
				
			||||||
                                    <br>
 | 
					 | 
				
			||||||
                                    <strong>Last attempt:</strong> ${note.lastAttempt.substring(0, 19)}
 | 
					 | 
				
			||||||
                                    <br>
 | 
					 | 
				
			||||||
                                    <strong>Error:</strong> ${(note.error || 'Unknown error').substring(0, 100)}${(note.error && note.error.length > 100) ? '...' : ''}
 | 
					 | 
				
			||||||
                                </p>
 | 
					 | 
				
			||||||
                                </div>
 | 
					                                </div>
 | 
				
			||||||
                            <div class="ml-2 align-self-center">
 | 
					                                <div class="note-detail-field">
 | 
				
			||||||
 | 
					                                    <span class="note-detail-label">Last attempt:</span>
 | 
				
			||||||
 | 
					                                    <span class="note-detail-value">${note.lastAttempt.substring(0, 19)}</span>
 | 
				
			||||||
 | 
					                                </div>
 | 
				
			||||||
 | 
					                                <div class="note-detail-field">
 | 
				
			||||||
 | 
					                                    <span class="note-detail-label">Error:</span>
 | 
				
			||||||
 | 
					                                    <span class="note-detail-value">${(note.error || 'Unknown error').substring(0, 100)}${(note.error && note.error.length > 100) ? '...' : ''}</span>
 | 
				
			||||||
 | 
					                                </div>
 | 
				
			||||||
 | 
					                            </div>
 | 
				
			||||||
 | 
					                        </div>
 | 
				
			||||||
 | 
					                        <div class="note-book-actions">
 | 
				
			||||||
                            <button class="btn btn-sm btn-outline-secondary retry-btn" data-note-id="${note.noteId}">
 | 
					                            <button class="btn btn-sm btn-outline-secondary retry-btn" data-note-id="${note.noteId}">
 | 
				
			||||||
                                <i class="fas fa-redo-alt"></i> Retry
 | 
					                                <i class="fas fa-redo-alt"></i> Retry
 | 
				
			||||||
                            </button>
 | 
					                            </button>
 | 
				
			||||||
                        </div>
 | 
					                        </div>
 | 
				
			||||||
                    </div>
 | 
					                    </div>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
                </div>
 | 
					 | 
				
			||||||
            `);
 | 
					            `);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $failedList.append($item);
 | 
					            $failedList.append($item);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user