Enable Update URL

Since importing an egg via url was added, we can enable this.
This commit is contained in:
Charles 2024-07-03 10:27:57 -04:00
parent 7164951085
commit 160ea1ed50
4 changed files with 12 additions and 7 deletions

View File

@ -74,9 +74,10 @@ class CreateEgg extends CreateRecord
->helperText('')
->columnSpan(['default' => 1, 'sm' => 1, 'md' => 2, 'lg' => 2]),
TextInput::make('update_url')
->disabled()
->helperText('Not implemented.')
->columnSpan(['default' => 1, 'sm' => 1, 'md' => 2, 'lg' => 2]),
->hintIcon('tabler-question-mark')
->hintToolTip('URLs must point directly to the raw .json file.')
->columnSpan(['default' => 1, 'sm' => 1, 'md' => 2, 'lg' => 2])
->url(),
KeyValue::make('docker_images')
->live()
->columnSpanFull()

View File

@ -91,8 +91,10 @@ class EditEgg extends EditRecord
->helperText('')
->columnSpan(['default' => 1, 'sm' => 1, 'md' => 2, 'lg' => 2]),
TextInput::make('update_url')
->disabled()
->helperText('Not implemented.')
->label('Update URL')
->url()
->hintIcon('tabler-question-mark')
->hintIconTooltip('URLs must point directly to the raw .json file.')
->columnSpan(['default' => 1, 'sm' => 1, 'md' => 2, 'lg' => 2]),
KeyValue::make('docker_images')
->live()
@ -247,8 +249,9 @@ class EditEgg extends EditRecord
Tab::make('From URL')
->icon('tabler-world-upload')
->schema([
TextInput::make('url')
TextInput::make('update_url')
->label('URL')
->formatStateUsing(fn (Egg $egg): string => $egg->update_url)
->hint('Link to the egg file (eg. minecraft.json)')
->url(),
]),

View File

@ -95,6 +95,7 @@ class Egg extends Model
'config_stop',
'config_from',
'startup',
'update_url',
'script_is_privileged',
'script_install',
'script_entry',