more cleanup
This commit is contained in:
@@ -196,7 +196,6 @@ export default function EditSocialLinks() {
|
|||||||
return (
|
return (
|
||||||
<div className="actions">
|
<div className="actions">
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
|
||||||
size="small"
|
size="small"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setEditId(index);
|
setEditId(index);
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import {
|
|||||||
import TextField from './form-textfield';
|
import TextField from './form-textfield';
|
||||||
import FormStatusIndicator from './form-status-indicator';
|
import FormStatusIndicator from './form-status-indicator';
|
||||||
import { isValidUrl } from '../../utils/urls';
|
import { isValidUrl } from '../../utils/urls';
|
||||||
|
import ToggleSwitch from './form-toggleswitch-with-submit';
|
||||||
// import ToggleSwitch from './form-toggleswitch-with-submit';
|
// import ToggleSwitch from './form-toggleswitch-with-submit';
|
||||||
|
|
||||||
const { Panel } = Collapse;
|
const { Panel } = Collapse;
|
||||||
@@ -145,20 +146,21 @@ export default function EditStorage() {
|
|||||||
return (
|
return (
|
||||||
<div className={containerClass}>
|
<div className={containerClass}>
|
||||||
<div className="enable-switch">
|
<div className="enable-switch">
|
||||||
{/* <ToggleSwitch
|
<ToggleSwitch
|
||||||
|
apiPath=""
|
||||||
fieldName="enabled"
|
fieldName="enabled"
|
||||||
label="Storage Enabled"
|
label="Storage Enabled"
|
||||||
checked={formDataValues.enabled}
|
checked={formDataValues.enabled}
|
||||||
onChange={handleSwitchChange}
|
onChange={handleSwitchChange}
|
||||||
/> */}
|
/>
|
||||||
<Switch
|
{/* <Switch
|
||||||
checked={formDataValues.enabled}
|
checked={formDataValues.enabled}
|
||||||
defaultChecked={formDataValues.enabled}
|
defaultChecked={formDataValues.enabled}
|
||||||
onChange={handleSwitchChange}
|
onChange={handleSwitchChange}
|
||||||
checkedChildren="ON"
|
checkedChildren="ON"
|
||||||
unCheckedChildren="OFF"
|
unCheckedChildren="OFF"
|
||||||
/>{' '}
|
/>{' '}
|
||||||
Enabled
|
Enabled */}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="form-fields">
|
<div className="form-fields">
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
// This is a wrapper for the Ant Switch component.
|
// This is a wrapper for the Ant Switch component.
|
||||||
// onChange of the switch, it will automatically post a change to the config api.
|
// This one is styled to match the form-textfield component.
|
||||||
|
// If `useSubmit` is true then it will automatically post to the config API onChange.
|
||||||
|
|
||||||
import React, { useState, useContext } from 'react';
|
import React, { useState, useContext } from 'react';
|
||||||
import { Switch } from 'antd';
|
import { Switch } from 'antd';
|
||||||
@@ -17,9 +18,9 @@ import { RESET_TIMEOUT, postConfigUpdateToAPI } from '../../utils/config-constan
|
|||||||
import { ServerStatusContext } from '../../utils/server-status-context';
|
import { ServerStatusContext } from '../../utils/server-status-context';
|
||||||
|
|
||||||
interface ToggleSwitchProps {
|
interface ToggleSwitchProps {
|
||||||
apiPath: string;
|
|
||||||
fieldName: string;
|
fieldName: string;
|
||||||
|
|
||||||
|
apiPath?: string;
|
||||||
checked?: boolean;
|
checked?: boolean;
|
||||||
configPath?: string;
|
configPath?: string;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
@@ -106,6 +107,7 @@ export default function ToggleSwitch(props: ToggleSwitchProps) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ToggleSwitch.defaultProps = {
|
ToggleSwitch.defaultProps = {
|
||||||
|
apiPath: '',
|
||||||
checked: false,
|
checked: false,
|
||||||
configPath: '',
|
configPath: '',
|
||||||
disabled: false,
|
disabled: false,
|
||||||
|
|||||||
@@ -153,7 +153,6 @@ export default function CurrentVariantsTable() {
|
|||||||
return (
|
return (
|
||||||
<span className="actions">
|
<span className="actions">
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
|
||||||
size="small"
|
size="small"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setEditId(index);
|
setEditId(index);
|
||||||
|
|||||||
@@ -7,9 +7,7 @@ const { Title } = Typography;
|
|||||||
export default function ConfigServerDetails() {
|
export default function ConfigServerDetails() {
|
||||||
return (
|
return (
|
||||||
<div className="config-server-details-form">
|
<div className="config-server-details-form">
|
||||||
<Title>
|
<Title>Server Settings</Title>
|
||||||
Server Settings
|
|
||||||
</Title>
|
|
||||||
<p className="description">
|
<p className="description">
|
||||||
You should change your stream key from the default and keep it safe. For most people
|
You should change your stream key from the default and keep it safe. For most people
|
||||||
it's likely the other settings will not need to be changed.
|
it's likely the other settings will not need to be changed.
|
||||||
|
|||||||
@@ -7,9 +7,7 @@ const { Title } = Typography;
|
|||||||
export default function ConfigStorageInfo() {
|
export default function ConfigStorageInfo() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Title>
|
<Title>Storage</Title>
|
||||||
Storage
|
|
||||||
</Title>
|
|
||||||
<p className="description">
|
<p className="description">
|
||||||
Owncast supports optionally using external storage providers to distribute your video. Learn
|
Owncast supports optionally using external storage providers to distribute your video. Learn
|
||||||
more about this by visiting our{' '}
|
more about this by visiting our{' '}
|
||||||
|
|||||||
@@ -253,6 +253,17 @@ textarea.ant-input {
|
|||||||
|
|
||||||
|
|
||||||
// ANT BUTTON
|
// ANT BUTTON
|
||||||
|
.ant-btn {
|
||||||
|
background-color: var(--purple-dark);
|
||||||
|
border-color: var(--white-25);
|
||||||
|
color: var(--white-75);
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
background-color: var(--owncast-purple);
|
||||||
|
border-color: var(--owncast-purple);
|
||||||
|
color: var(--white);
|
||||||
|
}
|
||||||
|
}
|
||||||
.ant-btn-primary {
|
.ant-btn-primary {
|
||||||
background-color: var(--owncast-purple);
|
background-color: var(--owncast-purple);
|
||||||
border-color: var(--owncast-purple);
|
border-color: var(--owncast-purple);
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
|
|
||||||
.help-page {
|
.help-page {
|
||||||
|
|
||||||
.ant-result-image {
|
.ant-result-image {
|
||||||
height: 100px;
|
height: 100px;
|
||||||
svg {
|
svg {
|
||||||
|
|||||||
Reference in New Issue
Block a user