From 83aba4c1a890b95cf92e5be5a99c575154782de8 Mon Sep 17 00:00:00 2001 From: SEB Fotografie - soeren Date: Sat, 2 Aug 2025 14:55:00 +0200 Subject: [PATCH] fixed comfyui --- app/Api/Plugins/ComfyUi.php | 9 ++++++--- resources/js/Components/ImageContextMenu.vue | 4 ++-- resources/js/Components/StyleSelector.vue | 12 +++++++----- resources/lang/de/api.php | 1 + resources/lang/en/api.php | 1 + routes/web.php | 9 --------- tailwind.config.js | 1 + 7 files changed, 18 insertions(+), 19 deletions(-) diff --git a/app/Api/Plugins/ComfyUi.php b/app/Api/Plugins/ComfyUi.php index 99fad24..2a1c6c9 100644 --- a/app/Api/Plugins/ComfyUi.php +++ b/app/Api/Plugins/ComfyUi.php @@ -96,7 +96,10 @@ class ComfyUi implements ApiPluginInterface $this->logInfo('Uploading image to ComfyUI.', ['image_path' => $imagePath]); $response = Http::attach( 'image', file_get_contents($imagePath), basename($imagePath) - )->post($this->apiProvider->api_url . '/upload/image'); + )->timeout(120)->post(rtrim($this->apiProvider->api_url, '/') . '/upload/image', [ + 'type' => 'input', + 'overwrite' => 'false', + ]); if ($response->failed()) { $this->logError('ComfyUI image upload failed.', ['response' => $response->body()]); @@ -123,7 +126,7 @@ class ComfyUi implements ApiPluginInterface private function queuePrompt(array $promptData): array { $this->logInfo('Queueing prompt in ComfyUI.'); - $response = Http::post($this->apiProvider->api_url . '/prompt', ['prompt' => $promptData]); + $response = Http::timeout(120)->post(rtrim($this->apiProvider->api_url, '/') . '/prompt', ['prompt' => $promptData]); if ($response->failed()) { $this->logError('Failed to queue prompt in ComfyUI.', ['response' => $response->body()]); @@ -137,7 +140,7 @@ class ComfyUi implements ApiPluginInterface { $this->logInfo('Waiting for ComfyUI result.', ['prompt_id' => $promptId]); while (true) { - $response = Http::get($this->apiProvider->api_url . '/history/' . $promptId); + $response = Http::timeout(120)->get($this->apiProvider->api_url . '/history/' . $promptId); $data = $response->json(); if (!empty($data[$promptId]['outputs'])) { diff --git a/resources/js/Components/ImageContextMenu.vue b/resources/js/Components/ImageContextMenu.vue index 7494642..d79542b 100644 --- a/resources/js/Components/ImageContextMenu.vue +++ b/resources/js/Components/ImageContextMenu.vue @@ -126,7 +126,7 @@ const showStyleSelectorView = ref(false); } .context-menu li:hover { - background: var(--color-text); /* Adjust hover background for dark mode */ - color: var(--color-background); /* Adjust hover text color for dark mode */ + @apply hover:bg-gray-100 dark:hover:bg-gray-700; + @apply dark:hover:text-gray-400; } \ No newline at end of file diff --git a/resources/js/Components/StyleSelector.vue b/resources/js/Components/StyleSelector.vue index f4d6cec..fd70e57 100644 --- a/resources/js/Components/StyleSelector.vue +++ b/resources/js/Components/StyleSelector.vue @@ -62,9 +62,10 @@ onMounted(() => { \ No newline at end of file diff --git a/resources/lang/de/api.php b/resources/lang/de/api.php index 26b7548..1caae05 100644 --- a/resources/lang/de/api.php +++ b/resources/lang/de/api.php @@ -14,4 +14,5 @@ return [ 'navigation.previous' => 'Zurück', 'navigation.next' => 'Weiter', 'navigation.page_of' => 'Seite :currentPage von :totalPages', + 'loading_spinner.processing_image' => 'Bild wird verarbeitet...', ]; diff --git a/resources/lang/en/api.php b/resources/lang/en/api.php index a6bd57b..44b3cc2 100644 --- a/resources/lang/en/api.php +++ b/resources/lang/en/api.php @@ -14,4 +14,5 @@ return [ 'navigation.previous' => 'Previous', 'navigation.next' => 'Next', 'navigation.page_of' => 'Page :currentPage of :totalPages', + 'loading_spinner.processing_image' => 'Processing image...', ]; diff --git a/routes/web.php b/routes/web.php index 8a98b3d..a73a052 100644 --- a/routes/web.php +++ b/routes/web.php @@ -31,12 +31,3 @@ Route::middleware('auth')->group(function () { require __DIR__.'/auth.php'; -Route::get('/test-translations-en', function () { - app()->setLocale('en'); - return response()->json(trans('api')); -}); - -Route::get('/test-translations-de', function () { - app()->setLocale('de'); - return response()->json(trans('api')); -}); \ No newline at end of file diff --git a/tailwind.config.js b/tailwind.config.js index d7c4a93..c9b6c8f 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -3,6 +3,7 @@ import forms from '@tailwindcss/forms'; /** @type {import('tailwindcss').Config} */ export default { + darkMode: 'class', content: [ './vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php', './storage/framework/views/*.php',