From 79397de0903623d4e1e7de5e9db5e21eb91f07b1 Mon Sep 17 00:00:00 2001 From: min'ryouta <67493493+liwoyadan@users.noreply.github.com> Date: Tue, 29 Oct 2024 05:32:07 -0700 Subject: [PATCH 1/2] fix: improve user profile, character page row styling on smaller viewports/mobile (#1099) - User profile rows no longer are so small that they break heading text on >= 992px viewports (as their biggest breakpoint is lg) - Character information pages (image info and stats tab) have also had rows adjusted to prevent breaking headings --- .../views/character/_image_info.blade.php | 30 +++++++++---------- .../views/character/_tab_stats.blade.php | 30 +++++++++---------- .../views/user/_profile_content.blade.php | 24 +++++++-------- 3 files changed, 42 insertions(+), 42 deletions(-) diff --git a/resources/views/character/_image_info.blade.php b/resources/views/character/_image_info.blade.php index 4810d2cb1e..d39859c78c 100644 --- a/resources/views/character/_image_info.blade.php +++ b/resources/views/character/_image_info.blade.php @@ -36,25 +36,25 @@ {{-- Basic info --}}
-
-
+
+
Species
-
{!! $image->species_id ? $image->species->displayName : 'None' !!}
+
{!! $image->species_id ? $image->species->displayName : 'None' !!}
@if ($image->subtype_id) -
-
+
+
Subtype
-
{!! $image->subtype_id ? $image->subtype->displayName : 'None' !!}
+
{!! $image->subtype_id ? $image->subtype->displayName : 'None' !!}
@endif -
-
+
+
Rarity
-
{!! $image->rarity_id ? $image->rarity->displayName : 'None' !!}
+
{!! $image->rarity_id ? $image->rarity->displayName : 'None' !!}
@@ -142,21 +142,21 @@ {{-- Image credits --}}
-
-
+
+
Design
-
+
@foreach ($image->designers as $designer)
{!! $designer->displayLink() !!}
@endforeach
-
-
+
+
Art
-
+
@foreach ($image->artists as $artist)
{!! $artist->displayLink() !!}
@endforeach diff --git a/resources/views/character/_tab_stats.blade.php b/resources/views/character/_tab_stats.blade.php index 686f3dfc4c..495da42221 100644 --- a/resources/views/character/_tab_stats.blade.php +++ b/resources/views/character/_tab_stats.blade.php @@ -1,22 +1,22 @@ -
-
+
+
Owner
-
{!! $character->displayOwner !!}
+
{!! $character->displayOwner !!}
@if (!$character->is_myo_slot) -
-
+
+
Category
-
{!! $character->category->displayName !!}
+
{!! $character->category->displayName !!}
@endif -
-
+
+
Created
-
{!! format_date($character->created_at) !!}
+
{!! format_date($character->created_at) !!}

@@ -32,21 +32,21 @@ {{ $character->is_sellable ? 'Can' : 'Cannot' }} be sold @if ($character->sale_value > 0) -
-
+
+
Sale Value
-
+
{{ Config::get('lorekeeper.settings.currency_symbol') }}{{ $character->sale_value }}
@endif @if ($character->transferrable_at && $character->transferrable_at->isFuture()) -
-
+
+
Cooldown
-
Cannot be transferred until {!! format_date($character->transferrable_at) !!}
+
Cannot be transferred until {!! format_date($character->transferrable_at) !!}
@endif @if (Auth::check() && Auth::user()->hasPower('manage_characters')) diff --git a/resources/views/user/_profile_content.blade.php b/resources/views/user/_profile_content.blade.php index d6824f3cb9..99f4dc8945 100644 --- a/resources/views/user/_profile_content.blade.php +++ b/resources/views/user/_profile_content.blade.php @@ -28,11 +28,11 @@
-
-
+
+
Alias
-
+
{!! $user->displayAlias !!} @if (count($aliases) > 1 && config('lorekeeper.extensions.aliases_on_userpage')) @@ -46,24 +46,24 @@ @endif
-
-
+
+
Joined
-
{!! format_date($user->created_at, false) !!} ({{ $user->created_at->diffForHumans() }})
+
{!! format_date($user->created_at, false) !!} ({{ $user->created_at->diffForHumans() }})
-
-
+
+
Rank
-
{!! $user->rank->displayName !!} {!! add_help($user->rank->parsed_description) !!}
+
{!! $user->rank->displayName !!} {!! add_help($user->rank->parsed_description) !!}
@if ($user->birthdayDisplay && isset($user->birthday)) -
-
+
+
Birthday
-
{!! $user->birthdayDisplay !!}
+
{!! $user->birthdayDisplay !!}
@endif
From 9675699eb615e8acd0d8c6e8cbce7d1fbd01611e Mon Sep 17 00:00:00 2001 From: moif <104588768+AW0005@users.noreply.github.com> Date: Tue, 29 Oct 2024 09:23:36 -0400 Subject: [PATCH 2/2] fix(galleries): make some queries more efficient (#1098) * Update GalleryController.php * Update gallery.blade.php --- app/Http/Controllers/GalleryController.php | 2 +- resources/views/galleries/gallery.blade.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/GalleryController.php b/app/Http/Controllers/GalleryController.php index fcace01dc5..7fb490d943 100644 --- a/app/Http/Controllers/GalleryController.php +++ b/app/Http/Controllers/GalleryController.php @@ -99,7 +99,7 @@ public function getGallery($id, Request $request) { return view('galleries.gallery', [ 'gallery' => $gallery, 'submissions' => $query->paginate(20)->appends($request->query()), - 'prompts' => [0 => 'Any Prompt'] + Prompt::whereIn('id', GallerySubmission::where('gallery_id', $gallery->id)->visible(Auth::check() ? Auth::user() : null)->accepted()->whereNotNull('prompt_id')->pluck('prompt_id')->toArray())->orderBy('name')->pluck('name', 'id')->toArray(), + 'prompts' => [0 => 'Any Prompt'] + Prompt::whereIn('id', GallerySubmission::where('gallery_id', $gallery->id)->visible(Auth::check() ? Auth::user() : null)->accepted()->whereNotNull('prompt_id')->select('prompt_id')->distinct()->pluck('prompt_id')->toArray())->orderBy('name')->pluck('name', 'id')->toArray(), 'childSubmissions' => GallerySubmission::whereIn('gallery_id', $gallery->children->pluck('id')->toArray())->where('is_visible', 1)->where('status', 'Accepted'), 'galleryPage' => true, 'sideGallery' => $gallery, diff --git a/resources/views/galleries/gallery.blade.php b/resources/views/galleries/gallery.blade.php index 0df2319563..fbbc612679 100644 --- a/resources/views/galleries/gallery.blade.php +++ b/resources/views/galleries/gallery.blade.php @@ -26,7 +26,7 @@

@endif

{!! $gallery->description !!}

- @if (!$gallery->submissions->count() && $gallery->children->count() && $childSubmissions->count()) + @if (!$gallery->submissions()->count() && $gallery->children->count() && $childSubmissions->count())

This gallery has no submissions; instead, displayed is a selection of the most recent submissions from its sub-galleries. Please navigate to one of the sub-galleries to view more.

@endif @@ -59,7 +59,7 @@ {!! Form::close() !!}
- @if ($gallery->submissions->count()) + @if ($gallery->submissions()->count()) {!! $submissions->render() !!}