Files
SealShare/app/Livewire/ShareCreated.php
T
Andreas Reinhold / reiniandClaude Opus 5 1352533667 Offer a new share as a QR code and through the share sheet
The share created page gets "Show QR code", a dialog with the link as a
QR code (black on white, full screen on a phone) that downloads as a PNG
drawn in the browser, with a password reminder for protected shares; and
"Share…", which opens the device's share sheet where there is one. Both
carry only the link.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V9NnLxnPp8vaaurb3Z1MFy
2026-09-13 11:46:07 +02:00

32 lines
701 B
PHP

<?php
namespace App\Livewire;
use App\Models\Setting;
use App\Models\Share;
use App\Services\QrCodeService;
use Livewire\Attributes\Layout;
use Livewire\Component;
#[Layout('layouts.app')]
class ShareCreated extends Component
{
public Share $share;
public function mount(Share $share): void
{
$this->share = $share;
}
public function render(): mixed
{
$shareUrl = route('share.download', $this->share);
return view('livewire.share-created', [
'shareUrl' => $shareUrl,
'qrCodeSvg' => app(QrCodeService::class)->svg($shareUrl),
'siteTitle' => Setting::get('site_title') ?: config('app.name'),
]);
}
}