wormtql / genshin_artifact

莫娜占卜铺 | 原神 | 圣遗物搭配 | 圣遗物潜力。多方向圣遗物自动搭配,多方向圣遗物潜力与评分, Genshin Impact artifacts assessment, artifacts auto combination, artifacts statistics, artifacts potential, and more.
https://www.mona-uranai.com/
MIT License
1.19k stars 110 forks source link

feat: Added functionality to rename presets #320

Open AFcPPe opened 7 months ago

AFcPPe commented 7 months ago

中文:

标题:增加预设重命名功能 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.
netlify[bot] commented 7 months ago

Deploy Preview for dulcet-cascaron-04b388 canceled.

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