mirror of
https://github.com/owncast/owncast.git
synced 2024-10-10 19:16:02 +00:00
fix styles; update storage validation checker
This commit is contained in:
parent
7501cfc548
commit
cd8d877a59
@ -28,14 +28,14 @@ function checkSaveable(formValues: any, currentValues: any) {
|
|||||||
const { endpoint, accessKey, secret, bucket, region, enabled, servingEndpoint, acl } = formValues;
|
const { endpoint, accessKey, secret, bucket, region, enabled, servingEndpoint, acl } = formValues;
|
||||||
// if fields are filled out and different from what's in store, then return true
|
// if fields are filled out and different from what's in store, then return true
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
if (endpoint !== '' && accessKey !== '' && secret !== '' && bucket !== '' && region !== '') {
|
if (!!endpoint && !!accessKey && !!secret && !!bucket && !!region) {
|
||||||
if (
|
if (
|
||||||
endpoint !== currentValues.endpoint ||
|
endpoint !== currentValues.endpoint ||
|
||||||
accessKey !== currentValues.accessKey ||
|
accessKey !== currentValues.accessKey ||
|
||||||
secret !== currentValues.bucket ||
|
secret !== currentValues.secret ||
|
||||||
region !== currentValues.region ||
|
region !== currentValues.region ||
|
||||||
servingEndpoint !== currentValues.servingEndpoint ||
|
(!!currentValues.servingEndpoint && servingEndpoint !== currentValues.servingEndpoint) ||
|
||||||
acl !== currentValues.acl
|
(!!currentValues.acl && acl !== currentValues.acl)
|
||||||
) {
|
) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -188,10 +188,8 @@ function EditStorage() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Collapse>
|
<Collapse className="advanced-section">
|
||||||
<Panel header="Advanced Settings" key="1">
|
<Panel header="Advanced Settings" key="1">
|
||||||
<Title level={4}>Advanced</Title>
|
|
||||||
|
|
||||||
<div className="field-container">
|
<div className="field-container">
|
||||||
<TextField
|
<TextField
|
||||||
{...S3_TEXT_FIELDS_INFO.acl}
|
{...S3_TEXT_FIELDS_INFO.acl}
|
||||||
@ -211,7 +209,7 @@ function EditStorage() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="button-container">
|
<div className="button-container">
|
||||||
<Button onClick={handleSave} disabled={!isSaveable}>
|
<Button type="primary" onClick={handleSave} disabled={!isSaveable}>
|
||||||
Save
|
Save
|
||||||
</Button>
|
</Button>
|
||||||
<InputStatusInfo status={submitStatus} />
|
<InputStatusInfo status={submitStatus} />
|
||||||
|
@ -85,7 +85,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
display: block;
|
display: block;
|
||||||
&.empty {
|
&.empty {
|
||||||
display: inline-block;
|
display: none;
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -340,4 +340,14 @@
|
|||||||
.button-container {
|
.button-container {
|
||||||
margin: 1em 0;
|
margin: 1em 0;
|
||||||
}
|
}
|
||||||
|
.advanced-section {
|
||||||
|
margin: 1em 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.field-container {
|
||||||
|
padding: .85em 0 .5em;
|
||||||
|
&:nth-child(even) {
|
||||||
|
background-color: rgba(0,0,0,.25);
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user