mirror of
https://github.com/lostpaul/obsidian-folder-notes.git
synced 2026-07-22 07:40:24 +00:00
Add missing default settings
This commit is contained in:
parent
a3a306c9cf
commit
d4f7050351
3 changed files with 6 additions and 2 deletions
|
|
@ -3,6 +3,7 @@ import FolderNotesPlugin from '../main';
|
|||
import { getDetachedFolder, getExcludedFolder } from 'src/ExcludeFolders/functions/folderFunctions';
|
||||
import { getFolder, getFolderNote } from 'src/functions/folderNoteFunctions';
|
||||
import { getFileExplorer } from './utils';
|
||||
import FolderOverviewPlugin from 'src/obsidian-folder-overview/src/main';
|
||||
|
||||
export function loadFileClasses(forceReload = false, plugin: FolderNotesPlugin) {
|
||||
if (plugin.activeFileExplorer === getFileExplorer(plugin) && !forceReload) { return; }
|
||||
|
|
@ -143,7 +144,7 @@ export function removeCSSClassFromEL(path: string | undefined, cssClass: string,
|
|||
fileExplorerItem.removeClass(cssClass);
|
||||
}
|
||||
|
||||
export function getEl(path: string, plugin: FolderNotesPlugin): HTMLElement | null {
|
||||
export function getEl(path: string, plugin: FolderNotesPlugin | FolderOverviewPlugin): HTMLElement | null {
|
||||
const fileExplorer = getFileExplorer(plugin);
|
||||
if (!fileExplorer) { return null; }
|
||||
if (!fileExplorer.view) { return null; }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { FileExplorerWorkspaceLeaf } from 'src/globals';
|
||||
import FolderNotesPlugin from 'src/main';
|
||||
import { FileExplorerLeaf } from 'obsidian-typings';
|
||||
import FolderOverviewPlugin from 'src/obsidian-folder-overview/src/main';
|
||||
|
||||
export function getFileNameFromPathString(path: string): string {
|
||||
return path.substring(path.lastIndexOf('/') >= 0 ? path.lastIndexOf('/') + 1 : 0);
|
||||
|
|
@ -36,7 +37,7 @@ export function getParentFolderPath(path: string): string {
|
|||
return this.getFolderPathFromString(this.getFolderPathFromString(path));
|
||||
}
|
||||
|
||||
export function getFileExplorer(plugin: FolderNotesPlugin) {
|
||||
export function getFileExplorer(plugin: FolderNotesPlugin | FolderOverviewPlugin) {
|
||||
return plugin.app.workspace.getLeavesOfType('file-explorer')[0] as any as FileExplorerWorkspaceLeaf;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -116,6 +116,8 @@ export const DEFAULT_SETTINGS: FolderNotesSettings = {
|
|||
showFolderNotes: false,
|
||||
disableCollapseIcon: true,
|
||||
alwaysCollapse: false,
|
||||
autoSync: true,
|
||||
allowDragAndDrop: true
|
||||
},
|
||||
useSubmenus: true,
|
||||
syncMove: true,
|
||||
|
|
|
|||
Loading…
Reference in a new issue