fixed progress and alignment of style-change

This commit is contained in:
2025-08-04 15:35:01 +02:00
parent b4456bcabb
commit 4a45738b9b
5 changed files with 13 additions and 11 deletions

View File

@@ -48,6 +48,7 @@ class StyleResource extends Resource
->disk('public')
->directory('style_previews')
->image()
->imageEditor()
->required()
->rules(['mimes:jpeg,png,bmp,gif,webp']),
Textarea::make('parameters')

View File

@@ -47,9 +47,13 @@ class ImageController extends Controller
// Fetch images from the database after synchronization
$query = Image::orderBy('updated_at', 'desc');
// If user is not authenticated, filter by is_public
// If user is not authenticated, filter by is_public, but also include their temporary images
if (!auth()->check()) {
$query->where('is_public', true);
$query->where(function ($q) {
$q->where('is_public', true)->orWhere('is_temp', true);
});
} else {
// If user is authenticated, show all their images
}
$newImageTimespanMinutes = Setting::where('key', 'new_image_timespan_minutes')->first()->value ?? 60; // Default to 60 minutes