Skip to content

feat(shortcut): 增加提示,设置完快捷键后 blur 输入框#1042

Merged
imsyy merged 1 commit into
SPlayer-Dev:devfrom
MoYingJi:pr/shortcut
Apr 17, 2026
Merged

feat(shortcut): 增加提示,设置完快捷键后 blur 输入框#1042
imsyy merged 1 commit into
SPlayer-Dev:devfrom
MoYingJi:pr/shortcut

Conversation

@MoYingJi
Copy link
Copy Markdown
Collaborator

template 部分没怎么改,套了一层 n-popover(加提示),改了一下 placeholder 的提示文字

onKeyDown 部分优化了体验,在设置完成快捷键后会自动 blur 掉输入框,删除快捷键和快捷键相同时增加了提示

不会就我不知道怎么取消设置快捷键,按 Esc 没法取消,看了代码才知道是 Backspace 吧?(

Copilot AI review requested due to automatic review settings April 17, 2026 00:13
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request enhances the shortcut recording component by adding instructional popovers and ensuring the input field is blurred after interactions. It also introduces a check to prevent redundant updates. A review comment suggests refactoring the isSameShortcut function to ensure consistent handling of global shortcut formatting and avoid redundant success messages.

Comment thread src/components/Setting/components/ShortcutRecorder.vue
Copy link
Copy Markdown
Contributor

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

为快捷键录制输入框增加聚焦提示,并在快捷键设置完成/冲突/删除/相同等场景下自动 blur 输入框,提升配置体验与可理解性。

Changes:

  • 为本地/全局快捷键输入框外层增加 n-popover 聚焦提示,并调整 placeholder 文案
  • 优化 onKeyDown 交互:设置完成后自动 blur;删除/相同/冲突时增加消息提示并 blur
  • 新增 isSameShortcut 用于快捷键相同判断

Comment thread src/components/Setting/components/ShortcutRecorder.vue Outdated
Comment thread src/components/Setting/components/ShortcutRecorder.vue
Comment thread src/components/Setting/components/ShortcutRecorder.vue
Copy link
Copy Markdown
Contributor

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.

Comment thread src/components/Setting/components/ShortcutRecorder.vue
Comment thread src/components/Setting/components/ShortcutRecorder.vue
Comment thread src/components/Setting/components/ShortcutRecorder.vue Outdated
Comment thread src/components/Setting/components/ShortcutRecorder.vue Outdated
template 部分没怎么改,套了一层 n-popover(加提示),改了一下 placeholder 的提示文字

onKeyDown 部分优化了体验,在设置完成快捷键后会自动 blur 掉输入框,删除快捷键和快捷键相同时增加了提示

~~不会就我不知道怎么取消设置快捷键,按 Esc 没法取消,看了代码才知道是 Backspace 吧?(~~
@imsyy imsyy merged commit ed080dd into SPlayer-Dev:dev Apr 17, 2026
@MoYingJi MoYingJi deleted the pr/shortcut branch April 18, 2026 04:08
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.

3 participants