Skip to content

Commit

Permalink
Added Settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Canna71 committed Sep 23, 2023
1 parent a1f65d4 commit 83e49d4
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 13 deletions.
19 changes: 9 additions & 10 deletions docs/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,16 @@ By default, the following folders structure is used:

```
/Sets # "Sets Folder" can be configured
|- Types
| |- Name1Type.md
|- Types # "Types Folder" can be configured
| |- Name1Type.md # "Type Suffix" can be configured
| └─ Name1Type.md
|- Sets
| |- Name1Set # "Type Set Suffix" can be configured
| | |─ item1.md
| | └─ item2.md
| └─ Name2Set
| |─ item3.md
| └─ item4.md
|- Collections
|- Name1Set # "Type Set Suffix" can be configured
| |─ item1.md
| └─ item2.md
|─ Name2Set
| |─ item3.md
| └─ item4.md
|- Collections # "Collections Folder" can be configured
| |- Collection1
| | └─ Collection1.md
| └─ Collection2
Expand Down
2 changes: 1 addition & 1 deletion manifest-beta.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-sets",
"name": "Sets",
"version": "1.0.0",
"version": "1.0.1",
"minAppVersion": "1.4.4",
"description": "Create, edit and search sets of notes like Notion or AnyType DBs",
"author": "Gabriele Cannata",
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-sets",
"name": "Sets",
"version": "1.0.0",
"version": "1.0.1",
"minAppVersion": "1.4.4",
"description": "Create, edit and search sets of notes like Notion or AnyType DBs",
"author": "Gabriele Cannata",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-sets",
"version": "1.0.0",
"version": "1.0.1",
"description": "A plugin for Obsidian.md that allows you to create, edit and search sets of notes like Notion or AnyType DBs",
"main": "main.js",
"scripts": {
Expand Down
40 changes: 40 additions & 0 deletions src/SettingTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,42 @@ export class SetsSettingsTab extends PluginSettingTab {
await this.plugin.saveSettings();
}
));

// setting for typesFolder
new Setting(containerEl)
.setName("Types Folder")
.setDesc("The subfolder where Sets will store its types.")
.addText(text => text
.setValue(this.plugin.settings.typesFolder)
.onChange(async (value) => {
this.plugin.settings.typesFolder = value;
await this.plugin.saveSettings();
}
));

// setting for typesSuffix
new Setting(containerEl)
.setName("Types Suffix")
.setDesc("The suffix that will be added to the name of the type.")
.addText(text => text
.setValue(this.plugin.settings.typesSuffix)
.onChange(async (value) => {
this.plugin.settings.typesSuffix = value;
await this.plugin.saveSettings();
}
));

// setting for collectionsRoot
new Setting(containerEl)
.setName("Collections Folder")
.setDesc("The subfolder where Sets will store its collections.")
.addText(text => text
.setValue(this.plugin.settings.collectionsRoot)
.onChange(async (value) => {
this.plugin.settings.collectionsRoot = value;
await this.plugin.saveSettings();
}
));

// add a settings for typeAttributeKey
new Setting(containerEl)
Expand All @@ -68,6 +104,8 @@ export class SetsSettingsTab extends PluginSettingTab {
}
));



// add a settings for collectionAttributeKey
new Setting(containerEl)
.setName("Collection Attribute Key")
Expand All @@ -80,6 +118,8 @@ export class SetsSettingsTab extends PluginSettingTab {
}
));



// add a setting for topResults
new Setting(containerEl)
.setName("Top Results")
Expand Down

0 comments on commit 83e49d4

Please sign in to comment.