1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-27 02:06:52 +00:00

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 19 additions and 43 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
],
],
],

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
public/js/profile.js vendored

Binary file not shown.

BIN
public/js/spa.js vendored

Binary file not shown.

Binary file not shown.

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