diff --git a/static/js/script.js b/static/js/script.js
index b89c4f75..83a13c23 100644
--- a/static/js/script.js
+++ b/static/js/script.js
@@ -233,7 +233,7 @@ function showLoraModal(lora) {
`).join('')}
- ` : '
@@ -562,11 +562,17 @@ document.querySelectorAll('.lora-card').forEach(card => {
};
}
- // 为没有元数据的卡片添加点击反馈
+ // 为卡片添加点击反馈,根据不同情况显示不同的提示
card.addEventListener('click', () => {
const meta = JSON.parse(card.dataset.meta || '{}');
+ const fromCivitai = card.dataset.from_civitai === 'True';
+
if (Object.keys(meta).length === 0) {
- showToast('This model is not available on Civitai. No additional information to display.', 'info');
+ if (fromCivitai) {
+ showToast('Model is available on Civitai. Please click "Fetch" to retrieve metadata.', 'info');
+ } else {
+ showToast('This model is not available on Civitai. No additional information to display.', 'info');
+ }
}
});
});
diff --git a/templates/loras.html b/templates/loras.html
index b7ed9c24..516970a5 100644
--- a/templates/loras.html
+++ b/templates/loras.html
@@ -93,6 +93,7 @@
data-file_name="{{ lora.file_name }}"
data-folder="{{ lora.folder }}"
data-modified="{{ lora.modified }}"
+ data-from_civitai="{{ lora.from_civitai }}"
data-meta="{{ lora.civitai | default({}) | tojson | forceescape }}">
{% if lora.preview_url.endswith('.mp4') or lora.preview_url.endswith('.webm') %}