Implement creator studio and upload updates
This commit is contained in:
@@ -20,6 +20,7 @@ use App\Services\CollectionSaveService;
|
||||
use App\Services\CollectionSeriesService;
|
||||
use App\Services\CollectionSubmissionService;
|
||||
use App\Services\CollectionService;
|
||||
use App\Support\Seo\SeoFactory;
|
||||
use App\Support\UsernamePolicy;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
@@ -113,6 +114,16 @@ class ProfileCollectionController extends Controller
|
||||
|
||||
event(new CollectionViewed($collection, $viewer?->id));
|
||||
|
||||
$seo = app(SeoFactory::class)->collectionPage(
|
||||
$collection->is_featured
|
||||
? sprintf('Featured: %s by %s — Skinbase Nova', $collection->title, $collection->displayOwnerName())
|
||||
: sprintf('%s by %s — Skinbase Nova', $collection->title, $collection->displayOwnerName()),
|
||||
$collection->summary ?: $collection->description ?: sprintf('Explore the %s collection by %s on Skinbase Nova.', $collection->title, $collection->displayOwnerName()),
|
||||
$collectionPayload['public_url'],
|
||||
$collectionPayload['cover_image'],
|
||||
$collection->visibility === Collection::VISIBILITY_PUBLIC,
|
||||
)->toArray();
|
||||
|
||||
return Inertia::render('Collection/CollectionShow', [
|
||||
'collection' => $collectionPayload,
|
||||
'artworks' => $this->collections->mapArtworkPaginator($artworks),
|
||||
@@ -168,15 +179,7 @@ class ProfileCollectionController extends Controller
|
||||
]),
|
||||
'featuredCollectionsUrl' => route('collections.featured'),
|
||||
'reportEndpoint' => $viewer ? route('api.reports.store') : null,
|
||||
'seo' => [
|
||||
'title' => $collection->is_featured
|
||||
? sprintf('Featured: %s by %s — Skinbase Nova', $collection->title, $collection->displayOwnerName())
|
||||
: sprintf('%s by %s — Skinbase Nova', $collection->title, $collection->displayOwnerName()),
|
||||
'description' => $collection->summary ?: $collection->description ?: sprintf('Explore the %s collection by %s on Skinbase Nova.', $collection->title, $collection->displayOwnerName()),
|
||||
'canonical' => $collectionPayload['public_url'],
|
||||
'og_image' => $collectionPayload['cover_image'],
|
||||
'robots' => $collection->visibility === Collection::VISIBILITY_PUBLIC ? 'index,follow' : 'noindex,nofollow',
|
||||
],
|
||||
'seo' => $seo,
|
||||
])->rootView('collections');
|
||||
}
|
||||
|
||||
@@ -198,6 +201,12 @@ class ProfileCollectionController extends Controller
|
||||
->first();
|
||||
$seriesDescription = $seriesMeta['description'];
|
||||
|
||||
$seo = app(SeoFactory::class)->collectionListing(
|
||||
sprintf('Series: %s — Skinbase Nova', $seriesKey),
|
||||
sprintf('Explore the %s collection series on Skinbase Nova.', $seriesKey),
|
||||
route('collections.series.show', ['seriesKey' => $seriesKey])
|
||||
)->toArray();
|
||||
|
||||
return Inertia::render('Collection/CollectionSeriesShow', [
|
||||
'seriesKey' => $seriesKey,
|
||||
'title' => $seriesTitle ?: sprintf('Collection Series: %s', str_replace(['-', '_'], ' ', $seriesKey)),
|
||||
@@ -210,12 +219,7 @@ class ProfileCollectionController extends Controller
|
||||
'artworks' => $artworksCount,
|
||||
'latest_activity_at' => optional($latestActivityAt)?->toISOString(),
|
||||
],
|
||||
'seo' => [
|
||||
'title' => sprintf('Series: %s — Skinbase Nova', $seriesKey),
|
||||
'description' => sprintf('Explore the %s collection series on Skinbase Nova.', $seriesKey),
|
||||
'canonical' => route('collections.series.show', ['seriesKey' => $seriesKey]),
|
||||
'robots' => 'index,follow',
|
||||
],
|
||||
'seo' => $seo,
|
||||
])->rootView('collections');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ use App\Services\UsernameApprovalService;
|
||||
use App\Services\UserStatsService;
|
||||
use App\Support\AvatarUrl;
|
||||
use App\Support\CoverUrl;
|
||||
use App\Support\Seo\SeoFactory;
|
||||
use App\Support\UsernamePolicy;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
@@ -1204,6 +1205,27 @@ class ProfileController extends Controller
|
||||
? ucfirst($resolvedInitialTab)
|
||||
: null;
|
||||
|
||||
$pageTitle = $galleryOnly
|
||||
? (($user->username ?? $user->name ?? 'User') . ' Gallery on Skinbase')
|
||||
: ($isTabLanding
|
||||
? (($user->username ?? $user->name ?? 'User') . ' ' . $tabMetaLabel . ' on Skinbase')
|
||||
: (($user->username ?? $user->name ?? 'User') . ' on Skinbase'));
|
||||
$pageDescription = $galleryOnly
|
||||
? ('Browse the public gallery of ' . ($user->username ?? $user->name) . ' on Skinbase.')
|
||||
: ($isTabLanding
|
||||
? ('Explore the ' . strtolower((string) $tabMetaLabel) . ' section for ' . ($user->username ?? $user->name) . ' on Skinbase.')
|
||||
: ('View the profile of ' . ($user->username ?? $user->name) . ' on Skinbase — artworks, favourites and more.'));
|
||||
$profileSeo = app(SeoFactory::class)->profilePage(
|
||||
$pageTitle,
|
||||
$galleryOnly ? $galleryUrl : $activeProfileUrl,
|
||||
$pageDescription,
|
||||
$avatarUrl,
|
||||
collect([
|
||||
(object) ['name' => 'Home', 'url' => '/'],
|
||||
(object) ['name' => $user->username ?? $user->name ?? 'Profile', 'url' => $galleryOnly ? $galleryUrl : $activeProfileUrl],
|
||||
]),
|
||||
)->toArray();
|
||||
|
||||
return Inertia::render($component, [
|
||||
'user' => [
|
||||
'id' => $user->id,
|
||||
@@ -1259,18 +1281,12 @@ class ProfileController extends Controller
|
||||
'collectionFeatureLimit' => (int) config('collections.featured_limit', 3),
|
||||
'profileTabUrls' => $profileTabUrls,
|
||||
])->withViewData([
|
||||
'page_title' => $galleryOnly
|
||||
? (($user->username ?? $user->name ?? 'User') . ' Gallery on Skinbase')
|
||||
: ($isTabLanding
|
||||
? (($user->username ?? $user->name ?? 'User') . ' ' . $tabMetaLabel . ' on Skinbase')
|
||||
: (($user->username ?? $user->name ?? 'User') . ' on Skinbase')),
|
||||
'page_title' => $pageTitle,
|
||||
'page_canonical' => $galleryOnly ? $galleryUrl : $activeProfileUrl,
|
||||
'page_meta_description' => $galleryOnly
|
||||
? ('Browse the public gallery of ' . ($user->username ?? $user->name) . ' on Skinbase.')
|
||||
: ($isTabLanding
|
||||
? ('Explore the ' . strtolower((string) $tabMetaLabel) . ' section for ' . ($user->username ?? $user->name) . ' on Skinbase.')
|
||||
: ('View the profile of ' . ($user->username ?? $user->name) . ' on Skinbase.org — artworks, favourites and more.')),
|
||||
'page_meta_description' => $pageDescription,
|
||||
'og_image' => $avatarUrl,
|
||||
'seo' => $profileSeo,
|
||||
'useUnifiedSeo' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user