updates
This commit is contained in:
Regular → Executable
+80
-1
@@ -1 +1,80 @@
|
||||
@extends('layouts.app') @section('content')<div class="card"><h1>{{ $license->product->name }}</h1><p>{{ $license->edition }} · key ending {{ $license->license_key_last4 }}</p><form method="post" action="{{ route('portal.resend',$license) }}">@csrf<button>Email my licence key</button></form></div><div class="card"><h2>Installations</h2><table><tr><th>Installation</th><th>Platform</th><th>Version</th><th>Last seen</th><th></th></tr>@foreach($license->activations->whereNull('deactivated_at') as $a)<tr><td>{{ $a->installation_name ?: $a->installation_id }}</td><td>{{ $a->platform }}</td><td>{{ $a->app_version }}</td><td>{{ optional($a->last_seen_at)->toDayDateTimeString() }}</td><td><form method="post" action="{{ route('portal.deactivate',[$license,$a->id]) }}">@csrf @method('DELETE')<button class="danger">Deactivate</button></form></td></tr>@endforeach</table></div>@endsection
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
@php
|
||||
$activeActivations = $license->activations->whereNull('deactivated_at');
|
||||
$billing = str_contains(strtolower((string) optional($license->product)->code), 'annual') ? 'Annual' : 'Monthly';
|
||||
@endphp
|
||||
|
||||
<a class="back-link" href="{{ route('portal.index') }}">← My licences</a>
|
||||
|
||||
<section class="licence-detail-head">
|
||||
<div>
|
||||
<div class="badge-row">
|
||||
<span class="status-badge {{ $license->is_usable ? 'status-active' : 'status-inactive' }}">{{ $license->is_usable ? 'Active' : 'Unavailable' }}</span>
|
||||
<span class="plan-badge">{{ $license->edition }}</span>
|
||||
<span class="billing-badge">{{ $billing }}</span>
|
||||
</div>
|
||||
<h1>Rsync Studio {{ $license->edition }}</h1>
|
||||
<p class="muted">Licence ending <strong>{{ $license->license_key_last4 }}</strong></p>
|
||||
</div>
|
||||
<form method="post" action="{{ route('portal.resend', $license) }}">
|
||||
@csrf
|
||||
<button class="btn-secondary">Email licence key</button>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<div class="detail-grid">
|
||||
<section class="panel">
|
||||
<div class="panel-heading">
|
||||
<div>
|
||||
<h2>Activated Macs</h2>
|
||||
<p>{{ $activeActivations->count() }} of {{ $license->activation_limit }} activation slots in use.</p>
|
||||
</div>
|
||||
<span class="activation-count">{{ $activeActivations->count() }}/{{ $license->activation_limit }}</span>
|
||||
</div>
|
||||
|
||||
@forelse($activeActivations as $activation)
|
||||
<div class="device-row">
|
||||
<div class="device-icon">⌘</div>
|
||||
<div class="device-copy">
|
||||
<strong>{{ $activation->installation_name ?: 'Mac' }}</strong>
|
||||
<span>{{ $activation->platform ?: 'macOS' }}@if($activation->app_version) · Rsync Studio {{ $activation->app_version }}@endif</span>
|
||||
<small>Last seen {{ optional($activation->last_seen_at)->diffForHumans() ?: 'not yet recorded' }}</small>
|
||||
</div>
|
||||
<form method="post" action="{{ route('portal.deactivate', [$license, $activation->id]) }}" onsubmit="return confirm('Deactivate this Mac? Rsync Studio on that Mac will lose access when it next validates.');">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button class="danger-outline">Deactivate</button>
|
||||
</form>
|
||||
</div>
|
||||
@empty
|
||||
<div class="empty-inline">No Macs are currently activated with this licence.</div>
|
||||
@endforelse
|
||||
</section>
|
||||
|
||||
<aside class="panel subscription-panel">
|
||||
<h2>Subscription</h2>
|
||||
<dl class="subscription-facts">
|
||||
<div><dt>Plan</dt><dd>{{ $license->edition }} {{ $billing }}</dd></div>
|
||||
<div><dt>Status</dt><dd>{{ ucfirst($license->subscription_status ?: 'active') }}</dd></div>
|
||||
<div><dt>{{ $license->subscription_status === 'trialing' ? 'Trial ends' : 'Current period ends' }}</dt><dd>{{ optional($license->current_period_ends_at)->format('j M Y') ?: '—' }}</dd></div>
|
||||
</dl>
|
||||
|
||||
@if($license->edition === 'Personal' && $license->is_usable)
|
||||
<form method="post" action="{{ route('portal.upgrade', $license) }}" onsubmit="return confirm('Upgrade this existing Paddle subscription to Professional now? Paddle will prorate the change.');">
|
||||
@csrf
|
||||
<button class="full-width">Upgrade to Professional</button>
|
||||
</form>
|
||||
@endif
|
||||
|
||||
@if($license->payment_provider === 'paddle' && $license->external_subscription_id && $license->subscription_status !== 'canceled')
|
||||
<form method="post" action="{{ route('portal.cancel', $license) }}" onsubmit="return confirm('Cancel this Paddle subscription immediately? This cannot be undone.');">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button class="danger-outline full-width">Cancel subscription</button>
|
||||
</form>
|
||||
@endif
|
||||
</aside>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user