-
Notifications
You must be signed in to change notification settings - Fork 17
Create cli #213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create cli #213
Conversation
…t and enhance prop definitions
…g with optional additional name
…ance record access
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds standardized Vue <script setup>
boilerplate to generated component templates, refactors customFields and customCrud templates to use typed props and i18n hooks, and extends the CLI to accept an optional “additional name” when generating CRUD injection components.
- Introduce
defineProps
/onMounted
in all templates and switch to TypeScript types where applicable - Replace dynamic
{{ reason }}
in global templates with static placeholder text - Update
main.js
to prompt for an optional additional name and include it in the generated filename - Enhance
configUpdater.js
logging to include the line number of injections added or updated
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
adminforth/commands/createCustomComponent/templates/login/afterLogin.vue.hbs | Static placeholder text + added props/onMounted boilerplate |
adminforth/commands/createCustomComponent/templates/global/userMenu.vue.hbs | Same dynamic‐to‐static change + props/onMounted |
adminforth/commands/createCustomComponent/templates/global/sidebar.vue.hbs | Same |
adminforth/commands/createCustomComponent/templates/global/header.vue.hbs | Same |
adminforth/commands/createCustomComponent/templates/global/everyPageBottom.vue.hbs | Same |
adminforth/commands/createCustomComponent/templates/customFields/show.vue.hbs | Typed defineProps , removed v-if on record[column.name] |
adminforth/commands/createCustomComponent/templates/customFields/list.vue.hbs | Same as show.vue.hbs |
adminforth/commands/createCustomComponent/templates/customCrud/threeDotsDropdownItems.vue.hbs | Added props/i18n but removed translation and extra menu items |
adminforth/commands/createCustomComponent/templates/customCrud/bottom.vue.hbs | Replaced table with a button + click handler |
adminforth/commands/createCustomComponent/templates/customCrud/beforeBreadcrumbs.vue.hbs & afterBreadcrumbs.vue.hbs | Added i18n translation calls, typed props |
adminforth/commands/createCustomComponent/main.js | Prompt for additionalName , append to componentFileName |
adminforth/commands/createCustomComponent/configUpdater.js | Capture and log injection line numbers in all injection functions |
Comments suppressed due to low confidence (8)
adminforth/commands/createCustomComponent/templates/login/afterLogin.vue.hbs:3
- Replaced dynamic
{{reason}}
with a static string, which removes the intended dynamic message. Consider using{{ props.reason }}
(and referenceprops.reason
) or removing the unused prop.
Login Page Text
adminforth/commands/createCustomComponent/templates/global/userMenu.vue.hbs:3
- Static placeholder replaced
{{reason}}
, losing dynamic behavior. Use{{ props.reason }}
or remove the unusedreason
prop and imports.
User Menu Text
adminforth/commands/createCustomComponent/templates/global/sidebar.vue.hbs:3
- Dynamic
{{reason}}
was replaced by a hard‐coded string. Restore dynamic interpolation ({{ props.reason }}
) or remove the unused prop boilerplate.
Sidebar Text
adminforth/commands/createCustomComponent/templates/global/header.vue.hbs:3
- Replaced
{{reason}}
with a static string, dropping the prop usage. Either bind toprops.reason
or eliminate the empty props definition.
Header Text
adminforth/commands/createCustomComponent/templates/global/everyPageBottom.vue.hbs:3
- Static text removed the dynamic
{{reason}}
interpolation. Use{{ props.reason }}
if you need the value, or drop the unused prop logic.
Page Bottom Text
adminforth/commands/createCustomComponent/templates/customFields/show.vue.hbs:2
- Removed the
v-if='record[column.name]'
check, causing the div to render even when the value is falsy. Reintroduce a guard likev-if="record[props.column.name]"
.
<div
adminforth/commands/createCustomComponent/templates/customFields/list.vue.hbs:2
- The original
v-if='record[column.name]'
was removed, making the element always render. Consider re-addingv-if="record[props.column.name]"
for correct conditional display.
<div
adminforth/commands/createCustomComponent/templates/customCrud/threeDotsDropdownItems.vue.hbs:8
- Replaced
{{ t(item.label) }}
with rawitem.label
, removing translation. If i18n support is needed, use{{ t(item.label) }}
again in the template or pre-translate the labels.
\{{ item.label }}
No description provided.