mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-25 22:10:47 +00:00
commit
8b783566b3
6 changed files with 8 additions and 6 deletions
|
@ -23,6 +23,7 @@ class StatusTransformer extends Fractal\TransformerAbstract
|
||||||
'in_reply_to_account_id' => $status->in_reply_to_profile_id,
|
'in_reply_to_account_id' => $status->in_reply_to_profile_id,
|
||||||
'reblog' => null,
|
'reblog' => null,
|
||||||
'content' => $status->rendered ?? $status->caption,
|
'content' => $status->rendered ?? $status->caption,
|
||||||
|
'content_text' => $status->caption,
|
||||||
'created_at' => $status->created_at->format('c'),
|
'created_at' => $status->created_at->format('c'),
|
||||||
'emojis' => [],
|
'emojis' => [],
|
||||||
'reblogs_count' => $status->reblogs_count ?? 0,
|
'reblogs_count' => $status->reblogs_count ?? 0,
|
||||||
|
@ -62,7 +63,7 @@ class StatusTransformer extends Fractal\TransformerAbstract
|
||||||
public function includeMediaAttachments(Status $status)
|
public function includeMediaAttachments(Status $status)
|
||||||
{
|
{
|
||||||
return Cache::remember('status:transformer:media:attachments:'.$status->id, now()->addDays(14), function() use($status) {
|
return Cache::remember('status:transformer:media:attachments:'.$status->id, now()->addDays(14), function() use($status) {
|
||||||
if(in_array($status->type, ['photo', 'video', 'photo:album', 'loop', 'photo:video:album'])) {
|
if(in_array($status->type, ['photo', 'video', 'video:album', 'photo:album', 'loop', 'photo:video:album'])) {
|
||||||
$media = $status->media()->orderBy('order')->get();
|
$media = $status->media()->orderBy('order')->get();
|
||||||
return $this->collection($media, new MediaTransformer());
|
return $this->collection($media, new MediaTransformer());
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,5 +15,6 @@ return [
|
||||||
'contact' => 'Contact',
|
'contact' => 'Contact',
|
||||||
'contact-us' => 'Contact Us',
|
'contact-us' => 'Contact Us',
|
||||||
'places' => 'Places',
|
'places' => 'Places',
|
||||||
|
'profiles' => 'Profiles',
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
<div class="form-group row mt-5 pt-5">
|
<div class="form-group row mt-5 pt-5">
|
||||||
<div class="col-12 text-right">
|
<div class="col-12 text-right">
|
||||||
<hr>
|
<hr>
|
||||||
<button type="submit" class="btn btn-primary font-weight-bold">Submit</button>
|
<button type="submit" class="btn btn-primary font-weight-bold py-0 px-5">Submit</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<hr>
|
<hr>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col-12 text-right">
|
<div class="col-12 text-right">
|
||||||
<button type="submit" class="btn btn-primary font-weight-bold float-right">Submit</button>
|
<button type="submit" class="btn btn-primary font-weight-bold py-0 px-5">Submit</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -95,7 +95,7 @@
|
||||||
<hr>
|
<hr>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col-12 text-right">
|
<div class="col-12 text-right">
|
||||||
<button type="submit" class="btn btn-primary font-weight-bold float-right">Submit</button>
|
<button type="submit" class="btn btn-primary font-weight-bold py-0 px-5">Submit</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -29,8 +29,8 @@
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col-sm-9">
|
<div class="col-12 text-right">
|
||||||
<button type="submit" class="btn btn-primary">Submit</button>
|
<button type="submit" class="btn btn-primary font-weight-bold py-0 px-5">Submit</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Reference in a new issue