mirror of
				https://github.com/linuxserver/Heimdall.git
				synced 2025-10-31 13:07:50 +09:00 
			
		
		
		
	feat: support the listing of private apps
This commit is contained in:
		| @@ -110,6 +110,13 @@ class Application extends Model | |||||||
|     { |     { | ||||||
|         $apps = self::apps(); |         $apps = self::apps(); | ||||||
|         $app = $apps->where('appid', $appid)->first(); |         $app = $apps->where('appid', $appid)->first(); | ||||||
|  |  | ||||||
|  |         if ($app === null) { | ||||||
|  |             // Try in db for Private App | ||||||
|  |             $appModel = self::where('appid', $appid)->first(); | ||||||
|  |             $app = json_decode($appModel->toJson()); | ||||||
|  |         } | ||||||
|  |  | ||||||
|         if ($app === null) { |         if ($app === null) { | ||||||
|             return null; |             return null; | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -17,6 +17,7 @@ use Illuminate\Http\Request; | |||||||
| use Illuminate\Support\Facades\Log; | use Illuminate\Support\Facades\Log; | ||||||
| use Illuminate\Support\Facades\Route; | use Illuminate\Support\Facades\Route; | ||||||
| use Illuminate\Support\Facades\Storage; | use Illuminate\Support\Facades\Storage; | ||||||
|  | use Illuminate\Support\Facades\URL; | ||||||
|  |  | ||||||
| class ItemController extends Controller | class ItemController extends Controller | ||||||
| { | { | ||||||
| @@ -376,7 +377,13 @@ class ItemController extends Controller | |||||||
|         } |         } | ||||||
|  |  | ||||||
|         $output['colour'] = ($app->tile_background == 'light') ? '#fafbfc' : '#161b1f'; |         $output['colour'] = ($app->tile_background == 'light') ? '#fafbfc' : '#161b1f'; | ||||||
|         $output['iconview'] = config('app.appsource').'icons/'.$app->icon; |         if(strpos($app->icon, 'icons/') !== false) { | ||||||
|  |             // Private apps have the icon locally | ||||||
|  |             $output['iconview'] = URL::to('/').'/storage/'.$app->icon; | ||||||
|  |         } else { | ||||||
|  |             $output['iconview'] = config('app.appsource').'icons/'.$app->icon; | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |  | ||||||
|         return json_encode($output); |         return json_encode($output); | ||||||
|     } |     } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user