mirror of
https://github.com/owncast/owncast.git
synced 2024-11-29 11:39:08 +03:00
Prettified Code!
This commit is contained in:
parent
d0eb1446f3
commit
5371559c74
4 changed files with 19 additions and 18 deletions
|
@ -184,7 +184,9 @@ export default function EditSocialLinks() {
|
||||||
<div className="social-handle-cell">
|
<div className="social-handle-cell">
|
||||||
<p className="option-label">
|
<p className="option-label">
|
||||||
<strong>{platform}</strong>
|
<strong>{platform}</strong>
|
||||||
<span className="handle-url" title={url}>{url}</span>
|
<span className="handle-url" title={url}>
|
||||||
|
{url}
|
||||||
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -195,11 +197,13 @@ export default function EditSocialLinks() {
|
||||||
return (
|
return (
|
||||||
<div className="social-handle-cell">
|
<div className="social-handle-cell">
|
||||||
<span className="option-icon">
|
<span className="option-icon">
|
||||||
<img src={ iconUrl } alt="" className="option-icon" />
|
<img src={iconUrl} alt="" className="option-icon" />
|
||||||
</span>
|
</span>
|
||||||
<p className="option-label">
|
<p className="option-label">
|
||||||
<strong>{platformName}</strong>
|
<strong>{platformName}</strong>
|
||||||
<span className="handle-url" title={url}>{url}</span>
|
<span className="handle-url" title={url}>
|
||||||
|
{url}
|
||||||
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -71,7 +71,10 @@ export default function TextFieldWithSubmit(props: TextFieldWithSubmitProps) {
|
||||||
// if field is required but value is empty, or equals initial value, then don't show submit/update button. otherwise clear out any result messaging and display button.
|
// if field is required but value is empty, or equals initial value, then don't show submit/update button. otherwise clear out any result messaging and display button.
|
||||||
const handleChange = ({ fieldName: changedFieldName, value: changedValue }: UpdateArgs) => {
|
const handleChange = ({ fieldName: changedFieldName, value: changedValue }: UpdateArgs) => {
|
||||||
if (onChange) {
|
if (onChange) {
|
||||||
onChange({ fieldName: changedFieldName, value: useTrim ? changedValue.trim() : changedValue });
|
onChange({
|
||||||
|
fieldName: changedFieldName,
|
||||||
|
value: useTrim ? changedValue.trim() : changedValue,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -112,11 +112,10 @@ strong {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
input {
|
input {
|
||||||
&:not(:focus) {
|
&:not(:focus) {
|
||||||
&:invalid {
|
&:invalid {
|
||||||
color: var(--ant-error);
|
color: var(--ant-error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,8 +78,7 @@ export const TEXTFIELD_PROPS_SERVER_WELCOME_MESSAGE = {
|
||||||
maxLength: 500,
|
maxLength: 500,
|
||||||
placeholder: '',
|
placeholder: '',
|
||||||
label: 'Welcome Message',
|
label: 'Welcome Message',
|
||||||
tip:
|
tip: 'A system chat message sent to viewers when they first connect to chat. Leave blank to disable.',
|
||||||
'A system chat message sent to viewers when they first connect to chat. Leave blank to disable.',
|
|
||||||
};
|
};
|
||||||
export const TEXTFIELD_PROPS_LOGO = {
|
export const TEXTFIELD_PROPS_LOGO = {
|
||||||
apiPath: API_LOGO,
|
apiPath: API_LOGO,
|
||||||
|
@ -87,8 +86,7 @@ export const TEXTFIELD_PROPS_LOGO = {
|
||||||
maxLength: 255,
|
maxLength: 255,
|
||||||
placeholder: '/img/mylogo.png',
|
placeholder: '/img/mylogo.png',
|
||||||
label: 'Logo',
|
label: 'Logo',
|
||||||
tip:
|
tip: 'Upload your logo if you have one. We recommend that you use a square image that is at least 256x256.',
|
||||||
'Upload your logo if you have one. We recommend that you use a square image that is at least 256x256.',
|
|
||||||
};
|
};
|
||||||
export const TEXTFIELD_PROPS_STREAM_KEY = {
|
export const TEXTFIELD_PROPS_STREAM_KEY = {
|
||||||
apiPath: API_STREAM_KEY,
|
apiPath: API_STREAM_KEY,
|
||||||
|
@ -152,8 +150,7 @@ export const FIELD_PROPS_NSFW = {
|
||||||
apiPath: API_NSFW_SWITCH,
|
apiPath: API_NSFW_SWITCH,
|
||||||
configPath: 'instanceDetails',
|
configPath: 'instanceDetails',
|
||||||
label: 'NSFW?',
|
label: 'NSFW?',
|
||||||
tip:
|
tip: "Turn this ON if you plan to steam explicit or adult content. Please respectfully set this flag so unexpected eyes won't accidentally see it in the Directory.",
|
||||||
"Turn this ON if you plan to steam explicit or adult content. Please respectfully set this flag so unexpected eyes won't accidentally see it in the Directory.",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const FIELD_PROPS_YP = {
|
export const FIELD_PROPS_YP = {
|
||||||
|
@ -222,8 +219,7 @@ export const FRAMERATE_DEFAULTS = {
|
||||||
defaultValue: 24,
|
defaultValue: 24,
|
||||||
unit: 'fps',
|
unit: 'fps',
|
||||||
incrementBy: null,
|
incrementBy: null,
|
||||||
tip:
|
tip: 'Reducing your framerate will decrease the amount of video that needs to be encoded and sent to your viewers, saving CPU and bandwidth at the expense of smoothness. A lower value is generally is fine for most content.',
|
||||||
'Reducing your framerate will decrease the amount of video that needs to be encoded and sent to your viewers, saving CPU and bandwidth at the expense of smoothness. A lower value is generally is fine for most content.',
|
|
||||||
};
|
};
|
||||||
export const FRAMERATE_SLIDER_MARKS = {
|
export const FRAMERATE_SLIDER_MARKS = {
|
||||||
[FRAMERATE_DEFAULTS.min]: `${FRAMERATE_DEFAULTS.min} ${FRAMERATE_DEFAULTS.unit}`,
|
[FRAMERATE_DEFAULTS.min]: `${FRAMERATE_DEFAULTS.min} ${FRAMERATE_DEFAULTS.unit}`,
|
||||||
|
@ -321,7 +317,7 @@ export const S3_TEXT_FIELDS_INFO = {
|
||||||
tip: 'The full URL (with "https://") endpoint from your storage provider.',
|
tip: 'The full URL (with "https://") endpoint from your storage provider.',
|
||||||
useTrim: true,
|
useTrim: true,
|
||||||
type: TEXTFIELD_TYPE_URL,
|
type: TEXTFIELD_TYPE_URL,
|
||||||
pattern: DEFAULT_TEXTFIELD_URL_PATTERN,
|
pattern: DEFAULT_TEXTFIELD_URL_PATTERN,
|
||||||
},
|
},
|
||||||
region: {
|
region: {
|
||||||
fieldName: 'region',
|
fieldName: 'region',
|
||||||
|
@ -342,8 +338,7 @@ export const S3_TEXT_FIELDS_INFO = {
|
||||||
label: 'Serving Endpoint',
|
label: 'Serving Endpoint',
|
||||||
maxLength: 255,
|
maxLength: 255,
|
||||||
placeholder: 'http://cdn.ss3.provider.endpoint.com',
|
placeholder: 'http://cdn.ss3.provider.endpoint.com',
|
||||||
tip:
|
tip: 'Optional URL that content should be accessed from instead of the default. Used with CDNs and specific storage providers. Generally not required.',
|
||||||
'Optional URL that content should be accessed from instead of the default. Used with CDNs and specific storage providers. Generally not required.',
|
|
||||||
type: TEXTFIELD_TYPE_URL,
|
type: TEXTFIELD_TYPE_URL,
|
||||||
pattern: DEFAULT_TEXTFIELD_URL_PATTERN,
|
pattern: DEFAULT_TEXTFIELD_URL_PATTERN,
|
||||||
useTrim: true,
|
useTrim: true,
|
||||||
|
|
Loading…
Reference in a new issue