Enhance LoraRoutes and templates for improved cache initialization handling

- Updated LoraRoutes to better check cache initialization status and handle loading states.
- Added logging for successful cache loading and error handling for cache retrieval failures.
- Enhanced base.html and loras.html templates to display a loading spinner and initialization notice during cache setup.
- Improved user experience by ensuring the loading notice is displayed appropriately based on initialization state.
This commit is contained in:
Will Miao
2025-03-28 15:04:35 +08:00
parent 85c3e33343
commit 5a8a402fdc
4 changed files with 91 additions and 26 deletions

View File

@@ -4,7 +4,9 @@
{% block page_id %}loras{% endblock %}
{% block preload %}
{% if not is_initializing %}
<link rel="preload" href="/loras_static/js/loras.js" as="script" crossorigin="anonymous">
{% endif %}
{% endblock %}
{% block init_title %}Initializing LoRA Manager{% endblock %}
@@ -29,5 +31,7 @@
{% endblock %}
{% block main_script %}
{% if not is_initializing %}
<script type="module" src="/loras_static/js/loras.js"></script>
{% endif %}
{% endblock %}