owncast/models/externalAction.go
Philipp a290770ac9
Allow embedding HTML for external actions (#2693)
* Admin UI: implement HTML embeds

* Admin UI External Actions: set correct useHTML on edits

* Admin UI: edit by index, not URL

* External Actions: render HTML on stream frontend

* Don't open embeds externally

* Remove TODO comment

* Add HTML as unique action key

* Admin UI: Actions: use CodeMirror editor, dropdown
2023-02-14 09:08:54 -08:00

19 lines
825 B
Go

package models
// ExternalAction is a link that will open as a 3rd party action.
type ExternalAction struct {
// URL is the URL to load.
URL string `json:"url"`
// HTML is the HTML to embed into the modal. When this is set, OpenExternally and URL are ignored
HTML string `json:"html"`
// Title is the name of this action, displayed in the modal.
Title string `json:"title"`
// Description is the description of this action.
Description string `json:"description"`
// Icon is the optional icon for the button associated with this action.
Icon string `json:"icon"`
// Color is the optional color for the button associated with this action.
Color string `json:"color"`
// OpenExternally states if the action should open a new tab/window instead of an internal modal.
OpenExternally bool `json:"openExternally"`
}