-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(filament): added entries tab to create theme form (#701)
- Loading branch information
Showing
44 changed files
with
617 additions
and
788 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
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,61 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Enums\Auth; | ||
|
||
/** | ||
* Enum Role. | ||
*/ | ||
enum Role: string | ||
{ | ||
case ADMIN = 'Admin'; | ||
|
||
case DEVELOPER = 'Developer'; | ||
|
||
case ENCODER = 'Encoder'; | ||
|
||
case PATRON = 'Patron'; | ||
|
||
case PLAYLIST_USER = 'Playlist User'; | ||
|
||
case WIKI_EDITOR = 'Wiki Editor'; | ||
|
||
case WIKI_VIEWER = 'Wiki Viewer'; | ||
|
||
/** | ||
* Get the color for the role. | ||
* | ||
* @return string|null | ||
*/ | ||
public function color(): ?string | ||
{ | ||
return match ($this) { | ||
Role::ADMIN => '#1F8B4C', | ||
Role::DEVELOPER => '#FF69B4', | ||
Role::ENCODER => '#FFC107', | ||
Role::PATRON => '#E74C3C', | ||
Role::WIKI_EDITOR => '#2E5A88', | ||
Role::WIKI_VIEWER => '#2596D1', | ||
default => null, | ||
}; | ||
} | ||
|
||
/** | ||
* Get the priority value for the role. | ||
* | ||
* @return int|null | ||
*/ | ||
public function priority(): ?int | ||
{ | ||
return match ($this) { | ||
Role::ADMIN => 250000, | ||
Role::DEVELOPER => 125000, | ||
Role::ENCODER => 150000, | ||
Role::PATRON => 50000, | ||
Role::WIKI_EDITOR => 100000, | ||
Role::WIKI_VIEWER => 25000, | ||
default => null, | ||
}; | ||
} | ||
} |
Oops, something went wrong.