From a1dcb10b965e12fd54b70d0dfa0fa6c69def6742 Mon Sep 17 00:00:00 2001 From: ilestis Date: Wed, 8 Jan 2025 15:38:55 -0600 Subject: [PATCH] UI cleanup --- app/View/Components/InfoBox.php | 2 + lang/en/campaigns.php | 2 +- lang/en/campaigns/styles.php | 8 +- lang/en/campaigns/submissions.php | 4 +- resources/views/campaigns/_overview.blade.php | 92 ++++++------------- .../views/campaigns/members/index.blade.php | 2 +- .../views/campaigns/roles/index.blade.php | 2 +- .../views/campaigns/styles/index.blade.php | 78 ++++++++-------- resources/views/components/info-box.blade.php | 8 +- 9 files changed, 82 insertions(+), 116 deletions(-) diff --git a/app/View/Components/InfoBox.php b/app/View/Components/InfoBox.php index e9adb58e0..a073e0fda 100644 --- a/app/View/Components/InfoBox.php +++ b/app/View/Components/InfoBox.php @@ -18,10 +18,12 @@ public function __construct( public ?string $url, public ?string $subtitle, public ?string $color, + public ?string $urlTooltip, public ?Campaign $campaign, public string $target = 'primary-dialog', public string $background = 'bg-neutral', public string $subtitleColour = 'text-neutral-content', + public string $urlIcon = 'fa-solid fa-angle-right', public bool $ajax = false, public bool $premium = false, ) diff --git a/lang/en/campaigns.php b/lang/en/campaigns.php index d0a709950..a1b3cfee6 100644 --- a/lang/en/campaigns.php +++ b/lang/en/campaigns.php @@ -433,7 +433,7 @@ 'title' => 'Overview - :name', ], 'themes' => [ - 'none' => 'None (defaults to member settings)', + 'none' => 'None (defaults to user\'s preference)', ], 'ui' => [ 'collapsed' => [ diff --git a/lang/en/campaigns/styles.php b/lang/en/campaigns/styles.php index 06049fa02..134ef6044 100644 --- a/lang/en/campaigns/styles.php +++ b/lang/en/campaigns/styles.php @@ -46,12 +46,12 @@ 'title' => 'Reorder styles', ], 'theme' => [ - 'success' => 'Campaign theme updated.', - 'title' => 'Update the campaign theme', + 'success' => 'Theme override updated.', + 'title' => 'Update the theme override', 'none' => 'Use user\'s preference', - 'override' => 'Campaign theme override' + 'override' => 'Theme override' ], - 'title' => 'Campaign Theming', + 'title' => 'Theming', 'update' => [ 'success' => 'Style :name updated.', 'title' => 'Update style', diff --git a/lang/en/campaigns/submissions.php b/lang/en/campaigns/submissions.php index 20090afba..f84988e3f 100644 --- a/lang/en/campaigns/submissions.php +++ b/lang/en/campaigns/submissions.php @@ -37,8 +37,8 @@ 'reason' => 'Your reason', ], 'public' => [ - 'private' => 'Campaign is private', - 'public' => 'Campaign is public', + 'private' => 'Campaign is private.', + 'public' => 'Campaign is public.', 'title' => 'Public campaign', ], 'toggle' => [ diff --git a/resources/views/campaigns/_overview.blade.php b/resources/views/campaigns/_overview.blade.php index 8a7f67ce1..cec802caf 100644 --- a/resources/views/campaigns/_overview.blade.php +++ b/resources/views/campaigns/_overview.blade.php @@ -34,87 +34,53 @@ @if (!$campaign->boosted() && auth()->check()) @if (auth()->user()->hasBoosterNomenclature()) { - + {{ __('crud.actions.enable') }} @else - + @endif @elseif (auth()->check()) - + @endif - -
- -
-
- {!! __('crud.fields.visibility') !!} - @if ($campaign->isPublic()) - {!! __('campaigns/submissions.public.public') !!} - @else - {!! __('campaigns/submissions.public.private') !!} - @endif -
- @can('update', $campaign) -
- -
- @endcan -
+ + @if (auth()->check() && $campaign->userIsMember()) - -
- -
-
- {!! __('campaigns/overview.member.title') !!} - {!! __('users/profile.fields.member_since', ['date' => $campaign->members()->where('user_id', auth()->user()->id)->first()?->created_at->isoFormat('MMMM D, Y')]) !!} -
-
- -
-
+ @endif @if ($campaign->isPublic()) - -
- -
-
- {!! __('campaigns/overview.followers.title') !!} - - {{ trans_choice('campaigns.overview.follower-count', $campaign->follower(), ['amount' => number_format($campaign->follower())]) }} - -
-
+ @endif -{{--
--}} - -{{-- --}} -{{-- --}} -{{--
--}} -{{-- {{ trans_choice('campaigns.overview.entity-count', \App\Facades\CampaignCache::entityCount(), ['amount' => number_format(\App\Facades\CampaignCache::entityCount())]) }}--}} -{{--
--}} -{{--
--}} -{{--
--}} - -@section('modals') - @parent - -

- {{ __('campaigns.helpers.entity_count_v3', ['amount' => 6]) }} -

-
-@endsection diff --git a/resources/views/campaigns/members/index.blade.php b/resources/views/campaigns/members/index.blade.php index 1a55fc413..c651e96ca 100644 --- a/resources/views/campaigns/members/index.blade.php +++ b/resources/views/campaigns/members/index.blade.php @@ -26,7 +26,7 @@ {{ __('crud.actions.help') }} - @if ($campaign->boosted()) - - - {{ __('campaigns/styles.actions.new') }} - - @endif + @if ($campaign->boosted()) + + + {{ __('campaigns/styles.actions.new') }} + + @endif @if (!$campaign->boosted()) - +

{!! __('campaigns/styles.pitch') !!}

+ @endif + +
+ + +
+ @if ($styles->count() === 0) + + + {!! __('campaigns/styles.helpers.main', ['here' => '' . __('campaigns/styles.helpers.here') . '']) !!} + + @else -
- -
- -
-
- {!! __('campaigns/styles.theme.override') !!} - @if (!empty($theme)) - {!! $theme->__toString() !!} - @else - {!! __('campaigns/styles.theme.none') !!} - @endif -
-
- -
-
-
- @if ($styles->count() === 0) - - - {!! __('campaigns/styles.helpers.main', ['here' => '' . __('campaigns/styles.helpers.here') . '']) !!} - - - @else - @if(Datagrid::hasBulks()) - -
- @include('layouts.datagrid._table', ['rows' => $styles]) -
-
- @else + @if(Datagrid::hasBulks()) +
@include('layouts.datagrid._table', ['rows' => $styles])
- @endif +
+ @else +
+ @include('layouts.datagrid._table', ['rows' => $styles]) +
@endif + @endif + @if ($campaign->boosted()) @includeWhen(!$reorderStyles->isEmpty(), 'campaigns.styles._reorder') @endif + @endsection diff --git a/resources/views/components/info-box.blade.php b/resources/views/components/info-box.blade.php index fa86eab4a..b985abe0a 100644 --- a/resources/views/components/info-box.blade.php +++ b/resources/views/components/info-box.blade.php @@ -10,12 +10,12 @@ @if ($url) @if ($ajax) -
- +
+
@else - - + + @endif @elseif ($premium && !$campaign->boosted())