finished the upgrade to filament 4. completely revamped the frontend with codex, now it looks great!
This commit is contained in:
@@ -4,11 +4,12 @@ namespace App\Http\Controllers\Api;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Style;
|
||||
use App\Models\Setting;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Settings\GeneralSettings;
|
||||
|
||||
class StyleController extends Controller
|
||||
{
|
||||
public function __construct(private GeneralSettings $settings) {}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$styles = Style::with(['aiModel.primaryApiProvider'])
|
||||
@@ -31,15 +32,15 @@ class StyleController extends Controller
|
||||
|
||||
public function getImageRefreshInterval()
|
||||
{
|
||||
$interval = Setting::where('key', 'image_refresh_interval')->first();
|
||||
|
||||
return response()->json(['interval' => $interval ? (int)$interval->value / 1000 : 5]);
|
||||
return response()->json([
|
||||
'interval' => $this->settings->image_refresh_interval / 1000,
|
||||
]);
|
||||
}
|
||||
|
||||
public function getMaxNumberOfCopies()
|
||||
{
|
||||
$maxCopies = Setting::where('key', 'max_number_of_copies')->first();
|
||||
|
||||
return response()->json(['max_copies' => $maxCopies ? (int)$maxCopies->value : 10]); // Default to 10 if not set
|
||||
return response()->json([
|
||||
'max_copies' => $this->settings->max_number_of_copies,
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user