Skip to content
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

feat: Added functionality to rename presets #320

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AFcPPe
Copy link

@AFcPPe AFcPPe commented Feb 19, 2024

中文:

标题:增加预设重命名功能 Closes #316

描述:
本次PR实现了预设重命名功能。具体变更如下:

  1. 在国际化文件en.js和zh-cn.js中,新增了'renamePresetTitle'和'renamePresetContent'字段,以支持预设的重命名。
  2. 在PresetItem.vue组件中,添加了一个带有编辑图标的新按钮,并为其绑定了相应的事件监听器,用于重命名预设。
  3. 在CharacterPresetsPage.vue页面中,添加了一个处理重命名事件的处理器,它会打开一个提示框,让用户输入新的预设名称。
  4. 在preset.ts存储模块中,新增了一个名为'renamePreset'的函数,用于在应用状态中处理预设的重命名。
  5. 对现有的组件和存储模块进行了一些小的修改,以支持新的重命名功能。

English:

Title: Added functionality to rename presets Closes #316

Description:
This PR introduces the ability to rename presets. The changes are as follows:

  1. New fields 'renamePresetTitle' and 'renamePresetContent' were added to the i18n locales en.js and zh-cn.js files to support the renaming of presets.
  2. A new button with an edit icon was added to the PresetItem.vue component, along with the corresponding event listener for renaming presets.
  3. A handler for the rename event was added to the CharacterPresetsPage.vue page, which opens a prompt for users to enter a new preset name.
  4. A new function 'renamePreset' was added to the preset.ts store module to handle the renaming of presets within the application state.
  5. Minor adjustments were made to existing components and store modules to accommodate the new renaming functionality.

Changes:
1. In i18n locales en.js and zh-cn.js files, added new fields for 'renamePresetTitle' and 'renamePresetContent' to support renaming of presets.
2. In PresetItem.vue component, added a new button with an edit icon for renaming presets along with the corresponding event listener.
3. In CharacterPresetsPage.vue page, added a handler for the rename event which opens a prompt for entering the new preset name.
4. In preset.ts store, added a new function 'renamePreset' to handle renaming of presets in the application state.
5. A few minor changes have been made to the existing components and store modules to support the new rename functionality.
Copy link

netlify bot commented Feb 19, 2024

Deploy Preview for dulcet-cascaron-04b388 canceled.

Name Link
🔨 Latest commit 3dc96ed
🔍 Latest deploy log https://app.netlify.com/sites/dulcet-cascaron-04b388/deploys/65d3a448b20ce20008eba6b2

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.

建议计算预设中添加重命名功能
1 participant