mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-06-19 17:02:04 -03:00
feat(license-icons): add second set of license icons matching current CivitAI design
- Add 5 new Tabler SVG icons (currency-dollar, brush, user, git-merge, license) - Implement Set 2 rendering in ModelModal.js (standalone UI) with green/red permission indicators and preview_tooltip.js (ComfyUI widget) - Add use_new_license_icons setting (default: true) with toggle in settings UI - ComfyUI tooltip reads setting directly from preview-url API response to eliminate race conditions and respect standalone settings changes - Remove the now-unused separate ComfyUI setting loramanager.license_icon_style - Add CSS for both standalone (lora-modal.css) and widget (lm_styles.css) - i18n: translate licenseIcons keys into all 10 supported languages - Fix test to use classic style explicitly for continued coverage
This commit is contained in:
@@ -101,14 +101,19 @@ vi.mock(API_FACTORY, () => ({
|
||||
|
||||
describe('Model modal license rendering', () => {
|
||||
let getModelApiClient;
|
||||
let state;
|
||||
|
||||
beforeEach(async () => {
|
||||
document.body.innerHTML = '';
|
||||
({ getModelApiClient } = await import(API_FACTORY));
|
||||
getModelApiClient.mockReset();
|
||||
// Import state and force classic icons for this test
|
||||
const stateModule = await import('../../../static/js/state/index.js');
|
||||
state = stateModule.state;
|
||||
state.global.settings.use_new_license_icons = false;
|
||||
});
|
||||
|
||||
it('handles aggregated commercial strings without extra restrictions', async () => {
|
||||
it('handles aggregated commercial strings without extra restrictions (classic style)', async () => {
|
||||
const fetchModelMetadata = vi.fn().mockResolvedValue(null);
|
||||
getModelApiClient.mockReturnValue({
|
||||
fetchModelMetadata,
|
||||
|
||||
Reference in New Issue
Block a user