mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-07-13 20:21:16 -03:00
- Merge Relink to Civitai and new Link to HuggingFace into a single 'Link Model' submenu with sub-options for each source - Add POST /api/lm/set-hf-url endpoint to associate a model with a HuggingFace repo URL, saving hf_url to .metadata.json - Add link_hf_modal.html for URL input, following relink-civitai pattern - Use update_single_model_cache instead of add_model_to_cache to prevent duplicate cache entries after linking - Remove os.path.realpath usage for consistency with relink-civitai - Raise errors instead of silently falling back to LoRA scanner when model root cannot be determined - Scope .input-group CSS rules to modal IDs to fix style conflicts with download-modal.css - Add i18n keys across all 10 locales with translations for zh-CN, zh-TW, ja, ko, de, es, fr, he, ru
70 lines
3.8 KiB
HTML
70 lines
3.8 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}{{ t('checkpoints.title') }}{% endblock %}
|
|
{% block page_id %}checkpoints{% endblock %}
|
|
|
|
{% block init_title %}{{ t('initialization.checkpoints.title') }}{% endblock %}
|
|
{% block init_message %}{{ t('initialization.checkpoints.message') }}{% endblock %}
|
|
{% block init_check_url %}/api/checkpoints/list?page=1&page_size=1{% endblock %}
|
|
|
|
{% block additional_components %}
|
|
|
|
<div id="checkpointContextMenu" class="context-menu" style="display: none;">
|
|
<!-- Metadata -->
|
|
<div class="context-menu-item" data-action="refresh-metadata"><i class="fas fa-sync"></i> {{ t('loras.contextMenu.refreshMetadata') }}</div>
|
|
<div class="context-menu-item has-submenu" data-has-submenu="link-model">
|
|
<i class="fas fa-link"></i>
|
|
<span>{{ t('loras.contextMenu.linkModel') }}</span>
|
|
<i class="fas fa-chevron-right submenu-arrow"></i>
|
|
<div class="context-submenu">
|
|
<div class="context-menu-item" data-action="relink-civitai">
|
|
<i class="fas fa-external-link-alt"></i> <span>{{ t('loras.contextMenu.linkCivitai') }}</span>
|
|
</div>
|
|
<div class="context-menu-item" data-action="link-hf">
|
|
<i class="fas fa-robot"></i> <span>{{ t('loras.contextMenu.linkHuggingFace') }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="context-menu-separator menu-section-break"></div>
|
|
<!-- Workflow -->
|
|
<div class="context-menu-item" data-action="copyname"><i class="fas fa-copy"></i> {{ t('loras.contextMenu.copyFilename') }}</div>
|
|
<div class="context-menu-item" data-action="sendworkflow"><i class="fas fa-paper-plane"></i> {{ t('checkpoints.contextMenu.sendToWorkflow') }}</div>
|
|
<div class="context-menu-separator menu-section-break"></div>
|
|
<!-- Media / Preview -->
|
|
<div class="context-menu-item" data-action="preview"><i class="fas fa-folder-open"></i> {{ t('loras.contextMenu.openExamples') }}</div>
|
|
<div class="context-menu-item" data-action="download-examples"><i class="fas fa-download"></i> {{ t('loras.contextMenu.downloadExamples') }}</div>
|
|
<div class="context-menu-item" data-action="replace-preview"><i class="fas fa-image"></i> {{ t('loras.contextMenu.replacePreview') }}</div>
|
|
<div class="context-menu-separator menu-section-break"></div>
|
|
<!-- Attributes -->
|
|
<div class="context-menu-item" data-action="set-nsfw"><i class="fas fa-exclamation-triangle"></i> {{ t('loras.contextMenu.setContentRating') }}</div>
|
|
<div class="context-menu-separator menu-section-break"></div>
|
|
<!-- Organization -->
|
|
<div class="context-menu-item" data-action="move"><i class="fas fa-folder-open"></i> {{ t('loras.contextMenu.moveToFolder') }}</div>
|
|
<div class="context-menu-item" data-action="move-other"><i class="fas fa-exchange-alt"></i> {{ t('checkpoints.contextMenu.moveToOtherTypeFolder', {otherType: '...'}) }}</div>
|
|
<div class="context-menu-separator"></div>
|
|
<!-- Destructive -->
|
|
<div class="context-menu-item" data-action="exclude"><i class="fas fa-eye-slash"></i> {{ t('loras.contextMenu.excludeModel') }}</div>
|
|
<div class="context-menu-item delete-item" data-action="delete"><i class="fas fa-trash"></i> {{ t('loras.contextMenu.deleteModel') }}</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
{% include 'components/controls.html' %}
|
|
{% include 'components/breadcrumb.html' %}
|
|
{% include 'components/duplicates_banner.html' %}
|
|
{% include 'components/folder_sidebar.html' %}
|
|
|
|
<!-- Checkpoint cards container -->
|
|
<div class="card-grid" id="modelGrid">
|
|
<!-- Cards will be dynamically inserted here -->
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block overlay %}
|
|
<div class="bulk-mode-overlay"></div>
|
|
{% endblock %}
|
|
|
|
{% block main_script %}
|
|
<script type="module" src="/loras_static/js/checkpoints.js?v={{ version }}"></script>
|
|
{% endblock %}
|