move into sonardesk
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
@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
|
||||
@@ -0,0 +1,7 @@
|
||||
@extends('layouts.app', ['title' => 'Releases — SonarDesk Admin'])
|
||||
@section('content')
|
||||
<section class="portal-header admin-release-head"><div><span class="eyebrow">Distribution</span><h1>Release management</h1><p class="lead compact">Publish SonarDesk builds, manage the public download experience and keep Sparkle updates under control.</p></div><div class="support-actions"><a class="btn btn-secondary" href="{{ route('admin.download-products.index') }}">Other products</a><a class="btn btn-secondary" href="{{ route('admin.releases.settings') }}">Download page settings</a><a class="btn btn-primary" href="{{ route('admin.releases.create') }}">New release</a></div></section>
|
||||
<div class="grid admin-metrics"><div class="card"><strong>{{ $releases->total() }}</strong><p>Total releases</p></div><div class="card"><strong>{{ $publishedCount }}</strong><p>Published</p></div><div class="card"><strong>{{ number_format($downloadCount) }}</strong><p>Total downloads</p></div><div class="card"><strong>Live</strong><p>Sparkle feed</p></div></div>
|
||||
<div class="admin-table-card"><div class="admin-table-title"><div><h2>SonarDesk builds</h2><p>Only published builds with an uploaded package are available publicly.</p></div><a href="{{ route('release') }}" class="btn btn-secondary" target="_blank">View public page</a></div><div class="table-scroll"><table class="pro-table"><thead><tr><th>Release</th><th>Channel</th><th>Status</th><th>Package</th><th>Downloads</th><th>Published</th><th></th></tr></thead><tbody>@forelse($releases as $release)<tr><td><strong>SonarDesk {{ $release->version }}</strong><small>Build {{ $release->build_number }} · macOS {{ $release->minimum_macos ?: 'Any supported' }}</small></td><td><span class="status-chip">{{ ucfirst($release->channel) }}</span></td><td>@if($release->is_published)<span class="status-chip success">Published</span>@else<span class="status-chip muted">Draft</span>@endif</td><td>{{ $release->file_path ? $release->formatted_size : 'No package' }}</td><td>{{ number_format($release->download_count) }}</td><td>{{ $release->published_at?->format('j M Y H:i') ?: '—' }}</td><td class="table-actions"><a class="btn btn-secondary" href="{{ route('admin.releases.edit',$release) }}">Edit</a><form method="post" action="{{ route('admin.releases.destroy',$release) }}" onsubmit="return confirm('Delete this release and its package?')">@csrf @method('DELETE')<button class="danger-outline" type="submit">Delete</button></form></td></tr>@empty<tr><td colspan="7" class="empty-cell">No releases yet. Create your first signed SonarDesk build.</td></tr>@endforelse</tbody></table></div></div>
|
||||
{{ $releases->links() }}
|
||||
@endsection
|
||||
@@ -0,0 +1,5 @@
|
||||
@extends('layouts.app', ['title' => 'Download page — SonarDesk Admin'])
|
||||
@section('content')
|
||||
<section class="portal-header"><div><span class="eyebrow">Website</span><h1>Download page content</h1><p class="lead compact">Control the customer-facing download area without editing a template or deploying code.</p></div><a class="btn btn-secondary" href="{{ route('admin.releases.index') }}">Back to releases</a></section>
|
||||
<form class="editor-card settings-editor" method="post" action="{{ route('admin.releases.settings.update') }}">@csrf @method('PUT')<label>Eyebrow<input name="eyebrow" value="{{ old('eyebrow',$settings['downloads.eyebrow'] ?: 'SonarDesk for macOS') }}" required></label><label>Page title<input name="title" value="{{ old('title',$settings['downloads.title'] ?: 'Download SonarDesk') }}" required></label><label>Introduction<textarea name="intro" rows="4" required>{{ old('intro',$settings['downloads.intro'] ?: 'A focused native SonarQube workspace, designed for macOS and built for daily engineering work.') }}</textarea></label><label>System requirements<textarea name="requirements" rows="4" required>{{ old('requirements',$settings['downloads.requirements'] ?: 'Apple silicon and Intel Macs supported. A SonarQube server and valid SonarDesk licence are required.') }}</textarea></label><label>Support message<textarea name="support_text" rows="4" required>{{ old('support_text',$settings['downloads.support_text'] ?: 'Need help installing or activating SonarDesk? Our support team can help.') }}</textarea></label><div><button class="btn btn-primary" type="submit">Save website content</button> <a class="btn btn-secondary" target="_blank" href="{{ route('release') }}">Preview page</a></div></form>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user