Skip to content

Commit 606b49c

Browse files
committedApr 2, 2025
UI cleanup
1 parent 91619c1 commit 606b49c

File tree

12 files changed

+65
-45
lines changed

12 files changed

+65
-45
lines changed
 

‎app/Http/Controllers/Campaign/DefaultImageController.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ class DefaultImageController extends Controller
1515
public function __construct(
1616
protected EntityTypeService $entityTypeService,
1717
protected DefaultImageService $service
18-
) {}
18+
) {
19+
$this->middleware('campaign.boosted', ['except' => 'index']);
20+
}
1921

2022
/**
2123
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View

‎lang/en/campaigns.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@
222222
],
223223
'edit' => [
224224
'success' => 'Role :name updated.',
225-
'title' => 'Edit role :name',
225+
'title' => 'Rename role :name',
226226
],
227227
'fields' => [
228228
'copy_permissions' => 'Copy permissions',

‎lang/en/campaigns/default-images.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
return [
44
'actions' => [
5-
'add' => 'Upload a new thumbnail',
5+
'add' => 'New thumbnail',
66
],
7+
'empty' => 'No modules currently have a default thumbnail setup.',
78
'call-to-action' => 'Upload a custom thumbnail for all the characters, locations, or other entities of the campaign. These images are then shown on various lists.',
89
'create' => [
910
'error' => 'Error saving the new default entity thumbnails. Is :type already set?',
11+
'helper' => 'Upload an image that will be used as the default thumbnail for entities of this type.',
1012
'success' => 'New thumbnail for :type created.',
1113
'title' => 'New default thumbnail',
1214
],

‎lang/en/campaigns/invites.php

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
return [
4+
'create' => [
5+
'helper' => 'Create an invite link to send to your players, so that they can join the campaign.',
6+
]
7+
];

‎lang/en/campaigns/plugins.php

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
'helper' => 'When a new version of a plugin is released, you can update it to the latest version for your campaign.',
5656
'title' => 'Plugin :plugin updates',
5757
'updates' => 'Updates',
58+
'versions' => 'Versions',
5859
'your_version' => 'Your version',
5960
],
6061
'pitch' => 'Install and manage plugins from the :marketplace.',

‎lang/en/campaigns/roles.php

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
'actions' => [
55
'status' => 'Status: :status',
66
],
7+
'create' => [
8+
'helper' => 'Create a new role for the campaign.',
9+
],
710
'overview' => [
811
'limited' => ':amount of :total roles created.',
912
'title' => 'Available roles',

‎resources/views/campaigns/default-images/_form.blade.php

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
<x-grid type="1/1">
2+
<x-helper>
3+
{{ __('campaigns/default-images.create.helper') }}
4+
</x-helper>
25
<x-forms.field
36
field="entity-type"
47
required

‎resources/views/campaigns/default-images/index.blade.php

+5-11
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@
1717
<h3 class="inline-block grow">
1818
{{ __('campaigns.show.tabs.default-images') }}
1919
</h3>
20+
<a href="https://docs.kanka.io/en/latest/features/campaigns/default-thumbnails.html" class="btn2 btn-sm btn-ghost" target="_blank">
21+
<x-icon class="question" />
22+
{{ __('crud.actions.help') }}
23+
</a>
2024
@if ($campaign->boosted())
21-
<a href="https://docs.kanka.io/en/latest/features/campaigns/default-thumbnails.html" class="btn2 btn-sm btn-ghost" target="_blank">
22-
<x-icon class="question" />
23-
{{ __('crud.actions.help') }}
24-
</a>
25-
2625
@can('recover', $campaign)
2726
<a href="{{ route('campaign.default-images.create', $campaign) }}" class="btn2 btn-primary btn-sm"
2827
data-toggle="dialog-ajax" data-target="new-thumbnail"
@@ -37,12 +36,7 @@
3736
@if (empty($campaign->defaultImages()))
3837
@can('recover', $campaign)
3938
<x-box>
40-
<a href="{{ route('campaign.default-images.create', $campaign) }}" class="btn2 btn-primary"
41-
data-toggle="dialog-ajax" data-target="new-thumbnail"
42-
data-url="{{ route('campaign.default-images.create', $campaign) }}">
43-
<x-icon class="plus" />
44-
{{ __('campaigns/default-images.actions.add') }}
45-
</a>
39+
<x-helper>{{ __('campaigns/default-images.empty') }}</x-helper>
4640
</x-box>
4741
@endcan
4842
@endif

‎resources/views/campaigns/invites/_form.blade.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
];
88
@endphp
99

10-
{{ csrf_field() }}
1110
<x-grid type="1/1">
11+
<x-helper>
12+
{{ __('campaigns/invites.create.helper') }}
13+
</x-helper>
1214
<x-forms.field
1315
field="usage"
1416
required

‎resources/views/campaigns/plugins/index.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<h3 class="inline-block grow">
66
{{ __('campaigns.show.tabs.plugins') }}
77
</h3>
8-
<a href="{{ config('marketplace.url') }}" class="btn2 btn-primary">
8+
<a href="{{ config('marketplace.url') }}" class="btn2 btn-primary btn-sm">
99
{{ __('campaigns/plugins.actions.find-plugins') }} <x-icon class="fa-solid fa-external-link-alt"></x-icon>
1010
</a>
1111
</div>

‎resources/views/campaigns/plugins/info.blade.php

+32-28
Original file line numberDiff line numberDiff line change
@@ -15,43 +15,46 @@
1515
{!! $plugin->name !!} - {{ __('campaigns/plugins.info.updates') }}
1616
</x-dialog.header>
1717
<article class="text-left max-w-2xl p-4 md:px-6">
18-
<div class="formless">
19-
<div class="flex gap-2 w-full">
20-
<div class="plugin-summary grow">
21-
@if (!empty($plugin->summary))
22-
{!! $plugin->summary !!}
23-
@else
24-
{!! \Illuminate\Support\Str::limit($plugin->entry, 300) !!}
25-
@endif
26-
</div>
27-
28-
@if($plugin->hasUpdate())
29-
<div>
30-
<x-form :action="['campaign_plugins.update', $campaign, $plugin]" class="inline-block">
31-
<button type="submit" class="btn2 btn-primary btn-sm">
32-
<x-icon class="fa-solid fa-download" />
33-
{{ __('campaigns/plugins.actions.update') }}
34-
</button>
35-
</x-form>
36-
</div>
18+
<div class="formless flex flex-col gap-4">
19+
<div class="plugin-summary grow">
20+
@if (!empty($plugin->summary))
21+
{!! $plugin->summary !!}
22+
@else
23+
{!! \Illuminate\Support\Str::limit($plugin->entry, 300) !!}
3724
@endif
3825
</div>
3926

40-
@foreach ($versions as $version)
41-
<div class="plugin-box w-full border-t pt-5">
27+
@if($plugin->hasUpdate())
28+
<x-form :action="['campaign_plugins.update', $campaign, $plugin]" class="inline-block">
29+
<button type="submit" class="btn2 btn-primary btn-sm">
30+
<x-icon class="fa-solid fa-download" />
31+
{{ __('campaigns/plugins.actions.update') }}
32+
</button>
33+
</x-form>
34+
@endif
35+
<div class="text-lg mt-6">
36+
{{ __('campaigns/plugins.info.versions') }}
37+
</div>
4238

43-
<div class="plugin-head flex items-center gap-2">
44-
<div class="grow">
39+
@php $first = true; @endphp
40+
@foreach ($versions as $version)
41+
@if (!$first) <hr /> @endif
42+
<div class="plugin-box">
43+
<div class="plugin-head flex items-center gap-2 justify-between">
44+
<div class="flex gap-2 items-center">
4545
<x-icon class="fa-solid fa-code-branch" />
4646
<strong>{{ $version->version }}</strong>
47-
</div>
48-
<div class="">
49-
<span class="text-xs">{{ $version->updated_at->diffForHumans() }}</span>
5047
@if($version->id == $plugin->pivot->plugin_version_id)
5148
<x-badge type="accent">
52-
{{ __('campaigns/plugins.info.your_version') }}
49+
<span class="text-xs">
50+
{{ __('campaigns/plugins.info.your_version') }}
51+
</span>
5352
</x-badge>
5453
@endif
54+
</div>
55+
<div class="">
56+
<span class="text-xs text-neutral-content">{{ $version->updated_at->diffForHumans() }}</span>
57+
5558
@if ($version->status_id == 1)
5659
<x-badge>
5760
DRAFT
@@ -60,10 +63,11 @@
6063
</div>
6164
</div>
6265

63-
<div class="plugin-body text-justify p-2">
66+
<div class="plugin-body text-neutral-content text-sm">
6467
{!! $version->entry !!}
6568
</div>
6669
</div>
70+
@php $first = false; @endphp
6771
@endforeach
6872

6973
@if ($versions->hasPages())

‎resources/views/campaigns/roles/_form.blade.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
{{ csrf_field() }}
21
<x-grid type="1/1">
2+
@empty($model)
3+
<x-helper>{{ __('campaigns/roles.create.helper') }}</x-helper>
4+
@endif
35
<x-forms.field
46
field="name"
57
required

0 commit comments

Comments
 (0)
Failed to load comments.