diff --git a/web/.github/workflows/build-next.yml b/web/.github/workflows/build-next.yml index d35c03938..d9d713f0f 100644 --- a/web/.github/workflows/build-next.yml +++ b/web/.github/workflows/build-next.yml @@ -1,11 +1,5 @@ name: Build admin app -on: - push: - branches: - - master - pull_request: - branches: master - +on: [push, pull_request] jobs: run: name: npm run build diff --git a/web/pages/config-storage.tsx b/web/pages/config-storage.tsx index 6c1f5e3d0..e46713350 100644 --- a/web/pages/config-storage.tsx +++ b/web/pages/config-storage.tsx @@ -1,9 +1,10 @@ -import React, { useContext } from "react"; -import KeyValueTable from "./components/key-value-table"; +import React, { useContext, useState, useEffect } from 'react'; import { ServerStatusContext } from '../utils/server-status-context'; -import { Typography } from 'antd'; -import Link from 'next/link'; - +import { Typography, Switch, Input, Button } from 'antd'; +import { + postConfigUpdateToAPI, + API_S3_INFO, +} from './components/config/constants'; const { Title } = Typography; function Storage({ config }) { @@ -11,66 +12,89 @@ function Storage({ config }) { return null; } - if (!config.s3.enabled) { - return ( -
- You are currently using the local storage of this Owncast server to store and distribute video. -
-- Owncast can use S3-compatible external storage providers to offload the responsibility of disk and bandwidth utilization from your own server. -
+ const [endpoint, setEndpoint] = useState(config.s3.endpoint); + const [accessKey, setAccessKey] = useState(config.s3.accessKey); + const [secret, setSecret] = useState(config.s3.secret); + const [bucket, setBucket] = useState(config.s3.bucket); + const [region, setRegion] = useState(config.s3.region); + const [acl, setAcl] = useState(config.s3.acl); + const [servingEndpoint, setServingEndpoint] = useState(config.s3.servingEndpoint); + const [enabled, setEnabled] = useState(config.s3.enabled); -- Visit our storage documentation to learn how to configure this. -
-