-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
122 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
namespace App\View\Components; | ||
|
||
use App\Models\Campaign; | ||
use Closure; | ||
use Illuminate\Contracts\View\View; | ||
use Illuminate\View\Component; | ||
|
||
class InfoBox extends Component | ||
{ | ||
/** | ||
* Create a new component instance. | ||
*/ | ||
public function __construct( | ||
public string $title, | ||
public string $icon, | ||
public ?string $url, | ||
public ?string $subtitle, | ||
public ?string $color, | ||
public ?Campaign $campaign, | ||
public string $target = 'primary-dialog', | ||
public string $background = 'bg-neutral', | ||
public string $subtitleColour = 'text-neutral-content', | ||
public bool $ajax = false, | ||
public bool $premium = false, | ||
) | ||
{ | ||
// | ||
} | ||
|
||
/** | ||
* Get the view / contents that represent the component. | ||
*/ | ||
public function render(): View|Closure|string | ||
{ | ||
return view('components.info-box'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
return [ | ||
'overview' => [ | ||
'title' => 'Available members', | ||
'unlimited' => ':amount of unlimited members.', | ||
'limited' => ':amount of :total members.', | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<x-box css="flex items-center gap-5"> | ||
<div class="rounded {{ $background }} w-12 h-12 flex items-center justify-center"> | ||
<x-icon class="{{ $icon }}" /> | ||
</div> | ||
<div class="flex flex-col gap-0 grow"> | ||
<span>{!! $title !!}</span> | ||
@if (isset($subtitle)) | ||
<span class="{{ $subtitleColour }}">{!! $subtitle !!}</span> | ||
@endif | ||
</div> | ||
@if ($url) | ||
@if ($ajax) | ||
<div class="rounded-full border h-12 w-12 flex items-center justify-center cursor-pointer" data-target="{{ $target }}" data-url="{{ $url }}" data-toggle="dialog-ajax"> | ||
<x-icon class="fa-solid fa-angle-right" /> | ||
</div> | ||
@else | ||
<a class="rounded-full border h-12 w-12 flex items-center justify-center cursor-pointer" href="{{ $route }}" > | ||
<x-icon class="fa-solid fa-angle-right" /> | ||
</a> | ||
@endif | ||
@elseif ($premium && !$campaign->boosted()) | ||
<a class="rounded-full border h-12 w-12 flex items-center justify-center cursor-pointer neutral-link" href="{{ route('settings.premium', ['campaign' => $campaign->id]) }}" data-tooltip data-title="{{ __('settings/premium.actions.unlock') }}"> | ||
<x-icon class="fa-solid fa-gem" /> | ||
</a> | ||
@endif | ||
</x-box> |