Skip to content

feat: 添加页面内搜索快捷键 - #129

Open
MoYingJi wants to merge 1 commit into
SPlayer-Dev:devfrom
MoYingJi:pr/feat/hotkey-focus-search-input
Open

feat: 添加页面内搜索快捷键#129
MoYingJi wants to merge 1 commit into
SPlayer-Dev:devfrom
MoYingJi:pr/feat/hotkey-focus-search-input

Conversation

@MoYingJi

@MoYingJi MoYingJi commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

改动类型

  • 新功能(feat)
  • 缺陷修复(fix)
  • 重构 / 优化(不改变对外行为)
  • 文档(docs)
  • 其他(请在「改动说明」中注明)

是否包含破坏性变更

  • 是(请在「改动说明」中详细描述)

改动说明

增加了应用内快捷键「页面内搜索」,在有搜索框的页面(比如歌单页面)聚焦到搜索框。默认快捷键为 /。为了操作更流畅统一,输入框可以用 Esc 失焦

测试情况

测试有效

自查清单

  • 本 PR 只包含一个主要功能 / 修复,没有夹带无关改动
  • 已在本地完整测试通过;AI 生成的代码同样自行测试并审阅过,未做未经验证的提交
  • 已运行 pnpm format,并确认 pnpm typecheckpnpm lint 通过
  • 改动涉及原生模块时已 pnpm build:native 验证;未手写 native/*/index.d.ts
  • 已向 dev 分支提交

Copilot AI review requested due to automatic review settings August 1, 2026 21:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

新增页面内搜索快捷键 /,统一聚焦各页面搜索框,并支持通过 Esc 让输入框失焦。

Changes:

  • 注册页面内搜索动作及默认快捷键。
  • 为七个页面标记可聚焦搜索框。
  • 扩展输入框 Esc 行为及中英文文案。

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/core/hotkey/registry.ts 注册搜索框聚焦逻辑
shared/defaults/hotkeys.ts 添加默认 / 绑定
shared/types/hotkey.ts 扩展动作 ID 类型
src/components/ui/SInput.vue Esc 时统一失焦
src/pages/Streaming/Songs.vue 标记搜索框
src/pages/Liked.vue 标记搜索框
src/pages/Library.vue 标记搜索框
src/pages/History.vue 标记搜索框
src/pages/Collection.vue 标记搜索框
src/pages/Cloud.vue 标记搜索框
src/pages/Artist.vue 标记搜索框
src/i18n/locales/zh-CN.json 添加中文动作名称
src/i18n/locales/en-US.json 添加英文动作名称

Comment thread src/core/hotkey/registry.ts Outdated
Copilot AI review requested due to automatic review settings August 1, 2026 21:47
@MoYingJi
MoYingJi force-pushed the pr/feat/hotkey-focus-search-input branch from 6a3db09 to 08e2514 Compare August 1, 2026 21:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated no new comments.

Suppressed comments (1)

shared/defaults/hotkeys.ts:139

  • 必修:这个默认值并不能在所有键盘布局上表示“输入 /”。当前 parseAccelerator/matchParsedevent.code 和精确修饰键匹配,因此德语布局中的 /(例如 Shift+Digit7)不会命中无修饰键的 Slash,用户按实际的 / 时功能无响应。请让该动作对可打印字符按 event.key 匹配,或改用跨布局稳定的默认组合键,并同步录入/展示逻辑。
    defaultBinding: { inApp: "/", global: null },

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