Files
2026-10-12 13:25:16 +01:00

10 lines
3.7 KiB
PHP

@extends('layouts.app', ['title' => ($release->exists ? 'Edit release' : 'New release').' — SonarDesk Admin'])
@section('content')
<section class="portal-header"><div><span class="eyebrow">Distribution</span><h1>{{ $release->exists ? 'Edit SonarDesk '.$release->version : 'Create a release' }}</h1><p class="lead compact">Upload the notarized distribution package and control exactly when it becomes public.</p></div><a class="btn btn-secondary" href="{{ route('admin.releases.index') }}">Back to releases</a></section>
<form class="release-editor" method="post" enctype="multipart/form-data" action="{{ $release->exists ? route('admin.releases.update',$release) : route('admin.releases.store') }}">@csrf @if($release->exists) @method('PUT') @endif
<div class="editor-main"><section class="editor-card"><div class="editor-card-head"><span>01</span><div><h2>Release identity</h2><p>Version and compatibility information shown to customers.</p></div></div><div class="form-grid"><label>Version<input name="version" value="{{ old('version',$release->version) }}" placeholder="1.2.0" required></label><label>Build number<input type="number" min="1" name="build_number" value="{{ old('build_number',$release->build_number ?: 1) }}" required></label><label>Channel<select name="channel"><option value="stable" @selected(old('channel',$release->channel)==='stable')>Stable</option><option value="beta" @selected(old('channel',$release->channel)==='beta')>Beta</option></select></label><label>Minimum macOS<input name="minimum_macos" value="{{ old('minimum_macos',$release->minimum_macos) }}" placeholder="14.0"></label></div></section>
<section class="editor-card"><div class="editor-card-head"><span>02</span><div><h2>Distribution package</h2><p>DMG or ZIP. SHA-256 is calculated automatically after upload.</p></div></div>@if($release->file_path)<div class="package-current"><strong>{{ $release->original_filename }}</strong><span>{{ $release->formatted_size }} · SHA-256 {{ $release->sha256 }}</span></div>@endif<label class="upload-zone"><strong>{{ $release->file_path ? 'Replace package' : 'Choose distribution package' }}</strong><span>Signed and notarized .dmg or .zip · up to 1 GB</span><input type="file" name="package" accept=".dmg,.zip" {{ $release->exists ? '' : 'required' }}></label><label>Sparkle EdDSA signature<textarea name="sparkle_signature" rows="3" placeholder="Paste the signature generated by Sparkle's sign_update tool">{{ old('sparkle_signature',$release->sparkle_signature) }}</textarea></label></section>
<section class="editor-card"><div class="editor-card-head"><span>03</span><div><h2>Release notes</h2><p>Professional customer-facing notes. Plain text is rendered safely with line breaks.</p></div></div><label>What's new<textarea name="release_notes" rows="12" placeholder="New in this release…">{{ old('release_notes',$release->release_notes) }}</textarea></label></section></div>
<aside class="editor-side"><div class="editor-card sticky-card"><h2>Publishing</h2><p>A draft is never exposed publicly or in the Sparkle feed.</p><label class="toggle-row"><input type="checkbox" name="is_published" value="1" @checked(old('is_published',$release->is_published))><span><strong>Published</strong><small>Make this build downloadable</small></span></label><label class="toggle-row"><input type="checkbox" name="is_featured" value="1" @checked(old('is_featured',$release->is_featured))><span><strong>Featured release</strong><small>Mark as the highlighted build</small></span></label><button class="btn btn-primary full-width" type="submit">{{ $release->exists ? 'Save release' : 'Create release' }}</button>@if($release->is_published)<a class="btn btn-secondary full-width" href="{{ route('download.release',$release) }}">Test download</a>@endif</div></aside></form>
@endsection