Skip to content

Add prefill support for obsidian://ledger links#79

Open
StreliaPico wants to merge 2 commits intotgrosinger:mainfrom
StreliaPico:protocoluri
Open

Add prefill support for obsidian://ledger links#79
StreliaPico wants to merge 2 commits intotgrosinger:mainfrom
StreliaPico:protocoluri

Conversation

@StreliaPico
Copy link
Copy Markdown

Pull Request Description

This PR adds basic support for prefilled fields for the Obsidian Protocol handler.

Calling the uri will open the Add to Ledger modal with
A uri call may look like the following:
obsidian://ledger?amount=100&payee=Groceries

Supported fields:

  • amount
  • date
  • payee
  • toaccount
  • fromaccount
  • currency

Known Issues

  • amount defaults to 0 instead of a blank field.
    • This is a typing issue. Changing the accepted type on the object class might solve this but possibly introduce issues elsewhere.
  • currency, while it works, is not reflected in the UI which will show your Currency Symbol as selected in the settings.
    • Additionally, it successfully defaults to the selected currency despite not having been specified. Perhaps this implementation ought to be more explicit.
  • Modal will fail to load if run while Obsidian is not already running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant