Initial Commit
This commit is contained in:
Executable
+113
@@ -0,0 +1,113 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<section class="portal-header">
|
||||
<div>
|
||||
<span class="eyebrow">Account</span>
|
||||
<h1>My licences</h1>
|
||||
<p class="lead compact">Manage subscriptions, licence keys and activated Macs.</p>
|
||||
</div>
|
||||
<a class="btn btn-secondary" href="{{ route('buy') }}">Buy another licence</a>
|
||||
</section>
|
||||
|
||||
@php
|
||||
$activeLicences = $licenses->filter(fn ($license) => $license->is_usable);
|
||||
$historyLicences = $licenses->reject(fn ($license) => $license->is_usable);
|
||||
@endphp
|
||||
|
||||
@if($activeLicences->isEmpty())
|
||||
<div class="empty-state">
|
||||
<h2>No active licences</h2>
|
||||
<p>No active SonarDesk licence is associated with {{ auth()->user()->email }}.</p>
|
||||
<a class="btn" href="{{ route('buy') }}">Choose a plan</a>
|
||||
</div>
|
||||
@else
|
||||
<div class="licence-list">
|
||||
@foreach($activeLicences as $license)
|
||||
@php
|
||||
$activeCount = $license->activations->whereNull('deactivated_at')->count();
|
||||
$isDuplicatePersonal = $hasProfessional && $license->edition === 'Personal';
|
||||
$billing = str_contains(strtolower((string) optional($license->product)->code), 'annual') ? 'Annual' : 'Monthly';
|
||||
@endphp
|
||||
<article class="licence-card {{ $license->edition === 'Professional' ? 'licence-card-featured' : '' }}">
|
||||
<div class="licence-main">
|
||||
<div class="licence-title-row">
|
||||
<div>
|
||||
<div class="badge-row">
|
||||
<span class="status-badge status-active">Active</span>
|
||||
<span class="plan-badge">{{ $license->edition }}</span>
|
||||
<span class="billing-badge">{{ $billing }}</span>
|
||||
</div>
|
||||
<h2>SonarDesk {{ $license->edition }}</h2>
|
||||
<p class="muted licence-key">Licence ending <strong>{{ $license->license_key_last4 }}</strong></p>
|
||||
</div>
|
||||
<a class="btn btn-secondary" href="{{ route('portal.show', $license) }}">Manage licence</a>
|
||||
</div>
|
||||
|
||||
<div class="licence-stats">
|
||||
<div>
|
||||
<span class="stat-label">Macs activated</span>
|
||||
<strong>{{ $activeCount }} of {{ $license->activation_limit }}</strong>
|
||||
</div>
|
||||
<div>
|
||||
<span class="stat-label">Subscription</span>
|
||||
<strong>{{ ucfirst($license->subscription_status ?: 'active') }}</strong>
|
||||
</div>
|
||||
<div>
|
||||
<span class="stat-label">{{ $license->subscription_status === 'trialing' ? 'Trial ends' : 'Renews' }}</span>
|
||||
<strong>{{ optional($license->current_period_ends_at)->format('j M Y') ?: '—' }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="activation-meter" aria-label="{{ $activeCount }} of {{ $license->activation_limit }} Macs activated">
|
||||
<span style="width: {{ min(100, ($activeCount / max(1, $license->activation_limit)) * 100) }}%"></span>
|
||||
</div>
|
||||
|
||||
@if($isDuplicatePersonal)
|
||||
<div class="subscription-warning">
|
||||
<div>
|
||||
<strong>You already have an active Professional subscription.</strong>
|
||||
<p>This Personal plan is a separate Paddle subscription and could be billed separately. Cancel it if it was only created while upgrading.</p>
|
||||
</div>
|
||||
<form method="post" action="{{ route('portal.cancel', $license) }}" onsubmit="return confirm('Cancel this Personal subscription immediately in Paddle? This cannot be undone.');">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button class="danger">Cancel Personal</button>
|
||||
</form>
|
||||
</div>
|
||||
@elseif($license->edition === 'Personal')
|
||||
<div class="upgrade-strip">
|
||||
<div>
|
||||
<strong>Need more Macs?</strong>
|
||||
<span>Upgrade this subscription to Professional for up to 3 Macs.</span>
|
||||
</div>
|
||||
<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>Upgrade to Professional</button>
|
||||
</form>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</article>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if($historyLicences->isNotEmpty())
|
||||
<details class="history-panel">
|
||||
<summary>Licence history <span>{{ $historyLicences->count() }}</span></summary>
|
||||
<div class="history-list">
|
||||
@foreach($historyLicences as $license)
|
||||
<div class="history-row">
|
||||
<div>
|
||||
<strong>SonarDesk {{ $license->edition }}</strong>
|
||||
<span>Licence ending {{ $license->license_key_last4 }}</span>
|
||||
</div>
|
||||
<div class="history-status">{{ ucfirst($license->subscription_status ?: ($license->revoked_at ? 'revoked' : 'unavailable')) }}</div>
|
||||
<a href="{{ route('portal.show', $license) }}">Details</a>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</details>
|
||||
@endif
|
||||
@endsection
|
||||
Executable
+80
@@ -0,0 +1,80 @@
|
||||
@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>SonarDesk {{ $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) · SonarDesk {{ $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? SonarDesk 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
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
@extends('layouts.app', [
|
||||
'title' => 'SonarDesk — SonarQube monitoring for macOS',
|
||||
'description' => 'A professional native macOS dashboard for SonarQube projects, quality gates, bugs, vulnerabilities and code smells.'
|
||||
])
|
||||
@section('content')
|
||||
<section class="hero-card" style="padding:64px 0 38px">
|
||||
<span class="eyebrow">Native SonarQube monitor for macOS</span>
|
||||
<h1 style="max-width:850px;font-size:58px">Your SonarQube projects.<br>One focused Mac workspace.</h1>
|
||||
<p class="lead">SonarDesk gives development teams a fast native view of project health, quality gates, bugs, vulnerabilities, code smells and measures without living in a browser.</p>
|
||||
<div class="support-actions" style="margin-top:24px"><a class="btn btn-primary" href="{{ route('buy') }}">Start free trial</a><a class="btn btn-secondary" href="{{ route('support') }}">Contact support</a></div>
|
||||
</section>
|
||||
<div class="grid" style="grid-template-columns:repeat(3,minmax(0,1fr));margin:22px 0 44px">
|
||||
<div class="card"><span class="eyebrow">Projects</span><h2>Everything at a glance</h2><p>Review quality gates and core measures across every configured SonarQube project.</p></div>
|
||||
<div class="card"><span class="eyebrow">Issues</span><h2>Find what needs work</h2><p>Browse bugs, vulnerabilities and code smells with filtering and server-side pagination.</p></div>
|
||||
<div class="card"><span class="eyebrow">Security</span><h2>Credentials stay protected</h2><p>SonarQube tokens are stored in the macOS Keychain and API access respects your server permissions.</p></div>
|
||||
</div>
|
||||
<section class="panel" style="padding:34px"><div class="portal-header"><div><span class="eyebrow">Built for engineering teams</span><h2 style="font-size:34px;margin:7px 0">A professional desktop companion for SonarQube.</h2><p class="lead compact">Multiple servers, project dashboards, quality gates, issue views, secure token storage and a native macOS experience.</p></div></div></section>
|
||||
<section style="padding:54px 0 10px"><div class="portal-header"><div><span class="eyebrow">Licensing</span><h2 style="font-size:34px;margin:7px 0">Simple licensing for SonarDesk.</h2><p class="lead compact">Start with a free trial, then manage your licence, activations and subscription from the customer portal.</p></div><a class="btn" href="{{ route('buy') }}">View pricing</a></div></section>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user