Deploy Ladill Transfer / deploy (push) Successful in 36s
Use transfer.ladill.com share URLs in notifications and APIs, add the email logo, and show file details with a prominent download button. Co-authored-by: Cursor <cursoragent@cursor.com>
111 lines
4.8 KiB
PHP
111 lines
4.8 KiB
PHP
@extends('mail.notifications.layout')
|
|
|
|
@section('email-header')
|
|
<img src="{{ config('app.url') }}/images/logo/ladilltransfer-logo-email.png" alt="Ladill Transfer" class="email-logo" style="max-height:44px;">
|
|
@endsection
|
|
|
|
@section('content')
|
|
@php
|
|
$fileCount = $transfer->files->count();
|
|
$availableUntil = $transfer->isInGracePeriod()
|
|
? $transfer->grace_ends_at
|
|
: $transfer->paid_until;
|
|
$fmtBytes = function (int $bytes) {
|
|
if ($bytes >= 1048576) {
|
|
return number_format($bytes / 1048576, 1).' MB';
|
|
}
|
|
if ($bytes >= 1024) {
|
|
return number_format($bytes / 1024, 0).' KB';
|
|
}
|
|
|
|
return $bytes.' B';
|
|
};
|
|
@endphp
|
|
|
|
@if($milestone === 'created')
|
|
<h1 class="email-title">You have files to download</h1>
|
|
<p class="email-text">
|
|
@if($senderName)
|
|
<strong>{{ $senderName }}</strong> shared {{ $fileCount === 1 ? 'a file' : $fileCount.' files' }} with you through Ladill Transfer.
|
|
@else
|
|
Someone shared {{ $fileCount === 1 ? 'a file' : $fileCount.' files' }} with you through Ladill Transfer.
|
|
@endif
|
|
</p>
|
|
@elseif($milestone === 'grace')
|
|
<div class="highlight-box highlight-box-warning" style="margin-top:0;">
|
|
<p class="highlight-box-text">Grace period</p>
|
|
<p class="highlight-box-subtext">Download soon</p>
|
|
</div>
|
|
|
|
<h1 class="email-title">Download before these files are removed</h1>
|
|
<p class="email-text">
|
|
The transfer <strong>{{ $transfer->title }}</strong> is in a grace period.
|
|
@if($availableUntil)
|
|
Files will be deleted on <strong>{{ $availableUntil->format('F j, Y') }}</strong> unless payment is received.
|
|
@endif
|
|
</p>
|
|
@else
|
|
<h1 class="email-title">Reminder: download your files</h1>
|
|
<p class="email-text">
|
|
<strong>{{ $transfer->title }}</strong>
|
|
@if($daysRemaining === 1)
|
|
will become unavailable tomorrow.
|
|
@else
|
|
will become unavailable in {{ $daysRemaining }} days.
|
|
@endif
|
|
</p>
|
|
@endif
|
|
|
|
<div class="email-details" style="margin-top:20px;">
|
|
<p class="email-details-title">Transfer</p>
|
|
<div class="email-details-row">
|
|
<p class="email-details-label">Title</p>
|
|
<p class="email-details-value">{{ $transfer->title }}</p>
|
|
</div>
|
|
<div class="email-details-row">
|
|
<p class="email-details-label">Files</p>
|
|
<p class="email-details-value">{{ $fileCount }} {{ $fileCount === 1 ? 'file' : 'files' }} · {{ $fmtBytes($transfer->storage_bytes) }}</p>
|
|
</div>
|
|
@foreach($transfer->files as $file)
|
|
<div class="email-details-row">
|
|
<p class="email-details-label">{{ $file->original_name }}</p>
|
|
<p class="email-details-value" style="font-weight:500;color:#475569;">{{ $fmtBytes($file->size_bytes) }}</p>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
|
|
@if($transfer->message)
|
|
<p class="email-text" style="background:#f8fafc;border-radius:10px;padding:14px 16px;color:#475569;border-left:4px solid #4f46e5;">
|
|
<span style="display:block;font-size:12px;font-weight:600;color:#64748b;text-transform:uppercase;letter-spacing:0.04em;margin-bottom:6px;">Message from sender</span>
|
|
{{ $transfer->message }}
|
|
</p>
|
|
@endif
|
|
|
|
@if($transfer->isPasswordProtected())
|
|
<p class="email-text" style="font-size:13px;color:#b45309;background:#fffbeb;border-radius:10px;padding:12px 14px;border:1px solid #fde68a;">
|
|
This transfer is password protected. The sender will share the password with you separately.
|
|
</p>
|
|
@endif
|
|
|
|
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%" style="margin:28px 0 20px;">
|
|
<tr>
|
|
<td align="center">
|
|
<a href="{{ $publicUrl }}" class="email-button" style="display:inline-block;background:linear-gradient(135deg,#4f46e5 0%,#7c3aed 100%);color:#ffffff;text-decoration:none;padding:16px 36px;border-radius:12px;font-size:16px;font-weight:700;box-shadow:0 8px 24px rgba(79,70,229,0.35);">
|
|
Download {{ $fileCount === 1 ? 'file' : 'files' }}
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p class="email-text" style="font-size:13px;color:#6b7280;text-align:center;">
|
|
Or copy this link into your browser:<br>
|
|
<a href="{{ $publicUrl }}" style="color:#4f46e5;word-break:break-all;">{{ $publicUrl }}</a>
|
|
</p>
|
|
|
|
@if($availableUntil && $milestone !== 'grace')
|
|
<p class="email-text" style="font-size:13px;color:#6b7280;text-align:center;">
|
|
Available until {{ $availableUntil->format('F j, Y') }}.
|
|
</p>
|
|
@endif
|
|
@endsection
|