mirror of
https://github.com/pelican-dev/panel.git
synced 2026-05-04 18:00:48 +03:00
Compare commits
1 Commits
main
...
boy132/rep
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
670a9c1a97 |
@@ -41,17 +41,8 @@ enum ContainerStatus: string implements HasColor, HasIcon, HasLabel
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getColor(bool $hex = false): string
|
public function getColor(): string
|
||||||
{
|
{
|
||||||
if ($hex) {
|
|
||||||
return match ($this) {
|
|
||||||
self::Created, self::Restarting => '#2563EB',
|
|
||||||
self::Starting, self::Paused, self::Removing, self::Stopping => '#D97706',
|
|
||||||
self::Running => '#22C55E',
|
|
||||||
self::Exited, self::Missing, self::Dead, self::Offline => '#EF4444',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return match ($this) {
|
return match ($this) {
|
||||||
self::Created => 'primary',
|
self::Created => 'primary',
|
||||||
self::Starting => 'warning',
|
self::Starting => 'warning',
|
||||||
|
|||||||
@@ -25,16 +25,8 @@ enum ServerState: string implements HasColor, HasIcon, HasLabel
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getColor(bool $hex = false): string
|
public function getColor(): string
|
||||||
{
|
{
|
||||||
if ($hex) {
|
|
||||||
return match ($this) {
|
|
||||||
self::Installing, self::RestoringBackup => '#2563EB',
|
|
||||||
self::Suspended => '#D97706',
|
|
||||||
self::InstallFailed, self::ReinstallFailed => '#EF4444',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return match ($this) {
|
return match ($this) {
|
||||||
self::Installing => 'primary',
|
self::Installing => 'primary',
|
||||||
self::InstallFailed => 'danger',
|
self::InstallFailed => 'danger',
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<div class="relative cursor-pointer"
|
<div class="relative cursor-pointer"
|
||||||
x-on:click="{{ $component->redirectUrl() }}"
|
x-on:click="{{ $component->redirectUrl() }}"
|
||||||
x-on:auxclick.prevent="if ($event.button === 1) {{ $component->redirectUrl(true) }}">
|
x-on:auxclick.prevent="if ($event.button === 1) {{ $component->redirectUrl(true) }}">
|
||||||
<div class="absolute left-0 top-1 bottom-0 w-1 rounded-lg" style="background-color: #D97706;"></div>
|
<div class="absolute left-0 top-1 bottom-0 w-1 rounded-lg fi-color fi-color-warning fi-bg-color-600" style="background-color: var(--bg);"></div>
|
||||||
|
|
||||||
<div class="flex-1 dark:bg-gray-800 dark:text-white rounded-lg overflow-hidden p-3">
|
<div class="flex-1 dark:bg-gray-800 dark:text-white rounded-lg overflow-hidden p-3">
|
||||||
@if($backgroundImage)
|
@if($backgroundImage)
|
||||||
|
|||||||
@@ -14,9 +14,7 @@
|
|||||||
x-on:click="{{ $component->redirectUrl() }}"
|
x-on:click="{{ $component->redirectUrl() }}"
|
||||||
x-on:auxclick.prevent="if ($event.button === 1) {{ $component->redirectUrl(true) }}">
|
x-on:auxclick.prevent="if ($event.button === 1) {{ $component->redirectUrl(true) }}">
|
||||||
|
|
||||||
<div class="absolute left-0 top-1 bottom-0 w-1 rounded-lg"
|
<div class="absolute left-0 top-1 bottom-0 w-1 rounded-lg fi-color fi-color-{{ $server->condition->getColor() }} fi-bg-color-600" style="background-color: var(--bg);"> </div>
|
||||||
style="background-color: {{ $server->condition->getColor(true) }};">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex-1 dark:bg-gray-800 dark:text-white rounded-lg overflow-hidden p-3">
|
<div class="flex-1 dark:bg-gray-800 dark:text-white rounded-lg overflow-hidden p-3">
|
||||||
@if($backgroundImage)
|
@if($backgroundImage)
|
||||||
|
|||||||
Reference in New Issue
Block a user