Skip to content

Commit

Permalink
Merge branch 'main' of github.com:spatie/spatie.be
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Jul 24, 2024
2 parents 65caa8c + 8fb9b2f commit e3a3b4f
Show file tree
Hide file tree
Showing 11 changed files with 71 additions and 18 deletions.
20 changes: 20 additions & 0 deletions app/Docs/Highlighting/JsxLanguage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace App\Docs\Highlighting;

use Tempest\Highlight\Languages\JavaScript\JavaScriptLanguage;

class JsxLanguage extends JavaScriptLanguage
{
public function getName(): string
{
return 'jsx';
}

public function getInjections(): array
{
return [
...parent::getInjections(),
];
}
}
4 changes: 4 additions & 0 deletions app/Domain/Shop/Notifications/LicenseExpiredNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ public function toMail(User $notifiable): MailMessage
$upgradeReason = "If you want to keep using Ray, go to the license overview on the [spatie.be]({$siteUrl}) site to renew the license.";
}

if ($this->license->hasRepositoryAccess()) {
$upgradeReason .= "\n\nKeep in mind that you will lose GitHub repository access once your license expires.";
}

return (new MailMessage())
->subject("Your {$name} license has expired")
->greeting('Hi!')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ public function toMail(User $notifiable): MailMessage
$upgradeReason = "At this point, you won't be able to use Ray anymore.";
}

if ($this->license->hasRepositoryAccess()) {
$upgradeReason .= "\n\nKeep in mind that you will lose GitHub repository access once your license expires.";
}

return (new MailMessage())
->subject("Your {$name} license has expired")
->greeting('Hi again!')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ public function toMail(User $notifiable): MailMessage
$upgradeReason = "Go to your license overview on the [spatie.be]({$siteUrl}) site to renew the license and continue using Ray.";
}

if ($this->license->hasRepositoryAccess()) {
$upgradeReason .= "\n\nKeep in mind that you will lose GitHub repository access once your license expires.";
}

return (new MailMessage())
->subject("Your {$name} license is about to expire")
->greeting('Hi!')
Expand Down
3 changes: 2 additions & 1 deletion app/Filament/Resources/Shop/ProductResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ public static function table(Table $table): Table
Tables\Actions\BulkActionGroup::make([
Tables\Actions\DeleteBulkAction::make(),
]),
]);
])
->reorderable('sort_order');
}

public static function getRelations(): array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@ protected function getHeaderActions(): array
Actions\CreateAction::make(),
];
}

public function reorderTable(array $order): void
{
static::getResource()::getModel()::setNewOrder($order);
}
}
2 changes: 2 additions & 0 deletions app/Http/Controllers/DocsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use App\Docs\Docs;
use App\Docs\DocumentationPage;
use App\Docs\Highlighting\DiffLanguage;
use App\Docs\Highlighting\JsxLanguage;
use App\Support\CommonMark\ImageRenderer;
use App\Support\CommonMark\LinkRenderer;
use Illuminate\Support\Arr;
Expand Down Expand Up @@ -168,6 +169,7 @@ private function renderMarkdown(string $contents): string
{
$highlighter = new Highlighter();
$highlighter->addLanguage(new DiffLanguage());
$highlighter->addLanguage(new JsxLanguage());

return app(MarkdownRenderer::class)
->highlightCode(false)
Expand Down
9 changes: 9 additions & 0 deletions config/docs.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,15 @@
],
"category" => "Laravel",
],
[
"name" => "laravel-medialibrary-pro",
"repository" => "spatie/laravel-medialibrary-pro",
"branches" => [
"main" => "v6",
"v6" => "v6",
],
"category" => "Laravel",
],
[
"name" => "laravel-blade-x",
"repository" => "spatie/laravel-blade-x",
Expand Down
28 changes: 15 additions & 13 deletions resources/views/front/pages/docs/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,21 @@
<div class="mb-10">
{{ $alias->slogan }}
</div>
<div>
<h3 class="font-bold mb-5">Useful links</h3>
<ul class="text-base">
<li class="flex items-center gap-x-2">
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 18 18"><path fill="#172A3D" d="m12.686 9-.53.53-4.5 4.5-.532.532L6.063 13.5l.53-.53L10.562 9 6.595 5.03l-.532-.53 1.061-1.062.53.53 4.5 4.5.532.532Z"/></svg>
<a class="underline" href="https://github.com/spatie/{{ $repository->slug }}">Repository</a>
</li>
<li class="flex items-center gap-x-2">
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 18 18"><path fill="#172A3D" d="m12.686 9-.53.53-4.5 4.5-.532.532L6.063 13.5l.53-.53L10.562 9 6.595 5.03l-.532-.53 1.061-1.062.53.53 4.5 4.5.532.532Z"/></svg>
<a class="underline" href="https://github.com/spatie/{{ $repository->slug }}/discussions">Discussions</a>
</li>
</ul>
</div>
@if($repository->slug !== 'laravel-medialibrary-pro')
<div>
<h3 class="font-bold mb-5">Useful links</h3>
<ul class="text-base">
<li class="flex items-center gap-x-2">
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 18 18"><path fill="#172A3D" d="m12.686 9-.53.53-4.5 4.5-.532.532L6.063 13.5l.53-.53L10.562 9 6.595 5.03l-.532-.53 1.061-1.062.53.53 4.5 4.5.532.532Z"/></svg>
<a class="underline" href="https://github.com/spatie/{{ $repository->slug }}">Repository</a>
</li>
<li class="flex items-center gap-x-2">
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 18 18"><path fill="#172A3D" d="m12.686 9-.53.53-4.5 4.5-.532.532L6.063 13.5l.53-.53L10.562 9 6.595 5.03l-.532-.53 1.061-1.062.53.53 4.5 4.5.532.532Z"/></svg>
<a class="underline" href="https://github.com/spatie/{{ $repository->slug }}/discussions">Discussions</a>
</li>
</ul>
</div>
@endif
</div>

<h2 class="text-[36px] font-bold mb-5">{{ $page->title }}</h2>
Expand Down
9 changes: 5 additions & 4 deletions resources/views/front/profile/purchases.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,13 @@
<h2 class="title line-after mb-12">Applications</h2>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 md:gap-8">
@foreach ($applications as $product_id => $assignments)
<x-purchase-assignment :assignment="$assignments->first()" :showImage="false" theme="white">
@php($assignment = $assignments->sortByDesc('created_at')->first())
<x-purchase-assignment :assignment="$assignment" :showImage="false" theme="white">
<div class="items-center grid gap-4 bg-gray-50 px-6 py-6">
{!! $assignments->first()->purchasable->getting_started_description !!}
@if ($assignments->first()->purchasable->getting_started_url)
{!! $assignment->purchasable->getting_started_description !!}
@if ($assignment->purchasable->getting_started_url)
<a class="block w-full text-xs md:text-base"
href="{{ $assignments->first()->purchasable->getting_started_url }}">
href="{{ $assignment->purchasable->getting_started_url }}">
<x-button> Getting started
</x-button>
</a>
Expand Down
1 change: 1 addition & 0 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

Route::permanentRedirect('docs/ray', 'https://myray.app/docs/');
Route::permanentRedirect('docs/ray/{any}', 'https://myray.app/docs/')->where('any', '.*');
Route::permanentRedirect('docs/laravel-medialibrary/v11/handling-uploads-with-media-library-pro{any}', 'https://spatie.be/docs/laravel-medialibrary-pro/v6/introduction')->where('any', '.*');

Route::redirect('/mailcoach/{any}', 'https://spatie.mailcoach.app/{any}')->where('any', '.*');

Expand Down

0 comments on commit e3a3b4f

Please sign in to comment.