Admin support for creating 3rd party external link actions (#72)

* WIP external actions

* Add comment

* Add support for external actions icons and colors
This commit is contained in:
Gabe Kangas
2021-03-15 15:27:19 -07:00
committed by GitHub
parent f2092f928e
commit 195ac23bb2
6 changed files with 294 additions and 1 deletions

View File

@@ -60,9 +60,13 @@ export const DELETE_WEBHOOK = `${API_LOCATION}webhooks/delete`;
// Create a single webhook
export const CREATE_WEBHOOK = `${API_LOCATION}webhooks/create`;
// hard coded social icons list
export const SOCIAL_PLATFORMS_LIST = `${NEXT_PUBLIC_API_HOST}api/socialplatforms`;
// set external action links
export const EXTERNAL_ACTIONS = `${API_LOCATION}api/externalactions`
export const API_YP_RESET = `${API_LOCATION}yp/reset`;
export const TEMP_UPDATER_API = LOGS_ALL;

View File

@@ -27,6 +27,7 @@ export const API_VIDEO_VARIANTS = '/video/streamoutputvariants';
export const API_WEB_PORT = '/webserverport';
export const API_YP_SWITCH = '/directoryenabled';
export const API_CHAT_DISABLE = '/chat/disable';
export const API_EXTERNAL_ACTIONS = '/externalactions'
export async function postConfigUpdateToAPI(args: ApiPostArgs) {
const { apiPath, data, onSuccess, onError } = args;

View File

@@ -4,7 +4,7 @@ import React, { useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import { STATUS, fetchData, FETCH_INTERVAL, SERVER_CONFIG } from './apis';
import { ConfigDetails, UpdateArgs } from '../types/config-section';
import { ConfigDetails, UpdateArgs, ExternalAction } from '../types/config-section';
import { DEFAULT_VARIANT_STATE } from './config-constants';
export const initialServerConfigState: ConfigDetails = {
@@ -44,6 +44,7 @@ export const initialServerConfigState: ConfigDetails = {
cpuUsageLevel: 3,
videoQualityVariants: [DEFAULT_VARIANT_STATE],
},
externalActions: [],
};
const initialServerStatusState = {