Compare commits

..

No commits in common. "master" and "1.0.1" have entirely different histories.

5 changed files with 20 additions and 29 deletions

View file

@ -1,7 +1,7 @@
{
"id": "crosslink-advanced",
"name": "Crosslink Advanced",
"version": "1.0.3",
"version": "1.0.1",
"minAppVersion": "1.8.0",
"description": "Tag files using folders and symlinks system (ftags).",
"author": "d7sd6u",

@ -1 +1 @@
Subproject commit fb589401f0ba76fab5c01bab8b63684ceeff3290
Subproject commit 6d64559440fa42f765db2906d5f74af3eed0ada8

View file

@ -1,6 +1,6 @@
{
"name": "crosslink-advanced",
"version": "1.0.3",
"version": "1.0.1",
"description": "",
"main": "./src/main.ts",
"scripts": {

View file

@ -458,19 +458,15 @@ export class FileAndDirChooser extends FuzzySuggestModal<TFile> {
return this.inputEl.value;
}
private get hiddenChooser() {
interface WithChooser {
chooser: {
selectedItem: number | null;
values:
| {
item: TFile;
}[]
| null;
suggestions: unknown[];
};
}
const chooser = (this as unknown as WithChooser).chooser;
const chooser = (
this as unknown as {
chooser: {
selectedItem: number | null;
values: { item: TFile }[] | null;
suggestions: unknown[];
};
}
).chooser;
return chooser;
}

View file

@ -1,6 +1,5 @@
import { App, PluginSettingTab, Setting } from "obsidian";
import Main from "./main";
import { FolderSuggest } from "../obsidian-reusables/src/FolderSuggest";
export const DEFAULT_SETTINGS = {
inbox: "Uncategorized",
@ -14,8 +13,6 @@ export class MainPluginSettingsTab extends PluginSettingTab {
this.plugin = plugin;
}
suggest?: FolderSuggest;
display() {
const { containerEl } = this;
containerEl.empty();
@ -23,19 +20,17 @@ export class MainPluginSettingsTab extends PluginSettingTab {
this.app.vault.getAllFolders().map((v) => [v.path, v.path]),
);
options["/"] = "/";
const setInbox = async (v: string) => {
this.plugin.settings.inbox = v;
await this.plugin.saveSettings();
};
new Setting(containerEl)
.setName("Inbox folder")
.setDesc("Folder where notes without explicit ftags are stored")
.addSearch((search) => {
search.setValue(this.plugin.settings.inbox).onChange(setInbox);
this.suggest = new FolderSuggest(this.app, search.inputEl);
this.suggest.onSelect((v) => setInbox(v.path));
.addDropdown((textArea) => {
textArea
.addOptions(options)
.setValue(this.plugin.settings.inbox)
.onChange(async (v) => {
this.plugin.settings.inbox = v;
await this.plugin.saveSettings();
});
});
}
}