Modules: - Chain: daemon RPC client (DaemonRpc singleton, cached queries) - Explorer: block browser, tx viewer, alias directory, search, stats API - Names: .lthn TLD registrar portal (availability check, lookup, directory) - Trade: scaffold (DEX frontend + API) - Pool: scaffold (mining pool dashboard) Replaces 5 Node.js containers (5.9GB) with one FrankenPHP app. Built on CorePHP framework pattern from host.uk.com. Co-Authored-By: Charon <charon@lethean.io>
24 lines
808 B
PHP
24 lines
808 B
PHP
@props([
|
|
'status' => 'pending',
|
|
'size' => 'sm',
|
|
'showIcon' => true,
|
|
])
|
|
|
|
@php
|
|
$config = match ($status) {
|
|
'pending' => ['color' => 'yellow', 'icon' => 'clock', 'label' => 'Pending'],
|
|
'processing' => ['color' => 'blue', 'icon' => 'arrow-path', 'label' => 'Processing'],
|
|
'completed' => ['color' => 'green', 'icon' => 'check', 'label' => 'Completed'],
|
|
'failed' => ['color' => 'red', 'icon' => 'x-mark', 'label' => 'Failed'],
|
|
default => ['color' => 'zinc', 'icon' => 'question-mark-circle', 'label' => ucfirst($status)],
|
|
};
|
|
@endphp
|
|
|
|
<flux:badge
|
|
color="{{ $config['color'] }}"
|
|
size="{{ $size }}"
|
|
@if($showIcon) icon="{{ $config['icon'] }}" @endif
|
|
{{ $attributes }}
|
|
>
|
|
{{ $slot->isNotEmpty() ? $slot : $config['label'] }}
|
|
</flux:badge>
|