Skip to content

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

Merged
merged 5 commits into from
May 21, 2025
Merged

Create cli #213

merged 5 commits into from
May 21, 2025

Conversation

NoOne7135
Copy link
Contributor

No description provided.

@NoOne7135 NoOne7135 requested a review from ivictbor May 20, 2025 11:43
@ivictbor ivictbor requested a review from Copilot May 20, 2025 14:09
Copy link
Contributor

@Copilot Copilot AI left a 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 reference props.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 unused reason 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 to props.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 like v-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-adding v-if="record[props.column.name]" for correct conditional display.
<div

adminforth/commands/createCustomComponent/templates/customCrud/threeDotsDropdownItems.vue.hbs:8

  • Replaced {{ t(item.label) }} with raw item.label, removing translation. If i18n support is needed, use {{ t(item.label) }} again in the template or pre-translate the labels.
\{{ item.label }}

@ivictbor ivictbor merged commit cd0a8a9 into next May 21, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants