[6.x] Inertia route settings#18927
Conversation
# Conflicts: # resources/build/assets/AdminTable-BaWDz4rn.js # resources/build/assets/Badge-DpS_C1p3.js # resources/build/assets/CpGlobalSidebar-CwLSFqmn.js # resources/build/assets/CpGlobalSidebar-D3tqrxar.js # resources/build/assets/CpGlobalSidebar-Dad7OYRX.js # resources/build/assets/CpQueueIndicator-BIIoBttd.js # resources/build/assets/CpQueueIndicator-Bn6InNNP.js # resources/build/assets/CpQueueIndicator-Z5fWxzKz.js # resources/build/assets/CraftInput-Diy-IcJh.js # resources/build/assets/CraftInputHandle-DC3oqA7Q.js # resources/build/assets/DeleteSiteModal-BcQpmR0f.js # resources/build/assets/DynamicHtmlRenderer-C36QxfOD.js # resources/build/assets/EntryTypesController-CFx2poSn.js # resources/build/assets/GraphQlSchemasPage-13Oak1St.js # resources/build/assets/GraphQlTokensPage-BLthOlOS.js # resources/build/assets/InlineFlash-Mr7imUWg.js # resources/build/assets/InputCombobox-DAgXLrVb.js # resources/build/assets/Modal-C3z5Gb2R.js # resources/build/assets/SectionsController-BQdhSguM.js # resources/build/assets/SectionsController-DXvTOXL3.js # resources/build/assets/SectionsController-hmgeYlcK.js # resources/build/assets/Select-BaRh7IFc.js # resources/build/assets/SettingsFieldsIndexPage-C5hm_gWn.js # resources/build/assets/SettingsFilesystemsIndexPage-BwXG7dOT.js # resources/build/assets/UserGroupsController-CSpl-KnZ.js # resources/build/assets/UtilitiesShowPage-A8JIeXgI.js # resources/build/assets/VolumesController-BjAWrNHV.js # resources/build/assets/VolumesController-CoajQ-Mw.js # resources/build/assets/VolumesController-DqjDlCi_.js # resources/build/assets/_plugin-vue_export-helper-mF6LBIZ_.js # resources/build/assets/cp-Ck7FKPK5.css # resources/build/assets/decorate-BM_SnROF.js # resources/build/assets/decorate-BqdY79kW.js # resources/build/assets/decorate-DQXQhzse.js # resources/build/assets/keyboard-B8LrfiOo.js # resources/build/assets/keyboard-LXOg_7gc.js # resources/build/assets/keyboard-suU_xNs9.js # resources/build/assets/nav-item.ts-M5J4cS0U.js # resources/build/assets/transformBooleanOptions-EOyV07RD.js # resources/build/assets/useFetch-CmOkdaaH.js # resources/build/assets/useInputGenerator-C97rdGdo.js # resources/build/assets/useServerSort-Di1sY1yR.js # resources/build/assets/useSettingsSave-BLqVG46P.js # resources/build/assets/useSettingsSave-CXH8py4m.js # resources/build/assets/useSettingsSave-DregJRb-.js # resources/build/manifest.json
There was a problem hiding this comment.
This is mostly a strict port of the legacy MixedInput component, it works but I'm not 100% confident on how idiomatic Vue this is
There was a problem hiding this comment.
I extended this to make it possible to pass in actionMenuItems (in this case a "Delete" action) which show up next to the save button
There was a problem hiding this comment.
This was crashing the browser when used on the Routes index, I don't exactly know why it was crashing but Codex made these changes to memoize or delay some things and now it's not crashing.
| </template> | ||
| </ActionMenu> | ||
| </craft-button-group> | ||
| v-if="formAdditionalActions?.length" |
There was a problem hiding this comment.
Added an extra ActionMenu here
| .optimistic<{routes: Array<RouteIndexData>}>(() => { | ||
| return { | ||
| routes, | ||
| }; |
There was a problem hiding this comment.
First time I used Inertia optimistic, but a pretty good use-case for it 😄
Description
Ports the route settings page to Inertia
I've decided to not port it in the same way with the edit happening in a modal, this isn't really a pattern used anywhere else in the control panel.
This ports the edit screen to a normal Inertia page with a form, which we can render in a slideout once that functionality is implemented.