From 5a529d4db952517e562708a1f8e930882c71debe Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Mon, 28 Nov 2022 14:26:16 -0600 Subject: [PATCH] Add audio/video embeds to checkins --- resources/views/partials/checkins-list.blade.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/resources/views/partials/checkins-list.blade.php b/resources/views/partials/checkins-list.blade.php index c533718..67ba191 100644 --- a/resources/views/partials/checkins-list.blade.php +++ b/resources/views/partials/checkins-list.blade.php @@ -6,7 +6,21 @@

{!! render_date_difference($checkin->date) !!}

@if($checkin->note) - {!! $checkin->note !!} + @if(preg_match("/\[\[[^]]+\]\]/", $checkin->note, $filepath) + @if(preg_match("/\.webm/", $filepath) + + @elseif(preg_match("/\.ogg/", $filepath) + + @endif + @else + {!! $checkin->note !!} + @endif @endif @if($checkin->image_url)