42 lines
1.6 KiB
PHP
42 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace App\Vito\Plugins\LiittleCookie\VitoTechnitiumDns;
|
|
|
|
use App\DTOs\DynamicField;
|
|
use App\DTOs\DynamicForm;
|
|
use App\Plugins\AbstractPlugin;
|
|
use App\Plugins\RegisterDNSProvider;
|
|
|
|
class Plugin extends AbstractPlugin
|
|
{
|
|
protected string $name = 'Technitium DNS';
|
|
|
|
protected string $description = 'Technitium DNS Server provider integration';
|
|
|
|
public function boot(): void
|
|
{
|
|
RegisterDNSProvider::make(Technitium::id())
|
|
->label('Technitium')
|
|
->handler(Technitium::class)
|
|
->form(
|
|
DynamicForm::make([
|
|
DynamicField::make('server_url')
|
|
->text()
|
|
->label('Server URL')
|
|
->placeholder('http://dns.example.com:5380')
|
|
->description('Base URL of your Technitium DNS Server (with port, without trailing slash)'),
|
|
DynamicField::make('api_token')
|
|
->passwordWithToggle()
|
|
->label('API Token')
|
|
->description('Generate a non-expiring API token from the Technitium web console (Administration > Sessions > Create API Token)'),
|
|
DynamicField::make('zone_filter')
|
|
->text()
|
|
->label('Zone Filter')
|
|
->placeholder('example.com, mysite.org')
|
|
->description('Optional comma-separated list of zones to show. Leave empty to show all Primary zones.'),
|
|
])
|
|
)
|
|
->register();
|
|
}
|
|
}
|