violet4 / commandbay

1 stars 0 forks source link

settings.yaml #11

Closed violet4 closed 6 months ago

violet4 commented 6 months ago

settings should be stored in a settings.yaml file so they are easy to transfer, back up, edit, etc directly from the command line.

it should have a self-documenting structure using pydantic, including documentation for its structure in the documentation pages.

it should be fully editable from a user-friendly GUI in the web UI, which in turn directly edits the settings.yaml file. as the user hits the save button, they should be warned that the settings.yaml file will be overwritten. maybe someday that warning popup will also include an option to back up the settings file.

since we need to be able to edit the settings from the UI, we also need to be able to either allow read/write access to the yaml file to our react app (can we read/modify/write yaml in js app?), or provide HTTP API access to the settings.

as of this moment, the only settings this file contains are optional spotify credentials. ensure that when new credentials are saved, our in-memory spotify object is either re-created or updated and re-authenticated with the new credentials.

violet4 commented 6 months ago

maybe not every wishlist feature was completed, but this is as good as done.

this was done using jsrf+pydantic. magic!