feat: Add tag support to file history display

- Modified cvs_client.py get_file_history() to parse and extract tags from CVS log
- Updated ui.js displayHistory() to render tags for each revision
- Added CSS styling for history tags with proper theming support
- Tags are displayed inline with revision information in history view
This commit is contained in:
Juan José Gutiérrez de Quevedo Pérez 2025-11-21 21:26:34 +01:00
parent c15b759378
commit 45ad8bb135
3 changed files with 55 additions and 0 deletions

View file

@ -407,6 +407,31 @@ main {
color: rgba(255, 255, 255, 0.9);
}
.history-tags {
display: flex;
gap: 0.25rem;
flex-wrap: wrap;
}
.history-tag {
display: inline-block;
padding: 0.125rem 0.5rem;
border-radius: 0.25rem;
font-size: 0.65rem;
font-weight: 600;
background-color: var(--primary-color);
color: white;
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.history-item.active .history-tag {
background-color: rgba(255, 255, 255, 0.2);
color: white;
}
/* Patchset View */
.patchset-content {
flex: 1;

View file

@ -244,6 +244,7 @@ class UIManager {
<div class="history-log-section">
<div class="history-log">${revision.log ? this.escapeHtml(revision.log) : ''}</div>
${revision.state && revision.state !== 'Exp' ? `<span class="history-state">${revision.state}</span>` : ''}
${revision.tags && revision.tags.length > 0 ? `<span class="history-tags">${revision.tags.map(tag => `<span class="history-tag">${this.escapeHtml(tag)}</span>`).join('')}</span>` : ''}
</div>
<div class="history-author">${revision.author || 'Unknown'}</div>
<div class="history-date" title="${revision.date || 'N/A'}">${this.getRelativeDate(revision.date) || 'N/A'}</div>