File tree Expand file tree Collapse file tree
src/view/components/container/controls-bar/modals/hotkeys/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33 import { StatefulViewCommand } from ' src/view/actions/keyboard-shortcuts/helpers/commands/default-view-hotkeys' ;
44 import {
55 DynamicLabelState ,
6- getDynamicLabel
6+ getDynamicLabel ,
7+ HotkeysThatBehaveDifferentlyInOutlineMode
78 } from ' src/view/components/container/controls-bar/modals/hotkeys/components/helpers/get-dynamic-label' ;
9+ import { Info } from ' lucide-svelte' ;
810
911 export let commandHotkeys: StatefulViewCommand ;
10- export let labelState: DynamicLabelState
12+ export let labelState: DynamicLabelState ;
1113 </script >
1214
1315<div class =" command" >
14- <span class ="label" >{getDynamicLabel (labelState ,commandHotkeys .name )}</span >
16+ <span class =" label"
17+ >{getDynamicLabel (labelState , commandHotkeys .name )}
18+
19+ {#if HotkeysThatBehaveDifferentlyInOutlineMode .has (commandHotkeys .name )}
20+ <span
21+ class =" info-icon"
22+ aria-label =" Behaves differently in outline mode"
23+ ><Info class =" svg-icon" /></span
24+ >
25+ {/if }
26+ </span >
1527 <div class =" hotkeys" >
1628 {#each commandHotkeys .hotkeys as hotkey , i }
1729 <Hotkey
3244 border-radius : 4px ;
3345 gap : 8px ;
3446 background-color : var (--color-base-30 );
35- flex-wrap :wrap ;
47+ flex-wrap : wrap ;
3648 }
3749
3850 .hotkeys {
4557 .label {
4658 font-size : 14px ;
4759 color : var (--text-normal );
48- display : block ;
60+ position : relative ;
61+ display : flex ;
62+ align-items : center ;
63+ gap : 5px ;
64+ }
65+
66+ .info-icon {
67+ color : #4973A1FF ;
68+ margin-bottom : -4px ;
69+
70+ & svg {
71+ width : 12px ;
72+ height : 12px ;
73+ }
4974 }
5075 </style >
Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ import { CommandName } from 'src/lang/hotkey-groups';
22import { hotkeysLang } from 'src/lang/hotkeys-lang' ;
33import { lang } from 'src/lang/lang' ;
44
5+ export const HotkeysThatBehaveDifferentlyInOutlineMode : Set < CommandName > =
6+ new Set ( [ 'go_down' , 'go_up' , 'go_left' , 'go_right' ] ) ;
7+
58export type DynamicLabelState = { outlineMode : boolean } ;
69
710export const getDynamicLabel = (
You can’t perform that action at this time.
0 commit comments