mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-08 16:22:51 +02:00
feat(shortcut): Add keyboard shortcuts for repository file and code search
Add GitHub-like keyboard shortcuts for repository navigation: - Press 'T' to focus the "Go to file" search input - Press 'S' to focus the "Search code" input - Press 'Escape' to blur focused search inputs Both search inputs display a keyboard hint (kbd element) showing the available shortcut. The hint hides when the input is focused or has a value. Includes unit tests and e2e tests for the new functionality.
This commit is contained in:
1 parent
a6282c98d7
commit
7226ecde9a
7 files changed
+460
-4
No files matched your search
@@ -1,7 +1,9 @@
|
||||
<div class="repo-home-sidebar-top">
|
||||
<form class="ignore-dirty tw-flex tw-flex-1" action="{{.RepoLink}}/search" method="get">
|
||||
<div class="ui small action input tw-flex-1">
|
||||
<input name="q" size="10" placeholder="{{ctx.Locale.Tr "search.code_kind"}}"> {{template "shared/search/button"}}
|
||||
<div class="ui small action input tw-flex-1 repo-code-search-input-wrapper">
|
||||
<input name="q" size="10" placeholder="{{ctx.Locale.Tr "search.code_kind"}}" class="code-search-input">
|
||||
<kbd class="repo-search-shortcut-hint">S</kbd>
|
||||
{{template "shared/search/button"}}
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
Reference in new issue
Block a user