mirror of
https://github.com/pelican-dev/panel.git
synced 2025-06-30 15:21:08 +02:00
Fix Editing Files
This commit is contained in:
parent
4f3e07d4e4
commit
0c3baa5cd8
@ -118,16 +118,14 @@ class EditFiles extends Page
|
||||
->icon('tabler-x')
|
||||
->url(fn () => ListFiles::getUrl(['path' => dirname($this->path)])),
|
||||
])
|
||||
->footerActionsAlignment(Alignment::End)
|
||||
->footerActionsAlignment(Alignment::End) //TODO MISSING PADDING
|
||||
->schema([
|
||||
Select::make('lang')
|
||||
Select::make('lang') //TODO BROKEN
|
||||
->label('Syntax Highlighting')
|
||||
->searchable()
|
||||
->native(false)
|
||||
->live()
|
||||
->options(EditorLanguages::class)
|
||||
->selectablePlaceholder(false)
|
||||
->afterStateUpdated(fn ($state) => $this->dispatch('setLanguage', lang: $state))
|
||||
->default(fn () => EditorLanguages::fromWithAlias(pathinfo($this->path, PATHINFO_EXTENSION))),
|
||||
CodeEditor::make('editor')
|
||||
->hiddenLabel()
|
||||
@ -165,7 +163,8 @@ class EditFiles extends Page
|
||||
$this->redirect(ListFiles::getUrl(['path' => dirname($this->path)]));
|
||||
}
|
||||
}),
|
||||
]),
|
||||
])
|
||||
->columnSpanFull(),
|
||||
]);
|
||||
}
|
||||
|
||||
@ -208,7 +207,7 @@ class EditFiles extends Page
|
||||
{
|
||||
return [
|
||||
'form' => $this->form(static::getResource()::form(
|
||||
$this->makeForm()
|
||||
$this->makeSchema()
|
||||
->statePath($this->getFormStatePath())
|
||||
->columns($this->hasInlineLabels() ? 1 : 2)
|
||||
->inlineLabel($this->hasInlineLabels()),
|
||||
|
@ -1,9 +1,6 @@
|
||||
<x-filament-panels::page class="fi-resource-edit-file-page">
|
||||
<x-filament-panels::form
|
||||
id="form"
|
||||
:wire:key="$this->getId() . '.forms.' . $this->getFormStatePath()"
|
||||
wire:submit="save"
|
||||
>
|
||||
<form>
|
||||
{{ $this->form }}
|
||||
</x-filament-panels::form>
|
||||
</x-filament-panels::page>
|
||||
</form>
|
||||
<x-filament-actions::modals />
|
||||
</x-filament-panels::form>
|
||||
|
Loading…
x
Reference in New Issue
Block a user