Primary code functionality
This commit is contained in:
parent
4a224bd6a8
commit
29d25dc6e7
8 changed files with 282 additions and 76 deletions
21
src/settings/manageHiddenFiles.ts
Normal file
21
src/settings/manageHiddenFiles.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import { Setting } from "obsidian";
|
||||
import FileHider from "../main";
|
||||
import { FileModal } from "../modals/FileModal";
|
||||
|
||||
export class ManageHiddenFiles {
|
||||
|
||||
public static create(plugin: FileHider, container: HTMLElement) {
|
||||
return new Setting(container)
|
||||
.setName(`Hidden Files`)
|
||||
.setDesc(`Add or remove files from the list that are being hidden`)
|
||||
.addButton(b => {
|
||||
b.setButtonText(`Manage File List`)
|
||||
.onClick(event => {
|
||||
// sanity check to prevent other code from opening the modal
|
||||
if (!event.isTrusted) { return }
|
||||
|
||||
new FileModal(plugin).open();
|
||||
});
|
||||
});
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue