mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-02-27 18:23:15 -05:00
feat: Improve auto-form layout (#7150)
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
<GroupDataPage
|
||||
:icon="$globals.icons.categories"
|
||||
:title="$t('data-pages.categories.category-data')"
|
||||
:create-title="$t('data-pages.recipe-actions.new-recipe-action')"
|
||||
:edit-title="$t('data-pages.recipe-actions.edit-recipe-action')"
|
||||
:table-headers="tableHeaders"
|
||||
:table-config="tableConfig"
|
||||
:data="actionStore.recipeActions.value || []"
|
||||
@@ -57,11 +59,11 @@ const tableHeaders: TableHeaders[] = [
|
||||
},
|
||||
];
|
||||
|
||||
const actionStore = useGroupRecipeActions(null, null);
|
||||
const actionStore = useGroupRecipeActions();
|
||||
|
||||
// ============================================================
|
||||
// Form items (shared)
|
||||
const formItems: AutoFormItems = [
|
||||
const formItems = computed<AutoFormItems>(() => [
|
||||
{
|
||||
label: i18n.t("general.title"),
|
||||
varName: "title",
|
||||
@@ -78,10 +80,14 @@ const formItems: AutoFormItems = [
|
||||
label: i18n.t("data-pages.recipe-actions.action-type"),
|
||||
varName: "actionType",
|
||||
type: fieldTypes.SELECT,
|
||||
options: [{ text: "link" }, { text: "post" }],
|
||||
options: [
|
||||
{ text: i18n.t("data-pages.recipe-actions.action-types.link"), value: "link" },
|
||||
{ text: i18n.t("data-pages.recipe-actions.action-types.post"), value: "post" },
|
||||
],
|
||||
selectReturnValue: "value",
|
||||
rules: [validators.required],
|
||||
},
|
||||
];
|
||||
]);
|
||||
|
||||
// ============================================================
|
||||
// Create
|
||||
|
||||
Reference in New Issue
Block a user