mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 13:37:15 +00:00
feat: Reassign save search shortcut for Arc (#389)
This commit is contained in:
parent
148c92b504
commit
ebd3f25d28
3 changed files with 17 additions and 3 deletions
5
.changeset/kind-moons-appear.md
Normal file
5
.changeset/kind-moons-appear.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@hyperdx/app': patch
|
||||
---
|
||||
|
||||
Reassign save search shortcut for Arc to CMD+SHIFT+S
|
||||
|
|
@ -577,10 +577,12 @@ export const RawLogTable = memo(
|
|||
[highlightedLineId, onRowExpandClick, dedupLogs],
|
||||
);
|
||||
|
||||
useHotkeys(['ArrowRight', 'j'], () => {
|
||||
useHotkeys(['ArrowRight', 'ArrowDown', 'j'], e => {
|
||||
e.preventDefault();
|
||||
shiftHighlightedLineId(1);
|
||||
});
|
||||
useHotkeys(['ArrowLeft', 'k'], () => {
|
||||
useHotkeys(['ArrowLeft', 'ArrowUp', 'k'], e => {
|
||||
e.preventDefault();
|
||||
shiftHighlightedLineId(-1);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -482,8 +482,15 @@ function SearchPage() {
|
|||
}
|
||||
}, [selectedSavedSearch, setSearchedQuery, _searchedQuery]);
|
||||
|
||||
const isArcBrowser =
|
||||
typeof window !== 'undefined' &&
|
||||
window
|
||||
.getComputedStyle?.(document.documentElement)
|
||||
.getPropertyValue('--arc-palette-title');
|
||||
|
||||
useHotkeys(
|
||||
['ctrl+s', 'meta+s'],
|
||||
// Arc Browser uses CMD+S for toggling sidebar which conflicts with save search
|
||||
isArcBrowser ? ['ctrl+shift+s', 'meta+shift+s'] : ['ctrl+s', 'meta+s'],
|
||||
() => {
|
||||
setSaveSearchModalMode('save');
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue