Sharing certificates now creates a Share: a public page behind an
unguessable token where the recipient views and downloads the selected
certificates individually or as a ZIP, instead of receiving links or
attachments by email.
- Share model + certificate_share pivot; expiration (1/7/30 days),
optional password (encrypted so the owner can re-view it), revocation,
and open tracking
- Public routes under shared/{token}: password unlock gate (throttled,
session-scoped), per-certificate download, on-the-fly ZIP that is
AES-256 encrypted when the share has a password, friendly 410 page
for expired/revoked links
- Share modal on the certificates index now creates the page and
reveals a copyable link + password; optional transactional email
(ShareCreatedMail) still sends the link to a recipient
- New Shares page in the sidebar to copy links, look up passwords,
revoke, and delete shares
- Old signed-URL controller and both attachment/link mailables removed;
Dutch translations updated; Pest coverage for the full lifecycle
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
63 lines
3 KiB
PHP
63 lines
3 KiB
PHP
@extends('shared.layout')
|
|
|
|
@section('content')
|
|
<flux:card class="space-y-6 rounded-2xl">
|
|
<div>
|
|
<flux:heading size="xl">{{ __('Certificates shared with you') }}</flux:heading>
|
|
<flux:text class="mt-2">
|
|
{{ trans_choice(':name has shared :count certificate with you.|:name has shared :count certificates with you.', $certificates->count(), ['name' => $share->user->name, 'count' => $certificates->count()]) }}
|
|
</flux:text>
|
|
</div>
|
|
|
|
<div class="divide-y divide-zinc-200 rounded-xl border border-zinc-200 dark:divide-zinc-800 dark:border-zinc-800">
|
|
@forelse ($certificates as $certificate)
|
|
<div class="flex items-center justify-between gap-4 p-4">
|
|
<div class="flex min-w-0 items-center gap-3">
|
|
<span class="flex size-9 shrink-0 items-center justify-center rounded-lg bg-emerald-100 text-emerald-600 dark:bg-emerald-500/15 dark:text-emerald-400">
|
|
<flux:icon.shield-check class="size-5" />
|
|
</span>
|
|
<div class="min-w-0">
|
|
<flux:heading class="truncate">{{ $certificate->title }}</flux:heading>
|
|
@if ($certificate->issuer)
|
|
<flux:text class="truncate text-sm">{{ $certificate->issuer }}</flux:text>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
<flux:button
|
|
:href="route('shared.certificate', ['share' => $share->token, 'certificate' => $certificate->id])"
|
|
icon="arrow-down-tray"
|
|
size="sm"
|
|
>
|
|
{{ __('Download') }}
|
|
</flux:button>
|
|
</div>
|
|
@empty
|
|
<div class="p-4">
|
|
<flux:text>{{ __('There are no files available in this share anymore.') }}</flux:text>
|
|
</div>
|
|
@endforelse
|
|
</div>
|
|
|
|
@if ($certificates->isNotEmpty())
|
|
<div class="space-y-2">
|
|
<flux:button
|
|
:href="route('shared.zip', $share->token)"
|
|
icon="archive-box-arrow-down"
|
|
variant="primary"
|
|
class="w-full"
|
|
>
|
|
{{ __('Download all as ZIP') }}
|
|
</flux:button>
|
|
@if ($share->password !== null)
|
|
<flux:text class="text-center text-sm">
|
|
{{ __('The ZIP archive is encrypted with the same password you used to open this page.') }}
|
|
</flux:text>
|
|
@endif
|
|
</div>
|
|
@endif
|
|
|
|
<flux:text class="text-sm">
|
|
{{ __('This page is available until :date, after which it will stop working.', ['date' => $share->expires_at->translatedFormat('F j, Y H:i')]) }}
|
|
</flux:text>
|
|
</flux:card>
|
|
@endsection
|