-
-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathdashboard.blade.php
More file actions
233 lines (215 loc) · 10 KB
/
Copy pathdashboard.blade.php
File metadata and controls
233 lines (215 loc) · 10 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
<div>
<div class="mb-6">
<flux:heading size="xl">Dashboard</flux:heading>
<flux:text>Welcome back, {{ auth()->user()->first_name ?? auth()->user()->name }}</flux:text>
</div>
{{-- Email Verification Banner --}}
@if (!auth()->user()->hasVerifiedEmail())
<flux:callout variant="warning" icon="envelope" class="mb-6">
<flux:callout.heading>Please verify your email address.</flux:callout.heading>
<flux:callout.text>
We sent a verification email when you registered. Click the link in that email to verify your account.
@if (session('status'))
<span class="font-medium">{{ session('status') }}</span>
@endif
</flux:callout.text>
<x-slot:actions>
<form method="POST" action="{{ route('verification.send') }}">
@csrf
<flux:button type="submit" variant="filled" size="sm">Resend verification email</flux:button>
</form>
</x-slot:actions>
</flux:callout>
@endif
{{-- Session Messages --}}
@if (session('success'))
<flux:callout variant="success" icon="check-circle" class="mb-6">
<flux:callout.text>{{ session('success') }}</flux:callout.text>
</flux:callout>
@endif
@if (session('message'))
<flux:callout variant="secondary" icon="information-circle" class="mb-6">
<flux:callout.text>{{ session('message') }}</flux:callout.text>
</flux:callout>
@endif
@if (session('error'))
<flux:callout variant="danger" icon="x-circle" class="mb-6">
<flux:callout.text>{{ session('error') }}</flux:callout.text>
</flux:callout>
@endif
{{-- Masterclass Countdown Banner --}}
@feature(App\Features\ShowMasterclass::class)
@if(!$this->hasPurchasedCourse && !$this->priceIncreased)
<div class="mb-6 overflow-hidden rounded-lg border border-violet-200 bg-gradient-to-br from-violet-50 to-white p-6 dark:border-violet-700/50 dark:from-violet-950/30 dark:to-zinc-900">
<div class="flex flex-col gap-6 sm:flex-row sm:items-center sm:justify-between">
<div class="flex items-start gap-4">
<div class="shrink-0 text-violet-600 dark:text-violet-400">
<x-heroicon-s-academic-cap class="size-6" />
</div>
<div>
<h3 class="font-medium text-violet-900 dark:text-violet-100">
The NativePHP Masterclass
</h3>
<p class="mt-1 text-sm text-violet-700 dark:text-violet-300">
Lock in early bird pricing — <span class="font-semibold">$199</span> now, before it goes up to $299.
</p>
<div class="mt-4">
<a href="{{ route('customer.course.index') }}" class="inline-flex items-center gap-2 rounded-md bg-violet-600 px-4 py-2 text-sm font-medium text-white transition hover:bg-violet-700">
Get the course
<svg class="size-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"/></svg>
</a>
</div>
</div>
</div>
<x-course.countdown
:deadline="$this->priceIncreaseAt"
:expired="$this->priceIncreased"
class="w-full shrink-0 rounded-xl bg-white/70 p-4 ring-1 ring-violet-200 sm:w-auto sm:min-w-72 dark:bg-white/5 dark:ring-white/10"
/>
</div>
</div>
@endif
@endfeature
{{-- Ultra Upsell Banner --}}
@if(!$this->hasUltraSubscription)
<div class="mb-6 rounded-lg border border-zinc-300 bg-gradient-to-r from-zinc-100 to-zinc-200 p-6 dark:border-zinc-600 dark:from-zinc-800 dark:to-zinc-900">
<div class="flex items-start">
<div class="shrink-0 text-zinc-700 dark:text-zinc-300">
<x-heroicon-s-bolt class="size-6" />
</div>
<div class="ml-4 flex-1">
<h3 class="font-medium text-zinc-900 dark:text-zinc-100">
Upgrade to NativePHP Ultra
</h3>
<p class="mt-1 text-sm text-zinc-600 dark:text-zinc-400">
Access all first-party plugins at no extra cost, premium support, team management, and more.
</p>
<div class="mt-4">
<a href="{{ route('pricing') }}" class="inline-flex items-center rounded-md border border-transparent bg-black px-4 py-2 text-sm font-medium text-white transition hover:bg-zinc-800 focus:outline-none focus:ring-2 focus:ring-zinc-500 focus:ring-offset-2 dark:bg-white dark:text-black dark:hover:bg-zinc-200">
Learn more
</a>
</div>
</div>
</div>
</div>
@endif
{{-- Banners --}}
<div class="mb-6 grid grid-cols-1 gap-6 lg:grid-cols-2">
@feature(App\Features\ShowPlugins::class)
@if(auth()->user()->shouldSeeFreePluginsOffer() && !$this->hasUltraSubscription)
<x-free-plugins-offer-banner :inline="true" />
@endif
@else
<x-discounts-banner :inline="true" />
@endfeature
</div>
{{-- Dashboard Cards --}}
<div class="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
{{-- Licenses Card --}}
@if($this->licenseCount > 0)
<x-dashboard-card
title="Licenses"
:count="$this->licenseCount"
icon="key"
color="blue"
:href="route('customer.licenses.list')"
link-text="View licenses"
/>
@endif
{{-- EAP Status Card --}}
<x-dashboard-card
title="Early Access Program"
:value="$this->isEapCustomer ? 'Member' : 'Not a member'"
:badge="$this->isEapCustomer ? 'EAP' : null"
:badge-color="$this->isEapCustomer ? 'green' : 'gray'"
icon="star"
:color="$this->isEapCustomer ? 'yellow' : 'gray'"
:description="$this->isEapCustomer ? 'You purchased before June 2025' : null"
/>
{{-- Subscription Card --}}
@if($this->activeSubscription?->active())
<x-dashboard-card
title="Subscription"
:value="$this->subscriptionName"
badge="Active"
badge-color="green"
icon="credit-card"
color="green"
:href="route('customer.billing-portal')"
link-text="Manage subscription"
/>
@else
<x-dashboard-card
title="Subscription"
value="No active subscription"
icon="credit-card"
color="gray"
:href="$this->renewalLicenseKey ? route('license.renewal', $this->renewalLicenseKey) : route('pricing')"
:link-text="$this->renewalLicenseKey ? 'Renew license' : 'View plans'"
/>
@endif
{{-- Team Card --}}
@if($this->hasUltraSubscription)
@if($this->ownedTeam)
<x-dashboard-card
title="Team"
:value="$this->ownedTeam->name"
icon="user-group"
color="purple"
:href="route('customer.team.index')"
link-text="Manage members"
:description="$this->teamMemberCount === 1 ? '1 active member' : $this->teamMemberCount . ' active members'"
/>
@else
<x-dashboard-card
title="Team"
value="No team yet"
icon="user-group"
color="gray"
:href="route('customer.team.index')"
link-text="Create a team"
description="Invite up to {{ config('subscriptions.plans.max.included_seats') - 1 }} members to share Ultra benefits ({{ config('subscriptions.plans.max.included_seats') }} seats total)"
/>
@endif
@endif
{{-- Premium Plugins Card --}}
@feature(App\Features\ShowPlugins::class)
<x-dashboard-card
title="Premium Plugins"
:count="$this->pluginLicenseCount"
icon="puzzle-piece"
color="purple"
:href="route('customer.purchased-plugins.index')"
link-text="View plugins"
/>
{{-- Submit Plugin Card --}}
<x-dashboard-card
title="Plugin Marketplace"
icon="code-bracket"
color="indigo"
description="Submit a plugin to the NativePHP marketplace"
:href="route('customer.plugins.create')"
link-text="Submit a plugin"
/>
@endfeature
{{-- Connected Accounts Card --}}
<x-dashboard-card
title="Connected Accounts"
:value="$this->connectedAccountsCount . ' of 2'"
icon="link"
color="indigo"
:href="route('customer.integrations')"
link-text="Manage integrations"
:description="$this->connectedAccountsDescription"
/>
{{-- Purchase History Card --}}
<x-dashboard-card
title="Purchase History"
:count="$this->totalPurchases"
icon="receipt-refund"
color="gray"
:href="route('customer.purchase-history.index')"
link-text="View history"
/>
</div>
</div>