多🌹444收拾收拾计算机视觉手机手机手机手机4大尺寸惆怅长岑长 ??????????????????????????С??????????????P??????????????????????????????????????????????????????^?????????? ????j?????????? ? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!extension.json 0000644 00000000203 15266620503 0007453 0 ustar 00 { "name": "SeeDream4", "type": "extension", "version": "1.1.0", "description": "SeeDream4 extension for magicai" } System/SeeDreamV4ServiceProvider.php 0000644 00000006406 15266620503 0013507 0 ustar 00 registerConfig(); } public function boot(Kernel $kernel): void { $this->registerTranslations() ->registerViews() ->registerRoutes() ->registerMigrations() ->publishAssets() ->registerComponents(); } public function registerComponents(): static { // $this->loadViewComponentsAs('example', []); return $this; } public function publishAssets(): static { $this->publishes([ // __DIR__ . '/../resources/assets/js' => public_path('vendor/example/js'), // __DIR__ . '/../resources/assets/images' => public_path('vendor/example/images'), ], 'extension'); return $this; } public function registerConfig(): static { $this->mergeConfigFrom(__DIR__ . '/../config/' . $this->registerKey() . '.php', $this->registerKey()); return $this; } protected function registerTranslations(): static { $this->loadTranslationsFrom(__DIR__ . '/../resources/lang', $this->registerKey()); return $this; } public function registerViews(): static { $this->loadViewsFrom([__DIR__ . '/../resources/views'], $this->registerKey()); return $this; } public function registerMigrations(): static { $this->loadMigrationsFrom(__DIR__ . '/../database/migrations'); return $this; } private function registerRoutes(): static { $this->router() ->group([ 'middleware' => ['web', 'auth'], ], function (Router $router) { $router->any('generator/webhook/fal-ai', FalAIWebhookController::class) ->name('generator.webhook.fal-ai') ->withoutMiddleware(['web', 'auth']); $router->controller(FalAISettingController::class) ->prefix('dashboard/admin/settings') ->middleware(['auth', 'admin']) ->name('dashboard.admin.settings.')->group(function (Router $router) { $router->get('fal-ai', 'index')->name('fal-ai'); $router->post('fal-ai', 'update')->name('fal-ai.update'); }); }); return $this; } private function router(): Router|Route { return $this->app['router']; } public static function uninstall(): void {} public function registerKey(): string { return 'see-dream-v4'; } } System/Http/Controllers/FalAISettingController.php 0000644 00000002062 15266620503 0016311 0 ustar 00 with([ 'status' => 'error', 'message' => trans('This feature is disabled in demo mode.'), ]); } return view('see-dream-v4::setting'); } public function update(Request $request): RedirectResponse { $data = $request->validate([ 'fal_ai_api_secret' => 'required|string', 'fal_ai_default_model' => 'required|string', ]); setting($data)->save(); return back()->with([ 'type' => 'success', 'message' => trans('Settings updated successfully.'), ]); } } System/Http/Controllers/FalAIWebhookController.php 0000644 00000003400 15266620503 0016267 0 ustar 00 get('request_id')) { return response()->json([ 'error' => 'Request ID not found', ], 400); } $openai = UserOpenai::query() ->where('response', 'FL') ->where('status', 'IN_QUEUE') ->where('request_id', $request->get('request_id')) ->first(); if (! $openai) { return response()->json([ 'error' => 'Request not found', ], 400); } $payload = $request->get('payload'); if (! $payload || ! is_array($payload)) { return response()->json([ 'error' => 'Payload is wrong', ], 400); } $images = data_get($payload, 'images'); if (empty($images) || is_array($images)) { $firstImage = Arr::first($images); $image = data_get($firstImage, 'url'); $image = FluxProQueueCheck::downloadImageToStorage($image); $openai->update([ 'output' => $image ?: $openai->output, 'payload' => $payload, 'status' => 'COMPLETED', ]); return response()->json([ 'message' => 'Request completed', ], 200); } return response()->json([ 'error' => 'Images not found', ], 400); } } resources/views/setting.blade.php 0000644 00000007410 15266620503 0013156 0 ustar 00 @php use App\Domains\Entity\Enums\EntityEnum; @endphp @extends('panel.layout.settings', ['layout' => 'wide']) @section('title', __('FalAI Settings')) @section('titlebar_actions', '') @section('titlebar_subtitle', __('This API key is used for these features: AI Image, Advanced Image Editor')) @section('additional_css') @endsection @section('settings')
@endsection @push('script') @endpush resources/views/see-dream-v4-tab-body.blade.php 0000644 00000007155 15266620503 0015377 0 ustar 00 {{--