mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-22 04:53:17 +00:00
commit
5613f6e84f
6 changed files with 68 additions and 43 deletions
|
@ -19,6 +19,11 @@
|
||||||
- Update ApiV1Controller, fix followAccountById with firstOrCreate() ([1d52ad0b](https://github.com/pixelfed/pixelfed/commit/1d52ad0b))
|
- Update ApiV1Controller, fix followAccountById with firstOrCreate() ([1d52ad0b](https://github.com/pixelfed/pixelfed/commit/1d52ad0b))
|
||||||
- Update AccountService, fix delete status ([8b7121f9](https://github.com/pixelfed/pixelfed/commit/8b7121f9))
|
- Update AccountService, fix delete status ([8b7121f9](https://github.com/pixelfed/pixelfed/commit/8b7121f9))
|
||||||
- Update ap helpers, fix duplicate entry bug ([85cfa1ba](https://github.com/pixelfed/pixelfed/commit/85cfa1ba))
|
- Update ap helpers, fix duplicate entry bug ([85cfa1ba](https://github.com/pixelfed/pixelfed/commit/85cfa1ba))
|
||||||
|
- Update Inbox, fix handleUndoActivity ([d660e46b](https://github.com/pixelfed/pixelfed/commit/d660e46b))
|
||||||
|
- Update HomeSettings controller, bail earlier when attempting to update email that already exists ([399bf5f8](https://github.com/pixelfed/pixelfed/commit/399bf5f8))
|
||||||
|
- Update ProfileController, cache actor object and atom feed ([8665eab1](https://github.com/pixelfed/pixelfed/commit/8665eab1))
|
||||||
|
- Update NotificationTransformer, fix mediaTag and modLog types ([b6c06c4b](https://github.com/pixelfed/pixelfed/commit/b6c06c4b))
|
||||||
|
- Update landing view, add `app.name` and `app.short_description` for better customizability ([bda9d16b](https://github.com/pixelfed/pixelfed/commit/bda9d16b))
|
||||||
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
||||||
|
|
||||||
## [v0.11.4 (2022-10-04)](https://github.com/pixelfed/pixelfed/compare/v0.11.3...v0.11.4)
|
## [v0.11.4 (2022-10-04)](https://github.com/pixelfed/pixelfed/compare/v0.11.3...v0.11.4)
|
||||||
|
|
|
@ -187,10 +187,12 @@ class ProfileController extends Controller
|
||||||
abort_if(!config_cache('federation.activitypub.enabled'), 404);
|
abort_if(!config_cache('federation.activitypub.enabled'), 404);
|
||||||
abort_if($user->domain, 404);
|
abort_if($user->domain, 404);
|
||||||
|
|
||||||
$fractal = new Fractal\Manager();
|
return Cache::remember('pf:activitypub:user-object:by-id:' . $user->id, 3600, function() use($user) {
|
||||||
$resource = new Fractal\Resource\Item($user, new ProfileTransformer);
|
$fractal = new Fractal\Manager();
|
||||||
$res = $fractal->createData($resource)->toArray();
|
$resource = new Fractal\Resource\Item($user, new ProfileTransformer);
|
||||||
return response(json_encode($res['data']))->header('Content-Type', 'application/activity+json');
|
$res = $fractal->createData($resource)->toArray();
|
||||||
|
return response(json_encode($res['data']))->header('Content-Type', 'application/activity+json');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public function showAtomFeed(Request $request, $user)
|
public function showAtomFeed(Request $request, $user)
|
||||||
|
@ -201,36 +203,47 @@ class ProfileController extends Controller
|
||||||
|
|
||||||
abort_if(!$pid, 404);
|
abort_if(!$pid, 404);
|
||||||
|
|
||||||
$profile = AccountService::get($pid);
|
$profile = AccountService::get($pid, true);
|
||||||
|
|
||||||
abort_if(!$profile || $profile['locked'] || !$profile['local'], 404);
|
abort_if(!$profile || $profile['locked'] || !$profile['local'], 404);
|
||||||
|
|
||||||
$items = DB::table('statuses')
|
$data = Cache::remember('pf:atom:user-feed:by-id:' . $profile['id'], 86400, function() use($pid, $profile) {
|
||||||
->whereProfileId($pid)
|
$items = DB::table('statuses')
|
||||||
->whereVisibility('public')
|
->whereProfileId($pid)
|
||||||
->whereType('photo')
|
->whereVisibility('public')
|
||||||
->orderByDesc('id')
|
->whereType('photo')
|
||||||
->take(10)
|
->orderByDesc('id')
|
||||||
->get()
|
->take(10)
|
||||||
->map(function($status) {
|
->get()
|
||||||
return StatusService::get($status->id);
|
->map(function($status) {
|
||||||
})
|
return StatusService::get($status->id);
|
||||||
->filter(function($status) {
|
})
|
||||||
return $status &&
|
->filter(function($status) {
|
||||||
isset($status['account']) &&
|
return $status &&
|
||||||
isset($status['media_attachments']) &&
|
isset($status['account']) &&
|
||||||
count($status['media_attachments']);
|
isset($status['media_attachments']) &&
|
||||||
})
|
count($status['media_attachments']);
|
||||||
->values();
|
})
|
||||||
$permalink = config('app.url') . "/users/{$profile['username']}.atom";
|
->values();
|
||||||
$headers = ['Content-Type' => 'application/atom+xml'];
|
$permalink = config('app.url') . "/users/{$profile['username']}.atom";
|
||||||
|
$headers = ['Content-Type' => 'application/atom+xml'];
|
||||||
|
|
||||||
if($items && $items->count()) {
|
if($items && $items->count()) {
|
||||||
$headers['Last-Modified'] = now()->parse($items->first()['created_at'])->toRfc7231String();
|
$headers['Last-Modified'] = now()->parse($items->first()['created_at'])->toRfc7231String();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return compact('items', 'permalink', 'headers');
|
||||||
|
});
|
||||||
|
abort_if(!$data, 404);
|
||||||
return response()
|
return response()
|
||||||
->view('atom.user', compact('profile', 'items', 'permalink'))
|
->view('atom.user',
|
||||||
->withHeaders($headers);
|
[
|
||||||
|
'profile' => $profile,
|
||||||
|
'items' => $data['items'],
|
||||||
|
'permalink' => $data['permalink']
|
||||||
|
]
|
||||||
|
)
|
||||||
|
->withHeaders($data['headers']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function meRedirect()
|
public function meRedirect()
|
||||||
|
|
|
@ -159,7 +159,7 @@ trait HomeSettings
|
||||||
public function emailUpdate(Request $request)
|
public function emailUpdate(Request $request)
|
||||||
{
|
{
|
||||||
$this->validate($request, [
|
$this->validate($request, [
|
||||||
'email' => 'required|email',
|
'email' => 'required|email|unique:users,email',
|
||||||
]);
|
]);
|
||||||
$changes = false;
|
$changes = false;
|
||||||
$email = $request->input('email');
|
$email = $request->input('email');
|
||||||
|
|
|
@ -32,18 +32,22 @@ class NotificationTransformer extends Fractal\TransformerAbstract
|
||||||
|
|
||||||
if($n->item_id && $n->item_type == 'App\ModLog') {
|
if($n->item_id && $n->item_type == 'App\ModLog') {
|
||||||
$ml = $n->item;
|
$ml = $n->item;
|
||||||
$res['modlog'] = [
|
if($ml && $ml->object_uid) {
|
||||||
'id' => $ml->object_uid,
|
$res['modlog'] = [
|
||||||
'url' => url('/i/admin/users/modlogs/' . $ml->object_uid)
|
'id' => $ml->object_uid,
|
||||||
];
|
'url' => url('/i/admin/users/modlogs/' . $ml->object_uid)
|
||||||
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($n->item_id && $n->item_type == 'App\MediaTag') {
|
if($n->item_id && $n->item_type == 'App\MediaTag') {
|
||||||
$ml = $n->item;
|
$ml = $n->item;
|
||||||
$res['tagged'] = [
|
if($ml && $ml->tagged_username) {
|
||||||
'username' => $ml->tagged_username,
|
$res['tagged'] = [
|
||||||
'post_url' => '/p/'.HashidService::encode($ml->status_id)
|
'username' => $ml->tagged_username,
|
||||||
];
|
'post_url' => '/p/'.HashidService::encode($ml->status_id)
|
||||||
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $res;
|
return $res;
|
||||||
|
|
|
@ -13,9 +13,9 @@ return [
|
||||||
|
|
||||||
'timeout' => 3600,
|
'timeout' => 3600,
|
||||||
|
|
||||||
'enable_logging' => env('FFMPEG_LOG', false),
|
'log_channel' => env('FFMPEG_LOG_CHANNEL', false), // set to false to completely disable logging
|
||||||
|
|
||||||
'set_command_and_error_output_on_exception' => false,
|
|
||||||
|
|
||||||
'temporary_files_root' => env('FFMPEG_TEMPORARY_FILES_ROOT', sys_get_temp_dir()),
|
'temporary_files_root' => env('FFMPEG_TEMPORARY_FILES_ROOT', sys_get_temp_dir()),
|
||||||
|
|
||||||
|
'temporary_files_encrypted_hls' => env('FFMPEG_TEMPORARY_ENCRYPTED_HLS', env('FFMPEG_TEMPORARY_FILES_ROOT', sys_get_temp_dir())),
|
||||||
];
|
];
|
||||||
|
|
|
@ -53,15 +53,18 @@
|
||||||
<p class="display-2 font-weight-bold">Photo Sharing</p>
|
<p class="display-2 font-weight-bold">Photo Sharing</p>
|
||||||
<p class="h1 font-weight-bold">For Everyone.</p>
|
<p class="h1 font-weight-bold">For Everyone.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<p class="lead font-weight-light mt-5">{{ config_cache('app.short_description') ?? 'Pixelfed is an image sharing platform, an ethical alternative to centralized platforms.' }}</p>
|
||||||
|
<p><a href="https://pixelfed.org" target="_blank" class="font-weight-bold">Learn more</a></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-5 offset-md-1">
|
<div class="col-12 col-md-5 offset-md-1">
|
||||||
<div>
|
<div>
|
||||||
<div class="pt-md-3 d-flex justify-content-center align-items-center">
|
<div class="pt-md-3 d-flex justify-content-center align-items-center">
|
||||||
<img src="/img/pixelfed-icon-color.svg" loading="lazy" width="50px" height="50px">
|
<img src="/img/pixelfed-icon-color.svg" loading="lazy" width="50px" height="50px">
|
||||||
<span class="font-weight-bold h3 ml-2 pt-2">Pixelfed</span>
|
<span class="font-weight-bold h3 ml-2 pt-2">{{ config_cache('app.name') ?? 'Pixelfed' }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-block d-md-none">
|
<div class="d-block d-md-none">
|
||||||
<p class="font-weight-bold mb-0 text-center">Photo Sharing. For Everyone</p>
|
<p class="font-weight-light mt-3 mb-5 text-center px-5">{{ config_cache('app.short_description') ?? 'Pixelfed is an image sharing platform, an ethical alternative to centralized platforms.' }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="card my-4 shadow-none border">
|
<div class="card my-4 shadow-none border">
|
||||||
<div class="card-body px-lg-5">
|
<div class="card-body px-lg-5">
|
||||||
|
|
Loading…
Reference in a new issue