mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-30 10:13:16 +00:00
commit
d90379c15f
19 changed files with 19 additions and 43 deletions
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
],
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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
|
||||
],
|
||||
],
|
||||
],
|
||||
|
|
BIN
public/js/daci-m9we36ik.js
vendored
BIN
public/js/daci-m9we36ik.js
vendored
Binary file not shown.
BIN
public/js/dffc-m9we36ik.js
vendored
BIN
public/js/dffc-m9we36ik.js
vendored
Binary file not shown.
BIN
public/js/dmyh-m9we36ik.js
vendored
BIN
public/js/dmyh-m9we36ik.js
vendored
Binary file not shown.
BIN
public/js/dmym-m9we36ik.js
vendored
BIN
public/js/dmym-m9we36ik.js
vendored
Binary file not shown.
BIN
public/js/dsfc-m9we36ik.js
vendored
BIN
public/js/dsfc-m9we36ik.js
vendored
Binary file not shown.
BIN
public/js/dssc-m9we36ik.js
vendored
BIN
public/js/dssc-m9we36ik.js
vendored
Binary file not shown.
BIN
public/js/home-m9we36ik.js
vendored
BIN
public/js/home-m9we36ik.js
vendored
Binary file not shown.
BIN
public/js/post-m9we36ik.js
vendored
BIN
public/js/post-m9we36ik.js
vendored
Binary file not shown.
BIN
public/js/profile-m9we36ik.js
vendored
BIN
public/js/profile-m9we36ik.js
vendored
Binary file not shown.
BIN
public/js/profile.js
vendored
BIN
public/js/profile.js
vendored
Binary file not shown.
BIN
public/js/spa.js
vendored
BIN
public/js/spa.js
vendored
Binary file not shown.
Binary file not shown.
|
@ -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
|
Loading…
Reference in a new issue