diff --git a/static/css/components/lora-modal.css b/static/css/components/lora-modal.css index 20e2fafe..bf00c6c1 100644 --- a/static/css/components/lora-modal.css +++ b/static/css/components/lora-modal.css @@ -1144,12 +1144,31 @@ white-space: nowrap; } +/* Style for empty tags placeholder */ +.model-tag-empty { + background: rgba(0, 0, 0, 0.02); + border: 1px dashed rgba(0, 0, 0, 0.1); + border-radius: var(--border-radius-xs); + padding: 2px 8px; + font-size: 0.75em; + color: var(--text-color); + white-space: nowrap; + opacity: 0.7; + font-style: italic; +} + /* Adjust dark theme tag styles */ [data-theme="dark"] .model-tag-compact { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--lora-border); } +/* Dark theme for empty tags */ +[data-theme="dark"] .model-tag-empty { + background: rgba(255, 255, 255, 0.02); + border: 1px dashed var(--lora-border); +} + .model-tag-more { background: var(--lora-accent); color: var(--lora-text); diff --git a/static/js/components/loraModal/utils.js b/static/js/components/loraModal/utils.js index 366d23bb..909817b5 100644 --- a/static/js/components/loraModal/utils.js +++ b/static/js/components/loraModal/utils.js @@ -30,11 +30,12 @@ export function formatFileSize(bytes) { * @returns {string} HTML内容 */ export function renderCompactTags(tags, filePath = '') { - if (!tags || tags.length === 0) return ''; + // Remove the early return and always render the container + const tagsList = tags || []; // Display up to 5 tags, with a tooltip indicator if there are more - const visibleTags = tags.slice(0, 5); - const remainingCount = Math.max(0, tags.length - 5); + const visibleTags = tagsList.slice(0, 5); + const remainingCount = Math.max(0, tagsList.length - 5); return `
- ${tags.length > 0 ? + ${tagsList.length > 0 ? `` : ''}