Skip to content

v0.2.4

Choose a tag to compare

@github-actions github-actions released this 05 Oct 12:07
· 119 commits to main since this release
Give each provider a tab of its own on the settings page

The settings page was one page that knew every provider's parts by
hand. A provider was spread over it: its addresses in one card, its
sign-in in a section, its proxy among the server's settings and its
channels at the bottom. A new provider, or a new kind of setting,
meant changing the shared page.

The page now has a tab for each provider and one for the server. A
provider's tab holds what to enter in Plex for it, its sign-in if it
has one, the settings it was started with and its channels. The
server's tab holds the version, the listen address, the data
directory and debug logging. The page opens on the first provider.

A tab shows how many channels its provider has. The number is green
while one of them is on air, and amber when the provider's sign-in
has expired, so that shows from every tab.

A provider can now bring settings the page knows nothing about. One
that implements provider.Settings writes its part of the tab as HTML
and takes the forms posted from it. telesfor then asks for its
channels again, in case the settings change them. No provider uses
this yet. The sign-in by a code stays as it was, for any
provider.Account.

Each provider's proxy is now declared with its tuner and shown on its
tab, in place of one list of settings for all.

/ui/settings, where the page was, leads to the new one: a page left
open since v0.2.3 still refreshes from there.

- internal/provider/provider.go: what a provider with settings of
  its own offers.
- internal/web: the tabs, a template for a provider's tab and one
  for the server's, and the route a provider's forms post to.
- cmd/telesfor/main.go: each provider's settings beside its tuner.
- README.md, docs: the tabs, and how a provider adds to its own.