generated from obsidianmd/obsidian-sample-plugin
-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add command to exclude notes #20
Open
harmtemolder
wants to merge
8
commits into
larslockefeer:main
Choose a base branch
from
harmtemolder:exclude-notes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a775037
Align .editorconfig and .prettierrc.js
harmtemolder fddfd1f
Update package.json
harmtemolder 7d124f1
Move *.ts to /src and build to /dist
harmtemolder 64356b2
Add empty settings tab
harmtemolder e63885e
Add refresh command with notification
harmtemolder aee895c
Lint
harmtemolder 9f17896
Add command to add ignored notes
harmtemolder 69c3ae0
Add the actual logic to ignore notes
harmtemolder File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
max_line_length = 120 | ||
trim_trailing_whitespace = true | ||
|
||
[*.js] | ||
ij_javascript_enforce_trailing_comma = keep | ||
ij_javascript_force_quote_style = true | ||
ij_javascript_space_before_function_left_parenth = false | ||
ij_javascript_spaces_within_imports = true | ||
ij_javascript_spaces_within_object_literal_braces = true | ||
ij_javascript_use_double_quotes = false | ||
ij_javascript_use_semicolon_after_statement = true | ||
|
||
[*.ts] | ||
ij_typescript_enforce_trailing_comma = keep | ||
ij_typescript_force_quote_style = true | ||
ij_typescript_space_before_function_left_parenth = false | ||
ij_typescript_spaces_within_imports = true | ||
ij_typescript_spaces_within_object_literal_braces = true | ||
ij_typescript_use_double_quotes = false | ||
ij_typescript_use_semicolon_after_statement = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
main.js | ||
dist/main.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
# OS X | ||
.DS_Store | ||
|
||
# Intellij | ||
*.iml | ||
.idea | ||
|
||
# npm / yarn | ||
node_modules | ||
package-lock.json | ||
yarn-error.log | ||
|
||
# build | ||
main.js | ||
*.js.map | ||
# macOS | ||
.DS_Store | ||
|
||
# IntelliJ | ||
*.iml | ||
.idea | ||
|
||
# npm / yarn | ||
node_modules | ||
package-lock.json | ||
yarn-error.log | ||
yarn.lock | ||
|
||
# build | ||
dist/main.js | ||
dist/data.json |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { App, PluginSettingTab, Setting } from 'obsidian'; | ||
import type TodoPlugin from './main'; | ||
|
||
export const DEFAULT_SETTINGS: TodoPluginSettings = { | ||
onlyRootTasks: false, | ||
ignoredNotes: {}, | ||
}; | ||
|
||
export interface TodoPluginSettings { | ||
onlyRootTasks: boolean; | ||
ignoredNotes: { [key: string]: null }; | ||
} | ||
|
||
export class TodoPluginSettingTab extends PluginSettingTab { | ||
plugin: TodoPlugin; | ||
app: App; | ||
|
||
constructor(app: App, plugin: TodoPlugin) { | ||
super(app, plugin); | ||
this.plugin = plugin; | ||
this.app = app; | ||
} | ||
|
||
display(): void { | ||
const { containerEl } = this; | ||
|
||
containerEl.empty(); | ||
|
||
containerEl.createEl('h2', { text: 'Obsidian TODO | Text-based GTD' }); | ||
containerEl.createEl('p', { | ||
text: | ||
'Collects all outstanding TODOs from your vault and presents them in lists Today, Scheduled, Inbox and Someday/Maybe.', | ||
}); | ||
containerEl.createEl('h3', { text: 'General Settings' }); | ||
containerEl.createEl('p', { | ||
text: '...', | ||
}); | ||
containerEl.createEl('h3', { text: 'Ignored Notes' }); | ||
containerEl.createEl('p', { | ||
text: 'You can ignore notes from this plugin by using the “Ignore this note” command', | ||
}); | ||
|
||
for (const key in this.plugin.settings.ignoredNotes) { | ||
const ignoredFilesSettingsObj = new Setting(containerEl).setDesc(key); | ||
|
||
ignoredFilesSettingsObj.addButton((button) => { | ||
button.setButtonText('Delete').onClick(async () => { | ||
delete this.plugin.settings.ignoredNotes[key]; | ||
await this.plugin.saveSettings(); | ||
this.display(); | ||
}); | ||
}); | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh this is a great one! Maybe we can add one command to easily create a todo list. I like how easy to create a todo list at Craft, maybe we can bring it to obsidian
