├── .gitignore ├── subdomains ├── config │ └── subdomains.php ├── src │ ├── Policies │ │ └── CloudflareDomainPolicy.php │ ├── Filament │ │ ├── Server │ │ │ └── Resources │ │ │ │ └── Subdomains │ │ │ │ └── Pages │ │ │ │ └── ListSubdomains.php │ │ └── Admin │ │ │ └── Resources │ │ │ └── CloudflareDomains │ │ │ ├── Pages │ │ │ └── ManageCloudflareDomains.php │ │ │ └── CloudflareDomainResource.php │ ├── Providers │ │ └── SubdomainsPluginProvider.php │ ├── Models │ │ ├── CloudflareDomain.php │ │ └── Subdomain.php │ └── SubdomainsPlugin.php ├── lang │ └── en │ │ └── strings.php ├── plugin.json └── database │ └── migrations │ ├── 003_add_subdomain_limit_to_servers.php │ ├── 001_create_cloudflare_domains_table.php │ └── 002_create_subdomains_table.php ├── billing ├── resources │ └── views │ │ └── widget.blade.php ├── config │ └── billing.php ├── src │ ├── Policies │ │ ├── OrderPolicy.php │ │ ├── ProductPolicy.php │ │ └── CustomerPolicy.php │ ├── Filament │ │ ├── App │ │ │ ├── Widgets │ │ │ │ ├── WelcomeWidget.php │ │ │ │ └── ProductWidget.php │ │ │ ├── Resources │ │ │ │ └── Orders │ │ │ │ │ └── Pages │ │ │ │ │ └── ListOrders.php │ │ │ └── Pages │ │ │ │ └── Dashboard.php │ │ └── Admin │ │ │ └── Resources │ │ │ ├── Coupons │ │ │ └── Pages │ │ │ │ ├── ListCoupons.php │ │ │ │ ├── CreateCoupon.php │ │ │ │ └── EditCoupon.php │ │ │ ├── Products │ │ │ ├── Pages │ │ │ │ ├── ListProducts.php │ │ │ │ ├── CreateProduct.php │ │ │ │ └── EditProduct.php │ │ │ └── RelationManagers │ │ │ │ └── PriceRelationManager.php │ │ │ ├── Customers │ │ │ ├── Pages │ │ │ │ ├── ListCustomers.php │ │ │ │ ├── CreateCustomer.php │ │ │ │ └── EditCustomer.php │ │ │ └── CustomerResource.php │ │ │ └── Orders │ │ │ └── Pages │ │ │ └── ListOrders.php │ ├── Enums │ │ ├── CouponType.php │ │ ├── PriceInterval.php │ │ └── OrderStatus.php │ ├── Providers │ │ ├── BillingRoutesProvider.php │ │ └── BillingPluginProvider.php │ ├── Console │ │ └── Commands │ │ │ └── CheckOrdersCommand.php │ ├── Models │ │ ├── Customer.php │ │ ├── ProductPrice.php │ │ ├── Product.php │ │ └── Coupon.php │ ├── Http │ │ └── Controllers │ │ │ └── Api │ │ │ └── CheckoutController.php │ └── BillingPlugin.php ├── plugin.json └── database │ └── migrations │ ├── 002_create_customers_table.php │ ├── 001_create_coupons_table.php │ ├── 004_create_product_prices_table.php │ ├── 005_create_orders_table.php │ └── 003_create_products_table.php ├── legal-pages ├── resources │ └── views │ │ └── base-page.blade.php ├── src │ ├── Filament │ │ ├── App │ │ │ └── Pages │ │ │ │ ├── Imprint.php │ │ │ │ ├── PrivacyPolicy.php │ │ │ │ ├── TermsOfService.php │ │ │ │ └── BaseLegalPage.php │ │ └── Admin │ │ │ └── Pages │ │ │ └── LegalPages.php │ ├── Enums │ │ └── LegalPageType.php │ ├── LegalPagesPlugin.php │ └── Providers │ │ └── LegalPagesPluginProvider.php ├── lang │ └── en │ │ └── strings.php └── plugin.json ├── minecraft-modrinth ├── config │ └── minecraft-modrinth.php ├── plugin.json └── src │ ├── Enums │ └── ModrinthProjectType.php │ ├── Facades │ └── MinecraftModrinth.php │ └── MinecraftModrinthPlugin.php ├── tawkto-widget ├── config │ └── tawkto-widget.php ├── plugin.json └── src │ ├── TawktoWidgetPlugin.php │ └── Providers │ └── TawktoWidgetPluginProvider.php ├── mclogs-uploader ├── lang │ └── en │ │ └── upload.php ├── src │ ├── MclogsUploaderPlugin.php │ ├── Providers │ │ └── MclogsUploaderPluginProvider.php │ └── Filament │ │ └── Components │ │ └── Actions │ │ └── UploadLogsAction.php └── plugin.json ├── tickets ├── src │ ├── Policies │ │ └── TicketPolicy.php │ ├── TicketsPlugin.php │ ├── Providers │ │ └── TicketsPluginProvider.php │ ├── Enums │ │ ├── TicketCategory.php │ │ └── TicketPriority.php │ ├── Filament │ │ ├── Components │ │ │ └── Actions │ │ │ │ ├── AssignToMeAction.php │ │ │ │ └── AnswerAction.php │ │ ├── Server │ │ │ └── Resources │ │ │ │ └── Tickets │ │ │ │ └── Pages │ │ │ │ └── ManageTickets.php │ │ └── Admin │ │ │ └── Resources │ │ │ └── Tickets │ │ │ └── Pages │ │ │ └── ManageTickets.php │ └── Models │ │ └── Ticket.php ├── plugin.json ├── lang │ ├── en │ │ └── tickets.php │ └── de │ │ └── tickets.php └── database │ └── migrations │ └── 001_create_tickets_table.php ├── player-counter ├── src │ ├── Policies │ │ └── GameQueryPolicy.php │ ├── Models │ │ ├── EggGameQuery.php │ │ └── GameQuery.php │ ├── Filament │ │ ├── Admin │ │ │ └── Resources │ │ │ │ └── GameQueries │ │ │ │ └── Pages │ │ │ │ └── ManageGameQueries.php │ │ └── Server │ │ │ └── Widgets │ │ │ └── ServerPlayerWidget.php │ ├── PlayerCounterPlugin.php │ ├── Enums │ │ └── GameQueryType.php │ └── Providers │ │ └── PlayerCounterPluginProvider.php ├── plugin.json ├── database │ ├── migrations │ │ ├── 001_create_game_queries_table.php │ │ └── 002_create_egg_game_query_table.php │ └── Seeders │ │ └── PlayerCounterSeeder.php └── lang │ └── en │ └── query.php ├── announcements ├── src │ ├── Policies │ │ └── AnnouncementPolicy.php │ ├── Providers │ │ └── AnnouncementsPluginProvider.php │ ├── Filament │ │ └── Admin │ │ │ └── Resources │ │ │ └── Announcements │ │ │ └── Pages │ │ │ └── ManageAnnouncements.php │ ├── AnnouncementsPlugin.php │ └── Models │ │ └── Announcement.php ├── lang │ └── en │ │ └── strings.php ├── plugin.json └── database │ └── migrations │ └── 001_create_announcements_table.php ├── user-creatable-servers ├── src │ ├── Policies │ │ └── UserResourceLimitsPolicy.php │ ├── Filament │ │ ├── Admin │ │ │ └── Resources │ │ │ │ ├── UserResourceLimits │ │ │ │ └── Pages │ │ │ │ │ └── ManageUserResourceLimits.php │ │ │ │ └── Users │ │ │ │ └── RelationManagers │ │ │ │ └── UserResourceLimitRelationManager.php │ │ └── App │ │ │ └── Widgets │ │ │ └── UserResourceLimitsOverview.php │ ├── Providers │ │ └── UserCreatableServersPluginProvider.php │ └── UserCreatableServersPlugin.php ├── config │ └── user-creatable-servers.php ├── lang │ └── en │ │ └── strings.php ├── plugin.json └── database │ └── migrations │ └── 001_create_user_resource_limits_table.php ├── pirate-language ├── lang │ └── pirate │ │ ├── server │ │ ├── activity.php │ │ ├── network.php │ │ ├── startup.php │ │ ├── dashboard.php │ │ ├── database.php │ │ ├── console.php │ │ ├── setting.php │ │ ├── backup.php │ │ ├── file.php │ │ └── schedule.php │ │ ├── admin │ │ ├── plugin.php │ │ ├── dashboard.php │ │ └── health.php │ │ ├── profile.php │ │ └── exceptions.php ├── src │ └── PirateLanguagePlugin.php └── plugin.json ├── snowflakes ├── config │ └── snowflakes.php ├── plugin.json └── src │ ├── Providers │ └── SnowflakesPluginProvider.php │ └── SnowflakesPlugin.php ├── robo-avatars ├── src │ ├── RoboAvatarsPlugin.php │ ├── Providers │ │ └── RoboAvatarsPluginProvider.php │ └── RoboAvatarsSchema.php └── plugin.json ├── generic-oidc-providers ├── lang │ └── en │ │ └── strings.php ├── plugin.json ├── src │ ├── GenericOIDCProvidersPlugin.php │ ├── Providers │ │ └── GenericOIDCProvidersPluginProvider.php │ ├── Filament │ │ └── Admin │ │ │ └── Resources │ │ │ └── GenericOIDCProviders │ │ │ └── Pages │ │ │ ├── ListGenericOIDCProviders.php │ │ │ ├── EditGenericOIDCProvider.php │ │ │ └── CreateGenericOIDCProvider.php │ ├── Models │ │ └── GenericOIDCProvider.php │ └── Extensions │ │ └── OAuth │ │ └── Schemas │ │ └── GenericOIDCProviderSchema.php └── database │ └── migrations │ └── 001_create_generic_oidc_providers_table.php ├── register ├── plugin.json └── src │ ├── RegisterPlugin.php │ └── Filament │ └── Pages │ └── Auth │ └── Register.php ├── fluffy-theme ├── plugin.json └── src │ └── FluffyThemePlugin.php ├── rust-umod ├── plugin.json └── src │ ├── RustUModPlugin.php │ ├── Facades │ └── RustUMod.php │ └── Services │ └── RustUModService.php ├── theme-customizer ├── config │ └── theme-customizer.php └── plugin.json ├── pterodactyl-theme ├── plugin.json └── src │ └── PterodactylThemePlugin.php └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | *.DS_Store* 2 | /.fleet 3 | /.idea 4 | /.nova 5 | /.vscode 6 | /.ddev 7 | -------------------------------------------------------------------------------- /subdomains/config/subdomains.php: -------------------------------------------------------------------------------- 1 | env('CLOUDFLARE_TOKEN'), 5 | ]; 6 | -------------------------------------------------------------------------------- /billing/resources/views/widget.blade.php: -------------------------------------------------------------------------------- 1 | 2 | {{ $this->content }} 3 | -------------------------------------------------------------------------------- /legal-pages/resources/views/base-page.blade.php: -------------------------------------------------------------------------------- 1 | 2 | {{ $this->form }} 3 | 4 | -------------------------------------------------------------------------------- /minecraft-modrinth/config/minecraft-modrinth.php: -------------------------------------------------------------------------------- 1 | env('LATEST_MINECRAFT_VERSION', '1.21.11'), 5 | ]; 6 | -------------------------------------------------------------------------------- /tawkto-widget/config/tawkto-widget.php: -------------------------------------------------------------------------------- 1 | env('TAWKTO_PROVIDER_ID'), 5 | 'widget_id' => env('TAWKTO_WIDGET_ID'), 6 | ]; 7 | -------------------------------------------------------------------------------- /mclogs-uploader/lang/en/upload.php: -------------------------------------------------------------------------------- 1 | 'Upload logs', 5 | 'uploaded' => 'Console logs uploaded', 6 | 'upload_failed' => 'Could not upload logs', 7 | ]; 8 | -------------------------------------------------------------------------------- /billing/config/billing.php: -------------------------------------------------------------------------------- 1 | env('STRIPE_KEY'), 5 | 'secret' => env('STRIPE_SECRET'), 6 | 7 | 'currency' => env('BILLING_CURRENCY', 'USD'), 8 | 9 | 'deployment_tags' => env('BILLING_DEPLOYMENT_TAGS'), 10 | ]; 11 | -------------------------------------------------------------------------------- /billing/src/Policies/OrderPolicy.php: -------------------------------------------------------------------------------- 1 | 'Cap\'n\'s Log', 5 | 'event' => 'Happenin\'', 6 | 'user' => 'Scallywag', 7 | 'deleted_user' => 'Vanished Scallywag', 8 | 'system' => 'The Ship', 9 | 'timestamp' => 'Hourglass Sand', 10 | 'metadata' => 'Hidden Booty', 11 | ]; 12 | -------------------------------------------------------------------------------- /legal-pages/src/Filament/App/Pages/PrivacyPolicy.php: -------------------------------------------------------------------------------- 1 | 'No Domains', 5 | 'domain' => 'Domain|Domains', 6 | 7 | 'no_subdomains' => 'No Subdomains', 8 | 'subdomain' => 'Subdomain|Subdomains', 9 | 'limit' => 'Subdomain Limit Reached', 10 | 'create_subdomain' => 'Create Subdomain', 11 | 12 | 'name' => 'Name', 13 | ]; 14 | -------------------------------------------------------------------------------- /snowflakes/config/snowflakes.php: -------------------------------------------------------------------------------- 1 | env('SNOWFLAKES_ENABLED', true), 5 | 'size' => env('SNOWFLAKES_SIZE', 1), 6 | 'speed' => env('SNOWFLAKES_SPEED', 3), 7 | 'opacity' => env('SNOWFLAKES_OPACITY', 0.5), 8 | 'density' => env('SNOWFLAKES_DENSITY', 1), 9 | 'quality' => env('SNOWFLAKES_QUALITY', 1), 10 | ]; 11 | -------------------------------------------------------------------------------- /billing/src/Enums/CouponType.php: -------------------------------------------------------------------------------- 1 | name; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /user-creatable-servers/config/user-creatable-servers.php: -------------------------------------------------------------------------------- 1 | env('UCS_DEFAULT_DATABASE_LIMIT', 0), 5 | 'allocation_limit' => env('UCS_DEFAULT_ALLOCATION_LIMIT', 0), 6 | 'backup_limit' => env('UCS_DEFAULT_BACKUP_LIMIT', 0), 7 | 8 | 'can_users_update_servers' => env('UCS_CAN_USERS_UPDATE_SERVERS', true), 9 | ]; 10 | -------------------------------------------------------------------------------- /billing/src/Enums/PriceInterval.php: -------------------------------------------------------------------------------- 1 | name; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /legal-pages/lang/en/strings.php: -------------------------------------------------------------------------------- 1 | 'Legal Page|Legal Pages', 5 | 'clear' => 'Clear', 6 | 7 | 'imprint' => 'Imprint', 8 | 'terms_of_service' => 'Terms of Service', 9 | 'privacy_policy' => 'Privacy Policy', 10 | 11 | 'notifications' => [ 12 | 'saved' => 'Legal Pages saved', 13 | 'saved_error' => 'Could not save Legal Pages', 14 | ], 15 | ]; 16 | -------------------------------------------------------------------------------- /robo-avatars/src/RoboAvatarsPlugin.php: -------------------------------------------------------------------------------- 1 | 'No Generic OIDC Providers', 5 | 'generic_oidc_provider' => 'Generic OIDC Provider|Generic OIDC Providers', 6 | 'display_name' => 'Display Name', 7 | 'display_color' => 'Display Color', 8 | 'display_icon' => 'Display Icon', 9 | 'base_url' => 'Base URL', 10 | 'verify_jwt' => 'Verify JWT?', 11 | 'jwt_public_key' => 'JWT Public Key', 12 | ]; 13 | -------------------------------------------------------------------------------- /billing/src/Filament/App/Resources/Orders/Pages/ListOrders.php: -------------------------------------------------------------------------------- 1 | 'No Announcements', 5 | 'announcement' => 'Announcement|Announcements', 6 | 'title' => 'Title', 7 | 'body' => 'Body', 8 | 'no_body' => 'No Body', 9 | 'type' => 'Type', 10 | 'panels' => 'Panels', 11 | 'all_panels' => 'All Panels', 12 | 'valid_from' => 'Valid from', 13 | 'no_valid_from' => 'No valid from', 14 | 'valid_to' => 'Valid to', 15 | 'no_valid_to' => 'No valid to', 16 | ]; 17 | -------------------------------------------------------------------------------- /robo-avatars/plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "robo-avatars", 3 | "name": "Robo Avatars", 4 | "author": "Boy132", 5 | "version": "1.0.0", 6 | "description": "Adds RoboHash as avatar provider", 7 | "category": "plugin", 8 | "url": "https://github.com/pelican-dev/plugins/tree/main/robo-avatars", 9 | "update_url": null, 10 | "namespace": "Boy132\\RoboAvatars", 11 | "class": "RoboAvatarsPlugin", 12 | "panels": null, 13 | "panel_version": null, 14 | "composer_packages": null 15 | } -------------------------------------------------------------------------------- /snowflakes/plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "snowflakes", 3 | "name": "Snowflakes", 4 | "author": "Boy132", 5 | "version": "1.0.0", 6 | "description": "Let it snow, let it snow, let it snow", 7 | "category": "plugin", 8 | "url": "https://github.com/pelican-dev/plugins/tree/main/snowflakes", 9 | "update_url": null, 10 | "namespace": "Boy132\\Snowflakes", 11 | "class": "SnowflakesPlugin", 12 | "panels": null, 13 | "panel_version": null, 14 | "composer_packages": null 15 | } 16 | -------------------------------------------------------------------------------- /fluffy-theme/plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "fluffy-theme", 3 | "name": "Fluffy Theme", 4 | "author": "Boy132", 5 | "version": "1.0.0", 6 | "description": "A super nice and super fluffy theme.", 7 | "category": "theme", 8 | "url": "https://github.com/pelican-dev/plugins/tree/main/fluffy-theme", 9 | "update_url": null, 10 | "namespace": "Boy132\\FluffyTheme", 11 | "class": "FluffyThemePlugin", 12 | "panels": null, 13 | "panel_version": null, 14 | "composer_packages": null 15 | } -------------------------------------------------------------------------------- /user-creatable-servers/lang/en/strings.php: -------------------------------------------------------------------------------- 1 | 'User Resource Limit|User Resource Limits', 5 | 'user' => 'User|Users', 6 | 'cpu' => 'CPU', 7 | 'memory' => 'Memory', 8 | 'disk' => 'Disk Space', 9 | 'server_limit' => 'Server Limit', 10 | 'no_limit' => 'No Limit', 11 | 'unlimited' => 'Unlimited', 12 | 'hint_unlimited' => '0 means unlimited', 13 | 'name' => 'Server Name', 14 | 'egg' => 'Egg', 15 | 'left' => 'left', 16 | ]; 17 | -------------------------------------------------------------------------------- /robo-avatars/src/Providers/RoboAvatarsPluginProvider.php: -------------------------------------------------------------------------------- 1 | app->make(AvatarService::class)->register(new RoboAvatarsSchema()); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /tawkto-widget/plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "tawkto-widget", 3 | "name": "Tawk.to Widget", 4 | "author": "Boy132", 5 | "version": "1.0.0", 6 | "description": "Adds a Tawk.to widget to all panels", 7 | "category": "plugin", 8 | "url": "https://github.com/pelican-dev/plugins/tree/main/tawkto-widget", 9 | "update_url": null, 10 | "namespace": "Boy132\\TawktoWidget", 11 | "class": "TawktoWidgetPlugin", 12 | "panels": null, 13 | "panel_version": null, 14 | "composer_packages": null 15 | } -------------------------------------------------------------------------------- /announcements/src/Providers/AnnouncementsPluginProvider.php: -------------------------------------------------------------------------------- 1 | 'Signal Ropes', 5 | 'add' => 'Claim a New Channel', 6 | 'limit' => 'Ye\'ve Reached the End o\' the Ropes!', 7 | 'address' => 'Dockin\' Coordinates', 8 | 'port' => 'Port o\' Call', 9 | 'notes' => 'Captain\'s Scribbles', 10 | 'no_notes' => 'No Scribbles Left Behind', 11 | 'make_primary' => 'Fly as Main Flag', 12 | 'primary' => 'Main Line', 13 | 'make' => 'Hoist It!', 14 | 'delete' => 'Cut the Line', 15 | ]; 16 | -------------------------------------------------------------------------------- /rust-umod/plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "rust-umod", 3 | "name": "Rust uMod", 4 | "author": "Boy132", 5 | "version": "1.0.0", 6 | "description": "Easily download rust plugins from uMod", 7 | "category": "plugin", 8 | "url": "https://github.com/pelican-dev/plugins/tree/main/rust-umod", 9 | "update_url": null, 10 | "namespace": "Boy132\\RustUMod", 11 | "class": "RustUModPlugin", 12 | "panels": [ 13 | "server" 14 | ], 15 | "panel_version": null, 16 | "composer_packages": null 17 | } -------------------------------------------------------------------------------- /register/src/RegisterPlugin.php: -------------------------------------------------------------------------------- 1 | registration(Register::class); 19 | } 20 | 21 | public function boot(Panel $panel): void {} 22 | } 23 | -------------------------------------------------------------------------------- /theme-customizer/config/theme-customizer.php: -------------------------------------------------------------------------------- 1 | env('THEME_CUSTOMIZER_FONT'), 5 | 6 | 'colors' => [ 7 | 'gray' => env('THEME_CUSTOMIZER_COLORS_GRAY'), 8 | 'primary' => env('THEME_CUSTOMIZER_COLORS_PRIMARY'), 9 | 'info' => env('THEME_CUSTOMIZER_COLORS_INFO'), 10 | 'success' => env('THEME_CUSTOMIZER_COLORS_SUCCESS'), 11 | 'warning' => env('THEME_CUSTOMIZER_COLORS_WARNING'), 12 | 'danger' => env('THEME_CUSTOMIZER_COLORS_DANGER'), 13 | ], 14 | ]; 15 | -------------------------------------------------------------------------------- /pterodactyl-theme/plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "pterodactyl-theme", 3 | "name": "Pterodactyl Theme", 4 | "author": "Boy132", 5 | "version": "1.0.0", 6 | "description": "Pterodactyl like colors and font", 7 | "category": "theme", 8 | "url": "https://github.com/pelican-dev/plugins/tree/main/pterodactyl-theme", 9 | "update_url": null, 10 | "namespace": "Boy132\\PterodactylTheme", 11 | "class": "PterodactylThemePlugin", 12 | "panels": null, 13 | "panel_version": null, 14 | "composer_packages": null 15 | } -------------------------------------------------------------------------------- /pirate-language/plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "pirate-language", 3 | "name": "Pirate Language", 4 | "author": "Boy132", 5 | "version": "1.0.0", 6 | "description": "Turns yer site's lingo into pirate talk, matey!", 7 | "category": "language", 8 | "url": "https://github.com/pelican-dev/plugins/tree/main/pirate-language", 9 | "update_url": null, 10 | "namespace": "Boy132\\PirateLanguage", 11 | "class": "PirateLanguagePlugin", 12 | "panels": null, 13 | "panel_version": null, 14 | "composer_packages": null 15 | } -------------------------------------------------------------------------------- /announcements/plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "announcements", 3 | "name": "Announcements", 4 | "author": "Boy132", 5 | "version": "1.0.0", 6 | "description": "Create panel wide announcements to inform your users about stuff", 7 | "category": "plugin", 8 | "url": "https://github.com/pelican-dev/plugins/tree/main/announcements", 9 | "update_url": null, 10 | "namespace": "Boy132\\Announcements", 11 | "class": "AnnouncementsPlugin", 12 | "panels": null, 13 | "panel_version": null, 14 | "composer_packages": null 15 | } -------------------------------------------------------------------------------- /theme-customizer/plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "theme-customizer", 3 | "name": "Theme Customizer", 4 | "author": "Boy132", 5 | "version": "1.0.0", 6 | "description": "Allows to customize the panel font and colors", 7 | "category": "plugin", 8 | "url": "https://github.com/pelican-dev/plugins/tree/main/theme-customizer", 9 | "update_url": null, 10 | "namespace": "Boy132\\ThemeCustomizer", 11 | "class": "ThemeCustomizerPlugin", 12 | "panels": null, 13 | "panel_version": null, 14 | "composer_packages": null 15 | } -------------------------------------------------------------------------------- /mclogs-uploader/plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "mclogs-uploader", 3 | "name": "Mclogs Uploader", 4 | "author": "Boy132", 5 | "version": "1.0.0", 6 | "description": "Upload console logs to mclo.gs", 7 | "category": "plugin", 8 | "url": "https://github.com/pelican-dev/plugins/tree/main/mclogs-uploader", 9 | "update_url": null, 10 | "namespace": "Boy132\\MclogsUploader", 11 | "class": "MclogsUploaderPlugin", 12 | "panels": [ 13 | "server" 14 | ], 15 | "panel_version": null, 16 | "composer_packages": null 17 | } -------------------------------------------------------------------------------- /billing/plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "billing", 3 | "name": "Billing", 4 | "author": "Boy132", 5 | "version": "1.0.0", 6 | "description": "A simple billing plugin which allows users to purchase servers.", 7 | "category": "plugin", 8 | "url": "https://github.com/pelican-dev/plugins/tree/main/billing", 9 | "update_url": null, 10 | "namespace": "Boy132\\Billing", 11 | "class": "BillingPlugin", 12 | "panels": null, 13 | "panel_version": null, 14 | "composer_packages": { 15 | "stripe/stripe-php": "^18.0" 16 | } 17 | } -------------------------------------------------------------------------------- /subdomains/plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "subdomains", 3 | "name": "Subdomains", 4 | "author": "Boy132", 5 | "version": "1.0.0", 6 | "description": "Allows users to create subdomains for their servers", 7 | "category": "plugin", 8 | "url": "https://github.com/pelican-dev/plugins/tree/main/subdomains", 9 | "update_url": null, 10 | "namespace": "Boy132\\Subdomains", 11 | "class": "SubdomainsPlugin", 12 | "panels": [ 13 | "admin", 14 | "server" 15 | ], 16 | "panel_version": null, 17 | "composer_packages": null 18 | } -------------------------------------------------------------------------------- /legal-pages/plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "legal-pages", 3 | "name": "Legal Pages", 4 | "author": "Boy132", 5 | "version": "1.0.0", 6 | "description": "Adds some legal pages (like an Imprint) to the panel", 7 | "category": "plugin", 8 | "url": "https://github.com/pelican-dev/plugins/tree/main/legal-pages", 9 | "update_url": null, 10 | "namespace": "Boy132\\LegalPages", 11 | "class": "LegalPagesPlugin", 12 | "panels": [ 13 | "admin", 14 | "app" 15 | ], 16 | "panel_version": null, 17 | "composer_packages": null 18 | } -------------------------------------------------------------------------------- /user-creatable-servers/plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "user-creatable-servers", 3 | "name": "User Creatable Servers", 4 | "author": "Boy132", 5 | "version": "1.0.0", 6 | "description": "Allow users to create their own servers", 7 | "category": "plugin", 8 | "url": "https://github.com/pelican-dev/plugins/tree/main/user-creatable-servers", 9 | "update_url": null, 10 | "namespace": "Boy132\\UserCreatableServers", 11 | "class": "UserCreatableServersPlugin", 12 | "panels": null, 13 | "panel_version": null, 14 | "composer_packages": null 15 | } -------------------------------------------------------------------------------- /robo-avatars/src/RoboAvatarsSchema.php: -------------------------------------------------------------------------------- 1 | email); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /pirate-language/lang/pirate/server/startup.php: -------------------------------------------------------------------------------- 1 | 'Settin\' Sail', 5 | 'command' => 'Captain\'s Orders', 6 | 'preview' => 'Spyglass View', 7 | 'docker_image' => 'Docker\'s Treasure Map', 8 | 'notification_docker' => 'Docker\'s Treasure Updated', 9 | 'notification_docker_body' => 'Hoist the sails an\' restart the ship to use the new map.', 10 | 'variables' => 'Ship\'s Logs', 11 | 'update' => 'Changed Course: :variable', 12 | 'fail' => 'Ran Aground: :variable', 13 | 'validation_fail' => 'Chart Error: :variable', 14 | ]; 15 | -------------------------------------------------------------------------------- /minecraft-modrinth/plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "minecraft-modrinth", 3 | "name": "Minecraft Modrinth", 4 | "author": "Boy132", 5 | "version": "1.0.0", 6 | "description": "Easily download minecraft mods & plugins from modrinth", 7 | "category": "plugin", 8 | "url": "https://github.com/pelican-dev/plugins/tree/main/minecraft-modrinth", 9 | "update_url": null, 10 | "namespace": "Boy132\\MinecraftModrinth", 11 | "class": "MinecraftModrinthPlugin", 12 | "panels": [ 13 | "server" 14 | ], 15 | "panel_version": null, 16 | "composer_packages": null 17 | } -------------------------------------------------------------------------------- /register/src/Filament/Pages/Auth/Register.php: -------------------------------------------------------------------------------- 1 | name('username') 18 | ->statePath('username'); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /mclogs-uploader/src/Providers/MclogsUploaderPluginProvider.php: -------------------------------------------------------------------------------- 1 | getId())->title(); 18 | 19 | $panel->discoverPages(plugin_path($this->getId(), "src/Filament/$id/Pages"), "Boy132\\RustUMod\\Filament\\$id\\Pages"); 20 | } 21 | 22 | public function boot(Panel $panel): void {} 23 | } 24 | -------------------------------------------------------------------------------- /tickets/src/TicketsPlugin.php: -------------------------------------------------------------------------------- 1 | getId())->title(); 18 | 19 | $panel->discoverResources(plugin_path($this->getId(), "src/Filament/$id/Resources"), "Boy132\\Tickets\\Filament\\$id\\Resources"); 20 | } 21 | 22 | public function boot(Panel $panel): void {} 23 | } 24 | -------------------------------------------------------------------------------- /billing/src/Filament/Admin/Resources/Coupons/Pages/ListCoupons.php: -------------------------------------------------------------------------------- 1 | label('Create Coupon'), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /generic-oidc-providers/plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "generic-oidc-providers", 3 | "name": "Generic OIDC Providers", 4 | "author": "Boy132", 5 | "version": "1.0.0", 6 | "description": "Allows to create generic OIDC providers.", 7 | "category": "plugin", 8 | "url": "https://github.com/pelican-dev/plugins/tree/main/generic-oidc-providers", 9 | "update_url": null, 10 | "namespace": "Boy132\\GenericOIDCProviders", 11 | "class": "GenericOIDCProvidersPlugin", 12 | "panels": null, 13 | "panel_version": null, 14 | "composer_packages": { 15 | "kovah/laravel-socialite-oidc": "^0.5" 16 | } 17 | } -------------------------------------------------------------------------------- /billing/src/Filament/Admin/Resources/Products/Pages/ListProducts.php: -------------------------------------------------------------------------------- 1 | label('Create Product'), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /player-counter/plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "player-counter", 3 | "name": "Player Counter", 4 | "author": "Boy132", 5 | "version": "1.0.0", 6 | "description": "Show the amount of connected players to the server", 7 | "category": "plugin", 8 | "url": "https://github.com/pelican-dev/plugins/tree/main/player-counter", 9 | "update_url": null, 10 | "namespace": "Boy132\\PlayerCounter", 11 | "class": "PlayerCounterPlugin", 12 | "panels": [ 13 | "admin", 14 | "server" 15 | ], 16 | "panel_version": null, 17 | "composer_packages": { 18 | "krymosoftware/gameq": "^4.0" 19 | } 20 | } -------------------------------------------------------------------------------- /billing/src/Filament/Admin/Resources/Customers/Pages/ListCustomers.php: -------------------------------------------------------------------------------- 1 | label('Create Customer'), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /player-counter/src/Filament/Admin/Resources/GameQueries/Pages/ManageGameQueries.php: -------------------------------------------------------------------------------- 1 | createAnother(false), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /announcements/src/Filament/Admin/Resources/Announcements/Pages/ManageAnnouncements.php: -------------------------------------------------------------------------------- 1 | createAnother(false), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tickets/src/Providers/TicketsPluginProvider.php: -------------------------------------------------------------------------------- 1 | $server->hasMany(Ticket::class, 'server_id', 'id')); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /generic-oidc-providers/src/GenericOIDCProvidersPlugin.php: -------------------------------------------------------------------------------- 1 | getId())->title(); 18 | 19 | $panel->discoverResources(plugin_path($this->getId(), "src/Filament/$id/Resources"), "Boy132\\GenericOIDCProviders\\Filament\\$id\\Resources"); 20 | } 21 | 22 | public function boot(Panel $panel): void {} 23 | } 24 | -------------------------------------------------------------------------------- /subdomains/database/migrations/003_add_subdomain_limit_to_servers.php: -------------------------------------------------------------------------------- 1 | unsignedInteger('subdomain_limit')->default(0)->after('backup_limit'); 13 | }); 14 | } 15 | 16 | public function down(): void 17 | { 18 | Schema::table('servers', function (Blueprint $table) { 19 | $table->dropColumn('subdomain_limit'); 20 | }); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /minecraft-modrinth/src/Enums/ModrinthProjectType.php: -------------------------------------------------------------------------------- 1 | 'Minecraft Mods', 16 | self::Plugin => 'Minecraft Plugins', 17 | }; 18 | } 19 | 20 | public function getFolder(): string 21 | { 22 | return match ($this) { 23 | self::Mod => 'mods', 24 | self::Plugin => 'plugins', 25 | }; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /subdomains/src/Filament/Admin/Resources/CloudflareDomains/Pages/ManageCloudflareDomains.php: -------------------------------------------------------------------------------- 1 | createAnother(false), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /player-counter/database/migrations/001_create_game_queries_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 13 | $table->string('query_type'); 14 | $table->integer('query_port_offset')->nullable(); 15 | $table->timestamps(); 16 | }); 17 | } 18 | 19 | public function down(): void 20 | { 21 | Schema::dropIfExists('game_queries'); 22 | } 23 | }; 24 | -------------------------------------------------------------------------------- /billing/src/Filament/Admin/Resources/Coupons/Pages/CreateCoupon.php: -------------------------------------------------------------------------------- 1 | getCreateFormAction()->formId('form'), 23 | ]; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /billing/src/Providers/BillingRoutesProvider.php: -------------------------------------------------------------------------------- 1 | routes(function () { 14 | Route::get('checkout/success', [CheckoutController::class, 'success'])->name('billing.checkout.success')->withoutMiddleware(['auth']); 15 | Route::get('checkout/cancel', [CheckoutController::class, 'cancel'])->name('billing.checkout.cancel')->withoutMiddleware(['auth']); 16 | }); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /subdomains/database/migrations/001_create_cloudflare_domains_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 13 | $table->string('name')->unique(); 14 | $table->string('cloudflare_id')->nullable(); 15 | $table->timestamps(); 16 | }); 17 | } 18 | 19 | public function down(): void 20 | { 21 | Schema::dropIfExists('cloudflare_domains'); 22 | } 23 | }; 24 | -------------------------------------------------------------------------------- /billing/src/Filament/Admin/Resources/Customers/Pages/CreateCustomer.php: -------------------------------------------------------------------------------- 1 | getCreateFormAction()->formId('form'), 23 | ]; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /user-creatable-servers/src/Filament/Admin/Resources/UserResourceLimits/Pages/ManageUserResourceLimits.php: -------------------------------------------------------------------------------- 1 | createAnother(false), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /rust-umod/src/Facades/RustUMod.php: -------------------------------------------------------------------------------- 1 | >, total: int} getUModPlugins(int $page = 1, string $search = '') 13 | * @method static array getUModPlugin(string $pluginName) 14 | * 15 | * @see RustUModService 16 | */ 17 | class RustUMod extends Facade 18 | { 19 | protected static function getFacadeAccessor(): string 20 | { 21 | return RustUModService::class; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /generic-oidc-providers/src/Providers/GenericOIDCProvidersPluginProvider.php: -------------------------------------------------------------------------------- 1 | app->make(OAuthService::class); 15 | 16 | $providers = GenericOIDCProvider::all(); 17 | foreach ($providers as $provider) { 18 | $service->register(new GenericOIDCProviderSchema($provider)); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /billing/src/Filament/Admin/Resources/Products/Pages/CreateProduct.php: -------------------------------------------------------------------------------- 1 | getCreateFormAction()->formId('form'), 27 | ]; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /generic-oidc-providers/src/Filament/Admin/Resources/GenericOIDCProviders/Pages/ListGenericOIDCProviders.php: -------------------------------------------------------------------------------- 1 | hidden(fn () => GenericOIDCProvider::count() <= 0), 19 | ]; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /billing/src/Filament/App/Pages/Dashboard.php: -------------------------------------------------------------------------------- 1 | prices->count() <= 0) { 19 | continue; 20 | } 21 | 22 | $widgets[] = new WidgetConfiguration(ProductWidget::class, ['product' => $product]); 23 | } 24 | 25 | return $widgets; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /generic-oidc-providers/src/Filament/Admin/Resources/GenericOIDCProviders/Pages/EditGenericOIDCProvider.php: -------------------------------------------------------------------------------- 1 | getSaveFormAction()->formId('form'), 23 | ]; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /pirate-language/lang/pirate/server/dashboard.php: -------------------------------------------------------------------------------- 1 | 'Fleet o\' Ships', 5 | 'list' => 'Manifest o\' Ships', 6 | 'my_servers' => 'Me Own Vessels', 7 | 'other_servers' => 'Ships of Other Scallywags', 8 | 'all_servers' => 'The Whole Armada', 9 | 'empty_own' => 'Ye own no ships, landlubber!', 10 | 'empty_other' => 'Ye\'ve no rights to any other vessels!', 11 | 12 | 'status' => 'Where She Be Standin\'', 13 | 'server' => 'The Ship', 14 | 'resource' => 'Supplies', 15 | 'usage_limit' => 'Limit o\' Usage: :resource', 16 | 17 | 'cpu' => 'Captain\'s Cogitator (CPU)', 18 | 'memory' => 'Memory Chest', 19 | 'disk' => 'Cargo Bay', 20 | 'network' => 'Signal Ropes', 21 | 'none' => 'Nay', 22 | 'loading' => 'Hoistin\' the sails...', 23 | 24 | 'power_actions' => 'Ship Commands', 25 | ]; 26 | -------------------------------------------------------------------------------- /pirate-language/lang/pirate/server/database.php: -------------------------------------------------------------------------------- 1 | 'Vaults o\' Knowledge', 5 | 'create_database' => 'Forge a New Vault', 6 | 'limit' => 'Vault Limit Reached, Ye Greedy Dog!', 7 | 'viewing' => 'Peekin\' Inside: :database', 8 | 'host' => 'Harbor Master (Host)', 9 | 'database' => 'Treasure Vault', 10 | 'username' => 'Scallywag Name', 11 | 'password' => 'Secret Code', 12 | 'remote' => 'Distant Lands', 13 | 'created_at' => 'Buried On', 14 | 'name' => 'Name o\' the Vault', 15 | 'name_hint' => 'Leave blank an\' a name shall be summoned from the depths', 16 | 'connections_from' => 'Boardin\' From', 17 | 'max_connections' => 'Max Boarders', 18 | 'database_host' => 'Vault Keeper', 19 | 'database_host_select' => 'Pick Yer Vault Keeper', 20 | 'jdbc' => 'JDBC Map to the Treasure', 21 | ]; 22 | -------------------------------------------------------------------------------- /billing/database/migrations/002_create_customers_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 13 | $table->string('first_name'); 14 | $table->string('last_name'); 15 | $table->integer('balance')->default(0); 16 | $table->unsignedInteger('user_id'); 17 | $table->foreign('user_id')->references('id')->on('users')->cascadeOnDelete(); 18 | $table->timestamps(); 19 | }); 20 | } 21 | 22 | public function down(): void 23 | { 24 | Schema::dropIfExists('customers'); 25 | } 26 | }; 27 | -------------------------------------------------------------------------------- /player-counter/database/migrations/002_create_egg_game_query_table.php: -------------------------------------------------------------------------------- 1 | unsignedInteger('egg_id'); 13 | $table->foreign('egg_id')->references('id')->on('eggs')->cascadeOnDelete(); 14 | 15 | $table->unsignedInteger('game_query_id'); 16 | $table->foreign('game_query_id')->references('id')->on('game_queries')->cascadeOnDelete(); 17 | 18 | $table->unique('egg_id'); 19 | }); 20 | } 21 | 22 | public function down(): void 23 | { 24 | Schema::dropIfExists('egg_game_query'); 25 | } 26 | }; 27 | -------------------------------------------------------------------------------- /fluffy-theme/src/FluffyThemePlugin.php: -------------------------------------------------------------------------------- 1 | font('Finger Paint') 20 | ->colors([ 21 | 'danger' => Color::Rose, 22 | 'gray' => Color::generateV3Palette('#b974c3'), // Fuchsia but desaturated 23 | 'info' => Color::Violet, 24 | 'primary' => Color::Indigo, 25 | 'success' => Color::Teal, 26 | 'warning' => Color::Pink, 27 | ]); 28 | } 29 | 30 | public function boot(Panel $panel): void {} 31 | } 32 | -------------------------------------------------------------------------------- /player-counter/src/PlayerCounterPlugin.php: -------------------------------------------------------------------------------- 1 | getId())->title(); 18 | 19 | $panel->discoverResources(plugin_path($this->getId(), "src/Filament/$id/Resources"), "Boy132\\PlayerCounter\\Filament\\$id\\Resources"); 20 | $panel->discoverPages(plugin_path($this->getId(), "src/Filament/$id/Pages"), "Boy132\\PlayerCounter\\Filament\\$id\\Pages"); 21 | $panel->discoverWidgets(plugin_path($this->getId(), "src/Filament/$id/Widgets"), "Boy132\\PlayerCounter\\Filament\\$id\\Widgets"); 22 | } 23 | 24 | public function boot(Panel $panel): void {} 25 | } 26 | -------------------------------------------------------------------------------- /announcements/database/migrations/001_create_announcements_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 13 | $table->string('title'); 14 | $table->string('body')->nullable(); 15 | $table->string('type')->default('info'); 16 | $table->json('panels')->nullable(); 17 | $table->timestamp('valid_from')->nullable(); 18 | $table->timestamp('valid_to')->nullable(); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | public function down(): void 24 | { 25 | Schema::dropIfExists('announcements'); 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /billing/src/Console/Commands/CheckOrdersCommand.php: -------------------------------------------------------------------------------- 1 | count() < 1) { 19 | $this->line('No orders'); 20 | 21 | return 0; 22 | } 23 | 24 | $bar = $this->output->createProgressBar(count($orders)); 25 | foreach ($orders as $order) { 26 | $bar->clear(); 27 | 28 | $order->checkExpire(); 29 | 30 | $bar->advance(); 31 | $bar->display(); 32 | } 33 | 34 | $this->line(''); 35 | 36 | return 0; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /tickets/lang/en/tickets.php: -------------------------------------------------------------------------------- 1 | 'No tickets', 5 | 'ticket' => 'Ticket|Tickets', 6 | 'title' => 'Title', 7 | 'category' => 'Category', 8 | 'priority' => 'Priority', 9 | 'description' => 'Description', 10 | 'no_description' => 'No description', 11 | 'answered' => 'Answered', 12 | 'unanswered' => 'Unanswered', 13 | 'all' => 'All', 14 | 'answer_verb' => 'Answer', 15 | 'answer_noun' => 'Answer', 16 | 'server' => 'Server', 17 | 'owner' => 'Server Owner', 18 | 'created_at' => 'Created at', 19 | 'created_by' => 'Created by', 20 | 'unknown' => 'Unknown', 21 | 'assigned_to' => 'Assigned to', 22 | 'noone' => 'Noone', 23 | 'assign_to_me' => 'Assign to me', 24 | 'assigned_to_me' => 'Assigned to me', 25 | 26 | 'notifications' => [ 27 | 'answered' => 'Ticket answered', 28 | 'assigned_to_you' => 'Ticket assigned to you', 29 | ], 30 | ]; 31 | -------------------------------------------------------------------------------- /billing/src/Providers/BillingPluginProvider.php: -------------------------------------------------------------------------------- 1 | app->bind(StripeClient::class, fn () => new StripeClient(config('billing.secret'))); 16 | 17 | Role::registerCustomDefaultPermissions('customer'); 18 | Role::registerCustomModelIcon('customer', 'tabler-user-dollar'); 19 | 20 | Role::registerCustomDefaultPermissions('product'); 21 | Role::registerCustomModelIcon('product', 'tabler-package'); 22 | } 23 | 24 | public function boot(): void 25 | { 26 | Schedule::command(CheckOrdersCommand::class)->everyMinute()->withoutOverlapping(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /tickets/lang/de/tickets.php: -------------------------------------------------------------------------------- 1 | 'Keine Tickets', 5 | 'ticket' => 'Ticket|Tickets', 6 | 'title' => 'Titel', 7 | 'category' => 'Kategorie', 8 | 'priority' => 'Priorität', 9 | 'description' => 'Beschreibung', 10 | 'no_description' => 'Keine Beschreibung', 11 | 'answered' => 'Beantwortet', 12 | 'unanswered' => 'Unbeantwortet', 13 | 'all' => 'Alle', 14 | 'answer_verb' => 'Antworten', 15 | 'answer_noun' => 'Antwort', 16 | 'server' => 'Server', 17 | 'owner' => 'Server Besitzer', 18 | 'created_at' => 'Erstellt am', 19 | 'created_by' => 'Erstellt von', 20 | 'unknown' => 'Unbekannt', 21 | 'assigned_to' => 'Zugewiesen an', 22 | 'noone' => 'Niemand', 23 | 'assign_to_me' => 'Mir zuweisen', 24 | 'assigned_to_me' => 'Mir zugewiesene', 25 | 26 | 'notifications' => [ 27 | 'answered' => 'Ticket wurde beantwortet', 28 | 'assigned_to_you' => 'Ticket wurde dir zugewiesen', 29 | ], 30 | ]; 31 | -------------------------------------------------------------------------------- /user-creatable-servers/database/migrations/001_create_user_resource_limits_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 13 | $table->unsignedInteger('user_id')->unique(); 14 | $table->foreign('user_id')->references('id')->on('users')->cascadeOnDelete(); 15 | $table->unsignedInteger('cpu'); 16 | $table->unsignedInteger('memory'); 17 | $table->unsignedInteger('disk'); 18 | $table->unsignedInteger('server_limit')->nullable(); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | public function down(): void 24 | { 25 | Schema::dropIfExists('user_resource_limits'); 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /billing/src/Filament/Admin/Resources/Coupons/Pages/EditCoupon.php: -------------------------------------------------------------------------------- 1 | getSaveFormAction()->formId('form'), 24 | ]; 25 | } 26 | 27 | protected function mutateFormDataBeforeFill(array $data): array 28 | { 29 | $data['coupon_type'] = $data['amount_off'] ? CouponType::Amount : CouponType::Percentage; 30 | 31 | return $data; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /billing/src/Filament/Admin/Resources/Customers/Pages/EditCustomer.php: -------------------------------------------------------------------------------- 1 | getSaveFormAction()->formId('form'), 24 | ]; 25 | } 26 | 27 | public function getRelationManagers(): array 28 | { 29 | return [ 30 | OrderRelationManager::class, 31 | ]; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /minecraft-modrinth/src/Facades/MinecraftModrinth.php: -------------------------------------------------------------------------------- 1 | >, total_hits: int} getModrinthProjects(Server $server, int $page = 1, ?string $search = null) 15 | * @method static array getModrinthVersions(string $projectId, Server $server) 16 | * 17 | * @see MinecraftModrinthService 18 | */ 19 | class MinecraftModrinth extends Facade 20 | { 21 | protected static function getFacadeAccessor(): string 22 | { 23 | return MinecraftModrinthService::class; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /billing/database/migrations/001_create_coupons_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 13 | $table->string('stripe_coupon_id')->nullable(); 14 | $table->string('stripe_promotion_id')->nullable(); 15 | $table->string('name'); 16 | $table->string('code')->unique(); 17 | $table->integer('amount_off')->nullable(); 18 | $table->integer('percent_off')->nullable(); 19 | $table->integer('max_redemptions')->nullable(); 20 | $table->dateTime('redeem_by')->nullable(); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | public function down(): void 26 | { 27 | Schema::dropIfExists('coupons'); 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /legal-pages/src/Enums/LegalPageType.php: -------------------------------------------------------------------------------- 1 | name); 20 | } 21 | 22 | public function getLabel(): string 23 | { 24 | return trans('legal-pages::strings.' . $this->getId()); 25 | } 26 | 27 | public function getUrl(): string 28 | { 29 | return '/' . Str::slug($this->getId()); 30 | } 31 | 32 | /** @return class-string */ 33 | public function getClass(): string 34 | { 35 | return $this->value; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /player-counter/src/Enums/GameQueryType.php: -------------------------------------------------------------------------------- 1 | name)->headline(); 32 | } 33 | 34 | public function isMinecraft(): bool 35 | { 36 | return $this === self::MinecraftJava || $this === self::MinecraftBedrock; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /tickets/src/Enums/TicketCategory.php: -------------------------------------------------------------------------------- 1 | 'tabler-help-circle', 19 | self::Issue => 'tabler-exclamation-circle', 20 | self::Feedback => 'tabler-user-circle', 21 | }; 22 | } 23 | 24 | public function getColor(): string 25 | { 26 | return match ($this) { 27 | self::Question => 'primary', 28 | self::Issue => 'danger', 29 | self::Feedback => 'success', 30 | }; 31 | } 32 | 33 | public function getLabel(): string 34 | { 35 | return str($this->value)->headline(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /generic-oidc-providers/src/Filament/Admin/Resources/GenericOIDCProviders/Pages/CreateGenericOIDCProvider.php: -------------------------------------------------------------------------------- 1 | getCreateFormAction()->formId('form'), 24 | ]; 25 | } 26 | 27 | protected function mutateFormDataBeforeCreate(array $data): array 28 | { 29 | $data['id'] = Str::slug($data['id'], '_'); 30 | 31 | return $data; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /billing/src/Filament/Admin/Resources/Products/Pages/EditProduct.php: -------------------------------------------------------------------------------- 1 | getSaveFormAction()->formId('form'), 28 | ]; 29 | } 30 | 31 | public function getRelationManagers(): array 32 | { 33 | return [ 34 | PriceRelationManager::class, 35 | ]; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /player-counter/src/Providers/PlayerCounterPluginProvider.php: -------------------------------------------------------------------------------- 1 | $egg->hasOneThrough(GameQuery::class, EggGameQuery::class, 'egg_id', 'id', 'id', 'game_query_id')); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /billing/database/migrations/004_create_product_prices_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 14 | $table->string('stripe_id')->nullable(); 15 | $table->string('name'); 16 | $table->float('cost', 2); 17 | $table->string('interval_type')->default(PriceInterval::Month); 18 | $table->unsignedInteger('interval_value')->default(1); 19 | 20 | $table->unsignedInteger('product_id'); 21 | $table->foreign('product_id')->references('id')->on('products')->cascadeOnDelete(); 22 | 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | public function down(): void 28 | { 29 | Schema::dropIfExists('product_prices'); 30 | } 31 | }; 32 | -------------------------------------------------------------------------------- /subdomains/src/Providers/SubdomainsPluginProvider.php: -------------------------------------------------------------------------------- 1 | Http::acceptJson() 24 | ->withToken(config('subdomains.token')) 25 | ->timeout(5) 26 | ->connectTimeout(1) 27 | ->baseUrl('https://api.cloudflare.com/client/v4/') 28 | ->throw() 29 | ); 30 | 31 | Server::resolveRelationUsing('subdomains', fn (Server $server) => $server->hasMany(Subdomain::class, 'server_id', 'id')); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /subdomains/database/migrations/002_create_subdomains_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 13 | $table->string('name'); 14 | $table->string('record_type')->default('A'); 15 | $table->string('cloudflare_id')->nullable(); 16 | 17 | $table->unsignedInteger('domain_id'); 18 | $table->foreign('domain_id')->references('id')->on('cloudflare_domains')->cascadeOnDelete(); 19 | 20 | $table->unsignedInteger('allocation_id'); 21 | $table->foreign('allocation_id')->references('id')->on('allocations')->cascadeOnDelete(); 22 | 23 | $table->timestamps(); 24 | 25 | $table->unique(['name', 'domain_id']); 26 | }); 27 | } 28 | 29 | public function down(): void 30 | { 31 | Schema::dropIfExists('subdomains'); 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /billing/src/Enums/OrderStatus.php: -------------------------------------------------------------------------------- 1 | 'warning', 20 | self::Active => 'success', 21 | self::Expired => 'warning', 22 | self::Closed => 'danger', 23 | }; 24 | } 25 | 26 | public function getIcon(): string 27 | { 28 | return match ($this) { 29 | self::Pending => 'tabler-circle-dotted', 30 | self::Active => 'tabler-circle-check', 31 | self::Expired => 'tabler-clock-hour-4', 32 | self::Closed => 'tabler-circle-x', 33 | }; 34 | } 35 | 36 | public function getLabel(): string 37 | { 38 | return $this->name; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /tickets/src/Enums/TicketPriority.php: -------------------------------------------------------------------------------- 1 | 'tabler-chevron-down', 20 | self::Normal => 'tabler-menu', 21 | self::High => 'tabler-chevron-up', 22 | self::VeryHigh => 'tabler-chevrons-up', 23 | }; 24 | } 25 | 26 | public function getColor(): string 27 | { 28 | return match ($this) { 29 | self::Low => 'success', 30 | self::Normal => 'primary', 31 | self::High => 'warning', 32 | self::VeryHigh => 'danger', 33 | }; 34 | } 35 | 36 | public function getLabel(): string 37 | { 38 | return str($this->value)->headline(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /tickets/src/Filament/Components/Actions/AssignToMeAction.php: -------------------------------------------------------------------------------- 1 | authorize(fn (Ticket $ticket) => auth()->user()->can('update ticket', $ticket)); 21 | 22 | $this->hidden(fn (Ticket $ticket) => $ticket->assignedUser); 23 | 24 | $this->label(trans('tickets::tickets.assign_to_me')); 25 | 26 | $this->icon('tabler-user-share'); 27 | 28 | $this->color('primary'); 29 | 30 | $this->action(function (Ticket $ticket) { 31 | $ticket->assignTo(auth()->user()); 32 | 33 | Notification::make() 34 | ->title(trans('tickets::tickets.notifications.assigned_to_you')) 35 | ->success() 36 | ->send(); 37 | }); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /announcements/src/AnnouncementsPlugin.php: -------------------------------------------------------------------------------- 1 | getId())->title(); 20 | 21 | $panel->discoverResources(plugin_path($this->getId(), "src/Filament/$id/Resources"), "Boy132\\Announcements\\Filament\\$id\\Resources"); 22 | } 23 | 24 | public function boot(Panel $panel): void 25 | { 26 | foreach (Announcement::all() as $announcement) { 27 | if (!$announcement->shouldDisplay($panel)) { 28 | continue; 29 | } 30 | 31 | AlertBanner::make('announcement_' . $announcement->id) 32 | ->title($announcement->title) 33 | ->body($announcement->body) 34 | ->status($announcement->type) 35 | ->send(); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /billing/src/Models/Customer.php: -------------------------------------------------------------------------------- 1 | BelongsTo(User::class, 'user_id'); 33 | } 34 | 35 | public function orders(): HasMany 36 | { 37 | return $this->hasMany(Order::class, 'customer_id'); 38 | } 39 | 40 | public function getLabel(): string 41 | { 42 | return $this->first_name . ' ' . $this->last_name; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /generic-oidc-providers/database/migrations/001_create_generic_oidc_providers_table.php: -------------------------------------------------------------------------------- 1 | string('id')->primary(); 13 | $table->boolean('create_missing_users')->default(false); 14 | $table->boolean('link_missing_users')->default(false); 15 | $table->string('display_name'); 16 | $table->string('display_icon')->nullable(); 17 | $table->string('display_color', 6)->nullable(); 18 | $table->string('base_url'); 19 | $table->string('client_id'); 20 | $table->string('client_secret'); 21 | $table->boolean('verify_jwt')->default(false); 22 | $table->text('jwt_public_key')->nullable(); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | public function down(): void 28 | { 29 | Schema::dropIfExists('generic_oidc_providers'); 30 | } 31 | }; 32 | -------------------------------------------------------------------------------- /subdomains/src/Models/CloudflareDomain.php: -------------------------------------------------------------------------------- 1 | fetchCloudflareId(); 26 | }); 27 | } 28 | 29 | public function subdomains(): HasMany 30 | { 31 | return $this->hasMany(Subdomain::class, 'domain_id'); 32 | } 33 | 34 | public function fetchCloudflareId(): void 35 | { 36 | $response = Http::cloudflare()->get('zones', [ 37 | 'name' => $this->name, 38 | ])->json(); 39 | 40 | if ($response['success']) { 41 | $zones = $response['result']; 42 | 43 | if (count($zones) > 0) { 44 | $this->update([ 45 | 'cloudflare_id' => $zones[0]->id, 46 | ]); 47 | } 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /player-counter/database/Seeders/PlayerCounterSeeder.php: -------------------------------------------------------------------------------- 1 | 'minecraft']); 15 | $sourceQuery = GameQuery::firstOrCreate(['query_type' => 'source']); 16 | 17 | foreach (Egg::all() as $egg) { 18 | $tags = $egg->tags ?? []; 19 | 20 | if (in_array('minecraft', $tags)) { 21 | EggGameQuery::firstOrCreate([ 22 | 'egg_id' => $egg->id, 23 | ], [ 24 | 'game_query_id' => $minecraftQuery->id, 25 | ]); 26 | } elseif (in_array('source', $tags)) { 27 | EggGameQuery::firstOrCreate([ 28 | 'egg_id' => $egg->id, 29 | ], [ 30 | 'game_query_id' => $sourceQuery->id, 31 | ]); 32 | } 33 | } 34 | 35 | if ($this->command) { 36 | $this->command->info('Created game query types for minecraft and source'); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /tickets/database/migrations/001_create_tickets_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 13 | $table->string('title'); 14 | $table->string('category'); 15 | $table->string('priority'); 16 | $table->text('description')->nullable(); 17 | $table->boolean('is_answered')->default(false); 18 | $table->text('answer')->nullable(); 19 | $table->unsignedInteger('server_id'); 20 | $table->foreign('server_id')->references('id')->on('servers')->cascadeOnDelete(); 21 | $table->unsignedInteger('author_id'); 22 | $table->foreign('author_id')->references('id')->on('users')->nullOnDelete(); 23 | $table->unsignedInteger('assigned_user_id'); 24 | $table->foreign('assigned_user_id')->references('id')->on('users')->nullOnDelete(); 25 | $table->timestamps(); 26 | }); 27 | } 28 | 29 | public function down(): void 30 | { 31 | Schema::dropIfExists('tickets'); 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /legal-pages/src/LegalPagesPlugin.php: -------------------------------------------------------------------------------- 1 | getId())->title(); 20 | 21 | $panel->discoverPages(plugin_path($this->getId(), "src/Filament/$id/Pages"), "Boy132\\LegalPages\\Filament\\$id\\Pages"); 22 | } 23 | 24 | public function boot(Panel $panel): void {} 25 | 26 | public static function Save(LegalPageType|string $type, ?string $contents): bool 27 | { 28 | if ($type instanceof LegalPageType) { 29 | $type = $type->getId(); 30 | } 31 | 32 | $path = $type . '.md'; 33 | 34 | if (!$contents) { 35 | return Storage::delete($path); 36 | } 37 | 38 | return Storage::put($path, $contents); 39 | } 40 | 41 | public static function Load(LegalPageType|string $type): ?string 42 | { 43 | if ($type instanceof LegalPageType) { 44 | $type = $type->getId(); 45 | } 46 | 47 | return Storage::get($type . '.md'); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /pterodactyl-theme/src/PterodactylThemePlugin.php: -------------------------------------------------------------------------------- 1 | 'oklch(0.975 0.0046 258.32)', 18 | 100 => 'oklch(0.9286 0.00618 254.9897)', 19 | 200 => 'oklch(0.8575 0.013 247.98)', 20 | 300 => 'oklch(0.718 0.0216 249.92)', 21 | 400 => 'oklch(0.6173 0.0232 249.98)', 22 | 500 => 'oklch(0.5297 0.0264 250.09)', 23 | 600 => 'oklch(0.4779 0.0267 246.6)', 24 | 700 => 'oklch(0.413 0.0288 246.77)', 25 | 800 => 'oklch(0.3656 0.027449 246.8348)', 26 | 900 => 'oklch(0.2753 0.0228 248.67)', 27 | 950 => 'oklch(0.2484 0.0128 248.51)', 28 | ]; 29 | 30 | public function register(Panel $panel): void 31 | { 32 | $panel 33 | ->font('IBM Plex Sans') 34 | ->monoFont('system-ui') 35 | ->serifFont('sans-serif') 36 | ->colors([ 37 | 'gray' => self::PTERO_GRAY, 38 | 'primary' => Color::Blue, 39 | ]); 40 | } 41 | 42 | public function boot(Panel $panel): void {} 43 | } 44 | -------------------------------------------------------------------------------- /billing/database/migrations/005_create_orders_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 14 | $table->string('stripe_checkout_id')->nullable(); 15 | $table->string('stripe_payment_id')->nullable(); 16 | $table->string('status')->default(OrderStatus::Pending); 17 | $table->timestamp('expires_at')->nullable(); 18 | 19 | $table->unsignedInteger('customer_id'); 20 | $table->foreign('customer_id')->references('id')->on('customers')->cascadeOnDelete(); 21 | 22 | $table->unsignedInteger('product_price_id'); 23 | $table->foreign('product_price_id')->references('id')->on('product_prices')->cascadeOnDelete(); 24 | 25 | $table->unsignedInteger('server_id')->nullable(); 26 | $table->foreign('server_id')->references('id')->on('servers')->nullOnDelete(); 27 | 28 | $table->timestamps(); 29 | }); 30 | } 31 | 32 | public function down(): void 33 | { 34 | Schema::dropIfExists('orders'); 35 | } 36 | }; 37 | -------------------------------------------------------------------------------- /billing/database/migrations/003_create_products_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 13 | $table->string('stripe_id')->nullable(); 14 | $table->string('name'); 15 | $table->text('description'); 16 | $table->unsignedInteger('cpu')->default(0); 17 | $table->unsignedInteger('memory')->default(0); 18 | $table->unsignedInteger('disk')->default(0); 19 | $table->unsignedInteger('swap')->default(0); 20 | $table->json('ports'); 21 | $table->json('tags'); 22 | $table->unsignedInteger('allocation_limit')->default(0); 23 | $table->unsignedInteger('database_limit')->default(0); 24 | $table->unsignedInteger('backup_limit')->default(0); 25 | 26 | $table->unsignedInteger('egg_id'); 27 | $table->foreign('egg_id')->references('id')->on('eggs')->cascadeOnDelete(); 28 | 29 | $table->timestamps(); 30 | }); 31 | } 32 | 33 | public function down(): void 34 | { 35 | Schema::dropIfExists('products'); 36 | } 37 | }; 38 | -------------------------------------------------------------------------------- /tickets/src/Filament/Components/Actions/AnswerAction.php: -------------------------------------------------------------------------------- 1 | authorize(fn (Ticket $ticket) => auth()->user()->can('update ticket', $ticket)); 22 | 23 | $this->hidden(fn (Ticket $ticket) => $ticket->is_answered || $ticket->assigned_user_id !== auth()->user()->id); 24 | 25 | $this->label(trans('tickets::tickets.answer_verb')); 26 | 27 | $this->icon('tabler-edit'); 28 | 29 | $this->color('primary'); 30 | 31 | $this->schema([ 32 | MarkdownEditor::make('answer') 33 | ->required() 34 | ->hiddenLabel(), 35 | ]); 36 | 37 | $this->action(function (Ticket $ticket, array $data) { 38 | $ticket->answer($data['answer']); 39 | 40 | Notification::make() 41 | ->title(trans('tickets::tickets.notifications.answered')) 42 | ->success() 43 | ->send(); 44 | }); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /generic-oidc-providers/src/Models/GenericOIDCProvider.php: -------------------------------------------------------------------------------- 1 | 'bool', 44 | 'link_missing_users' => 'bool', 45 | 'client_id' => 'encrypted', 46 | 'client_secret' => 'encrypted', 47 | 'verify_jwt' => 'bool', 48 | ]; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /announcements/src/Models/Announcement.php: -------------------------------------------------------------------------------- 1 | '[]', 33 | ]; 34 | 35 | protected function casts(): array 36 | { 37 | return [ 38 | 'panels' => 'array', 39 | ]; 40 | } 41 | 42 | public function shouldDisplay(Panel $panel): bool 43 | { 44 | if (!empty($this->panels) && !in_array($panel->getId(), $this->panels)) { 45 | return false; 46 | } 47 | 48 | if (!empty($this->valid_from) && now() < $this->valid_from) { 49 | return false; 50 | } 51 | 52 | if (!empty($this->valid_to) && now() > $this->valid_to) { 53 | return false; 54 | } 55 | 56 | return true; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /player-counter/lang/en/query.php: -------------------------------------------------------------------------------- 1 | 'No Game Queries', 5 | 'query' => 'Game Query|Game Queries', 6 | 'type' => 'Type', 7 | 'port_offset' => 'Query Port Offset', 8 | 'no_offset' => 'No Offset', 9 | 'eggs' => 'Eggs', 10 | 'no_eggs' => 'No Eggs', 11 | 'hostname' => 'Hostname', 12 | 'players' => 'Players', 13 | 'map' => 'Map', 14 | 'unknown' => 'Unknown', 15 | 16 | 'whitelisted' => 'Whitelisted', 17 | 'add_to_whitelist' => 'Add to whitelist', 18 | 'remove_from_whitelist' => 'Remove from whitelist', 19 | 20 | 'op' => 'OP', 21 | 'add_to_ops' => 'Add to OPs', 22 | 'remove_from_ops' => 'Remove from OPs', 23 | 24 | 'table' => [ 25 | 'no_players' => 'No players found', 26 | 'no_players_description' => 'Either no players are online or query is disabled on this server', 27 | 'server_offline' => 'Server is offline', 28 | ], 29 | 30 | 'notifications' => [ 31 | 'player_kicked' => 'Player kicked from server', 32 | 'player_kick_failed' => 'Could not kick player', 33 | 34 | 'player_whitelist_add' => 'Player added to whitelist', 35 | 'player_whitelist_remove' => 'Player removed from whitelist', 36 | 'player_whitelist_failed' => 'Could not change whitelist', 37 | 38 | 'player_op' => 'Player added to OPs', 39 | 'player_deop' => 'Player removed from OPs', 40 | 'player_op_failed' => 'Could not change OPs', 41 | ], 42 | ]; 43 | -------------------------------------------------------------------------------- /tawkto-widget/src/TawktoWidgetPlugin.php: -------------------------------------------------------------------------------- 1 | label('Provider ID') 30 | ->required() 31 | ->default(fn () => config('tawkto-widget.provider_id')), 32 | TextInput::make('widget_id') 33 | ->label('Widget ID') 34 | ->required() 35 | ->default(fn () => config('tawkto-widget.widget_id')), 36 | ]; 37 | } 38 | 39 | public function saveSettings(array $data): void 40 | { 41 | $this->writeToEnvironment([ 42 | 'TAWKTO_PROVIDER_ID' => $data['provider_id'], 43 | 'TAWKTO_WIDGET_ID' => $data['widget_id'], 44 | ]); 45 | 46 | Notification::make() 47 | ->title('Settings saved') 48 | ->success() 49 | ->send(); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /billing/src/Filament/Admin/Resources/Orders/Pages/ListOrders.php: -------------------------------------------------------------------------------- 1 | label('Create Order') 22 | ->createAnother(false), 23 | ]; 24 | } 25 | 26 | public function getDefaultActiveTab(): string 27 | { 28 | return OrderStatus::Active->value; 29 | } 30 | 31 | public function getTabs(): array 32 | { 33 | $tabs = []; 34 | 35 | foreach (OrderStatus::cases() as $orderStatus) { 36 | $tabs[$orderStatus->value] = Tab::make($orderStatus->getLabel()) 37 | ->modifyQueryUsing(fn (Builder $query) => $query->where('status', $orderStatus->value)) 38 | ->badge(fn () => Order::where('status', $orderStatus->value)->count()) 39 | ->icon(fn () => $orderStatus->getIcon()); 40 | } 41 | 42 | $tabs['all'] = Tab::make('All')->badge(fn () => Order::count()); 43 | 44 | return $tabs; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /pirate-language/lang/pirate/server/console.php: -------------------------------------------------------------------------------- 1 | 'Speak\'n Tube', 5 | 'command' => 'Type yer orders here...', 6 | 'command_blocked' => 'Ship\'s Dead in the Water...', 7 | 'command_blocked_title' => 'Can\'t shout orders when the ship be sinkin\'!', 8 | 'open_in_admin' => 'Board as Cap\'n', 9 | 'power_actions' => [ 10 | 'start' => 'Hoist the Sails', 11 | 'stop' => 'Drop Anchor', 12 | 'restart' => 'Re-hoist the Colors', 13 | 'kill' => 'Sink Her!', 14 | 'kill_tooltip' => 'This might send yer data to Davy Jones\' locker!', 15 | ], 16 | 'labels' => [ 17 | 'cpu' => 'Thinkin\' Box (CPU)', 18 | 'memory' => 'Rum Storage', 19 | 'network' => 'Spyglass (Network)', 20 | 'disk' => 'Cargo Hold (Disk)', 21 | 'name' => 'Ship\'s Name', 22 | 'status' => 'Current State o\' the Ship', 23 | 'address' => 'Where She Be Docked', 24 | 'unavailable' => 'Nowhere to be Found', 25 | ], 26 | 'status' => [ 27 | 'created' => 'Forged in the Shipwright\'s Forge', 28 | 'starting' => 'Hoistin\' the Anchor', 29 | 'running' => 'Sailin\' Full Speed', 30 | 'restarting' => 'Turnin\' the Ship ‘Round', 31 | 'exited' => 'Jumped Overboard', 32 | 'paused' => 'Nappin\' in a Hammock', 33 | 'dead' => 'Lost to the Deep', 34 | 'removing' => 'Scuttlin\' the Wreck', 35 | 'stopping' => 'Droppin\' Anchor', 36 | 'offline' => 'Below the Waves', 37 | 'missing' => 'Vanished in a Fog', 38 | ], 39 | ]; 40 | -------------------------------------------------------------------------------- /user-creatable-servers/src/Filament/App/Widgets/UserResourceLimitsOverview.php: -------------------------------------------------------------------------------- 1 | user()->id)->first(); 16 | $userServers = auth()->user()->servers; 17 | 18 | $suffix = config('panel.use_binary_prefix') ? ' MiB' : ' MB'; 19 | 20 | $cpu = $userServers->sum('cpu') . '% / ' . ($userResourceLimits->cpu > 0 ? "{$userResourceLimits->cpu}%" : '∞'); 21 | $memory = $userServers->sum('memory') . "{$suffix} / " . ($userResourceLimits->memory > 0 ? "{$userResourceLimits->memory}{$suffix}" : '∞'); 22 | $disk = $userServers->sum('disk') . "{$suffix} / " . ($userResourceLimits->disk > 0 ? "{$userResourceLimits->disk}{$suffix}" : '∞'); 23 | 24 | return [ 25 | Stat::make(trans('user-creatable-servers::strings.cpu'), $cpu), 26 | Stat::make(trans('user-creatable-servers::strings.memory'), $memory), 27 | Stat::make(trans('user-creatable-servers::strings.disk'), $disk), 28 | ]; 29 | } 30 | 31 | public static function canView(): bool 32 | { 33 | return UserResourceLimits::where('user_id', auth()->user()->id)->exists(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /user-creatable-servers/src/Providers/UserCreatableServersPluginProvider.php: -------------------------------------------------------------------------------- 1 | $user->belongsTo(UserResourceLimits::class, 'id', 'user_id')); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /minecraft-modrinth/src/MinecraftModrinthPlugin.php: -------------------------------------------------------------------------------- 1 | getId())->title(); 24 | 25 | $panel->discoverPages(plugin_path($this->getId(), "src/Filament/$id/Pages"), "Boy132\\MinecraftModrinth\\Filament\\$id\\Pages"); 26 | } 27 | 28 | public function boot(Panel $panel): void {} 29 | 30 | public function getSettingsForm(): array 31 | { 32 | return [ 33 | TextInput::make('latest_minecraft_version') 34 | ->label('Latest Minecraft Version') 35 | ->required() 36 | ->default(fn () => config('minecraft-modrinth.latest_minecraft_version', '1.21.11')), 37 | ]; 38 | } 39 | 40 | public function saveSettings(array $data): void 41 | { 42 | $this->writeToEnvironment([ 43 | 'LATEST_MINECRAFT_VERSION' => $data['latest_minecraft_version'], 44 | ]); 45 | 46 | Notification::make() 47 | ->title('Settings saved') 48 | ->success() 49 | ->send(); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /subdomains/src/SubdomainsPlugin.php: -------------------------------------------------------------------------------- 1 | getId())->title(); 24 | 25 | $panel->discoverResources(plugin_path($this->getId(), "src/Filament/$id/Resources"), "Boy132\\Subdomains\\Filament\\$id\\Resources"); 26 | $panel->discoverPages(plugin_path($this->getId(), "src/Filament/$id/Pages"), "Boy132\\Subdomains\\Filament\\$id\\Pages"); 27 | } 28 | 29 | public function boot(Panel $panel): void {} 30 | 31 | public function getSettingsForm(): array 32 | { 33 | return [ 34 | TextInput::make('token') 35 | ->label('Cloudflare API Token') 36 | ->required() 37 | ->default(fn () => config('subdomains.token')), 38 | ]; 39 | } 40 | 41 | public function saveSettings(array $data): void 42 | { 43 | $this->writeToEnvironment([ 44 | 'CLOUDFLARE_TOKEN' => $data['token'], 45 | ]); 46 | 47 | Notification::make() 48 | ->title('Settings saved') 49 | ->success() 50 | ->send(); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /player-counter/src/Filament/Server/Widgets/ServerPlayerWidget.php: -------------------------------------------------------------------------------- 1 | isInConflictState() && $server->allocation && $server->egg->gameQuery()->exists() && !$server->retrieveStatus()->isOffline(); 21 | } 22 | 23 | protected function getStats(): array 24 | { 25 | /** @var Server $server */ 26 | $server = Filament::getTenant(); 27 | 28 | /** @var ?GameQuery $gameQuery */ 29 | $gameQuery = $server->egg->gameQuery; 30 | 31 | if (!$gameQuery) { 32 | return []; 33 | } 34 | 35 | $data = $gameQuery->runQuery($server->allocation); 36 | 37 | return [ 38 | SmallStatBlock::make(trans('player-counter::query.hostname'), $data['gq_hostname'] ?? trans('player-counter::query.unknown')), 39 | SmallStatBlock::make(trans('player-counter::query.players'), ($data['gq_numplayers'] ?? '?') . ' / ' . ($data['gq_maxplayers'] ?? '?')), 40 | SmallStatBlock::make(trans('player-counter::query.map'), $data['gq_mapname'] ?? trans('player-counter::query.unknown')), 41 | ]; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /tawkto-widget/src/Providers/TawktoWidgetPluginProvider.php: -------------------------------------------------------------------------------- 1 | Blade::render(<<<'HTML' 21 | 22 | 33 | 34 | HTML, [ 35 | 'providerId' => $providerId, 36 | 'widgetId' => $widgetId, 37 | ]) 38 | ); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /legal-pages/src/Providers/LegalPagesPluginProvider.php: -------------------------------------------------------------------------------- 1 | routes(function () { 18 | foreach (LegalPageType::cases() as $legalPageType) { 19 | Route::get($legalPageType->getId(), $legalPageType->getClass())->name($legalPageType->getId())->withoutMiddleware(['auth']); 20 | } 21 | }); 22 | 23 | $footer = null; 24 | 25 | foreach (LegalPageType::cases() as $legalPageType) { 26 | $content = LegalPagesPlugin::Load($legalPageType); 27 | 28 | if ($content) { 29 | $label = $legalPageType->getLabel(); 30 | $url = $legalPageType->getUrl(); 31 | 32 | if (!$footer) { 33 | $footer = "$label"; 34 | } else { 35 | $footer = "$footer | $label"; 36 | } 37 | } 38 | } 39 | 40 | if ($footer) { 41 | FilamentView::registerRenderHook(CustomRenderHooks::FooterEnd->value, fn () => Blade::render("
$footer
")); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /snowflakes/src/Providers/SnowflakesPluginProvider.php: -------------------------------------------------------------------------------- 1 | Blade::render(<<<'HTML' 24 | 36 | 37 | HTML, [ 38 | 'enabled' => $enabled, 39 | 'size' => $size, 40 | 'speed' => $speed, 41 | 'opacity' => $opacity, 42 | 'density' => $density, 43 | 'quality' => $quality, 44 | ]) 45 | ); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /pirate-language/lang/pirate/admin/plugin.php: -------------------------------------------------------------------------------- 1 | 'Add-ons', 5 | 'model_label' => 'Add-on', 6 | 'model_label_plural' => 'Add-ons', 7 | 8 | 'name' => 'Name o\' the Treasure', 9 | 'update_available' => 'Thar be an update fer this here add-on!', 10 | 'author' => 'Scallywag Who Made It', 11 | 'version' => 'Version o\' the Booty', 12 | 'category' => 'Type o\' Loot', 13 | 'status' => 'State o\' the Booty', 14 | 'settings' => 'Ship Settin\'s', 15 | 'install' => 'Hoist It Aboard', 16 | 'update' => 'Refit', 17 | 'enable' => 'Raise the Sails', 18 | 'disable' => 'Drop Anchor', 19 | 'import' => 'Smuggle In', 20 | 'no_plugins' => 'Nay Add-ons in Sight', 21 | 'from_file' => 'From the Captain\'s Log', 22 | 'from_url' => 'From the Sea o\' URLs', 23 | 'all' => 'All Hands', 24 | 25 | 'status_enum' => [ 26 | 'not_installed' => 'Ain\'t Been Hoisted Yet', 27 | 'disabled' => 'Anchor Be Dropped', 28 | 'enabled' => 'Sails Be Raised', 29 | 'errored' => 'Cursed with Errors', 30 | 'incompatible' => 'Don\'t Belong on This Ship', 31 | ], 32 | 33 | 'category_enum' => [ 34 | 'plugin' => 'Trinket', 35 | 'theme' => 'Colors o\' the Ship', 36 | 'language' => 'Tongue o\' the Seas', 37 | ], 38 | 39 | 'notifications' => [ 40 | 'installed' => 'Add-on be hoisted aboard!', 41 | 'updated' => 'Add-on\'s been given a fresh coat o\' paint!', 42 | 'enabled' => 'Add-on be awake and ready, yarrr!', 43 | 'disabled' => 'Add-on be sleepin\' in the brig.', 44 | 'downloaded' => 'Add-on plundered from the net!', 45 | 'download_failed' => 'Blast it! Couldn\'t snatch the add-on!', 46 | ], 47 | ]; 48 | -------------------------------------------------------------------------------- /legal-pages/src/Filament/App/Pages/BaseLegalPage.php: -------------------------------------------------------------------------------- 1 | */ 20 | public array $data = []; 21 | 22 | protected string $view = 'legal-pages::base-page'; 23 | 24 | protected ?string $content = null; 25 | 26 | public function getTitle(): string 27 | { 28 | return $this->getPageType()->getLabel(); 29 | } 30 | 31 | public function getMaxContentWidth(): Width|string 32 | { 33 | return Width::SevenExtraLarge; 34 | } 35 | 36 | public function mount(): void 37 | { 38 | $this->content = LegalPagesPlugin::Load($this->getPageType()); 39 | 40 | abort_if(!$this->content, 404); 41 | } 42 | 43 | /** 44 | * @return Component[] 45 | * 46 | * @throws Exception 47 | */ 48 | protected function getFormSchema(): array 49 | { 50 | return [ 51 | TextEntry::make('content') 52 | ->hiddenLabel() 53 | ->markdown() 54 | ->state(fn () => $this->content), 55 | ]; 56 | } 57 | 58 | protected function getFormStatePath(): ?string 59 | { 60 | return 'data'; 61 | } 62 | 63 | abstract public function getPageType(): LegalPageType; 64 | } 65 | -------------------------------------------------------------------------------- /tickets/src/Filament/Server/Resources/Tickets/Pages/ManageTickets.php: -------------------------------------------------------------------------------- 1 | createAnother(false) 22 | ->using(function (array $data) { 23 | $data['server_id'] ??= Filament::getTenant()->getKey(); 24 | $data['author_id'] ??= auth()->user()->id; 25 | 26 | return Ticket::create($data); 27 | }), 28 | ]; 29 | } 30 | 31 | public function getTabs(): array 32 | { 33 | return [ 34 | 'unanswered' => Tab::make(trans('tickets::tickets.unanswered')) 35 | ->modifyQueryUsing(fn (Builder $query) => $query->where('is_answered', false)) 36 | ->badge(fn () => Ticket::where('server_id', Filament::getTenant()->getKey())->where('is_answered', false)->count()), 37 | 38 | 'answered' => Tab::make(trans('tickets::tickets.answered')) 39 | ->modifyQueryUsing(fn (Builder $query) => $query->where('is_answered', true)) 40 | ->badge(fn () => Ticket::where('server_id', Filament::getTenant()->getKey())->where('is_answered', true)->count()), 41 | ]; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /player-counter/src/Models/GameQuery.php: -------------------------------------------------------------------------------- 1 | null, 30 | ]; 31 | 32 | protected function casts(): array 33 | { 34 | return [ 35 | 'query_type' => GameQueryType::class, 36 | ]; 37 | } 38 | 39 | public function eggs(): BelongsToMany 40 | { 41 | return $this->belongsToMany(Egg::class); 42 | } 43 | 44 | /** @return array */ 45 | public function runQuery(Allocation $allocation): array 46 | { 47 | $ip = is_ipv6($allocation->ip) ? '[' . $allocation->ip . ']' : $allocation->ip; 48 | $port = $allocation->port + ($this->query_port_offset ?? 0); 49 | $host = $ip . ':' . $port; 50 | 51 | try { 52 | $gameQ = new GameQ(); 53 | 54 | $gameQ->addServer([ 55 | 'type' => $this->query_type->value, 56 | 'host' => $host, 57 | ]); 58 | 59 | $gameQ->setOption('debug', config('app.debug')); 60 | 61 | return $gameQ->process()[$host] ?? []; 62 | } catch (Exception $exception) { 63 | report($exception); 64 | } 65 | 66 | return []; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /billing/src/Http/Controllers/Api/CheckoutController.php: -------------------------------------------------------------------------------- 1 | get('session_id'); 24 | 25 | if ($sessionId === null) { 26 | return redirect(Filament::getPanel('app')->getUrl()); 27 | } 28 | 29 | $session = $this->stripeClient->checkout->sessions->retrieve($sessionId); 30 | 31 | if ($session->payment_status === Session::PAYMENT_STATUS_UNPAID) { 32 | return redirect(ListOrders::getUrl(panel: 'app')); 33 | } 34 | 35 | /** @var ?Order $order */ 36 | $order = Order::where('stripe_checkout_id', $session->id)->first(); 37 | 38 | if (!$order) { 39 | return redirect(ListOrders::getUrl(panel: 'app')); 40 | } 41 | 42 | $order->activate($session->payment_intent); 43 | $order->refresh(); 44 | 45 | return redirect(Console::getUrl(panel: 'server', tenant: $order->server)); 46 | } 47 | 48 | public function cancel(Request $request): RedirectResponse 49 | { 50 | $sessionId = $request->get('session_id'); 51 | 52 | if ($sessionId) { 53 | /** @var ?Order $order */ 54 | $order = Order::where('stripe_checkout_id', $sessionId)->first(); 55 | $order?->close(); 56 | } 57 | 58 | return redirect(ListOrders::getUrl(panel: 'app')); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /tickets/src/Filament/Admin/Resources/Tickets/Pages/ManageTickets.php: -------------------------------------------------------------------------------- 1 | createAnother(false) 22 | ->using(function (array $data) { 23 | $data['server_id'] ??= Filament::getTenant()->getKey(); 24 | $data['author_id'] ??= auth()->user()->id; 25 | 26 | return Ticket::create($data); 27 | }), 28 | ]; 29 | } 30 | 31 | public function getTabs(): array 32 | { 33 | return [ 34 | 'my' => Tab::make(trans('tickets::tickets.assigned_to_me')) 35 | ->modifyQueryUsing(fn (Builder $query) => $query->where('is_answered', false)->where('assigned_user_id', auth()->user()->id)) 36 | ->badge(fn () => Ticket::where('is_answered', false)->where('assigned_user_id', auth()->user()->id)->count()), 37 | 38 | 'unanswered' => Tab::make(trans('tickets::tickets.unanswered')) 39 | ->modifyQueryUsing(fn (Builder $query) => $query->where('is_answered', false)) 40 | ->badge(fn () => Ticket::where('is_answered', false)->count()), 41 | 42 | 'answered' => Tab::make(trans('tickets::tickets.answered')) 43 | ->modifyQueryUsing(fn (Builder $query) => $query->where('is_answered', true)) 44 | ->badge(fn () => Ticket::where('is_answered', true)->count()), 45 | 46 | 'all' => Tab::make(trans('tickets::tickets.all')) 47 | ->badge(fn () => Ticket::count()), 48 | ]; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /pirate-language/lang/pirate/admin/dashboard.php: -------------------------------------------------------------------------------- 1 | 'Welcome aboard the Pelican!', 5 | 'version' => 'Version: :version', 6 | 'advanced' => 'High Seas', 7 | 'server' => 'Ship', 8 | 'user' => 'Crewmate', 9 | 'sections' => [ 10 | 'intro-developers' => [ 11 | 'heading' => 'Message in a Bottle fer Developers', 12 | 'content' => 'Thanks fer testin\' the development ship, matey!', 13 | 'extra_note' => 'If ye run aground, report it on the GitHub seas.', 14 | 'button_issues' => 'Raise a Complaint', 15 | 'button_features' => 'Parley Features', 16 | ], 17 | 'intro-update-available' => [ 18 | 'heading' => 'New booty be available!', 19 | 'content' => ':latestVersion be ready fer ye! Read the scrolls to upgrade yer Panel.', 20 | ], 21 | 'intro-no-update' => [ 22 | 'heading' => 'Yer Panel be shipshape', 23 | 'content' => 'Ye be sailin\' with :version. Yer panel be all up-to-date, savvy!', 24 | ], 25 | 'intro-first-node' => [ 26 | 'heading' => 'No Nodes Spotted on the Horizon', 27 | 'content' => "Looks like ye ain't got any Nodes charted yet, but fret not — just click the action button to craft yer first one, matey!", 28 | 'extra_note' => 'If ye be runnin\' into troubles, send word to GitHub.', 29 | 'button_label' => 'Forge yer First Node in Pelican', 30 | ], 31 | 'intro-support' => [ 32 | 'heading' => 'Lend a Hand to Pelican', 33 | 'content' => 'We be grateful fer yer help, mates! This ship sails thanks to ye, our crew, and all hands who support us!', 34 | 'extra_note' => 'Any aid from landlubbers or seadogs is welcome!', 35 | 'button_translate' => 'Help Translate the Tongue', 36 | 'button_donate' => 'Send Some Booty', 37 | ], 38 | 'intro-help' => [ 39 | 'heading' => 'Need a Hand, Matey?', 40 | 'content' => 'Start with the scrolls! Still lost? Head over to our Discord port for aid!', 41 | 'button_docs' => 'Read the Scrolls', 42 | ], 43 | ], 44 | ]; 45 | -------------------------------------------------------------------------------- /pirate-language/lang/pirate/server/setting.php: -------------------------------------------------------------------------------- 1 | 'Ship Settin\'s', 5 | 'server_info' => [ 6 | 'title' => 'Ship\'s Scrolls', 7 | 'information' => 'The Details', 8 | 'name' => 'Name o\' the Ship', 9 | 'notification_name' => 'Ship\'s Name Hoisted High', 10 | 'description' => 'What the Ship Be About', 11 | 'notification_description' => 'New Tale for the Ship Written', 12 | 'failed' => 'Aye, It Failed', 13 | 'uuid' => 'Ship\'s Secret Mark (UUID)', 14 | 'id' => 'Ship ID', 15 | 16 | 'limits' => [ 17 | 'title' => 'What Ye Be Allowed', 18 | 'unlimited' => 'No Shackles', 19 | 'of' => 'of', 20 | 'cpu' => 'Thinkin\' Power (CPU)', 21 | 'memory' => 'Mindspace (Memory)', 22 | 'disk' => 'Cargo Hold (Disk Space)', 23 | 'backups' => 'Stashed Loot (Backups)', 24 | 'databases' => 'Tomes o\' Knowledge (Databases)', 25 | 'allocations' => 'Dockin\' Spots (Allocations)', 26 | 'no_allocations' => 'No More Dockin\' Spots for This Vessel', 27 | ], 28 | ], 29 | 30 | 'node_info' => [ 31 | 'title' => 'Dock Info', 32 | 'name' => 'Name o\' the Dock', 33 | 'sftp' => [ 34 | 'title' => 'SFTP Ship Ropes', 35 | 'connection' => 'Moorin\' Line (Connection)', 36 | 'action' => 'Latch Onto SFTP', 37 | 'username' => 'Deckhand\'s Name', 38 | 'password' => 'Secret Code', 39 | 'password_body' => 'Yer SFTP pass be the same one ye use to board this here panel.', 40 | ], 41 | ], 42 | 43 | 'reinstall' => [ 44 | 'title' => 'Rig Her Again (Reinstall)', 45 | 'body' => 'Riggin\' the ship anew will halt her sails and run the script that once gave her life.', 46 | 'body2' => 'Mind ye, some maps or loot might be tossed o\'erboard. Back ‘em up first!', 47 | 'action' => 'Rig Her Again', 48 | 'modal' => 'Ye sure ye want to rig the ship anew?', 49 | 'modal_description' => 'Beware! Some loot might be lost or changed. Best make a backup first.', 50 | 'yes' => 'Aye, Rig Her Again!', 51 | 'notification_start' => 'She Be Gettin\' Rigged', 52 | 'notification_fail' => 'Re-Riggin\' Went Belly-Up', 53 | ], 54 | ]; 55 | -------------------------------------------------------------------------------- /pirate-language/lang/pirate/server/backup.php: -------------------------------------------------------------------------------- 1 | 'Booty Logs', 5 | 'empty' => 'No Booty in the Hold', 6 | 'size' => 'Cargo Weight', 7 | 'created_at' => 'Stashed On', 8 | 'status' => 'Condition o\' the Booty', 9 | 'is_locked' => 'Be It Locked?', 10 | 'backup_status' => [ 11 | 'in_progress' => 'Still Bein\' Buried', 12 | 'successful' => 'Buried Treasure Found', 13 | 'failed' => 'The Buryin\' Failed', 14 | ], 15 | 'actions' => [ 16 | 'create' => [ 17 | 'title' => 'Stash New Booty', 18 | 'limit' => 'Booty Hold Be Full', 19 | 'created' => ':name be buried deep', 20 | 'notification_success' => 'Booty Buried Successfully', 21 | 'notification_fail' => 'Couldn\'t Bury the Booty', 22 | 'name' => 'Name o\' the Booty', 23 | 'ignored' => 'Files & Folders Left Behind', 24 | 'locked' => 'Chained Down?', 25 | 'lock_helper' => 'Stops this treasure from bein\' tossed until ye unchain it yerself.', 26 | ], 27 | 'lock' => [ 28 | 'lock' => 'Chain It', 29 | 'unlock' => 'Unchain It', 30 | ], 31 | 'download' => 'Snag It', 32 | 'restore' => [ 33 | 'title' => 'Raise the Booty', 34 | 'helper' => 'Yer ship\'ll be stopped cold. No controls, no charts, no new stashin\' until the booty be back in place.', 35 | 'delete_all' => 'Scuttle all files before raisin\' the treasure?', 36 | 'notification_started' => 'Booty Be Comin\' Back', 37 | 'notification_success' => 'Booty Raised from the Depths', 38 | 'notification_fail' => 'Couldn\'t Raise the Booty', 39 | 'notification_fail_body_1' => 'This vessel ain\'t ready to raise no treasure just yet.', 40 | 'notification_fail_body_2' => 'This booty can\'t be raised now — it\'s either lost or unfinished.', 41 | ], 42 | 'delete' => [ 43 | 'title' => 'Sink the Booty', 44 | 'description' => 'Ye sure ye want to sink :backup to the deep?', 45 | 'notification_success' => 'Booty Sunk to the Briny Deep', 46 | 'notification_fail' => 'Couldn\'t Sink the Booty', 47 | 'notification_fail_body' => 'Lost contact with the crow\'s nest. Try again later.', 48 | ], 49 | ], 50 | ]; 51 | -------------------------------------------------------------------------------- /rust-umod/src/Services/RustUModService.php: -------------------------------------------------------------------------------- 1 | variables()->where('env_variable', 'FRAMEWORK')->first()?->server_value; 14 | } 15 | 16 | public function isRustServer(Server $server): bool 17 | { 18 | $framework = $this->getRustModdingFramework($server); 19 | 20 | if (!in_array($framework, ['oxide', 'umod'])) { 21 | return false; 22 | } 23 | 24 | $features = $server->egg->features ?? []; 25 | $tags = $server->egg->tags ?? []; 26 | 27 | return in_array('umod_plugins', $features) || in_array('rust', $tags); 28 | } 29 | 30 | /** @return array{data: array>, total: int} */ 31 | public function getUModPlugins(int $page = 1, string $search = ''): array 32 | { 33 | return cache()->remember("umod_plugins:$page:$search", now()->addMinutes(30), function () use ($search, $page) { 34 | try { 35 | return Http::asJson() 36 | ->timeout(5) 37 | ->connectTimeout(5) 38 | ->throw() 39 | ->get("https://umod.org/plugins/search.json?page=$page&query=$search&sort=downloads&sortdir=desc&categories=universal%2Crust") 40 | ->json(); 41 | } catch (Exception $exception) { 42 | report($exception); 43 | 44 | return [ 45 | 'data' => [], 46 | 'total' => 0, 47 | ]; 48 | } 49 | }); 50 | } 51 | 52 | /** @return array */ 53 | public function getUModPlugin(string $pluginName): array 54 | { 55 | return cache()->remember("umod_plugin:$pluginName", now()->addMinutes(30), function () use ($pluginName) { 56 | try { 57 | return Http::asJson() 58 | ->timeout(5) 59 | ->connectTimeout(5) 60 | ->throw() 61 | ->get("https://umod.org/plugins/$pluginName.json") 62 | ->json(); 63 | } catch (Exception $exception) { 64 | report($exception); 65 | 66 | return []; 67 | } 68 | }); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /pirate-language/lang/pirate/admin/health.php: -------------------------------------------------------------------------------- 1 | 'Health', 5 | 'results_refreshed' => 'Health check results be updated, aye!', 6 | 'checked' => 'Checked results from :time, matey', 7 | 'refresh' => 'Refresh the lookout', 8 | 'results' => [ 9 | 'cache' => [ 10 | 'label' => 'Cache', 11 | 'ok' => 'Arr, all be shipshape', 12 | 'failed_retrieve' => "Couldn't set or fetch a cache value in the hold.", 13 | 'failed' => 'A cursed error struck the cache: :error', 14 | ], 15 | 'database' => [ 16 | 'label' => 'Database', 17 | 'ok' => 'Arr, database be connected', 18 | 'failed' => "Couldn't connect to the database port: :error", 19 | ], 20 | 'debugmode' => [ 21 | 'label' => 'Debug Mode', 22 | 'ok' => 'Debug mode be disabled, smooth sailin’', 23 | 'failed' => 'Debug mode was expected to be :expected, but it be :actual instead!', 24 | ], 25 | 'environment' => [ 26 | 'label' => 'Environment', 27 | 'ok' => 'Aye, environment set to :actual', 28 | 'failed' => 'Environment be set to :actual, but we expected :expected', 29 | ], 30 | 'nodeversions' => [ 31 | 'label' => 'Node Versions', 32 | 'ok' => 'All Nodes be up-to-date and seaworthy', 33 | 'failed' => ':outdated out o’ :all Nodes be outdated, arr!', 34 | 'no_nodes_created' => 'No Nodes created yet, matey', 35 | 'no_nodes' => 'No Nodes in sight', 36 | 'all_up_to_date' => 'All be shipshape and up-to-date', 37 | 'outdated' => ':outdated out o’ :all be outdated', 38 | ], 39 | 'panelversion' => [ 40 | 'label' => 'Panel Version', 41 | 'ok' => 'Panel be shipshape and up-to-date', 42 | 'failed' => 'Installed version be :currentVersion but latest be :latestVersion, matey!', 43 | 'up_to_date' => 'All caught up', 44 | 'outdated' => 'Old as a barnacle', 45 | ], 46 | 'schedule' => [ 47 | 'label' => 'Schedule', 48 | 'ok' => 'Aye, all good', 49 | 'failed_last_ran' => 'The last time the schedule ran was over :time minutes ago, arr!', 50 | 'failed_not_ran' => "The schedule hasn't set sail yet.", 51 | ], 52 | 'useddiskspace' => [ 53 | 'label' => 'Disk Space', 54 | ], 55 | ], 56 | 'checks' => [ 57 | 'successful' => 'Fair winds', 58 | 'failed' => 'Davy Jones’ locker', 59 | ], 60 | ]; 61 | -------------------------------------------------------------------------------- /billing/src/Filament/Admin/Resources/Products/RelationManagers/PriceRelationManager.php: -------------------------------------------------------------------------------- 1 | components([ 29 | TextInput::make('name') 30 | ->required(), 31 | TextInput::make('cost') 32 | ->required() 33 | ->suffix(config('billing.currency')) 34 | ->numeric() 35 | ->minValue(0), 36 | Select::make('interval_type') 37 | ->required() 38 | ->selectablePlaceholder(false) 39 | ->options(PriceInterval::class), 40 | TextInput::make('interval_value') 41 | ->required() 42 | ->numeric() 43 | ->minValue(1), 44 | ]); 45 | } 46 | 47 | public function table(Table $table): Table 48 | { 49 | return $table 50 | ->columns([ 51 | TextColumn::make('name') 52 | ->sortable(), 53 | TextColumn::make('cost') 54 | ->sortable() 55 | ->state(fn (ProductPrice $price) => $price->formatCost()), 56 | TextColumn::make('interval') 57 | ->state(fn (ProductPrice $price) => $price->interval_value . ' ' . $price->interval_type->name), 58 | ]) 59 | ->headerActions([ 60 | CreateAction::make() 61 | ->label('Create Price') 62 | ->createAnother(false), 63 | ]) 64 | ->recordActions([ 65 | EditAction::make(), 66 | DeleteAction::make(), 67 | ]) 68 | ->emptyStateHeading('No Prices') 69 | ->emptyStateDescription(''); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /generic-oidc-providers/src/Extensions/OAuth/Schemas/GenericOIDCProviderSchema.php: -------------------------------------------------------------------------------- 1 | model->id; 19 | } 20 | 21 | public function getSocialiteProvider(): string 22 | { 23 | return Provider::class; 24 | } 25 | 26 | public function getServiceConfig(): array 27 | { 28 | return [ 29 | 'client_id' => $this->model->client_id, 30 | 'client_secret' => $this->model->client_secret, 31 | 'base_url' => $this->model->base_url, 32 | 'verify_jwt' => $this->model->verify_jwt, 33 | 'jwt_public_key' => $this->model->jwt_public_key, 34 | ]; 35 | } 36 | 37 | public function getSetupSteps(): array 38 | { 39 | return [ 40 | Step::make('Generic OIDC Provider') 41 | ->schema([ 42 | TextEntry::make('info') 43 | ->hiddenLabel() 44 | ->state('This a generic OIDC provider and doesn\'t require any setup!'), 45 | ]), 46 | ]; 47 | } 48 | 49 | public function getSettingsForm(): array 50 | { 51 | return [ 52 | TextEntry::make('info') 53 | ->label('Generic OIDC Provider') 54 | ->state('Click here to configure this generic OIDC provider.') 55 | ->url(EditGenericOIDCProvider::getUrl(['record' => $this->model], panel: 'admin')) 56 | ->columnSpanFull(), 57 | ]; 58 | } 59 | 60 | public function getName(): string 61 | { 62 | return $this->model->display_name; 63 | } 64 | 65 | public function getIcon(): ?string 66 | { 67 | return $this->model->display_icon; 68 | } 69 | 70 | public function getHexColor(): ?string 71 | { 72 | return $this->model->display_color; 73 | } 74 | 75 | public function shouldCreateMissingUsers(): bool 76 | { 77 | return $this->model->create_missing_users; 78 | } 79 | 80 | public function shouldLinkMissingUsers(): bool 81 | { 82 | return $this->model->link_missing_users; 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /pirate-language/lang/pirate/profile.php: -------------------------------------------------------------------------------- 1 | 'English (Pirate)', 5 | 6 | 'title' => 'Captain\'s Log', 7 | 'tabs' => [ 8 | 'account' => 'Account', 9 | 'oauth' => 'OAuth', 10 | 'activity' => 'Deck Happenings', 11 | 'api_keys' => 'API Keys', 12 | 'ssh_keys' => 'SSH Keys', 13 | '2fa' => 'Two-Factor Challenge', 14 | 'customization' => 'Riggin\'', 15 | ], 16 | 'username' => 'Pirate Name', 17 | 'admin' => 'Captain', 18 | 'exit_admin' => 'Leave Captain\'s Quarters', 19 | 'email' => 'Message in a Bottle', 20 | 'password' => 'Secret Code', 21 | 'current_password' => 'Current Secret Code', 22 | 'password_confirmation' => 'Confirm Secret Code', 23 | 'timezone' => 'Time Zone o\' the Seas', 24 | 'language' => 'Tongue', 25 | 'language_help' => 'Yer tongue :state hasn\'t been translated to pirate talk yet!', 26 | 'link' => 'Link \'em', 27 | 'unlink' => 'Cut the Line', 28 | 'unlinked' => ':name cut loose', 29 | 'scan_qr' => 'Scan the Pirate\'s Mark (QR Code)', 30 | 'code' => 'Code', 31 | 'setup_key' => 'Set Up the Key', 32 | 'invalid_code' => 'Wrong 2FA Code, ye scallywag!', 33 | 'code_help' => 'Scan the Pirate\'s Mark above with yer two-step auth app, then enter the secret code it gives ye.', 34 | '2fa_enabled' => 'Two-Factor Authentication be hoisted and ready!', 35 | 'backup_help' => 'These treasure codes won\'t show again!', 36 | 'backup_codes' => 'Backup Treasure Codes', 37 | 'disable_2fa' => 'Lower the 2FA Flag', 38 | 'disable_2fa_help' => 'Enter yer current 2FA code to lower the Two-Factor Authentication flag', 39 | 'api_keys' => 'API Keys', 40 | 'create_api_key' => 'Forge a New API Key', 41 | 'api_key_created' => 'API Key Forged', 42 | 'description' => 'Tale o\' the Key', 43 | 'allowed_ips' => 'Allowed IPs o\' the Seas', 44 | 'allowed_ips_help' => 'Press enter to add a new IP or leave blank to let any IP sail through', 45 | 'ssh_keys' => 'SSH Keys', 46 | 'create_ssh_key' => 'Forge a New SSH Key', 47 | 'ssh_key_created' => 'SSH Key Forged', 48 | 'name' => 'Name o\' the Key', 49 | 'public_key' => 'Public Key', 50 | 'could_not_create_ssh_key' => 'Failed to forge the SSH key, arrr!', 51 | 'dashboard' => 'Captain\'s Helm', 52 | 'dashboard_layout' => 'Captain\'s Helm Layout', 53 | 'console' => 'Ship\'s Wheel', 54 | 'grid' => 'Grid o\' the Deck', 55 | 'table' => 'Table o\' Logs', 56 | 'rows' => 'Rows o\' the Crew', 57 | 'font_size' => 'Letter Size', 58 | 'font' => 'Letterin\' Style', 59 | 'font_preview' => 'Peek at the Letterin\'', 60 | 'seconds' => 'Seconds o\' the Clock', 61 | 'graph_period' => 'Chartin\' Time Span', 62 | 'graph_period_helper' => 'How many data points, in seconds, be shown on the ship\'s console charts.', 63 | 64 | ]; 65 | -------------------------------------------------------------------------------- /mclogs-uploader/src/Filament/Components/Actions/UploadLogsAction.php: -------------------------------------------------------------------------------- 1 | hidden(function () { 25 | /** @var Server $server */ 26 | $server = Filament::getTenant(); 27 | 28 | return $server->retrieveStatus()->isOffline(); 29 | }); 30 | 31 | $this->label(fn () => trans('mclogs-uploader::upload.upload_logs')); 32 | 33 | $this->icon('tabler-upload'); 34 | 35 | $this->color('primary'); 36 | 37 | $this->size(Size::ExtraLarge); 38 | 39 | $this->action(function () { 40 | /** @var Server $server */ 41 | $server = Filament::getTenant(); 42 | 43 | try { 44 | $logs = Http::daemon($server->node) 45 | ->get("/api/servers/{$server->uuid}/logs") 46 | ->throw() 47 | ->json('data'); 48 | 49 | $logs = is_array($logs) ? implode(PHP_EOL, $logs) : $logs; 50 | 51 | $response = Http::asForm() 52 | ->timeout(15) 53 | ->connectTimeout(5) 54 | ->throw() 55 | ->post('https://api.mclo.gs/1/log', [ 56 | 'content' => $logs, 57 | ]) 58 | ->json(); 59 | 60 | if ($response['success']) { 61 | Notification::make() 62 | ->title(trans('mclogs-uploader::upload.uploaded')) 63 | ->body($response['url']) 64 | ->persistent() 65 | ->success() 66 | ->send(); 67 | } else { 68 | Notification::make() 69 | ->title(trans('mclogs-uploader::upload.upload_failed')) 70 | ->body($response['error']) 71 | ->danger() 72 | ->send(); 73 | } 74 | } catch (Exception $exception) { 75 | report($exception); 76 | 77 | Notification::make() 78 | ->title(trans('mclogs-uploader::upload.upload_failed')) 79 | ->body($exception->getMessage()) 80 | ->danger() 81 | ->send(); 82 | } 83 | }); 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /billing/src/Models/ProductPrice.php: -------------------------------------------------------------------------------- 1 | PriceInterval::class, 37 | ]; 38 | } 39 | 40 | protected static function boot(): void 41 | { 42 | parent::boot(); 43 | 44 | static::created(function (self $model) { 45 | $model->sync(); 46 | }); 47 | 48 | static::updated(function (self $model) { 49 | $model->sync(); 50 | }); 51 | } 52 | 53 | public function product(): BelongsTo 54 | { 55 | return $this->belongsTo(Product::class, 'product_id'); 56 | } 57 | 58 | public function getLabel(): string 59 | { 60 | return $this->interval_value . ' ' . str_plural($this->interval_type->getLabel(), $this->interval_value) . ' - ' . $this->formatCost(); 61 | } 62 | 63 | public function sync(): void 64 | { 65 | $this->product->sync(); 66 | 67 | /** @var StripeClient $stripeClient */ 68 | $stripeClient = app(StripeClient::class); // @phpstan-ignore myCustomRules.forbiddenGlobalFunctions 69 | 70 | if (is_null($this->stripe_id)) { 71 | $stripePrice = $stripeClient->prices->create([ 72 | 'currency' => config('billing.currency'), 73 | 'nickname' => $this->name, 74 | 'product' => $this->product->stripe_id, 75 | 'unit_amount' => $this->cost * 100, // Stripe needs cent/ penny price 76 | ]); 77 | 78 | $this->updateQuietly([ 79 | 'stripe_id' => $stripePrice->id, 80 | ]); 81 | } else { 82 | $stripePrice = $stripeClient->prices->retrieve($this->stripe_id); 83 | 84 | // You can't update price objects on stripe, so check for changes and recreate the price if needed 85 | if ($stripePrice->product !== $this->product->stripe_id || $stripePrice->unit_amount !== $this->cost * 100) { 86 | $this->stripe_id = null; 87 | $this->sync(); 88 | } 89 | } 90 | } 91 | 92 | public function formatCost(): string 93 | { 94 | $formatter = new NumberFormatter(user()->language ?? 'en', NumberFormatter::CURRENCY); 95 | 96 | return $formatter->formatCurrency($this->cost, config('billing.currency')); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /pirate-language/lang/pirate/server/file.php: -------------------------------------------------------------------------------- 1 | 'Ship\'s Logs', 5 | 'name' => 'Name o\' the Scroll', 6 | 'size' => 'Heft o\' the Loot', 7 | 'modified_at' => 'Last Tampered', 8 | 'actions' => [ 9 | 'open' => 'Crack It Open', 10 | 'download' => 'Snag It', 11 | 'copy' => [ 12 | 'title' => 'Make a Twin', 13 | 'notification' => 'Scroll Be Duplicated', 14 | ], 15 | 'upload' => [ 16 | 'title' => 'Stash Aboard', 17 | 'from_files' => 'Bring Files Aboard', 18 | 'from_url' => 'Fetch from Faraway Lands (URL)', 19 | 'url' => 'Map to the Loot (URL)', 20 | ], 21 | 'rename' => [ 22 | 'title' => 'Change the Name', 23 | 'file_name' => 'New Scroll Title', 24 | 'notification' => 'Scroll Be Renamed', 25 | ], 26 | 'move' => [ 27 | 'title' => 'Stow Elsewhere', 28 | 'directory' => 'Locker', 29 | 'directory_hint' => 'Point the way to the new locker (relative to now)', 30 | 'new_location' => 'New Dock', 31 | 'new_location_hint' => 'Chart the new dock (relative)', 32 | 'notification' => 'Scroll Moved', 33 | 'bulk_notification' => ':count scrolls moved to :directory', 34 | ], 35 | 'permissions' => [ 36 | 'title' => 'Who Can Touch It?', 37 | 'read' => 'Spy It', 38 | 'write' => 'Scratch on It', 39 | 'execute' => 'Set It Sailin\'', 40 | 'owner' => 'Cap\'n', 41 | 'group' => 'The Crew', 42 | 'public' => 'All Hands', 43 | 'notification' => 'Rules be changed to :mode', 44 | ], 45 | 'archive' => [ 46 | 'title' => 'Bottle It Up', 47 | 'archive_name' => 'Name o\' the Barrel', 48 | 'notification' => 'Barrel Sealed Tight', 49 | ], 50 | 'unarchive' => [ 51 | 'title' => 'Crack Open the Barrel', 52 | 'notification' => 'Booty Unpacked', 53 | ], 54 | 'new_file' => [ 55 | 'title' => 'Scribe New Scroll', 56 | 'file_name' => 'Name o\' the New Scroll', 57 | 'syntax' => 'Scroll Style (Syntax)', 58 | 'create' => 'Start Scribblin\'', 59 | ], 60 | 'new_folder' => [ 61 | 'title' => 'Build New Locker', 62 | 'folder_name' => 'Name o\' the New Locker', 63 | ], 64 | 'global_search' => [ 65 | 'title' => 'Search the Seven Seas', 66 | 'search_term' => 'What Be Ye Lookin\' For?', 67 | 'search_term_placeholder' => 'Toss a word in, like *.txt', 68 | 'search' => 'Start the Hunt', 69 | ], 70 | 'delete' => [ 71 | 'notification' => 'Scroll Sent to the Depths', 72 | 'bulk_notification' => ':count scrolls tossed overboard', 73 | ], 74 | 'edit' => [ 75 | 'title' => 'Scribblin\' on: :file', 76 | 'save_close' => 'Seal & Close', 77 | 'save' => 'Seal the Changes', 78 | 'cancel' => 'Abandon Ship', 79 | 'notification' => 'Scroll Sealed Up', 80 | ], 81 | ], 82 | ]; 83 | -------------------------------------------------------------------------------- /user-creatable-servers/src/UserCreatableServersPlugin.php: -------------------------------------------------------------------------------- 1 | getId())->title(); 25 | 26 | $panel->discoverPages(plugin_path($this->getId(), "src/Filament/$id/Pages"), "Boy132\\UserCreatableServers\\Filament\\$id\\Pages"); 27 | $panel->discoverResources(plugin_path($this->getId(), "src/Filament/$id/Resources"), "Boy132\\UserCreatableServers\\Filament\\$id\\Resources"); 28 | $panel->discoverWidgets(plugin_path($this->getId(), "src/Filament/$id/Widgets"), "Boy132\\UserCreatableServers\\Filament\\$id\\Widgets"); 29 | } 30 | 31 | public function boot(Panel $panel): void {} 32 | 33 | public function getSettingsForm(): array 34 | { 35 | return [ 36 | TextInput::make('database_limit') 37 | ->label('Default database limit') 38 | ->required() 39 | ->numeric() 40 | ->minValue(0) 41 | ->default(fn () => config('user-creatable-servers.database_limit')), 42 | TextInput::make('allocation_limit') 43 | ->label('Default allocation limit') 44 | ->required() 45 | ->numeric() 46 | ->minValue(0) 47 | ->default(fn () => config('user-creatable-servers.allocation_limit')), 48 | TextInput::make('backup_limit') 49 | ->label('Default backup limit') 50 | ->required() 51 | ->numeric() 52 | ->minValue(0) 53 | ->default(fn () => config('user-creatable-servers.backup_limit')), 54 | Toggle::make('can_users_update_servers') 55 | ->label('Can users update servers?') 56 | ->hintIcon('tabler-question-mark') 57 | ->hintIconTooltip('If checked users can update the resource limits of theirs servers after creation.') 58 | ->inline(false) 59 | ->default(fn () => config('user-creatable-servers.can_users_update_servers')), 60 | ]; 61 | } 62 | 63 | public function saveSettings(array $data): void 64 | { 65 | $this->writeToEnvironment([ 66 | 'UCS_DEFAULT_DATABASE_LIMIT' => $data['database_limit'], 67 | 'UCS_DEFAULT_ALLOCATION_LIMIT' => $data['allocation_limit'], 68 | 'UCS_DEFAULT_BACKUP_LIMIT' => $data['backup_limit'], 69 | 'UCS_CAN_USERS_UPDATE_SERVERS' => $data['can_users_update_servers'] ? 'true' : 'false', 70 | ]); 71 | 72 | Notification::make() 73 | ->title('Settings saved') 74 | ->success() 75 | ->send(); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /subdomains/src/Filament/Admin/Resources/CloudflareDomains/CloudflareDomainResource.php: -------------------------------------------------------------------------------- 1 | count() ?: null; 48 | } 49 | 50 | public static function table(Table $table): Table 51 | { 52 | return $table 53 | ->columns([ 54 | TextColumn::make('name') 55 | ->label(trans('subdomains::strings.name')), 56 | TextColumn::make('subdomains_count') 57 | ->label(trans_choice('subdomains::strings.subdomain', 2)) 58 | ->counts('subdomains'), 59 | ]) 60 | ->recordActions([ 61 | ViewAction::make() 62 | ->hidden(fn ($record) => static::canEdit($record)), 63 | EditAction::make(), 64 | DeleteAction::make(), 65 | ]) 66 | ->emptyStateIcon('tabler-world-www') 67 | ->emptyStateDescription('') 68 | ->emptyStateHeading(trans('subdomains::strings.no_domains')); 69 | } 70 | 71 | public static function form(Schema $schema): Schema 72 | { 73 | return $schema 74 | ->components([ 75 | TextInput::make('name') 76 | ->label(trans('subdomains::strings.name')) 77 | ->required() 78 | ->unique(), 79 | ]); 80 | } 81 | 82 | public static function infolist(Schema $schema): Schema 83 | { 84 | return $schema 85 | ->components([ 86 | TextEntry::make('name') 87 | ->label(trans('subdomains::strings.name')), 88 | ]); 89 | } 90 | 91 | public static function getPages(): array 92 | { 93 | return [ 94 | 'index' => ManageCloudflareDomains::route('/'), 95 | ]; 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /subdomains/src/Models/Subdomain.php: -------------------------------------------------------------------------------- 1 | createOnCloudflare(); 37 | }); 38 | 39 | static::updated(function (self $model) { 40 | $model->updateOnCloudflare(); 41 | }); 42 | 43 | static::deleted(function (self $model) { 44 | $model->deleteOnCloudflare(); 45 | }); 46 | } 47 | 48 | public function domain(): BelongsTo 49 | { 50 | return $this->BelongsTo(CloudflareDomain::class, 'domain_id'); 51 | } 52 | 53 | public function server(): BelongsTo 54 | { 55 | return $this->BelongsTo(Server::class); 56 | } 57 | 58 | public function getLabel(): string|Htmlable|null 59 | { 60 | return $this->name . '.' . $this->domain->name; 61 | } 62 | 63 | protected function createOnCloudflare(): void 64 | { 65 | if (!$this->server->allocation || $this->cloudflare_id) { 66 | return; 67 | } 68 | 69 | $response = Http::cloudflare()->post("zones/{$this->domain->cloudflare_id}/dns_records", [ 70 | 'name' => $this->name, 71 | 'ttl' => 120, 72 | 'type' => $this->record_type, 73 | 'comment' => 'Created by Pelican Subdomains plugin', 74 | 'content' => $this->server->allocation->ip, 75 | 'proxied' => false, 76 | ])->json(); 77 | 78 | if ($response['success']) { 79 | $dnsRecord = $response['result']; 80 | 81 | $this->updateQuietly([ 82 | 'cloudflare_id' => $dnsRecord->id, 83 | ]); 84 | } 85 | } 86 | 87 | protected function updateOnCloudflare(): void 88 | { 89 | if (!$this->server->allocation || !$this->cloudflare_id) { 90 | return; 91 | } 92 | 93 | Http::cloudflare()->patch("zones/{$this->domain->cloudflare_id}/dns_records/{$this->cloudflare_id}", [ 94 | 'name' => $this->name, 95 | 'ttl' => 120, 96 | 'type' => $this->record_type, 97 | 'comment' => 'Created by Pelican Subdomains plugin', 98 | 'content' => $this->server->allocation->ip, 99 | 'proxied' => false, 100 | ]); 101 | } 102 | 103 | protected function deleteOnCloudflare(): void 104 | { 105 | if ($this->cloudflare_id) { 106 | Http::cloudflare()->delete("zones/{$this->domain->cloudflare_id}/dns_records/{$this->cloudflare_id}"); 107 | } 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /tickets/src/Models/Ticket.php: -------------------------------------------------------------------------------- 1 | TicketCategory::class, 52 | 'priority' => TicketPriority::class, 53 | ]; 54 | } 55 | 56 | public function server(): BelongsTo 57 | { 58 | return $this->belongsTo(Server::class, 'server_id'); 59 | } 60 | 61 | public function author(): BelongsTo 62 | { 63 | return $this->belongsTo(User::class, 'author_id'); 64 | } 65 | 66 | public function assignedUser(): BelongsTo 67 | { 68 | return $this->belongsTo(User::class, 'assigned_user_id'); 69 | } 70 | 71 | public function answer(string $answer): void 72 | { 73 | $this->is_answered = true; 74 | $this->answer = $answer; 75 | 76 | $this->save(); 77 | 78 | // Send notification to author if existing and is the owner or a subuser of the server 79 | if ($this->author && collect($this->author->directAccessibleServers()->pluck('id')->all())->contains($this->server->id)) { 80 | Notification::make() 81 | ->title(trans('tickets::tickets.notifications.answered')) 82 | ->body(Markdown::inline($this->answer)) 83 | ->actions([ 84 | Action::make('view') 85 | ->label(trans(('filament-actions::view.single.label'))) 86 | ->button() 87 | ->markAsRead() 88 | ->url(fn () => ManageTickets::getUrl([ 89 | 'activeTab' => 'answered', 90 | 'tableAction' => 'view', 91 | 'tableActionRecord' => $this->id, 92 | ], panel: 'server', tenant: $this->server)), 93 | ]) 94 | ->sendToDatabase($this->author); 95 | } 96 | } 97 | 98 | public function assignTo(User $user): void 99 | { 100 | $this->assigned_user_id = $user->id; 101 | 102 | $this->save(); 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /billing/src/Models/Product.php: -------------------------------------------------------------------------------- 1 | $ports 23 | * @property string[] $tags 24 | * @property int $allocation_limit 25 | * @property int $database_limit 26 | * @property int $backup_limit 27 | * @property int $egg_id 28 | * @property Egg $egg 29 | * @property Collection|ProductPrice[] $prices 30 | */ 31 | class Product extends Model implements HasLabel 32 | { 33 | protected $fillable = [ 34 | 'stripe_id', 35 | 'name', 36 | 'description', 37 | 'egg_id', 38 | 'cpu', 39 | 'memory', 40 | 'disk', 41 | 'swap', 42 | 'ports', 43 | 'tags', 44 | 'allocation_limit', 45 | 'database_limit', 46 | 'backup_limit', 47 | ]; 48 | 49 | protected $attributes = [ 50 | 'ports' => '[]', 51 | 'tags' => '[]', 52 | ]; 53 | 54 | protected function casts(): array 55 | { 56 | return [ 57 | 'ports' => 'array', 58 | 'tags' => 'array', 59 | ]; 60 | } 61 | 62 | protected static function boot(): void 63 | { 64 | parent::boot(); 65 | 66 | static::created(function (self $model) { 67 | $model->sync(); 68 | }); 69 | 70 | static::updated(function (self $model) { 71 | $model->sync(); 72 | }); 73 | 74 | static::deleted(function (self $model) { 75 | if (!is_null($model->stripe_id)) { 76 | /** @var StripeClient $stripeClient */ 77 | $stripeClient = app(StripeClient::class); // @phpstan-ignore myCustomRules.forbiddenGlobalFunctions 78 | 79 | $stripeClient->products->delete($model->stripe_id); 80 | } 81 | }); 82 | } 83 | 84 | public function prices(): HasMany 85 | { 86 | return $this->hasMany(ProductPrice::class, 'product_id'); 87 | } 88 | 89 | public function egg(): BelongsTo 90 | { 91 | return $this->BelongsTo(Egg::class, 'egg_id'); 92 | } 93 | 94 | public function getLabel(): string 95 | { 96 | return $this->name; 97 | } 98 | 99 | public function sync(): void 100 | { 101 | /** @var StripeClient $stripeClient */ 102 | $stripeClient = app(StripeClient::class); // @phpstan-ignore myCustomRules.forbiddenGlobalFunctions 103 | 104 | if (is_null($this->stripe_id)) { 105 | $stripeProduct = $stripeClient->products->create([ 106 | 'name' => $this->name, 107 | 'description' => $this->description, 108 | ]); 109 | 110 | $this->updateQuietly([ 111 | 'stripe_id' => $stripeProduct->id, 112 | ]); 113 | } else { 114 | $stripeClient->products->update($this->stripe_id, [ 115 | 'name' => $this->name, 116 | 'description' => $this->description, 117 | ]); 118 | } 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /billing/src/BillingPlugin.php: -------------------------------------------------------------------------------- 1 | getId())->title(); 30 | 31 | if ($panel->getId() === 'app') { 32 | ServerResource::embedServerList(); 33 | 34 | $panel->navigation(true); 35 | $panel->topbar(function () { 36 | $navigationType = user()?->getCustomization(CustomizationKey::TopNavigation); 37 | 38 | return $navigationType === 'topbar' || $navigationType === 'mixed' || $navigationType === true; 39 | }); 40 | 41 | $panel->navigationItems([ 42 | NavigationItem::make(fn () => trans('filament-panels::auth/pages/edit-profile.label')) 43 | ->icon('tabler-user-circle') 44 | ->url(fn () => EditProfile::getUrl(panel: 'app')) 45 | ->isActiveWhen(fn () => request()->routeIs(EditProfile::getRouteName())) 46 | ->sort(99), 47 | ]); 48 | 49 | $panel->clearCachedComponents(); 50 | } 51 | 52 | $panel->discoverResources(plugin_path($this->getId(), "src/Filament/$id/Resources"), "Boy132\\Billing\\Filament\\$id\\Resources"); 53 | $panel->discoverPages(plugin_path($this->getId(), "src/Filament/$id/Pages"), "Boy132\\Billing\\Filament\\$id\\Pages"); 54 | $panel->discoverWidgets(plugin_path($this->getId(), "src/Filament/$id/Widgets"), "Boy132\\Billing\\Filament\\$id\\Widgets"); 55 | } 56 | 57 | public function boot(Panel $panel): void {} 58 | 59 | public function getSettingsForm(): array 60 | { 61 | return [ 62 | TextInput::make('key') 63 | ->label('Stripe Key') 64 | ->required() 65 | ->default(fn () => config('billing.key')), 66 | TextInput::make('secret') 67 | ->label('Stripe Secret') 68 | ->required() 69 | ->default(fn () => config('billing.secret')), 70 | Select::make('currency') 71 | ->label('Currency') 72 | ->required() 73 | ->default(fn () => config('billing.currency')) 74 | ->options([ 75 | 'USD' => 'US Dollar', 76 | 'EUR' => 'Euro', 77 | 'GBP' => 'British Pound', 78 | ]), 79 | TagsInput::make('deployment_tags') 80 | ->label('Default node tags for deployment'), 81 | ]; 82 | } 83 | 84 | public function saveSettings(array $data): void 85 | { 86 | $this->writeToEnvironment([ 87 | 'STRIPE_KEY' => $data['key'], 88 | 'STRIPE_SECRET' => $data['secret'], 89 | 'BILLING_CURRENCY' => $data['currency'], 90 | 'BILLING_DEPLOYMENT_TAGS' => implode(',', $data['deployment_tags']), 91 | ]); 92 | 93 | Notification::make() 94 | ->title('Settings saved') 95 | ->success() 96 | ->send(); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /billing/src/Filament/Admin/Resources/Customers/CustomerResource.php: -------------------------------------------------------------------------------- 1 | count() ?: null; 31 | } 32 | 33 | public static function form(Schema $schema): Schema 34 | { 35 | return $schema 36 | ->components([ 37 | Select::make('user_id') 38 | ->prefixIcon('tabler-user') 39 | ->label('User') 40 | ->required() 41 | ->selectablePlaceholder(false) 42 | ->relationship('user', 'username') 43 | ->searchable(['username', 'email']) 44 | ->getOptionLabelFromRecordUsing(fn (User $user) => $user->email . ' | ' . $user->username) 45 | ->preload(), 46 | TextInput::make('balance') 47 | ->required() 48 | ->suffix(config('billing.currency')) 49 | ->numeric() 50 | ->minValue(0), 51 | TextInput::make('first_name') 52 | ->required(), 53 | TextInput::make('last_name') 54 | ->required(), 55 | ]); 56 | } 57 | 58 | public static function table(Table $table): Table 59 | { 60 | return $table 61 | ->paginated(false) 62 | ->columns([ 63 | TextColumn::make('first_name') 64 | ->sortable(), 65 | TextColumn::make('last_name') 66 | ->sortable(), 67 | TextColumn::make('user.email') 68 | ->label('E-Mail') 69 | ->sortable(), 70 | TextColumn::make('balance') 71 | ->numeric() 72 | ->formatStateUsing(function ($state) { 73 | $formatter = new NumberFormatter(auth()->user()->language, NumberFormatter::CURRENCY); 74 | 75 | return $formatter->formatCurrency($state, config('billing.currency')); 76 | }), 77 | TextColumn::make('orders_count') 78 | ->label('Orders') 79 | ->counts('orders') 80 | ->badge(), 81 | ]) 82 | ->recordActions([ 83 | EditAction::make(), 84 | DeleteAction::make(), 85 | ]) 86 | ->emptyStateHeading('No Customers') 87 | ->emptyStateDescription('') 88 | ->emptyStateIcon('tabler-user-dollar'); 89 | } 90 | 91 | public static function getPages(): array 92 | { 93 | return [ 94 | 'index' => ListCustomers::route('/'), 95 | 'create' => CreateCustomer::route('/create'), 96 | 'edit' => EditCustomer::route('/{record}/edit'), 97 | ]; 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /billing/src/Filament/App/Widgets/ProductWidget.php: -------------------------------------------------------------------------------- 1 | product->prices as $price) { 34 | $actions[] = Action::make(str_slug($price->name)) 35 | ->label($price->getLabel()) 36 | ->action(function () use ($price) { 37 | $price->sync(); 38 | 39 | /** @var Customer $customer */ 40 | $customer = Customer::firstOrCreate([ 41 | 'user_id' => user()->id, 42 | ]); 43 | 44 | /** @var Order $order */ 45 | $order = Order::create([ 46 | 'customer_id' => $customer->id, 47 | 'product_price_id' => $price->id, 48 | ]); 49 | 50 | return $this->redirect($order->getCheckoutSession()->url); 51 | }); 52 | } 53 | 54 | return $schema 55 | ->record($this->product) 56 | ->components([ 57 | Section::make() 58 | ->heading($this->product->getLabel()) 59 | ->description($this->product->description) 60 | ->columns(6) 61 | ->schema([ 62 | TextEntry::make('cpu') 63 | ->label('CPU') 64 | ->icon('tabler-cpu') 65 | ->formatStateUsing(fn ($state) => $state === 0 ? 'Unlimited' : $state . ' %') 66 | ->columnSpan(2), 67 | TextEntry::make('memory') 68 | ->icon('tabler-database') 69 | ->formatStateUsing(fn ($state) => $state === 0 ? 'Unlimited' : Number::format($state / (config('panel.use_binary_prefix') ? 1024 : 1000), 2, locale: auth()->user()->language) . (config('panel.use_binary_prefix') ? ' GiB' : ' GB')) 70 | ->columnSpan(2), 71 | TextEntry::make('disk') 72 | ->icon('tabler-folder') 73 | ->formatStateUsing(fn ($state) => $state === 0 ? 'Unlimited' : Number::format($state / (config('panel.use_binary_prefix') ? 1024 : 1000), 2, locale: auth()->user()->language) . (config('panel.use_binary_prefix') ? ' GiB' : ' GB')) 74 | ->columnSpan(2), 75 | TextEntry::make('backup_limit') 76 | ->inlineLabel() 77 | ->columnSpan(3) 78 | ->visible(fn ($state) => $state > 0), 79 | TextEntry::make('database_limit') 80 | ->inlineLabel() 81 | ->columnSpan(3) 82 | ->visible(fn ($state) => $state > 0), 83 | Actions::make($actions) 84 | ->columnSpanFull() 85 | ->fullWidth(), 86 | ]), 87 | ]); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /pirate-language/lang/pirate/exceptions.php: -------------------------------------------------------------------------------- 1 | 'There be a storm brewin\' while tryin\' to parley with the daemon, resultin\' in a HTTP/:code response. This scallywag error has been logged in the captain\'s log.', 5 | 'node' => [ 6 | 'servers_attached' => 'A node can only be sent to Davy Jones\' Locker if no servers be chained to it.', 7 | 'error_connecting' => 'Trouble makin\' contact with :node, arrr!', 8 | 'daemon_off_config_updated' => 'The daemon\'s config has been updated, but there was a squall tryin\' to update the config file on the daemon itself. Ye\'ll need to update the config.yml file by hand to make the changes take hold.', 9 | ], 10 | 'allocations' => [ 11 | 'server_using' => 'This allocation be already claimed by a server. Ye can only delete it if no server be assigned.', 12 | 'too_many_ports' => 'Tryin\' to add over 1000 ports in one go ain\'t supported, matey.', 13 | 'invalid_mapping' => 'The map given for port :port be as wrong as a drunk sailor\'s compass and can\'t be processed.', 14 | 'cidr_out_of_range' => 'CIDR notation only allows masks from /25 to /32 — no more, no less!', 15 | 'port_out_of_range' => 'Ports must be between 1024 and 65535 to sail these waters.', 16 | ], 17 | 'egg' => [ 18 | 'delete_has_servers' => 'Ye can\'t toss an Egg overboard if there be active servers hatchin\' from it.', 19 | 'invalid_copy_id' => 'The Egg ye picked to copy a script from either don\'t exist or be copyin\' from another script itself.', 20 | 'has_children' => 'This Egg be a parent to other Eggs. Ye must send them to the deep before ye delete this one.', 21 | ], 22 | 'variables' => [ 23 | 'env_not_unique' => 'The environment variable :name must be unique for this Egg\'s domain.', 24 | 'reserved_name' => 'The environment variable :name be protected — no assignin\' allowed!', 25 | 'bad_validation_rule' => 'The validation rule ":rule" be no good for this ship\'s application.', 26 | ], 27 | 'importer' => [ 28 | 'json_error' => 'There was trouble parsing the JSON treasure map: :error.', 29 | 'file_error' => 'The JSON file provided be nothin\' but bilge water.', 30 | 'invalid_json_provided' => 'The JSON file be not in a form the ship can recognize.', 31 | ], 32 | 'subusers' => [ 33 | 'editing_self' => 'Ye can\'t be editin\' yer own subuser account, savvy?', 34 | 'user_is_owner' => 'Ye can\'t add the server\'s captain as a subuser, no matter how much grog ye offer.', 35 | 'subuser_exists' => 'A matey with that email be already listed as a subuser for this server.', 36 | ], 37 | 'databases' => [ 38 | 'delete_has_databases' => 'Ye can\'t scuttle a database host server while it still has active databases tied to it.', 39 | ], 40 | 'tasks' => [ 41 | 'chain_interval_too_long' => 'The longest waitin\' time fer a chained task be 15 minutes, no more!', 42 | ], 43 | 'locations' => [ 44 | 'has_nodes' => 'Ye can\'t delete a location if it\'s got active nodes anchored there.', 45 | ], 46 | 'users' => [ 47 | 'is_self' => 'Ye can\'t send yerself to the briny deep by deletin\' yer own user account.', 48 | 'has_servers' => 'Ye can\'t delete a user while they\'ve got servers sailin\' under their flag. Sink their servers first, then come back.', 49 | 'node_revocation_failed' => 'Failed to revoke keys on Node #:node. :error', 50 | ], 51 | 'deployment' => [ 52 | 'no_viable_nodes' => 'No nodes meetin\' the demands for automatic deployment could be found in these waters.', 53 | 'no_viable_allocations' => 'No allocations fit fer automatic deployment were found, arr!', 54 | ], 55 | 'api' => [ 56 | 'resource_not_found' => 'The treasure ye seek does not exist on this server.', 57 | ], 58 | 'mount' => [ 59 | 'servers_attached' => 'A mount must be free of servers before it can be sent to the depths.', 60 | ], 61 | 'server' => [ 62 | 'marked_as_failed' => 'This server\'s installation voyage ain\'t finished yet, try again later, matey.', 63 | ], 64 | ]; 65 | -------------------------------------------------------------------------------- /user-creatable-servers/src/Filament/Admin/Resources/Users/RelationManagers/UserResourceLimitRelationManager.php: -------------------------------------------------------------------------------- 1 | heading(trans_choice('user-creatable-servers::strings.user_resource_limits', 2)) 34 | ->columns([ 35 | TextColumn::make('cpu') 36 | ->label(trans('user-creatable-servers::strings.cpu')) 37 | ->badge() 38 | ->suffix('%'), 39 | TextColumn::make('memory') 40 | ->label(trans('user-creatable-servers::strings.memory')) 41 | ->badge() 42 | ->suffix(config('panel.use_binary_prefix') ? ' MiB' : ' MB'), 43 | TextColumn::make('disk') 44 | ->label(trans('user-creatable-servers::strings.disk')) 45 | ->badge() 46 | ->suffix(config('panel.use_binary_prefix') ? ' MiB' : ' MB'), 47 | ]) 48 | ->recordActions([ 49 | ActionGroup::make([ 50 | ViewAction::make() 51 | ->hidden(fn ($record) => static::canEdit($record)), 52 | EditAction::make(), 53 | DeleteAction::make(), 54 | ]), 55 | ]) 56 | ->emptyStateIcon('tabler-cube-plus') 57 | ->emptyStateDescription(''); 58 | } 59 | 60 | public function form(Schema $schema): Schema 61 | { 62 | return $schema 63 | ->components([ 64 | TextInput::make('cpu') 65 | ->label(trans('user-creatable-servers::strings.cpu')) 66 | ->required() 67 | ->numeric() 68 | ->minValue(0) 69 | ->default(0) 70 | ->suffix('%') 71 | ->hint(trans('user-creatable-servers::strings.hint_unlimited')), 72 | TextInput::make('memory') 73 | ->label(trans('user-creatable-servers::strings.memory')) 74 | ->required() 75 | ->numeric() 76 | ->minValue(0) 77 | ->default(0) 78 | ->suffix(config('panel.use_binary_prefix') ? 'MiB' : 'MB') 79 | ->hint(trans('user-creatable-servers::strings.hint_unlimited')), 80 | TextInput::make('disk') 81 | ->label(trans('user-creatable-servers::strings.disk')) 82 | ->required() 83 | ->numeric() 84 | ->minValue(0) 85 | ->default(0) 86 | ->suffix(config('panel.use_binary_prefix') ? 'MiB' : 'MB') 87 | ->hint(trans('user-creatable-servers::strings.hint_unlimited')), 88 | TextInput::make('server_limit') 89 | ->label(trans('user-creatable-servers::strings.server_limit')) 90 | ->numeric() 91 | ->nullable() 92 | ->placeholder(trans('user-creatable-servers::strings.no_limit')), 93 | ]); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /pirate-language/lang/pirate/server/schedule.php: -------------------------------------------------------------------------------- 1 | 'Ship\'s Runnin\' Routines', 5 | 'new' => 'Plot New Routine', 6 | 'edit' => 'Tweak the Routine', 7 | 'save' => 'Save the Routine', 8 | 'delete' => 'Scuttle the Routine', 9 | 'import' => 'Smuggle a Routine In', 10 | 'export' => 'Send a Routine Out', 11 | 'name' => 'Name o\' the Routine', 12 | 'cron' => 'Bell Ringin\' (Cron)', 13 | 'status' => 'Status o\' the Voyage', 14 | 'inactive' => 'Sleepin\'', 15 | 'processing' => 'Workin\' the Riggin\'', 16 | 'active' => 'Full Sail Ahead', 17 | 'no_tasks' => 'No Chores in the List', 18 | 'run_now' => 'Fire It Up Now', 19 | 'online_only' => 'Only When the Ship\'s Alive', 20 | 'last_run' => 'Last Time She Sailed', 21 | 'next_run' => 'Next Scheduled Voyage', 22 | 'never' => 'Not Yet, Matey', 23 | 'cancel' => 'Belay That!', 24 | 25 | 'only_online' => 'Only if the Ship\'s Breathin\'?', 26 | 'only_online_hint' => 'Only set sail with this routine if the ship be runnin\'.', 27 | 'enabled' => 'Hoist the Routine?', 28 | 'enabled_hint' => 'The routine will sail on its own if ye give the word.', 29 | 30 | 'cron_body' => 'Keep yer eyes sharp — cron speak always goes by the UTC stars.', 31 | 'cron_timezone' => 'Next voyage in yer timezone (:timezone): :next_run ', 32 | 33 | 'time' => [ 34 | 'minute' => 'Minuteglass', 35 | 'hour' => 'Hour o\' the Watch', 36 | 'day' => 'Day at Sea', 37 | 'week' => 'Seven-Day Stretch', 38 | 'month' => 'Full Moon Cycle', 39 | 'day_of_month' => 'Day o\' the Moon', 40 | 'day_of_week' => 'Day o\' the Week', 41 | 42 | 'hourly' => 'Each Hour', 43 | 'daily' => 'Every Tide', 44 | 'weekly_mon' => 'Weekly (First Mate\'s Day)', 45 | 'weekly_sun' => 'Weekly (Rest Day)', 46 | 'monthly' => 'Each Full Moon', 47 | 'every_min' => 'Every x Bells', 48 | 'every_hour' => 'Every x Hours', 49 | 'every_day' => 'Every x Sunrises', 50 | 'every_week' => 'Every x Voyages', 51 | 'every_month' => 'Every x Full Moons', 52 | 'every_day_of_week' => 'Each x Weekday', 53 | 54 | 'every' => 'Every', 55 | 'minutes' => 'Bells', 56 | 'hours' => 'Watches', 57 | 'days' => 'Days', 58 | 'months' => 'Moons', 59 | 60 | 'monday' => 'First Mate\'s Day', 61 | 'tuesday' => 'Two-Rum Tuesday', 62 | 'wednesday' => 'Windsday', 63 | 'thursday' => 'Thar\'sday', 64 | 'friday' => 'Fish Fryday', 65 | 'saturday' => 'Shipshape Saturday', 66 | 'sunday' => 'Still Sunday', 67 | ], 68 | 69 | 'tasks' => [ 70 | 'title' => 'Chores', 71 | 'create' => 'Add a Chore', 72 | 'limit' => 'Ye\'ve Hit the Chore Limit', 73 | 'action' => 'What Be Done', 74 | 'payload' => 'The Cargo (Payload)', 75 | 'time_offset' => 'Time Delay', 76 | 'seconds' => 'Seconds on the Hourglass', 77 | 'continue_on_failure' => 'Keep On Even if Things Go South', 78 | 79 | 'actions' => [ 80 | 'title' => 'Action', 81 | 'power' => [ 82 | 'title' => 'Send Power Orders', 83 | 'action' => 'Power Order', 84 | 'start' => 'Hoist the Sails', 85 | 'stop' => 'Drop Anchor', 86 | 'restart' => 'Turn Her About', 87 | 'kill' => 'Sink Her!', 88 | ], 89 | 'command' => [ 90 | 'title' => 'Send a Command', 91 | 'command' => 'Shouted Orders', 92 | ], 93 | 'backup' => [ 94 | 'title' => 'Stash the Loot (Backup)', 95 | 'files_to_ignore' => 'Files to Toss Overboard', 96 | ], 97 | 'delete' => [ 98 | 'title' => 'Sink the Files', 99 | 'files_to_delete' => 'Files to Send to Davy Jones', 100 | 101 | ], 102 | ], 103 | ], 104 | 105 | 'notification_invalid_cron' => 'Arrr! That cron gibberish don\'t make no sense, matey.', 106 | 107 | ]; 108 | -------------------------------------------------------------------------------- /billing/src/Models/Coupon.php: -------------------------------------------------------------------------------- 1 | code ??= Str::random(8); 40 | }); 41 | 42 | static::created(function (self $model) { 43 | $model->sync(); 44 | }); 45 | 46 | static::updating(function (self $model) { 47 | $model->code ??= Str::random(8); 48 | }); 49 | 50 | static::updated(function (self $model) { 51 | $model->sync(); 52 | }); 53 | 54 | static::deleted(function (self $model) { 55 | if (!is_null($model->stripe_coupon_id)) { 56 | /** @var StripeClient $stripeClient */ 57 | $stripeClient = app(StripeClient::class); // @phpstan-ignore myCustomRules.forbiddenGlobalFunctions 58 | 59 | $stripeClient->coupons->delete($model->stripe_coupon_id); 60 | $stripeClient->coupons->delete($model->stripe_promotion_id); 61 | } 62 | }); 63 | } 64 | 65 | public function sync(): void 66 | { 67 | /** @var StripeClient $stripeClient */ 68 | $stripeClient = app(StripeClient::class); // @phpstan-ignore myCustomRules.forbiddenGlobalFunctions 69 | 70 | if (is_null($this->stripe_coupon_id)) { 71 | $data = [ 72 | 'name' => $this->name, 73 | ]; 74 | 75 | if ($this->amount_off) { 76 | $data['currency'] = config('billing.currency'); 77 | $data['amount_off'] = $this->amount_off; 78 | } 79 | 80 | if ($this->percent_off) { 81 | $data['percent_off'] = $this->percent_off; 82 | } 83 | 84 | if ($this->max_redemptions) { 85 | $data['max_redemptions'] = $this->max_redemptions; 86 | } 87 | 88 | if ($this->redeem_by) { 89 | $data['redeem_by'] = $this->redeem_by->timestamp; 90 | } 91 | 92 | $stripeCoupon = $stripeClient->coupons->create($data); 93 | 94 | $stripePromotionCode = $stripeClient->promotionCodes->create([ 95 | 'code' => $this->code, 96 | 'promotion' => [ 97 | 'type' => 'coupon', 98 | 'coupon' => $stripeCoupon->id, 99 | ], 100 | ]); 101 | 102 | $this->updateQuietly([ 103 | 'stripe_coupon_id' => $stripeCoupon->id, 104 | 'stripe_promotion_id' => $stripePromotionCode->id, 105 | ]); 106 | } else { 107 | $stripeCoupon = $stripeClient->coupons->retrieve($this->stripe_coupon_id); 108 | 109 | // You can't update coupon objects on stripe, so check for changes and recreate the coupon if needed 110 | if ($stripeCoupon->amount_off !== $this->amount_off || $stripeCoupon->percent_off !== $this->percent_off || $stripeCoupon->max_redemptions !== $this->max_redemptions || $stripeCoupon->redeem_by !== $this->redeem_by) { 111 | $stripeClient->coupons->delete($this->stripe_coupon_id); 112 | $stripeClient->coupons->delete($this->stripe_promotion_id); 113 | 114 | $this->stripe_coupon_id = null; 115 | $this->sync(); 116 | } 117 | } 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /snowflakes/src/SnowflakesPlugin.php: -------------------------------------------------------------------------------- 1 | label('Enable Snowflakes') 32 | ->columnSpanFull() 33 | ->live() 34 | ->default(fn () => config('snowflakes.enabled')), 35 | Slider::make('SNOWFLAKES_SIZE') 36 | ->range(minValue: 0.5, maxValue: 4) 37 | ->decimalPlaces(1) 38 | ->step(0.1) 39 | ->label('Size') 40 | ->tooltips() 41 | ->hintIcon('tabler-question-mark') 42 | ->hintIconTooltip('Size of the snowflakes.') 43 | ->disabled(fn ($get) => !$get('SNOWFLAKES_ENABLED')) 44 | ->default(fn () => config('snowflakes.size')), 45 | Slider::make('SNOWFLAKES_SPEED') 46 | ->label('Speed') 47 | ->range(minValue: 0.5, maxValue: 3) 48 | ->decimalPlaces(1) 49 | ->step(0.1) 50 | ->tooltips() 51 | ->hintIcon('tabler-question-mark') 52 | ->hintIconTooltip('Speed of the snowflakes falling.') 53 | ->disabled(fn ($get) => !$get('SNOWFLAKES_ENABLED')) 54 | ->default(fn () => config('snowflakes.speed')), 55 | Slider::make('SNOWFLAKES_OPACITY') 56 | ->label('Opacity') 57 | ->range(minValue: 0.1, maxValue: 1) 58 | ->decimalPlaces(1) 59 | ->step(0.1) 60 | ->tooltips() 61 | ->hintIcon('tabler-question-mark') 62 | ->hintIconTooltip('How well can you see through the snowflakes.') 63 | ->disabled(fn ($get) => !$get('SNOWFLAKES_ENABLED')) 64 | ->default(fn () => config('snowflakes.opacity')), 65 | Slider::make('SNOWFLAKES_DENSITY') 66 | ->label('Density') 67 | ->range(minValue: 0.5, maxValue: 10) 68 | ->decimalPlaces(1) 69 | ->step(0.1) 70 | ->tooltips() 71 | ->hintIcon('tabler-question-mark') 72 | ->hintIconTooltip('Page density of the snowflakes. More density, more snowflakes.') 73 | ->disabled(fn ($get) => !$get('SNOWFLAKES_ENABLED')) 74 | ->default(fn () => config('snowflakes.density')), 75 | Slider::make('SNOWFLAKES_QUALITY') 76 | ->label('Quality') 77 | ->range(minValue: 0.1, maxValue: 1) 78 | ->decimalPlaces(1) 79 | ->step(0.1) 80 | ->tooltips() 81 | ->hintIcon('tabler-question-mark') 82 | ->hintIconTooltip('Higher quality may impact performance on some devices.') 83 | ->disabled(fn ($get) => !$get('SNOWFLAKES_ENABLED')) 84 | ->default(fn () => config('snowflakes.quality')), 85 | ]; 86 | 87 | return [ 88 | Group::make() 89 | ->schema($schema) 90 | ->columns(), 91 | ]; 92 | } 93 | 94 | public function saveSettings(array $data): void 95 | { 96 | $data['SNOWFLAKES_ENABLED'] = $data['SNOWFLAKES_ENABLED'] ? 'true' : 'false'; 97 | $this->writeToEnvironment($data); 98 | 99 | Notification::make() 100 | ->title('Settings saved') 101 | ->success() 102 | ->send(); 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /legal-pages/src/Filament/Admin/Pages/LegalPages.php: -------------------------------------------------------------------------------- 1 | |null */ 32 | public ?array $data = []; 33 | 34 | public function getTitle(): string 35 | { 36 | return trans_choice('legal-pages::strings.legal_page', 2); 37 | } 38 | 39 | public static function getNavigationLabel(): string 40 | { 41 | return trans_choice('legal-pages::strings.legal_page', 2); 42 | } 43 | 44 | public static function getNavigationGroup(): ?string 45 | { 46 | return trans('admin/dashboard.advanced'); 47 | } 48 | 49 | public static function canAccess(): bool 50 | { 51 | return user()?->can('view legalPages'); 52 | } 53 | 54 | public function mount(): void 55 | { 56 | $data = []; 57 | 58 | foreach (LegalPageType::cases() as $legalPageType) { 59 | $data[$legalPageType->getId()] = LegalPagesPlugin::Load($legalPageType); 60 | } 61 | 62 | $this->form->fill($data); 63 | } 64 | 65 | /** 66 | * @return Component[] 67 | * 68 | * @throws Exception 69 | */ 70 | public function getFormSchema(): array 71 | { 72 | $schema = []; 73 | 74 | foreach (LegalPageType::cases() as $legalPageType) { 75 | $schema[] = MarkdownEditor::make($legalPageType->getId()) 76 | ->label($legalPageType->getLabel()) 77 | ->hintActions([ 78 | Action::make('view') 79 | ->label(trans('filament-actions::view.single.label')) 80 | ->icon('tabler-eye') 81 | ->url($legalPageType->getUrl(), true) 82 | ->visible(fn (Get $get) => $get($legalPageType->getId())), 83 | Action::make('clear') 84 | ->label(trans('legal-pages::strings.clear')) 85 | ->color('danger') 86 | ->icon('tabler-trash') 87 | ->action(fn (Set $set) => $set($legalPageType->getId(), null)), 88 | ]); 89 | } 90 | 91 | return $schema; 92 | } 93 | 94 | protected function getFormStatePath(): ?string 95 | { 96 | return 'data'; 97 | } 98 | 99 | protected function getHeaderActions(): array 100 | { 101 | return [ 102 | Action::make('save') 103 | ->label(trans('filament-panels::resources/pages/edit-record.form.actions.save.label')) 104 | ->action('save') 105 | ->keyBindings(['mod+s']), 106 | ]; 107 | } 108 | 109 | public function save(): void 110 | { 111 | try { 112 | $data = $this->form->getState(); 113 | 114 | foreach ($data as $legalPageType => $contents) { 115 | LegalPagesPlugin::Save($legalPageType, $contents); 116 | } 117 | 118 | Notification::make() 119 | ->title(trans('legal-pages::strings.notifications.saved')) 120 | ->success() 121 | ->send(); 122 | } catch (Exception $exception) { 123 | Notification::make() 124 | ->title(trans('legal-pages::strings.notifications.saved_error')) 125 | ->body($exception->getMessage()) 126 | ->danger() 127 | ->send(); 128 | } 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Pelican Plugins 2 | 3 | A curated list of plugins for the [pelican panel](https://pelican.dev). Feel free to add plugins that you created via a pull request! 4 | 5 | ## How to install plugins 6 | 7 | [Download the repository archive](https://github.com/pelican-dev/plugins/archive/refs/heads/main.zip) and extract the folders of the plugins you want to install to your panels `plugins` folder (`/var/www/pelican/plugins` by default). Finally, open your panel and head to the plugins page and click on "Install". 8 | 9 | ## Plugin list 10 | 11 | ### [Announcements](/announcements) by Boy132 12 | 13 | Very simple announcements via AlertBanners. 14 | 15 | > [!WARNING] 16 | > Alert banners are currently bugged. See 17 | 18 | --- 19 | 20 | ### [Billing](/billing) by Boy132 21 | 22 | Allows admins to create products and users to buy them. Features automatic server creation and payment handling. Also adds a simple shop. 23 | 24 | > [!CAUTION] 25 | > This plugin is incomplete! 26 | 27 | --- 28 | 29 | ### [Fluffy Theme](/fluffy-theme) by Boy132 30 | 31 | Simple "Theme" with silly colors and font. 32 | 33 | --- 34 | 35 | ### [Generic OIDC Providers](/generic-oidc-providers) by Boy132 36 | 37 | Allows to create generic OIDC providers. 38 | 39 | --- 40 | 41 | ### [Legal Pages](/legal-pages) by Boy132 42 | 43 | Adds some legal pages (like an Imprint) to the panel. 44 | 45 | --- 46 | 47 | ### [Mclogs Uploader](/mclogs-uploader) by Boy132 48 | 49 | Adds a button to the console for uploading console logs to [mclo.gs](https://mclo.gs/). 50 | 51 | --- 52 | 53 | ### [Minecraft Modrinth](/minecraft-modrinth) by Boy132 54 | 55 | Allows to easily download minecraft mods & plugins from modrinth. 56 | 57 | > [!IMPORTANT] 58 | > Add `modrinth_mods` or `modrinth_plugins` to the features of your egg to enable the mod/ plugins page. Also make sure your egg has the `minecraft` tag and a tag for the mod loader, e.g. `paper` or `forge` or `fabric`. 59 | 60 | --- 61 | 62 | ### [Pirate Language](/pirate-language) by Boy132 63 | 64 | Adds a new Pirate like language to the panel. 65 | 66 | > [!WARNING] 67 | > Only the server pages, the Admin Dashboard, Profile page & Health page are currently translated. 68 | 69 | --- 70 | 71 | ### [Player Counter](/player-counter) by Boy132 72 | 73 | Adds a simple player counter to the console and a player list page. Uses a [GameQ fork](https://github.com/krymosoftware/gameq). 74 | 75 | > [!IMPORTANT] 76 | > You need to have the bz2 php extension and zip/ 7zip installed! 77 | 78 | > [!IMPORTANT] 79 | > For Minecraft servers you need to set `enable-query` to true and the `query-port` to your server port! (in `server.properties`) 80 | 81 | --- 82 | 83 | ### [Pterodactyl Theme](/pterodactyl-theme) by Boy132 84 | 85 | Simple "Theme" with Pterodactyl like colors and font. 86 | 87 | --- 88 | 89 | ### [Register](/register) by Boy132 90 | 91 | Enables registration on all panels. 92 | 93 | --- 94 | 95 | ### [Robo Avatars](/robo-avatars) by Boy132 96 | 97 | Adds [RoboHash](https://robohash.org/) as avatar provider. 98 | 99 | --- 100 | 101 | ### [Rust uMod](/rust-umod) by Boy132 102 | 103 | Allows to easily download rust plugins from uMod. 104 | 105 | --- 106 | 107 | ### [Snowflakes](/snowflakes) by Boy132 108 | 109 | Adds simple CSS snowflakes to all panels. 110 | 111 | --- 112 | 113 | ### [Subdomains](/subdomains) by Boy132 114 | 115 | Allows users to create subdomains (on cloudflare) for their servers. 116 | 117 | --- 118 | 119 | ### [Tawk.to Widget](/tawkto-widget) by Boy132 120 | 121 | Adds a Tawk.to widget to all panels. 122 | 123 | --- 124 | 125 | ### [Theme Customizer](/theme-customizer) by Boy132 126 | 127 | Allows to customize the panel font and colors. 128 | 129 | --- 130 | 131 | ### [Tickets](/tickets) by Boy132 132 | 133 | Allows users to create tickets (per server) and admins to answer them. 134 | 135 | --- 136 | 137 | ### [User Creatable Servers](/user-creatable-servers) by Boy132 138 | 139 | Allows admins to assign resources to users. User can then create server themselves. 140 | 141 | > [!IMPORTANT] 142 | > Add `user_creatable_servers` as tag to the nodes that should be used for creating servers. 143 | --------------------------------------------------------------------------------