This commit is contained in:
Jan Prochazka 2021-03-27 10:20:40 +01:00
parent d8fcbc8c17
commit 987fe6095a
3 changed files with 11 additions and 5 deletions

View File

@ -63,7 +63,11 @@
function handleKeyDown(e) {
if (e.keyCode == keycodes.upArrow && selectedIndex > 0) selectedIndex--;
if (e.keyCode == keycodes.downArrow && selectedIndex < filteredItems.length - 1) selectedIndex++;
if (e.keyCode == keycodes.enter) handleCommand(filteredItems[selectedIndex]);
if (e.keyCode == keycodes.enter) {
e.preventDefault();
e.stopPropagation();
handleCommand(filteredItems[selectedIndex]);
}
if (e.keyCode == keycodes.escape) $visibleCommandPalette = false;
if (e.keyCode == keycodes.pageDown) selectedIndex = Math.min(selectedIndex + 15, filteredItems.length - 1);

View File

@ -19,7 +19,9 @@
<WidgetColumnBar>
{#if hasPermission('files/favorites/read')}
<WidgetColumnBarItem title="Favorites" name="favorites" height="20%">
<AppObjectList list={$favorites || []} module={favoriteFileAppObject} />
<WidgetsInnerContainer>
<AppObjectList list={$favorites || []} module={favoriteFileAppObject} />
</WidgetsInnerContainer>
</WidgetColumnBarItem>
{/if}
<WidgetColumnBarItem title="Recently closed tabs" name="closedTabs">

View File

@ -85,10 +85,10 @@
});
registerCommand({
id: 'tabs.share',
id: 'tabs.addToFavorites',
category: 'Tabs',
name: 'Share',
icon: 'icon share',
name: 'Favorites',
icon: 'icon favorite',
toolbar: true,
testEnabled: () =>
getActiveTab()?.tabComponent &&