Complete rework of packet parsing and packet generation

This commit is contained in:
2024-05-17 22:10:54 +10:00
parent 1650d07d5c
commit 29710c37c2
30 changed files with 1394 additions and 1403 deletions

View File

@@ -1,3 +1,8 @@
@php
use App\Models\Netmail;
use App\Classes\FTN\Message;
@endphp
@extends('layouts.app')
@section('htmlheader_title')
Verify Packet
@@ -82,7 +87,7 @@
<div class="col-12">
<h4 class="accordion-header">
<span class="accordion-button" id="pktmsg" data-bs-toggle="collapse" data-bs-target="#collapse_msg_{{ $loop->parent->parent->index }}_{{ $loop->index }}" aria-expanded="false">
@if($msg->isNetmail()) Netmail @else Echomail&nbsp;<strong>{{ $msg->echoarea }}</strong> @endif : {{ $msg->msgid }}
@if($msg instanceof Netmail) Netmail @else Echomail&nbsp;<strong>{{ $msg->echoarea->name }}</strong> @endif : {{ $msg->msgid }}
</span>
</h4>
@@ -98,48 +103,40 @@
<div class="row pb-2">
<div class="col-4">
DATE: <strong class="highlight">{{ $msg->date }}</strong>
DATE: <strong class="highlight">{{ $msg->datetime }}</strong>
</div>
<div class="col-4">
FLAGS: <strong class="highlight">{{ $msg->flags()->filter()->keys()->join(', ') }}</strong>
FLAGS: <strong class="highlight">{{ $msg->flags()->keys()->join(', ') }}</strong>
</div>
</div>
<div class="row pb-2">
<div class="col-4">
FROM: <strong class="highlight">{!! \App\Classes\FTN\Message::tr($msg->user_from) !!}</strong> (<strong class="highlight">{{ $msg->fftn }}</strong>)
FROM: <strong class="highlight">{!! Message::tr($msg->from) !!}</strong> (<strong class="highlight">{{ $msg->fftn->ftn }}</strong>)
</div>
<div class="col-4">
TO: <strong class="highlight">{!! \App\Classes\FTN\Message::tr($msg->user_to) !!}</strong>@if($msg->isNetmail()) (<strong class="highlight">{{ $msg->tftn }}</strong>) @endif
TO: <strong class="highlight">{!! Message::tr($msg->to) !!}</strong>@if($msg instanceof Netmail) (<strong class="highlight">{{ $msg->tftn->ftn }}</strong>) @endif
</div>
</div>
<div class="row pb-2">
<div class="col-8">
SUBJECT: <strong class="highlight">{!! \App\Classes\FTN\Message::tr($msg->subject) !!}</strong>
SUBJECT: <strong class="highlight">{!! Message::tr($msg->subject) !!}</strong>
</div>
</div>
<div class="row pb-2">
<div class="col-8">
<div class="pad pb-0">
<pre class="highlight">{!! \App\Classes\FTN\Message::tr($msg->message).sprintf("\r * Origin: %s",$msg->origin) !!}</pre>
<pre class="highlight">{!! Message::tr($msg->msg_src) !!}</pre>
</div>
</div>
</div>
@if($msg->tagline)
@if($msg instanceof Netmail)
<div class="row pb-2">
<div class="col-8">
TAGLINE: <br><strong class="highlight">{{ $msg->tagline }}</strong>
</div>
</div>
@endif
@if($msg->isNetmail())
<div class="row pb-2">
<div class="col-8">
VIA: <br><strong class="highlight">{!! $msg->via->join('</strong><br><strong class="highlight">') !!}</strong>
VIA: <br><strong class="highlight">{!! $msg->path->join('</strong> -> <strong class="highlight">') !!}</strong>
</div>
</div>
@else
@@ -159,7 +156,7 @@
<div class="row pb-2">
<div class="col-8">
<strong>KLUDGES:</strong> <br>
@foreach ($msg->kludge->sort(function($v,$k) { return $k; })->reverse() as $k => $v)
@foreach ($msg->kludges->sort(function($v,$k) { return $k; })->reverse() as $k => $v)
<strong class="highlight">{{ $k }}</strong> {{ $v }}<br>
@endforeach
</div>