Skip to content

Commit 9f503ea

Browse files
committed
Improve
1 parent 53082de commit 9f503ea

File tree

4 files changed

+27
-23
lines changed

4 files changed

+27
-23
lines changed

app/Filament/Resources/PluginBundleResource.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,17 @@ public static function table(Table $table): Table
174174
->actions([
175175
Tables\Actions\ViewAction::make(),
176176
Tables\Actions\EditAction::make(),
177+
Tables\Actions\ActionGroup::make([
178+
Tables\Actions\Action::make('viewListing')
179+
->label('View Listing Page')
180+
->icon('heroicon-o-eye')
181+
->color('gray')
182+
->url(fn (PluginBundle $record) => route('bundles.show', $record))
183+
->openUrlInNewTab()
184+
->visible(fn (PluginBundle $record) => $record->is_active && $record->published_at?->isPast()),
185+
])
186+
->label('More')
187+
->icon('heroicon-m-ellipsis-vertical'),
177188
])
178189
->bulkActions([
179190
Tables\Actions\BulkActionGroup::make([

app/Filament/Resources/PluginBundleResource/Pages/ViewPluginBundle.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ class ViewPluginBundle extends ViewRecord
1313
protected function getHeaderActions(): array
1414
{
1515
return [
16+
Actions\Action::make('viewListing')
17+
->label('View Listing Page')
18+
->icon('heroicon-o-eye')
19+
->color('gray')
20+
->url(fn () => route('bundles.show', $this->record))
21+
->openUrlInNewTab()
22+
->visible(fn () => $this->record->is_active && $this->record->published_at?->isPast()),
1623
Actions\EditAction::make(),
1724
];
1825
}

app/Filament/Resources/PluginResource.php

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -211,26 +211,6 @@ public static function table(Table $table): Table
211211
->openUrlInNewTab()
212212
->visible(fn (Plugin $record) => $record->isFree()),
213213

214-
// Anystack Link (Paid plugins only)
215-
Tables\Actions\Action::make('viewAnystack')
216-
->label('View on Anystack')
217-
->icon('heroicon-o-arrow-top-right-on-square')
218-
->color('gray')
219-
->url(fn (Plugin $record) => $record->getAnystackUrl())
220-
->openUrlInNewTab()
221-
->visible(fn (Plugin $record) => $record->isPaid() && $record->anystack_id),
222-
223-
// Anystack Instructions (Paid plugins without ID)
224-
Tables\Actions\Action::make('anystackInstructions')
225-
->label('Anystack Setup')
226-
->icon('heroicon-o-information-circle')
227-
->color('warning')
228-
->visible(fn (Plugin $record) => $record->isPaid())
229-
->modalHeading('Anystack Verification Required')
230-
->modalDescription('For paid plugins, verify that the developer has applied to the "NativePHP Plugin Directory" affiliate program in their Anystack dashboard under the Advertising section.')
231-
->modalSubmitAction(false)
232-
->modalCancelActionLabel('Close'),
233-
234214
// Edit Description Action
235215
Tables\Actions\Action::make('editDescription')
236216
->label('Edit Description')
@@ -250,7 +230,6 @@ public static function table(Table $table): Table
250230
->modalDescription(fn (Plugin $record) => "Update the description for '{$record->name}'"),
251231

252232
Tables\Actions\ViewAction::make(),
253-
Tables\Actions\DeleteAction::make(),
254233
])
255234
->label('More')
256235
->icon('heroicon-m-ellipsis-vertical'),

resources/views/customer/licenses/index.blade.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,15 @@ class="rounded bg-indigo-600 px-2.5 py-1.5 text-xs font-medium text-white hover:
8585
<summary class="cursor-pointer text-xs font-medium text-indigo-700 dark:text-indigo-300 hover:text-indigo-900 dark:hover:text-indigo-100">
8686
How to configure Composer
8787
</summary>
88-
<div class="mt-2 rounded bg-gray-900 p-3">
89-
<code class="block font-mono text-xs text-gray-100 whitespace-pre">composer config http-basic.plugins.nativephp.com {{ auth()->user()->email }} {{ auth()->user()->plugin_license_key }}</code>
88+
<div class="mt-2 space-y-2">
89+
<p class="text-xs text-indigo-700 dark:text-indigo-300">1. Add the NativePHP plugins repository:</p>
90+
<div class="rounded bg-gray-900 p-3">
91+
<code class="block font-mono text-xs text-gray-100 whitespace-pre">composer config repositories.nativephp-plugins composer https://plugins.nativephp.com</code>
92+
</div>
93+
<p class="text-xs text-indigo-700 dark:text-indigo-300">2. Configure your credentials:</p>
94+
<div class="rounded bg-gray-900 p-3">
95+
<code class="block font-mono text-xs text-gray-100 whitespace-pre">composer config http-basic.plugins.nativephp.com {{ auth()->user()->email }} {{ auth()->user()->plugin_license_key }}</code>
96+
</div>
9097
</div>
9198
</details>
9299
</div>

0 commit comments

Comments
 (0)