Allow for empty lora (no loras option) in Lora Pool

This commit is contained in:
dogatech
2026-03-11 16:15:18 -07:00
committed by pixelpaws
parent 03e1fa75c5
commit 8dd849892d
15 changed files with 170 additions and 59 deletions

View File

@@ -10,6 +10,7 @@
:exclude-folders="state.excludeFolders.value"
:no-credit-required="state.noCreditRequired.value"
:allow-selling="state.allowSelling.value"
:include-empty-lora="state.includeEmptyLora.value"
:preview-items="state.previewItems.value"
:match-count="state.matchCount.value"
:is-loading="state.isLoading.value"
@@ -18,6 +19,7 @@
@update:exclude-folders="state.excludeFolders.value = $event"
@update:no-credit-required="state.noCreditRequired.value = $event"
@update:allow-selling="state.allowSelling.value = $event"
@update:include-empty-lora="state.includeEmptyLora.value = $event"
@refresh="state.refreshPreview"
/>

View File

@@ -27,8 +27,10 @@
<LicenseSection
:no-credit-required="noCreditRequired"
:allow-selling="allowSelling"
:include-empty-lora="includeEmptyLora"
@update:no-credit-required="$emit('update:noCreditRequired', $event)"
@update:allow-selling="$emit('update:allowSelling', $event)"
@update:include-empty-lora="$emit('update:includeEmptyLora', $event)"
/>
</div>
@@ -61,9 +63,10 @@ defineProps<{
// Folders
includeFolders: string[]
excludeFolders: string[]
// License
// License & Misc
noCreditRequired: boolean
allowSelling: boolean
includeEmptyLora: boolean
// Preview
previewItems: LoraItem[]
matchCount: number
@@ -76,6 +79,7 @@ defineEmits<{
'update:excludeFolders': [value: string[]]
'update:noCreditRequired': [value: boolean]
'update:allowSelling': [value: boolean]
'update:includeEmptyLora': [value: boolean]
refresh: []
}>()
</script>

View File

@@ -1,7 +1,7 @@
<template>
<div class="section">
<div class="section__header">
<span class="section__title">LICENSE</span>
<span class="section__title">LICENSE & OPTIONS</span>
</div>
<div class="section__toggles">
<label class="toggle-item">
@@ -33,6 +33,22 @@
<span class="toggle-switch__thumb"></span>
</button>
</label>
<label class="toggle-item">
<span class="toggle-item__label">Include No LoRAs</span>
<button
type="button"
class="toggle-switch"
:class="{ 'toggle-switch--active': includeEmptyLora }"
@click="$emit('update:includeEmptyLora', !includeEmptyLora)"
role="switch"
:aria-checked="includeEmptyLora"
title="Include an empty/blank LoRA option in the pool results"
>
<span class="toggle-switch__track"></span>
<span class="toggle-switch__thumb"></span>
</button>
</label>
</div>
</div>
</template>
@@ -41,11 +57,13 @@
defineProps<{
noCreditRequired: boolean
allowSelling: boolean
includeEmptyLora: boolean
}>()
defineEmits<{
'update:noCreditRequired': [value: boolean]
'update:allowSelling': [value: boolean]
'update:includeEmptyLora': [value: boolean]
}>()
</script>
@@ -69,6 +87,7 @@ defineEmits<{
.section__toggles {
display: flex;
flex-wrap: wrap;
gap: 16px;
}