mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-24 22:52:12 -03:00
feat(i18n): add license and content usage filter labels
Add new translation keys for model filter interface: - license - noCreditRequired - allowSellingGeneratedContent These labels support new filtering options for model licensing and content usage permissions, enabling users to filter models based on their license requirements and commercial usage rights.
This commit is contained in:
@@ -817,6 +817,33 @@ export class BaseModelApiClient {
|
||||
params.append('base_model', model);
|
||||
});
|
||||
}
|
||||
|
||||
// Add license filters
|
||||
if (pageState.filters.license) {
|
||||
const licenseFilters = pageState.filters.license;
|
||||
|
||||
if (licenseFilters.noCredit) {
|
||||
// For noCredit filter:
|
||||
// - 'include' means credit_required=False (no credit required)
|
||||
// - 'exclude' means credit_required=True (credit required)
|
||||
if (licenseFilters.noCredit === 'include') {
|
||||
params.append('credit_required', 'false');
|
||||
} else if (licenseFilters.noCredit === 'exclude') {
|
||||
params.append('credit_required', 'true');
|
||||
}
|
||||
}
|
||||
|
||||
if (licenseFilters.allowSelling) {
|
||||
// For allowSelling filter:
|
||||
// - 'include' means allow_selling_generated_content=True
|
||||
// - 'exclude' means allow_selling_generated_content=False
|
||||
if (licenseFilters.allowSelling === 'include') {
|
||||
params.append('allow_selling_generated_content', 'true');
|
||||
} else if (licenseFilters.allowSelling === 'exclude') {
|
||||
params.append('allow_selling_generated_content', 'false');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this._addModelSpecificParams(params, pageState);
|
||||
|
||||
Reference in New Issue
Block a user