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:
Gabe Kangas
2021-03-15 15:32:52 -07:00
committed by GitHub
parent 84f74f0353
commit 3fb80554ef
11 changed files with 288 additions and 37 deletions

View File

@ -52,7 +52,8 @@ func GetServerConfig(w http.ResponseWriter, r *http.Request) {
Enabled: data.GetDirectoryEnabled(),
InstanceURL: data.GetServerURL(),
},
S3: data.GetS3Config(),
S3: data.GetS3Config(),
ExternalActions: data.GetExternalActions(),
}
w.Header().Set("Content-Type", "application/json")
@ -63,16 +64,17 @@ func GetServerConfig(w http.ResponseWriter, r *http.Request) {
}
type serverConfigAdminResponse struct {
InstanceDetails webConfigResponse `json:"instanceDetails"`
FFmpegPath string `json:"ffmpegPath"`
StreamKey string `json:"streamKey"`
WebServerPort int `json:"webServerPort"`
RTMPServerPort int `json:"rtmpServerPort"`
S3 models.S3 `json:"s3"`
VideoSettings videoSettings `json:"videoSettings"`
LatencyLevel int `json:"latencyLevel"`
YP yp `json:"yp"`
ChatDisabled bool `json:"chatDisabled"`
InstanceDetails webConfigResponse `json:"instanceDetails"`
FFmpegPath string `json:"ffmpegPath"`
StreamKey string `json:"streamKey"`
WebServerPort int `json:"webServerPort"`
RTMPServerPort int `json:"rtmpServerPort"`
S3 models.S3 `json:"s3"`
VideoSettings videoSettings `json:"videoSettings"`
LatencyLevel int `json:"latencyLevel"`
YP yp `json:"yp"`
ChatDisabled bool `json:"chatDisabled"`
ExternalActions []models.ExternalAction `json:"externalActions"`
}
type videoSettings struct {