mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-31 14:55:38 +03:00
a88b8bc00a
closes: https://github.com/TryGhost/Ghost/issues/8106 - Fixes the keyboard selection problems of the '+' menu. - Makes the active state of the keyboard selection blank until a key is pressed. - Fixes it so that the '+' menu executes the tool on Enter.
27 lines
957 B
Handlebars
27 lines
957 B
Handlebars
{{#if showButton}}
|
|
<button class="gh-cardmenu-button" {{action "openMenu"}}>{{inline-svg "plus"}}</button>
|
|
{{/if}}
|
|
{{#if isOpen}}
|
|
<div class="gh-cardmenu">
|
|
<div class="gh-cardmenu-search">
|
|
{{inline-svg "search.svg"}}
|
|
{{gh-input query class="gh-input gh-cardmenu-search-input" placeholder="Search for a card..." type="text" update=(action (mut query))
|
|
keyEvents=(hash
|
|
27=(action "closeMenu")
|
|
13=(action "selectTool")
|
|
37=(action "moveSelectionLeft")
|
|
38=(action "moveSelectionUp")
|
|
39=(action "moveSelectionRight")
|
|
40=(action "moveSelectionDown")
|
|
)
|
|
}}
|
|
</div>
|
|
<div class="gh-cardmenu-divider">
|
|
Primary
|
|
</div>
|
|
{{#each toolbar as |tool index|}}
|
|
{{koenig-menu-item tool=tool editor=editor range=range selected=tool.selected clicked=(action "closeMenu")}}
|
|
{{/each}}
|
|
</div>
|
|
{{/if}}
|