mirror of
https://github.com/unarray/file-tree-generator.git
synced 2026-07-22 08:40:29 +00:00
Update modals & commands locations
This commit is contained in:
parent
5dd1304a4e
commit
18ee5cea75
4 changed files with 9 additions and 5 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import type { Command, Editor } from "obsidian";
|
||||
import { GenerateTree as GenerateTreeModal } from "#/modals";
|
||||
import { GenerateTree as GenerateTreeModal } from "#/modals/generate-tree";
|
||||
import FileTreeGenerator from "#/FileTreeGenerator";
|
||||
|
||||
export class GenerateTree implements Command {
|
||||
|
|
@ -113,10 +113,14 @@ export class GenerateTree extends Modal {
|
|||
const selectedPath = dialogResponse.filePaths[0];
|
||||
const removePath = selectedPath.substring(0, selectedPath.lastIndexOf(sep) + sep.length);
|
||||
const regex = beginningString(removePath);
|
||||
const files = filter(
|
||||
(await getFiles(selectedPath)).map(file => file.replace(regex, "")),
|
||||
SettingsTab.getInstance().settings.ignore
|
||||
);
|
||||
const rowFiles = (await getFiles(selectedPath)).map(file => file.replace(regex, ""));
|
||||
let files: string[];
|
||||
|
||||
if (this.useIgnore) {
|
||||
files = filter(rowFiles, SettingsTab.getInstance().settings.ignore);
|
||||
} else {
|
||||
files = rowFiles;
|
||||
}
|
||||
|
||||
showNotice = false;
|
||||
notice.hide();
|
||||
Loading…
Reference in a new issue