generated from obsidianmd/obsidian-sample-plugin
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
32 additions
and
3 deletions.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Command, WorkspaceLeaf } from 'obsidian'; | ||
import { ProviderType } from '../constants'; | ||
import { ProviderBase } from './base'; | ||
|
||
export class BookmarksProvider extends ProviderBase { | ||
public readonly providerType = ProviderType.Bookmarks; | ||
public readonly displayName = 'Bookmarks'; | ||
protected readonly leafType = 'bookmarks'; | ||
protected readonly toggleCommandName = 'Toggle collapse in bookmarks view'; | ||
protected readonly collapseCommandName = 'Not available'; | ||
protected readonly expandCommandName = 'Not available'; | ||
|
||
protected override get commands(): Command[] { | ||
return [this.toggleCommand]; | ||
} | ||
|
||
protected override collapseOrExpandAll(leaf: WorkspaceLeaf): void { | ||
leaf.view.collapseOrExpandAllEl?.click(); | ||
} | ||
} |
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