Gek/external actions (#827)
* WIP External actions modal frontend * Add external action links * Allow modal to show/hide and use a dynamic url * Use external link object instead of just url for state * add style and placement to external action buttons * reformat and simplify tag list style as not to conflict with action buttons and make them look less actionable since they're not * fix bug to open modal * have Esc key close modal * fix style on modal * make modal bg darker * close modal when you click outside of it * fix zindex * Add support for external action icons and colors * Some external action modal sizing + loading spinner Co-authored-by: Ginger Wong <omqmail@gmail.com>
This commit is contained in:
@@ -34,6 +34,7 @@ const s3StorageConfigKey = "s3_storage_config"
|
||||
const videoLatencyLevel = "video_latency_level"
|
||||
const videoStreamOutputVariantsKey = "video_stream_output_variants"
|
||||
const chatDisabledKey = "chat_disabled"
|
||||
const externalActionsKey = "external_actions"
|
||||
|
||||
// GetExtraPageBodyContent will return the user-supplied body content.
|
||||
func GetExtraPageBodyContent() string {
|
||||
@@ -424,6 +425,27 @@ func GetChatDisabled() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// GetExternalActions will return the registered external actions.
|
||||
func GetExternalActions() []models.ExternalAction {
|
||||
configEntry, err := _datastore.Get(externalActionsKey)
|
||||
if err != nil {
|
||||
return []models.ExternalAction{}
|
||||
}
|
||||
|
||||
var externalActions []models.ExternalAction
|
||||
if err := configEntry.getObject(&externalActions); err != nil {
|
||||
return []models.ExternalAction{}
|
||||
}
|
||||
|
||||
return externalActions
|
||||
}
|
||||
|
||||
// SetExternalActions will save external actions.
|
||||
func SetExternalActions(actions []models.ExternalAction) error {
|
||||
var configEntry = ConfigEntry{Key: externalActionsKey, Value: actions}
|
||||
return _datastore.Save(configEntry)
|
||||
}
|
||||
|
||||
// VerifySettings will perform a sanity check for specific settings values.
|
||||
func VerifySettings() error {
|
||||
if GetStreamKey() == "" {
|
||||
|
||||
Reference in New Issue
Block a user