Fix folder overview path & remove buggy enter event

This commit is contained in:
Lost Paul 2025-06-25 10:01:43 +02:00
parent 6c7c732d5b
commit d050217f5b
3 changed files with 9 additions and 8 deletions

View file

@ -9,7 +9,7 @@ Additionally, you can **customize** the overview by selecting **specific file ty
There are two options to create a folder overview in a note
- Use the command "Insert folder overview" from the [command palette](https://help.obsidian.md/Plugins/Command+palette)
- On desktop right click and click on the option "Create folder overview"
- On desktop right click and click on the option "Insert folder overview"
## Edit overview
If the overview shows no files or folders yet you can just click on the button that says "Edit overview". But if there are already files/folders you can use the command "Edit folder overview" from the [command palette](https://help.obsidian.md/Plugins/Command+palette) or click on the button as showed in the video below.

View file

@ -16,7 +16,7 @@ import { handleDelete } from './events/handleDelete';
import { addCSSClassToFileExplorerEl, getFileExplorerElement, removeCSSClassFromFileExplorerEL, refreshAllFolderStyles, setActiveFolder, removeActiveFolder } from './functions/styleFunctions';
import { getExcludedFolder } from './ExcludeFolders/functions/folderFunctions';
import { FileExplorerView, InternalPlugin } from 'obsidian-typings';
import { getFocusedItem } from './functions/utils';
// import { getFocusedItem } from './functions/utils';
import { FOLDER_OVERVIEW_VIEW, FolderOverviewView } from './obsidian-folder-overview/src/view';
import { registerOverviewCommands } from './obsidian-folder-overview/src/Commands';
import { updateOverviewView, updateViewDropdown } from './obsidian-folder-overview/src/main';
@ -76,11 +76,12 @@ export default class FolderNotesPlugin extends Plugin {
}
this.registerDomEvent(window, 'keydown', (event: KeyboardEvent) => {
if (event.key === 'Enter') {
const folderNote = getFolderNote(this, getFocusedItem(this)?.file?.path || '');
if (!folderNote) return;
openFolderNote(this, folderNote);
}
// Was a bit too buggy
// if (event.key === 'Enter') {
// const folderNote = getFolderNote(this, getFocusedItem(this)?.file?.path || '');
// if (!folderNote) return;
// openFolderNote(this, folderNote);
// }
const hoveredElement = this.hoveredElement;
if (this.hoverLinkTriggered) return;

@ -1 +1 @@
Subproject commit 3e48a5c20e8069cef1b36fb973c3ea182ca13f33
Subproject commit 656789271503283492ba334bf2e407c63711106c