Merge pull request #3360 from pixelfed/staging

Staging
This commit is contained in:
daniel 2022-04-05 22:22:36 -06:00 committed by GitHub
commit d90379c15f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 41 additions and 65 deletions

View File

@ -237,6 +237,9 @@ class CollectionController extends Controller
return Collection::whereProfileId($profile->id)
->whereIn('visibility', $visibility)
->when(!$owner, function($q, $owner) {
return $q->whereNotNull('published_at');
})
->orderByDesc('id')
->paginate(9)
->map(function($collection) {

View File

@ -81,9 +81,7 @@ class ProfileController extends Controller
'list' => $settings->show_profile_followers
]
];
$ui = $request->has('ui') && $request->input('ui') == 'memory' ? 'profile.memory' : 'profile.show';
return view($ui, compact('profile', 'settings'));
return view('profile.show', compact('profile', 'settings'));
} else {
$key = 'profile:settings:' . $user->id;
$ttl = now()->addHours(6);

View File

@ -213,6 +213,9 @@ class DeleteWorker implements ShouldQueue
'User-Agent' => 'PixelfedBot v0.1 - https://pixelfed.org',
])->get($actor->remote_url);
$res = json_decode($res->body(), true, 8);
if(!isset($res['publicKey'], $res['publicKey']['id'])) {
return;
}
if($res['publicKey']['id'] !== $actor->key_id) {
return;
}

View File

@ -7,10 +7,10 @@ use Illuminate\Support\Str;
class Config {
const CACHE_KEY = 'api:site:configuration:_v0.5';
const CACHE_KEY = 'api:site:configuration:_v0.6';
public static function get() {
return Cache::remember(self::CACHE_KEY, 86400, function() {
return Cache::remember(self::CACHE_KEY, 900, function() {
return [
'open_registration' => (bool) config_cache('pixelfed.open_registration'),
'uploader' => [
@ -51,12 +51,15 @@ class Config {
],
'features' => [
'timelines' => [
'local' => true,
'network' => (bool) config('federation.network_timeline'),
],
'mobile_apis' => (bool) config_cache('pixelfed.oauth_enabled'),
'circles' => false,
'stories' => (bool) config_cache('instance.stories.enabled'),
'video' => Str::contains(config_cache('pixelfed.media_types'), 'video/mp4'),
'import' => [
'instagram' => config_cache('pixelfed.import.instagram.enabled'),
'instagram' => (bool) config_cache('pixelfed.import.instagram.enabled'),
'mastodon' => false,
'pixelfed' => false
],

View File

@ -33,6 +33,8 @@ class Nodeinfo {
return Status::whereLocal(true)->count();
});
$features = [ 'features' => \App\Util\Site\Config::get()['features'] ];
return [
'metadata' => [
'nodeName' => config_cache('app.name'),
@ -40,7 +42,7 @@ class Nodeinfo {
'homepage' => 'https://pixelfed.org',
'repo' => 'https://github.com/pixelfed/pixelfed',
],
'config' => \App\Util\Site\Config::get()
'config' => $features
],
'protocols' => [
'activitypub',

View File

@ -175,6 +175,7 @@ return [
'memory' => 128,
'tries' => 3,
'nice' => 0,
'timeout' => 60
],
],
@ -187,6 +188,7 @@ return [
'memory' => 128,
'tries' => 3,
'nice' => 0,
'timeout' => 60
],
],
],

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
public/js/spa.js vendored

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,7 @@
"/js/activity.js": "/js/activity.js?id=d14e608dd1ecac4d900cd639f2199b62",
"/js/components.js": "/js/components.js?id=35beb0748dd5518371686a5f00348fbf",
"/js/discover.js": "/js/discover.js?id=0c98508635d6adae9bf8f76c9f5c918c",
"/js/profile.js": "/js/profile.js?id=42bd878e316ea68be770c1b572a9e61e",
"/js/profile.js": "/js/profile.js?id=c43b721fc76902c474563f2e3cf9fcbf",
"/js/status.js": "/js/status.js?id=64ae070933b89df06481c6035f897a2f",
"/js/timeline.js": "/js/timeline.js?id=ab7a627c078da5cf1a556d496b031442",
"/js/compose.js": "/js/compose.js?id=07a87bcfbf033c6abeaf073b2e96a83b",
@ -20,19 +20,19 @@
"/js/admin.js": "/js/admin.js?id=fd88b96423314b41cc763a0714554a04",
"/js/rempro.js": "/js/rempro.js?id=f8a8839ec4d1fc5a2fe75a5355fbf39c",
"/js/rempos.js": "/js/rempos.js?id=6adb34adf68f74778365143b28fb5b9b",
"/js/spa.js": "/js/spa.js?id=b4ae3271cccd13ad19bf79d7daccebc9",
"/js/spa.js": "/js/spa.js?id=17b1356e5fbae1788e19262b09b66354",
"/js/stories.js": "/js/stories.js?id=814a25875cac8987d85c801dcb453114",
"/js/manifest.js": "/js/manifest.js?id=03b8ee72f882070cabba951c4e5291ed",
"/js/home-m9we36ik.js": "/js/home-m9we36ik.js?id=031e8005eae16c601f6775154fc783ba",
"/js/home-m9we36ik.js": "/js/home-m9we36ik.js?id=c24d81bce180fc13ce03cc0ea8efb286",
"/js/compose-m9we36ik.js": "/js/compose-m9we36ik.js?id=884530b8963f483c8c20bf16300e51ea",
"/js/post-m9we36ik.js": "/js/post-m9we36ik.js?id=6a9d7dd2a1315a3b871eb08d47246e60",
"/js/profile-m9we36ik.js": "/js/profile-m9we36ik.js?id=3346f2f95a9364c50f938cb89889a915",
"/js/dmym-m9we36ik.js": "/js/dmym-m9we36ik.js?id=4b4f1712fb32979a4fababe4676d6728",
"/js/dmyh-m9we36ik.js": "/js/dmyh-m9we36ik.js?id=9ce762725ef238676780a24217a9bad6",
"/js/daci-m9we36ik.js": "/js/daci-m9we36ik.js?id=c1895fd839f97ad32bb661b965f88f18",
"/js/dffc-m9we36ik.js": "/js/dffc-m9we36ik.js?id=573a438abc6c0ce6dd6caf1bb8ea9e8e",
"/js/dsfc-m9we36ik.js": "/js/dsfc-m9we36ik.js?id=95727d76cc5ac8a1ba2e69f0fa43d4da",
"/js/dssc-m9we36ik.js": "/js/dssc-m9we36ik.js?id=bc46dfbe22b65eb77e93f70bc6ac7df3",
"/js/post-m9we36ik.js": "/js/post-m9we36ik.js?id=72668c82f5072d42c585b39214ab5745",
"/js/profile-m9we36ik.js": "/js/profile-m9we36ik.js?id=a3517090ebf338d323150096a786ca3b",
"/js/dmym-m9we36ik.js": "/js/dmym-m9we36ik.js?id=df1a3fe1183fc24fef240f9a1f65b5a9",
"/js/dmyh-m9we36ik.js": "/js/dmyh-m9we36ik.js?id=b6e50534d6035badd1189eb00a816dd6",
"/js/daci-m9we36ik.js": "/js/daci-m9we36ik.js?id=4cfb1ad39f048035762d99ff62b49136",
"/js/dffc-m9we36ik.js": "/js/dffc-m9we36ik.js?id=f4b3eae0711c78fc36f091de6d9f74e1",
"/js/dsfc-m9we36ik.js": "/js/dsfc-m9we36ik.js?id=ad7e87a55370749b3bbe1c179016e3a8",
"/js/dssc-m9we36ik.js": "/js/dssc-m9we36ik.js?id=8258ea645c3552da9264487d4555a503",
"/css/appdark.css": "/css/appdark.css?id=65bb8633bbd34c87111591cab68cf3dc",
"/css/app.css": "/css/app.css?id=f2e24fbb268e9946443459877f623d98",
"/css/spa.css": "/css/spa.css?id=8f0ae3d3a6614e8a1fe6687d58f6b806",

View File

@ -1,35 +0,0 @@
@extends('layouts.app',['title' => $profile->username . " on " . config('app.name')])
@section('content')
@if (session('error'))
<div class="alert alert-danger text-center font-weight-bold mb-0">
{{ session('error') }}
</div>
@endif
<memory-profile profile-id="{{$profile->id}}" profile-username="{{$profile->username}}" :profile-settings="{{json_encode($settings)}}" profile-layout="{{$profile->profile_layout ?? 'metro'}}"></memory-profile>
@if($profile->website)
<a class="d-none" href="{{$profile->website}}" rel="me">{{$profile->website}}</a>
@endif
<noscript>
<div class="container">
<p class="pt-5 text-center lead">Please enable javascript to view this content.</p>
</div>
</noscript>
@endsection
@push('meta')<meta property="og:description" content="{{$profile->bio}}">
@if(false == $settings['crawlable'] || $profile->remote_url)
<meta name="robots" content="noindex, nofollow">
@else <meta property="og:image" content="{{$profile->avatarUrl()}}">
<link href="{{$profile->permalink('.atom')}}" rel="alternate" title="{{$profile->username}} on Pixelfed" type="application/atom+xml">
<link href='{{$profile->permalink()}}' rel='alternate' type='application/activity+json'>
@endif
@endpush
@push('scripts')<script type="text/javascript" src="{{ mix('js/memoryprofile.js') }}"></script>
<script type="text/javascript" defer>App.boot();</script>
@endpush