@extends('layouts.admin') @section('title', $version->exists ? 'Edit Version' : 'New Version') @section('heading', $version->exists ? 'Edit v'.$version->version : 'New Version') @section('subheading', $version->exists ? 'Changes take effect on the next update check made by an installation.' : 'Saved as a draft — sign the package, then publish it when you are ready.') @section('content')
{{-- Re-uploading a package is not a neutral edit: it replaces the file, clears the signature and pulls a live release back to draft. Said here, once, before the form rather than after the save. --}} @if ($version->exists && $version->isPublished())

This release is live. Editing the fields is safe. Attaching a new package is not a small change: it replaces the file, discards the signature and returns the release to draft, so installations stop being offered it until it is signed and published again.

@endif
@csrf @if ($version->exists) @method('PUT') @endif

{{ $version->exists ? 'v'.$version->version : 'Release details' }}

{{ $version->exists ? ($version->release_name ?: 'No release name') : 'Version number, channel and package' }}

@if ($version->exists) @endif
@include('versions.partials.fields', ['version' => $version])
Cancel
{{-- Lifecycle actions live outside the save form: two submit paths in one form is how a "save" ends up publishing something. --}} @if ($version->exists)

Release lifecycle

These change what licensed installations are offered on their next update check.

@if (! $version->isPublished()) @if ($version->hasPackage() && filled($version->signature))
@csrf
@else Publish ({{ $version->hasPackage() ? 'unsigned' : 'no package' }}) @endif @else
@csrf
@csrf
@endif
@if ($version->isPublished()) Delete @else
@csrf @method('DELETE')
@endif
@endif
@endsection