acct_type === UserTypes::SUPER_ADMIN || $user->acct_type === UserTypes::SUPER_ADMIN->value); $appName = SystemSettingsHelper::appName(); $appDescription = SystemSettingsHelper::appDescription(); // Default CDN icons — served from obj-vault-3a via cdn_asset() $icons = [ ["sizes" => "48x48", "src" => cdn_asset('vendor/assets/icons/48x48.png'), "type" => "image/png"], ["sizes" => "72x72", "src" => cdn_asset('vendor/assets/icons/72x72.png'), "type" => "image/png"], ["sizes" => "96x96", "src" => cdn_asset('vendor/assets/icons/96x96.png'), "type" => "image/png"], ["sizes" => "144x144", "src" => cdn_asset('vendor/assets/icons/144x144.png'), "type" => "image/png"], ["sizes" => "192x192", "src" => cdn_asset('vendor/assets/icons/192x192.png'), "type" => "image/png"], ["sizes" => "512x512", "src" => cdn_asset('vendor/assets/icons/512x512.png'), "type" => "image/png"], ]; // Use the custom branding icon uploaded via Ultimate Console (System Settings) for everyone. // Ultimate-tier users keep that override even when previewing the Ultimate Console persona. $customLogoHash = \App\Models\SystemSetting::getValue('app_logo'); if ($customLogoHash && !$isUltimate) { $customLogoUrl = \App\Http\Controllers\FilesMainController::generateURLforFileListHash($customLogoHash); foreach ($icons as &$icon) { $icon['src'] = $customLogoUrl; $icon['type'] = 'image/png'; $icon['purpose'] = 'any maskable'; } unset($icon); } elseif ($isUltimate && $customLogoHash) { $customLogoUrl = \App\Http\Controllers\FilesMainController::generateURLforFileListHash($customLogoHash); foreach ($icons as &$icon) { $icon['src'] = $customLogoUrl; } unset($icon); } $manifest = [ "name" => $isUltimate ? "Ultimate Console" : $appName, "short_name" => $isUltimate ? "Ultimate" : explode(' ', $appName)[0], "description" => $isUltimate ? "Premium Administrative Management" : $appDescription, "lang" => "en-US", "start_url" => "/", "display" => "standalone", "background_color" => $isUltimate ? "#020617" : SystemSettingsHelper::primaryColor(), "theme_color" => $isUltimate ? "#0d6efd" : SystemSettingsHelper::primaryColor(), "icons" => $icons ]; return Response::json($manifest) ->withHeader('Content-Type', 'application/manifest+json'); } }