diff --git a/app/Features/Feature.php b/app/Features/Feature.php new file mode 100644 index 000000000..c34a5b12b --- /dev/null +++ b/app/Features/Feature.php @@ -0,0 +1,16 @@ +form([ + Placeholder::make('eula') + ->label('By pressing I Accept below you are indicating your agreement to the Minecraft® EULA.'), + ]) + ->action(function (DaemonFileRepository $fileRepository) { + try { + $fileRepository->putContent('eula.txt', 'eula=true'); + } catch (\Exception $e) { + Notification::make() + ->title('Error') + ->body($e->getMessage()) + ->danger() + ->send(); + } + } + ); + } +} diff --git a/resources/views/filament/components/server-console.blade.php b/resources/views/filament/components/server-console.blade.php index a28b960c4..e3cc0b45c 100644 --- a/resources/views/filament/components/server-console.blade.php +++ b/resources/views/filament/components/server-console.blade.php @@ -99,8 +99,14 @@ const TERMINAL_PRELUDE = '\u001b[1m\u001b[33mpelican@' + '{{ \Filament\Facades\Filament::getTenant()->name }}' + ' ~ \u001b[0m'; - const handleConsoleOutput = (line, prelude = false) => + const handleConsoleOutput = (line, prelude = false) => { terminal.writeln((prelude ? TERMINAL_PRELUDE : '') + line.replace(/(?:\r\n|\r|\n)$/im, '') + '\u001b[0m'); + checkListeners(line); + } + + const checkListeners = (line) => { + + } const handleTransferStatus = (status) => status === 'failure' && terminal.writeln(TERMINAL_PRELUDE + 'Transfer has failed.\u001b[0m');