parameter für Modelle eingeführt, Beschreibung aktualisiert

This commit is contained in:
2025-08-06 09:08:07 +02:00
parent 4a45738b9b
commit 57f3dbc402
16 changed files with 581 additions and 34 deletions

View File

@@ -15,7 +15,7 @@
class="style-item"
@click="selectStyle(style)"
>
<img :src="'/storage/' + style.preview_image" :alt="style.title" class="style-thumbnail" />
<img :data-src="'/storage/' + style.preview_image" :alt="style.title" class="style-thumbnail" />
<div class="style-details">
<h4>{{ style.title }}</h4>
<p>{{ style.description }}</p>
@@ -27,7 +27,7 @@
<script setup>
import axios from 'axios';
import { ref, onMounted } from 'vue';
import { ref, onMounted, nextTick } from 'vue';
const styles = ref([]);
@@ -44,6 +44,24 @@ const fetchStyles = () => {
axios.get('/api/styles')
.then(response => {
styles.value = response.data;
nextTick(() => {
const stylesList = document.querySelector('.styles-list');
const observer = new IntersectionObserver((entries, observer) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
const img = entry.target;
img.src = img.dataset.src;
observer.unobserve(img);
}
});
}, {
root: stylesList // Observe intersections relative to .styles-list
});
stylesList.querySelectorAll('.style-thumbnail').forEach(img => {
observer.observe(img);
});
});
})
.catch(error => {
console.error('Error fetching styles:', error);

View File

@@ -2,13 +2,15 @@
return [
'resource' => [
'ai_model' => [
'ai_model' => [
'form' => [
'name' => 'Name',
'model_id' => 'Modell ID',
'model_type' => 'Modell Typ',
'enabled' => 'Aktiviert',
'api_providers' => 'API Anbieter',
'api_providers' => 'API Provider',
'parameters' => 'Parameter',
'parameters_help' => 'Für ComfyUI, fügen Sie hier das Workflow-JSON ein. Verwenden Sie __PROMPT__, __FILENAME__ und __MODEL_ID__ als Platzhalter.',
],
'table' => [
'name' => 'Name',

View File

@@ -9,6 +9,8 @@ return [
'model_type' => 'Model Type',
'enabled' => 'Enabled',
'api_providers' => 'API Providers',
'parameters' => 'Parameters',
'parameters_help' => 'For ComfyUI, paste the workflow JSON here. Use __PROMPT__, __FILENAME__, and __MODEL_ID__ as placeholders.',
],
'table' => [
'name' => 'Name',