Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
waxxxd authored Aug 29, 2024
2 parents 40587ff + d2d08b9 commit 8691b38
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install modules
run: npm i
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ data.json

# Exclude macOS Finder (System Explorer) View States
.DS_Store
yarn.lock
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"id": "obsidian-folder-index",
"name": "Folder Index",
"version": "1.0.24",
"minAppVersion": "1.1.16",
"description": "This Plugin will automatically generate a TOC for the current Folder.",
"author": "turulix",
"authorUrl": "https://turulix.de/",
"fundingUrl": "https://www.buymeacoffee.com/turulix",
"isDesktopOnly": false
"isDesktopOnly": false,
"version": "1.0.25"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-sample-plugin",
"version": "1.0.24",
"version": "1.0.25",
"description": "This is a sample plugin for Obsidian (https://obsidian.md)",
"main": "main.js",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {GraphManipulatorModule} from "./modules/GraphManipulatorModule";
import {EventEmitter} from "events";
import {DEFAULT_SETTINGS, PluginSetting, PluginSettingsTab} from "./models/PluginSettingsTab";
import {FolderNoteModule} from "./modules/FolderNoteModule";
import { ContextMenuModule } from './modules/ContextMenuModule';
import {ContextMenuModule} from "./modules/ContextMenuModule";


// Remember to rename these classes and interfaces!
Expand All @@ -19,7 +19,7 @@ export default class FolderIndexPlugin extends Plugin {
eventManager: EventEmitter
oldGraphSetting = false
static PLUGIN: FolderIndexPlugin;

// @ts-ignore
private contextMenuModule: ContextMenuModule;

constructor(app: App, manifest: PluginManifest) {
Expand Down Expand Up @@ -55,7 +55,7 @@ export default class FolderIndexPlugin extends Plugin {
}

this.contextMenuModule = new ContextMenuModule(this.app, this);
this.contextMenuModule.addFolderContextMenu();
this.contextMenuModule.addFolderContextMenu();
}

onSettingsUpdate() {
Expand Down
5 changes: 5 additions & 0 deletions src/models/PluginSettingsTab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@ import {App, PluginSettingTab, Setting, TextAreaComponent} from "obsidian";
import FolderIndexPlugin from "../main";

export enum SortBy {
// eslint-disable-next-line no-unused-vars
None = "Disabled",
// eslint-disable-next-line no-unused-vars
Alphabetically = "Alphabetically",
// eslint-disable-next-line no-unused-vars
ReverseAlphabetically = "Reverse Alphabetically",
// eslint-disable-next-line no-unused-vars
Natural = "Natural",
// eslint-disable-next-line no-unused-vars
ReverseNatural = "Reverse Natural"
}

Expand Down
7 changes: 5 additions & 2 deletions src/modules/ContextMenuModule.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { TFolder, Menu, Notice, App } from 'obsidian';
import { TFolder, Notice, App } from 'obsidian';
import FolderIndexPlugin from "../main";

export class ContextMenuModule {
// eslint-disable-next-line no-unused-vars
constructor(private app: App, private plugin: FolderIndexPlugin) {
}

Expand Down Expand Up @@ -43,10 +44,12 @@ export class ContextMenuModule {

// Notify the user
new Notice(`File "${newFile.name}" created successfully in folder "${newFile.path}".`);
// eslint-disable-next-line no-console
console.log(`File created at path: ${newFile.path}`);
} catch (error) {
// eslint-disable-next-line no-console
console.error(`Failed to create file at path: ${filePath}`, error);
new Notice("Failed to create file. See console for details.");
}
}
}
}
3 changes: 2 additions & 1 deletion versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
"1.0.21": "1.1.16",
"1.0.22": "1.1.16",
"1.0.23": "1.1.16",
"1.0.24": "1.1.16"
"1.0.24": "1.1.16",
"1.0.25": "1.1.16"
}

0 comments on commit 8691b38

Please sign in to comment.