mirror of
https://github.com/lostpaul/obsidian-folder-notes.git
synced 2026-07-22 07:40:24 +00:00
Fix code style issues part two
This commit is contained in:
parent
8f131c83a8
commit
8986c5b524
25 changed files with 58 additions and 59 deletions
|
|
@ -1,2 +1,7 @@
|
|||
npm node_modules
|
||||
build
|
||||
build
|
||||
*.js
|
||||
*.json
|
||||
*.md
|
||||
*.css
|
||||
LICENSE
|
||||
10
.eslintrc
10
.eslintrc
|
|
@ -23,6 +23,7 @@
|
|||
"args": "none"
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/ban-ts-comment": "off",
|
||||
"no-prototype-builtins": "off",
|
||||
"@typescript-eslint/no-empty-function": "off",
|
||||
|
|
@ -41,6 +42,15 @@
|
|||
"avoidEscape": true
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/ban-types": [
|
||||
"error",
|
||||
{
|
||||
"types": {
|
||||
"Function": false
|
||||
},
|
||||
"extendDefaults": true
|
||||
}
|
||||
],
|
||||
"no-mixed-spaces-and-tabs": "error",
|
||||
"indent": [
|
||||
"error",
|
||||
|
|
|
|||
|
|
@ -4,12 +4,14 @@
|
|||
"description": "Adds Folder Notes to the default file tree.",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
"fn": "node esbuild.config.mjs",
|
||||
"fn-dev": "node esbuild.config.mjs",
|
||||
"dev": "npm run fn-dev",
|
||||
"fn-build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production",
|
||||
"fv-build": "tsc -noEmit -skipLibCheck && node ./src/obsidian-folder-overview/esbuild.config.mjs production",
|
||||
"version": "node version-bump.mjs && git add manifest.json versions.json",
|
||||
"folder-overview": "node ./src/obsidian-folder-overview/esbuild.config.mjs",
|
||||
"fv": "npm run folder-overview"
|
||||
|
||||
"fv-dev": "npm run folder-overview"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "Lost Paul",
|
||||
|
|
|
|||
|
|
@ -1,13 +1,9 @@
|
|||
import { App, TFolder, Menu, TAbstractFile, Notice, TFile, Editor, MarkdownView, Platform, stringifyYaml } from 'obsidian';
|
||||
import { App, TFolder, Menu, TAbstractFile, Notice, TFile, Editor, MarkdownView, Platform } from 'obsidian';
|
||||
import FolderNotesPlugin from './main';
|
||||
import { getFolderNote, createFolderNote, deleteFolderNote, turnIntoFolderNote, openFolderNote, extractFolderName, detachFolderNote } from './functions/folderNoteFunctions';
|
||||
import { ExcludedFolder } from './ExcludeFolders/ExcludeFolder';
|
||||
import { getFolderPathFromString } from './functions/utils';
|
||||
import { getExcludedFolderByPattern } from './ExcludeFolders/functions/patternFunctions';
|
||||
import { addExcludedFolder, deleteExcludedFolder, getDetachedFolder, getExcludedFolder, getExcludedFoldersByPath, updateExcludedFolder } from './ExcludeFolders/functions/folderFunctions';
|
||||
import ExcludedFolderSettings from './ExcludeFolders/modals/ExcludeFolderSettings';
|
||||
import { ExcludePattern } from './ExcludeFolders/ExcludePattern';
|
||||
import PatternSettings from './ExcludeFolders/modals/PatternSettings';
|
||||
import { addExcludedFolder, deleteExcludedFolder, getDetachedFolder, getExcludedFolder } from './ExcludeFolders/functions/folderFunctions';
|
||||
import { applyCSSClassesToFolder } from './functions/styleFunctions';
|
||||
|
||||
export class Commands {
|
||||
|
|
@ -121,7 +117,6 @@ export class Commands {
|
|||
name: 'Create folder note from selected text',
|
||||
editorCheckCallback: (checking: boolean, editor: Editor, view: MarkdownView) => {
|
||||
const text = editor.getSelection().trim();
|
||||
const line = editor.getCursor().line;
|
||||
const file = view.file;
|
||||
if (!(file instanceof TFile)) return false;
|
||||
if (text && text.trim() !== '') {
|
||||
|
|
@ -399,8 +394,6 @@ export class Commands {
|
|||
editorCommands() {
|
||||
this.plugin.registerEvent(this.plugin.app.workspace.on('editor-menu', (menu: Menu, editor: Editor, view: MarkdownView) => {
|
||||
const text = editor.getSelection().trim();
|
||||
const line = editor.getCursor().line;
|
||||
const lineText = editor.getLine(line);
|
||||
if (!text || text.trim() === '') return;
|
||||
menu.addItem((item) => {
|
||||
item.setTitle('Create folder note')
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ export async function getExcludedFolder(plugin: FolderNotesPlugin, path: string,
|
|||
}
|
||||
|
||||
export function getDetachedFolder(plugin: FolderNotesPlugin, path: string) {
|
||||
return plugin.settings.excludeFolders.find((f) => f.path == path && f.detached);
|
||||
return plugin.settings.excludeFolders.find((f) => f.path === path && f.detached);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ export function deletePattern(plugin: FolderNotesPlugin, pattern: ExcludePattern
|
|||
}
|
||||
|
||||
export function getExcludedFoldersByPattern(plugin: FolderNotesPlugin, folderName: string): ExcludePattern[] {
|
||||
return plugin.settings.excludeFolders.filter((s) => s.type == 'pattern').filter((pattern) => {
|
||||
return plugin.settings.excludeFolders.filter((s) => s.type === 'pattern').filter((pattern) => {
|
||||
if (!pattern.string) { return false; }
|
||||
const string = pattern.string.trim();
|
||||
if (!string.startsWith('{regex}') && !(string.startsWith('*') || string.endsWith('*'))) { return false; }
|
||||
|
|
@ -45,7 +45,7 @@ export function getExcludedFoldersByPattern(plugin: FolderNotesPlugin, folderNam
|
|||
}
|
||||
|
||||
export function getExcludedFolderByPattern(plugin: FolderNotesPlugin, folderName: string): ExcludePattern | undefined{
|
||||
return plugin.settings.excludeFolders.filter((s) => s.type == 'pattern').find((pattern) => {
|
||||
return plugin.settings.excludeFolders.filter((s) => s.type === 'pattern').find((pattern) => {
|
||||
if (!pattern.string) { return false; }
|
||||
const string = pattern.string.trim();
|
||||
if (!string.startsWith('{regex}') && !(string.startsWith('*') || string.endsWith('*'))) { return false; }
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import { WhitelistedPattern } from '../WhitelistPattern';
|
|||
import { Setting, Platform, ButtonComponent } from 'obsidian';
|
||||
import { FolderSuggest } from '../../suggesters/FolderSuggester';
|
||||
import { SettingsTab } from '../../settings/SettingsTab';
|
||||
import WhitelistededFoldersSettings from '../modals/WhitelistedFoldersSettings';
|
||||
import WhitelistFolderSettings from '../modals/WhitelistFolderSettings';
|
||||
import { updateWhitelistedPattern, getWhitelistedFoldersByPattern, addWhitelistedPatternListItem } from './whitelistPatternFunctions';
|
||||
Platform.isMobileApp;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import FolderNotesPlugin from '../../main';
|
||||
import { Setting } from 'obsidian';
|
||||
import { SettingsTab } from '../../settings/SettingsTab';
|
||||
import { addExcludedFolder, resyncArray, updateExcludedFolder } from './folderFunctions';
|
||||
import { resyncArray } from './folderFunctions';
|
||||
import WhitelistPatternSettings from '../modals/WhitelistPatternSettings';
|
||||
import { WhitelistedPattern } from '../WhitelistPattern';
|
||||
import { addWhitelistedFolder, updateWhitelistedFolder } from './whitelistFolderFunctions';
|
||||
|
|
@ -18,7 +18,7 @@ export function deletePattern(plugin: FolderNotesPlugin, pattern: WhitelistedPat
|
|||
}
|
||||
|
||||
export function getWhitelistedFolderByPattern(plugin: FolderNotesPlugin, folderName: string) {
|
||||
return plugin.settings.whitelistFolders.filter((s) => s.type == 'pattern').find((pattern) => {
|
||||
return plugin.settings.whitelistFolders.filter((s) => s.type === 'pattern').find((pattern) => {
|
||||
if (!pattern.string) { return false; }
|
||||
const string = pattern.string.trim();
|
||||
if (!string.startsWith('{regex}') && !(string.startsWith('*') || string.endsWith('*'))) { return false; }
|
||||
|
|
@ -46,7 +46,7 @@ export function getWhitelistedFolderByPattern(plugin: FolderNotesPlugin, folderN
|
|||
}
|
||||
|
||||
export function getWhitelistedFoldersByPattern(plugin: FolderNotesPlugin, folderName: string) {
|
||||
return plugin.settings.whitelistFolders.filter((s) => s.type == 'pattern').filter((pattern) => {
|
||||
return plugin.settings.whitelistFolders.filter((s) => s.type === 'pattern').filter((pattern) => {
|
||||
if (!pattern.string) { return false; }
|
||||
const string = pattern.string.trim();
|
||||
if (!string.startsWith('{regex}') && !(string.startsWith('*') || string.endsWith('*'))) { return false; }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { App, ButtonComponent, Modal, Setting, TFolder, Notice } from 'obsidian';
|
||||
import { App, Modal, Setting } from 'obsidian';
|
||||
import { SettingsTab } from 'src/settings/SettingsTab';
|
||||
import FolderNotesPlugin from '../../main';
|
||||
import { WhitelistedFolder } from '../WhitelistFolder';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import FolderNotesPlugin from 'src/main';
|
||||
import { getDefer, Listener, Events, ApiInterface, DeferInterface, ListenerRef, EventDispatcherInterface } from 'front-matter-plugin-api-provider';
|
||||
import { App, TFile, TFolder } from 'obsidian';
|
||||
import { extractFolderName, getFolder, getFolderNote } from 'src/functions/folderNoteFunctions';
|
||||
import { getFolder, getFolderNote } from 'src/functions/folderNoteFunctions';
|
||||
export class FrontMatterTitlePluginHandler {
|
||||
plugin: FolderNotesPlugin;
|
||||
app: App;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
import FolderNotesPlugin from 'src/main';
|
||||
import { Platform, Keymap } from 'obsidian';
|
||||
import { getFolder, getFolderNote } from 'src/functions/folderNoteFunctions';
|
||||
import { getFolderNote } from 'src/functions/folderNoteFunctions';
|
||||
import { handleFolderClick, handleViewHeaderClick } from './handleClick';
|
||||
import { getExcludedFolder } from 'src/ExcludeFolders/functions/folderFunctions';
|
||||
import { applyCSSClassesToFolder, applyCSSClassesToFolderNote } from 'src/functions/styleFunctions';
|
||||
import { getFolderNameFromPathString } from 'src/functions/utils';
|
||||
import { applyCSSClassesToFolder } from 'src/functions/styleFunctions';
|
||||
|
||||
export async function addObserver(plugin: FolderNotesPlugin) {
|
||||
plugin.observer = new MutationObserver((mutations: MutationRecord[]) => {
|
||||
|
|
@ -88,7 +87,7 @@ async function initializeFolderTitle(folderTitle: HTMLElement, plugin: any) {
|
|||
|
||||
// Handle middle click (auxclick)
|
||||
folderTitle.addEventListener('auxclick', (event: MouseEvent) => {
|
||||
if (event.button == 1) {
|
||||
if (event.button === 1) {
|
||||
handleFolderClick(event, plugin);
|
||||
}
|
||||
}, { capture: true });
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import FolderNotesPlugin from 'src/main';
|
||||
import { App, EditableFileView, TFile, TFolder } from 'obsidian';
|
||||
import { App, EditableFileView, TFolder } from 'obsidian';
|
||||
import { getFolder, getFolderNote } from 'src/functions/folderNoteFunctions';
|
||||
export class TabManager {
|
||||
plugin: FolderNotesPlugin;
|
||||
|
|
@ -55,7 +55,7 @@ export class TabManager {
|
|||
}
|
||||
|
||||
isEnabled() {
|
||||
if (this.plugin.settings.folderNoteName == '{{folder_name}}') return false;
|
||||
if (this.plugin.settings.folderNoteName === '{{folder_name}}') return false;
|
||||
return this.plugin.settings.tabManagerEnabled;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import FolderNotesPlugin from 'src/main';
|
|||
import { createFolderNote, getFolder, getFolderNote, turnIntoFolderNote } from 'src/functions/folderNoteFunctions';
|
||||
import { getExcludedFolder } from 'src/ExcludeFolders/functions/folderFunctions';
|
||||
import { removeCSSClassFromEL, addCSSClassToTitleEL } from 'src/functions/styleFunctions';
|
||||
import { removeExtension } from 'src/functions/utils';
|
||||
|
||||
export async function handleCreate(file: TAbstractFile, plugin: FolderNotesPlugin) {
|
||||
if (!plugin.app.workspace.layoutReady) return;
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ export async function createFolderNote(plugin: FolderNotesPlugin, folderPath: st
|
|||
if (!folderNote) {
|
||||
let content = '';
|
||||
if (extension !== '.md') {
|
||||
if (plugin.settings.templatePath && folderNoteType.split('.').pop() == plugin.settings.templatePath.split('.').pop()) {
|
||||
if (plugin.settings.templatePath && folderNoteType.split('.').pop() === plugin.settings.templatePath.split('.').pop()) {
|
||||
const templateFile = plugin.app.vault.getAbstractFileByPath(plugin.settings.templatePath);
|
||||
if (templateFile instanceof TFile) {
|
||||
if (['md', 'canvas', 'txt'].includes(templateFile.extension)) {
|
||||
|
|
@ -133,7 +133,7 @@ export async function createFolderNote(plugin: FolderNotesPlugin, folderPath: st
|
|||
}
|
||||
}
|
||||
|
||||
const matchingExtension = extension?.split('.').pop() == plugin.settings.templatePath.split('.').pop();
|
||||
const matchingExtension = extension?.split('.').pop() === plugin.settings.templatePath.split('.').pop();
|
||||
if (folderNote && matchingExtension && plugin.settings.folderNoteType !== '.excalidraw') {
|
||||
applyTemplate(plugin, folderNote, leaf, plugin.settings.templatePath);
|
||||
}
|
||||
|
|
@ -219,7 +219,7 @@ export async function tempDisableSync(plugin: FolderNotesPlugin, folder: TFolder
|
|||
|
||||
export async function openFolderNote(plugin: FolderNotesPlugin, file: TAbstractFile, evt?: MouseEvent) {
|
||||
const path = file.path;
|
||||
if (plugin.app.workspace.getActiveFile()?.path === path && !(Keymap.isModEvent(evt) == 'tab')) { return; }
|
||||
if (plugin.app.workspace.getActiveFile()?.path === path && !(Keymap.isModEvent(evt) === 'tab')) { return; }
|
||||
const leaf = plugin.app.workspace.getLeaf(Keymap.isModEvent(evt) || plugin.settings.openInNewTab);
|
||||
if (file instanceof TFile) {
|
||||
await leaf.openFile(file);
|
||||
|
|
@ -282,7 +282,7 @@ export function getFolderNote(plugin: FolderNotesPlugin, folderPath: string, sto
|
|||
|
||||
|
||||
let path = `${folder.path}/${fileName}`;
|
||||
folder.path == '/' ? path = fileName : path = `${folder.path}/${fileName}`;
|
||||
folder.path === '/' ? path = fileName : path = `${folder.path}/${fileName}`;
|
||||
|
||||
|
||||
let folderNoteType = plugin.settings.folderNoteType;
|
||||
|
|
|
|||
2
src/globals.d.ts
vendored
2
src/globals.d.ts
vendored
|
|
@ -1,4 +1,4 @@
|
|||
import { Plugin, TAbstractFile, View, WorkspaceLeaf } from 'obsidian';
|
||||
import { TAbstractFile, View, WorkspaceLeaf } from 'obsidian';
|
||||
|
||||
declare module 'obsidian' {
|
||||
interface Setting {
|
||||
|
|
|
|||
21
src/main.ts
21
src/main.ts
|
|
@ -19,7 +19,6 @@ import { getExcludedFolder } from './ExcludeFolders/functions/folderFunctions';
|
|||
import { FileExplorerView, InternalPlugin } from 'obsidian-typings';
|
||||
import { getFocusedItem } from './functions/utils';
|
||||
import { FOLDER_OVERVIEW_VIEW, FolderOverviewView } from './obsidian-folder-overview/src/view';
|
||||
import { getFolderPathFromString } from './functions/utils';
|
||||
import { registerOverviewCommands } from './obsidian-folder-overview/src/Commands';
|
||||
import { updateOverviewView, updateViewDropdown } from './obsidian-folder-overview/src/main';
|
||||
|
||||
|
|
@ -76,7 +75,7 @@ export default class FolderNotesPlugin extends Plugin {
|
|||
});
|
||||
|
||||
this.registerDomEvent(window, 'keydown', (event: KeyboardEvent) => {
|
||||
if (event.key == 'Enter') {
|
||||
if (event.key === 'Enter') {
|
||||
const folderNote = getFolderNote(this, getFocusedItem(this)?.file?.path || '');
|
||||
if (!folderNote) return;
|
||||
openFolderNote(this, folderNote);
|
||||
|
|
@ -159,16 +158,14 @@ export default class FolderNotesPlugin extends Plugin {
|
|||
const editMode = view.editMode ?? view.sourceMode ?? this.app.workspace.activeEditor?.editMode;
|
||||
if (!editMode) { return; }
|
||||
|
||||
const plugin = this;
|
||||
|
||||
// @ts-ignore
|
||||
const originalHandleDragOver = editMode.clipboardManager.constructor.prototype.handleDragOver;
|
||||
|
||||
// @ts-ignore
|
||||
editMode.clipboardManager.constructor.prototype.handleDragOver = function (evt, ...args) {
|
||||
const { draggable } = plugin.app.dragManager;
|
||||
if (draggable && draggable.file instanceof TFolder && getFolderNote(plugin, draggable.file.path)) {
|
||||
plugin.app.dragManager.setAction(window.i18next.t('interface.drag-and-drop.insert-link-here'));
|
||||
const { draggable } = this.app.dragManager;
|
||||
if (draggable && draggable.file instanceof TFolder && getFolderNote(this, draggable.file.path)) {
|
||||
this.app.dragManager.setAction(window.i18next.t('interface.drag-and-drop.insert-link-here'));
|
||||
} else {
|
||||
originalHandleDragOver.call(this, evt, ...args);
|
||||
}
|
||||
|
|
@ -178,9 +175,9 @@ export default class FolderNotesPlugin extends Plugin {
|
|||
const originalHandleDrop = editMode.clipboardManager.constructor.prototype.handleDrop;
|
||||
// @ts-ignore
|
||||
editMode.clipboardManager.constructor.prototype.handleDrop = function (evt, ...args) {
|
||||
const { draggable } = plugin.app.dragManager;
|
||||
if (draggable && draggable.file instanceof TFolder && getFolderNote(plugin, draggable.file.path)) {
|
||||
const folderNote = getFolderNote(plugin, draggable.file.path);
|
||||
const { draggable } = this.app.dragManager;
|
||||
if (draggable && draggable.file instanceof TFolder && getFolderNote(this, draggable.file.path)) {
|
||||
const folderNote = getFolderNote(this, draggable.file.path);
|
||||
if (draggable?.type === 'folder' && draggable.file instanceof TFolder && folderNote) {
|
||||
draggable.file = folderNote;
|
||||
draggable.type = 'file';
|
||||
|
|
@ -250,11 +247,11 @@ export default class FolderNotesPlugin extends Plugin {
|
|||
const cleanAttachmentFolderPath = attachmentFolderPath?.replace('./', '') || '';
|
||||
const attachmentsAreInRootFolder = attachmentFolderPath === './' || attachmentFolderPath === '';
|
||||
const threshold = this.settings.storageLocation === 'insideFolder' ? 1 : 0;
|
||||
if (folder.children.length == 0) {
|
||||
if (folder.children.length === 0) {
|
||||
addCSSClassToTitleEL(folder.path, 'fn-empty-folder', this);
|
||||
}
|
||||
|
||||
if (folder.children.length == threshold) {
|
||||
if (folder.children.length === threshold) {
|
||||
return true;
|
||||
} else if (folder.children.length > threshold) {
|
||||
if (attachmentsAreInRootFolder) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { App, Modal, Setting, TFolder, Notice } from 'obsidian';
|
||||
import { App, Modal, Setting, Notice, SettingTab } from 'obsidian';
|
||||
import FolderNotesPlugin from '../main';
|
||||
import { ListComponent } from 'src/functions/ListComponent';
|
||||
import { SettingTab } from 'obsidian';
|
||||
|
||||
export default class AddSupportedFileModal extends Modal {
|
||||
plugin: FolderNotesPlugin;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { FuzzySuggestModal, Notice, TFile } from 'obsidian';
|
||||
import { FuzzySuggestModal, TFile } from 'obsidian';
|
||||
import FolderNotesPlugin from 'src/main';
|
||||
import { createFolderNote } from 'src/functions/folderNoteFunctions';
|
||||
export class AskForExtensionModal extends FuzzySuggestModal<string> {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { App, Modal, Setting, TFile, Platform } from 'obsidian';
|
||||
import { App, Modal, TFile, Platform } from 'obsidian';
|
||||
import FolderNotesPlugin from '../main';
|
||||
import { deleteFolderNote, getFolder } from 'src/functions/folderNoteFunctions';
|
||||
import { removeCSSClassFromEL } from 'src/functions/styleFunctions';
|
||||
import { deleteFolderNote } from 'src/functions/folderNoteFunctions';
|
||||
export default class DeleteConfirmationModal extends Modal {
|
||||
plugin: FolderNotesPlugin;
|
||||
app: App;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { App, Modal, Setting, TFolder } from 'obsidian';
|
||||
import { App, Modal, TFolder } from 'obsidian';
|
||||
import FolderNotesPlugin from '../main';
|
||||
export default class NewFolderNameModal extends Modal {
|
||||
plugin: FolderNotesPlugin;
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 7e9cd0f6673c0fd9da0f9c65732a5485725737fc
|
||||
Subproject commit 94f2d633ddc894df938196b44cba422afc5e0136
|
||||
|
|
@ -1,7 +1,4 @@
|
|||
import { PluginSettingTab, Setting, TFolder } from 'obsidian';
|
||||
import { SettingsTab } from './SettingsTab';
|
||||
import { ListComponent } from 'src/functions/ListComponent';
|
||||
import { FolderSuggest } from 'src/suggesters/FolderSuggester';
|
||||
import { createOverviewSettings } from 'src/obsidian-folder-overview/src/settings';
|
||||
|
||||
export async function renderFolderOverview(settingsTab: SettingsTab) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Setting, Platform, SettingTab } from 'obsidian';
|
||||
import { Setting, Platform } from 'obsidian';
|
||||
import { SettingsTab } from './SettingsTab';
|
||||
import { ListComponent } from '../functions/ListComponent';
|
||||
import AddSupportedFileModal from '../modals/AddSupportedFileType';
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ export class SettingsTab extends PluginSettingTab {
|
|||
const tabBar = containerEl.createEl('nav', { cls: 'fn-settings-tab-bar' });
|
||||
for (const [tabId, tabInfo] of Object.entries(settingsTab.TABS)) {
|
||||
const tabEl = tabBar.createEl('div', { cls: 'fn-settings-tab' });
|
||||
const tabName = tabEl.createEl('div', { cls: 'fn-settings-tab-name', text: tabInfo.name });
|
||||
tabEl.createEl('div', { cls: 'fn-settings-tab-name', text: tabInfo.name });
|
||||
if (plugin && plugin.settings.settingsTab.toLocaleLowerCase() === tabId.toLocaleLowerCase()) {
|
||||
tabEl.addClass('fn-settings-tab-active');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Modal, App, ButtonComponent, Setting } from 'obsidian';
|
||||
import { Modal, ButtonComponent } from 'obsidian';
|
||||
import FolderNotesPlugin from 'src/main';
|
||||
|
||||
export default class BackupWarningModal extends Modal {
|
||||
|
|
|
|||
Loading…
Reference in a new issue