Merge pull request #1896 from pixelfed/staging

Update site config service
This commit is contained in:
daniel 2019-12-17 20:57:00 -07:00 committed by GitHub
commit 149d569823
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 1 deletions

View file

@ -3,6 +3,7 @@
namespace App\Util\Site; namespace App\Util\Site;
use Cache; use Cache;
use Illuminate\Support\Str;
class Config { class Config {
@ -35,7 +36,8 @@ class Config {
'site' => [ 'site' => [
'domain' => config('pixelfed.domain.app'), 'domain' => config('pixelfed.domain.app'),
'url' => config('app.url') 'url' => config('app.url'),
'description' => config('instance.description')
], ],
'username' => [ 'username' => [
@ -44,6 +46,18 @@ class Config {
'format' => config('instance.username.remote.format'), 'format' => config('instance.username.remote.format'),
'custom' => config('instance.username.remote.custom') 'custom' => config('instance.username.remote.custom')
] ]
],
'features' => [
'mobile_apis' => config('pixelfed.oauth_enabled'),
'circles' => false,
'stories' => false,
'video' => Str::contains(config('pixelfed.media_types'), 'video/mp4'),
'import' => [
'instagram' => config('pixelfed.import.instagram.enabled'),
'mastodon' => false,
'pixelfed' => false
]
] ]
]; ];
}); });

View file

@ -2,6 +2,7 @@
return [ return [
'description' => env('INSTANCE_DESCRIPTION', null),
'announcement' => [ 'announcement' => [
'enabled' => env('INSTANCE_ANNOUNCEMENT_ENABLED', false), 'enabled' => env('INSTANCE_ANNOUNCEMENT_ENABLED', false),
'message' => env('INSTANCE_ANNOUNCEMENT_MESSAGE', 'Example announcement message.<br><span class="font-weight-normal">Something else here</span>') 'message' => env('INSTANCE_ANNOUNCEMENT_MESSAGE', 'Example announcement message.<br><span class="font-weight-normal">Something else here</span>')