From 88be5bdc789f6f0684bb01e4711c472e46424d34 Mon Sep 17 00:00:00 2001 From: ilestis Date: Wed, 8 Jan 2025 12:52:59 -0600 Subject: [PATCH] UI cleanup --- app/View/Components/InfoBox.php | 39 +++++++++++++++++++ lang/en/campaigns.php | 4 ++ lang/en/campaigns/members.php | 9 +++++ lang/en/campaigns/roles.php | 5 +++ resources/sass/theming.scss | 8 ++++ .../views/campaigns/invites/_form.blade.php | 13 ++++--- .../views/campaigns/members/index.blade.php | 16 +++++--- .../views/campaigns/roles/index.blade.php | 13 ++++++- resources/views/components/info-box.blade.php | 26 +++++++++++++ 9 files changed, 122 insertions(+), 11 deletions(-) create mode 100644 app/View/Components/InfoBox.php create mode 100644 lang/en/campaigns/members.php create mode 100644 resources/views/components/info-box.blade.php diff --git a/app/View/Components/InfoBox.php b/app/View/Components/InfoBox.php new file mode 100644 index 0000000000..e9adb58e0b --- /dev/null +++ b/app/View/Components/InfoBox.php @@ -0,0 +1,39 @@ + 'Type', 'usage' => 'Expires after', ], + 'helpers' => [ + 'usage' => 'How many times the invite link can be used before it becomes inactive.', + 'role' => 'Users need to join before they can be promoted to the admin role.' + ], 'unlimited_validity' => 'Unlimited', 'usages' => [ 'five' => '5 uses', diff --git a/lang/en/campaigns/members.php b/lang/en/campaigns/members.php new file mode 100644 index 0000000000..69885367de --- /dev/null +++ b/lang/en/campaigns/members.php @@ -0,0 +1,9 @@ + [ + 'title' => 'Available members', + 'unlimited' => ':amount of unlimited members.', + 'limited' => ':amount of :total members.', + ], +]; diff --git a/lang/en/campaigns/roles.php b/lang/en/campaigns/roles.php index 3a0e42b3ff..6e1c8b1cfa 100644 --- a/lang/en/campaigns/roles.php +++ b/lang/en/campaigns/roles.php @@ -22,4 +22,9 @@ 'warnings' => [ 'adding-to-admin' => 'Members of the :name role have access to everything in the campaign, and cannot be removed by other members of the role. After :amount minutes, only they can remove themselves from the role.', ], + 'overview' => [ + 'title' => 'Available roles', + 'unlimited' => ':amount of unlimited roles created.', + 'limited' => ':amount of :total roles created.', + ] ]; diff --git a/resources/sass/theming.scss b/resources/sass/theming.scss index 5521381116..7da019287c 100644 --- a/resources/sass/theming.scss +++ b/resources/sass/theming.scss @@ -28,6 +28,14 @@ a, .text-link { color: var(--link-focus, hsl(var(--pf)/var(--tw-text-opacity))); } } +a.neutral-link { + --tw-text-opacity: 1; + color: hsl(var(--nc)/var(--tw-text-opacity)); + &:hover, &:focus { + --tw-text-opacity: 1; + color: hsl(var(--nc)/var(--tw-text-opacity)); + } +} h1, h2, h3, h4, h5, h6, h1 > small, .panel-title { --tw-text-opacity: 1; diff --git a/resources/views/campaigns/invites/_form.blade.php b/resources/views/campaigns/invites/_form.blade.php index 97e466ef5d..18c71606ea 100644 --- a/resources/views/campaigns/invites/_form.blade.php +++ b/resources/views/campaigns/invites/_form.blade.php @@ -11,15 +11,18 @@ + required + :label="__('campaigns.invites.fields.usage')" + :helper="__('campaigns.invites.helpers.usage')"> - + required + :label="__('campaigns.invites.fields.role')" + :helper="__('campaigns.invites.helpers.role')" + > + diff --git a/resources/views/campaigns/members/index.blade.php b/resources/views/campaigns/members/index.blade.php index 5f34ddbde5..1a55fc413d 100644 --- a/resources/views/campaigns/members/index.blade.php +++ b/resources/views/campaigns/members/index.blade.php @@ -23,11 +23,17 @@ - @if (!$campaign->canHaveMoreMembers()) - -

{{ __('campaigns/limits.members') }}

-
- @endif + + + + @if(Datagrid::hasBulks())
diff --git a/resources/views/campaigns/roles/index.blade.php b/resources/views/campaigns/roles/index.blade.php index fd98eee9f1..84381e34c9 100644 --- a/resources/views/campaigns/roles/index.blade.php +++ b/resources/views/campaigns/roles/index.blade.php @@ -1,6 +1,6 @@

- {{ __('campaigns.show.tabs.roles') }} ({{ $roles->total() }} / @if ($limit = $campaign->roleLimit()){{ $limit }}@else@endif) + {{ __('campaigns.show.tabs.roles') }}

+ + + + diff --git a/resources/views/components/info-box.blade.php b/resources/views/components/info-box.blade.php new file mode 100644 index 0000000000..fa86eab4ad --- /dev/null +++ b/resources/views/components/info-box.blade.php @@ -0,0 +1,26 @@ + +
+ +
+
+ {!! $title !!} + @if (isset($subtitle)) + {!! $subtitle !!} + @endif +
+ @if ($url) + @if ($ajax) +
+ +
+ @else + + + + @endif + @elseif ($premium && !$campaign->boosted()) + + + + @endif +