Skip to content

Conversation

@sogladev
Copy link
Member

@sogladev sogladev commented Dec 14, 2025

Changed proposed:

Add support for cloning an existing entity from the 'Create' card for multiple types.

I modified the tests for create.component.spec.ts. I'm not sure what other tests are needed for this.

FYI not an NX/Angular expert and I used AI tools to help draft this. Hopefully, nothing too bad in here

Details:

Adds allowCopy field to the CreateComponent <keira-create>, which is opt-in.

Handling is done by routing to a /clone route with a provided ID to copy from. This is similar to /select and /create that already exist. The /copy route displays a page with copy queries for the main table and related tables. After executing, the user is routed to the edit page.

After doing this for creatures, it was easy enough to copy and paste the handling for other types.

For gobjects and creatures, only the template-like tables are copied. SmartAI (TODO?), spawns or guid-specific stuff is not copied.

Issues

UI

UI Screenshots

keira_38_1

keira_3

keira_4

[[copilot summary below]]

This pull request adds support for "copy" routes and features across multiple entity types in the Keira app, allowing users to duplicate existing entries. It also introduces new internationalized strings related to the copy functionality in all supported languages.

Key changes include:

Routing and Feature Enhancements:

  • Added new "copy" routes for various entities (e.g., Creature, Quest, Gameobject, Item, Spell, Gossip, GameTele, FishingLoot, MailLoot, ReferenceLoot, PageText, NpcText, AcoreString) in routes.ts, each guarded by the appropriate handler service and linked to the corresponding CopyComponent. This enables users to copy existing records for these entities. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]
  • Updated imports in routes.ts to include all new CopyComponent classes for the affected features. [1] [2] [3] [4] [5] [6]

Internationalization (i18n):

  • Added new strings for copy-related UI elements (such as "Copy from existing", "Copy Entry SQL", "Execute", "Continue to Editor", etc.) to all supported language files (en.json, de.json, es.json, fr.json, el.json, it.json). This ensures the new copy functionality is fully localized. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

These changes collectively introduce and localize the experimental ability to copy existing entries for a wide range of entities within the Keira application, improving user productivity and data management.

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.

[Feature Request] - Ability to clone existing entity Feature Request: Clone/Copy Options Suggestion: Data replication

2 participants