From 206c1bd69f0d7e87ba4559006c6c5e34b390d3e9 Mon Sep 17 00:00:00 2001 From: Will Miao <13051207myq@gmail.com> Date: Fri, 25 Jul 2025 16:10:16 +0800 Subject: [PATCH] Refactor modals.html into modular components --- py/utils/routes_common.py | 2 - static/js/components/alphabet/AlphabetBar.js | 2 +- templates/components/modals.html | 722 +----------------- .../components/modals/confirm_modals.html | 85 +++ .../modals/example_access_modal.html | 27 + templates/components/modals/help_modal.html | 131 ++++ .../modals/relink_civitai_modal.html | 33 + .../components/modals/settings_modal.html | 278 +++++++ .../components/modals/support_modal.html | 91 +++ templates/components/modals/update_modal.html | 64 ++ 10 files changed, 717 insertions(+), 718 deletions(-) create mode 100644 templates/components/modals/confirm_modals.html create mode 100644 templates/components/modals/example_access_modal.html create mode 100644 templates/components/modals/help_modal.html create mode 100644 templates/components/modals/relink_civitai_modal.html create mode 100644 templates/components/modals/settings_modal.html create mode 100644 templates/components/modals/support_modal.html create mode 100644 templates/components/modals/update_modal.html diff --git a/py/utils/routes_common.py b/py/utils/routes_common.py index 8f00106b..40b02cb5 100644 --- a/py/utils/routes_common.py +++ b/py/utils/routes_common.py @@ -551,8 +551,6 @@ class ModelRouteUtils: # Add to excluded models list scanner._excluded_models.append(file_path) - - await scanner._save_cache_to_disk() return web.json_response({ 'success': True, diff --git a/static/js/components/alphabet/AlphabetBar.js b/static/js/components/alphabet/AlphabetBar.js index c56a2d5b..723e3089 100644 --- a/static/js/components/alphabet/AlphabetBar.js +++ b/static/js/components/alphabet/AlphabetBar.js @@ -227,7 +227,7 @@ export class AlphabetBar { this.updateToggleIndicator(); // Trigger a reload with the new filter - resetAndReload(true); + resetAndReload(false); } /** diff --git a/templates/components/modals.html b/templates/components/modals.html index 7f152c90..8d163336 100644 --- a/templates/components/modals.html +++ b/templates/components/modals.html @@ -1,715 +1,7 @@ - -
Are you sure you want to delete this model and all associated files?
- -Are you sure you want to exclude this model? Excluded models won't appear in searches or model lists.
- -Are you sure you want to delete the selected duplicate recipes?
-0 recipes will be permanently deleted.
-Are you sure you want to delete the selected duplicate models?
-0 models will be permanently deleted.
-Are you sure you want to clear all cache files?
-This will remove all cached model data. The system will need to rebuild the cache on next startup, which may take some time depending on your model collection size.
-Are you sure you want to delete all selected models and their associated files?
-0 models will be permanently deleted.
-If you find LoRA Manager useful, I'd really appreciate your support! 🙌
- -Your feedback helps shape future updates! Share your thoughts:
- -Support ongoing development with monthly contributions:
- - - Support on Patreon - -For users in China, you can support via WeChat:
- -
- Thank you for using LoRA Manager! ❤️
-Please wait while we check for the latest version.
-Watch all update videos showcasing the latest features and improvements.
-Warning: This is a potentially destructive operation. Re-linking will:
-Only proceed if you're sure this is what you want.
-No local example images found for this model. View options:
- -Are you sure you want to delete this model and all associated files?
+ +Are you sure you want to exclude this model? Excluded models won't appear in searches or model lists.
+ +Are you sure you want to delete the selected duplicate recipes?
+0 recipes will be permanently deleted.
+Are you sure you want to delete the selected duplicate models?
+0 models will be permanently deleted.
+Are you sure you want to clear all cache files?
+This will remove all cached model data. The system will need to rebuild the cache on next startup, which may take some time depending on your model collection size.
+Are you sure you want to delete all selected models and their associated files?
+0 models will be permanently deleted.
+No local example images found for this model. View options:
+ +Watch all update videos showcasing the latest features and improvements.
+Warning: This is a potentially destructive operation. Re-linking will:
+Only proceed if you're sure this is what you want.
+If you find LoRA Manager useful, I'd really appreciate your support! 🙌
+ +Your feedback helps shape future updates! Share your thoughts:
+ +Support ongoing development with monthly contributions:
+ + + Support on Patreon + +For users in China, you can support via WeChat:
+ +
+ Thank you for using LoRA Manager! ❤️
+Please wait while we check for the latest version.
+