Skip to content
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 prefill support for obsidian://ledger links #79

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

StreliaPico
Copy link

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