Changing server url was resetting other updated fields (#86)
* changing url was resetting other fields. Closes https://github.com/owncast/owncast/issues/854 * specify config path for various instanceDetails fields instead * fix react warning Co-authored-by: gingervitis <omqmail@gmail.com>
This commit is contained in:
parent
396eafcbd2
commit
ea1ed11e72
@ -124,13 +124,12 @@ export default function EditInstanceDetails() {
|
||||
Learn more
|
||||
</a>
|
||||
.
|
||||
{!yp.instanceUrl && (
|
||||
<div>
|
||||
<br />
|
||||
You must set your server URL above to enable the directory.
|
||||
</div>
|
||||
)}
|
||||
</p>
|
||||
{!yp.instanceUrl && (
|
||||
<p className="description">
|
||||
You must set your <strong>Server URL</strong> above to enable the directory.
|
||||
</p>
|
||||
)}
|
||||
|
||||
<div className="config-yp-container">
|
||||
<ToggleSwitch
|
||||
|
@ -50,6 +50,9 @@ code {
|
||||
font-size: .88em;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.logo-svg {
|
||||
height: 2rem;
|
||||
|
@ -46,6 +46,7 @@ export async function postConfigUpdateToAPI(args: ApiPostArgs) {
|
||||
// Some default props to help build out a TextField
|
||||
export const TEXTFIELD_PROPS_SERVER_NAME = {
|
||||
apiPath: API_SERVER_NAME,
|
||||
configPath: 'instanceDetails',
|
||||
maxLength: TEXT_MAXLENGTH,
|
||||
placeholder: 'Owncast site name', // like "gothland"
|
||||
label: 'Name',
|
||||
@ -53,6 +54,7 @@ export const TEXTFIELD_PROPS_SERVER_NAME = {
|
||||
};
|
||||
export const TEXTFIELD_PROPS_STREAM_TITLE = {
|
||||
apiPath: API_STREAM_TITLE,
|
||||
configPath: 'instanceDetails',
|
||||
maxLength: 100,
|
||||
placeholder: 'Doing cool things...',
|
||||
label: 'Stream Title',
|
||||
@ -60,6 +62,7 @@ export const TEXTFIELD_PROPS_STREAM_TITLE = {
|
||||
};
|
||||
export const TEXTFIELD_PROPS_SERVER_SUMMARY = {
|
||||
apiPath: API_SERVER_SUMMARY,
|
||||
configPath: 'instanceDetails',
|
||||
maxLength: 500,
|
||||
placeholder: '',
|
||||
label: 'About',
|
||||
@ -67,6 +70,7 @@ export const TEXTFIELD_PROPS_SERVER_SUMMARY = {
|
||||
};
|
||||
export const TEXTFIELD_PROPS_SERVER_WELCOME_MESSAGE = {
|
||||
apiPath: API_SERVER_WELCOME_MESSAGE,
|
||||
configPath: 'instanceDetails',
|
||||
maxLength: 500,
|
||||
placeholder: '',
|
||||
label: 'Welcome Message',
|
||||
@ -75,6 +79,7 @@ export const TEXTFIELD_PROPS_SERVER_WELCOME_MESSAGE = {
|
||||
};
|
||||
export const TEXTFIELD_PROPS_LOGO = {
|
||||
apiPath: API_LOGO,
|
||||
configPath: 'instanceDetails',
|
||||
maxLength: 255,
|
||||
placeholder: '/img/mylogo.png',
|
||||
label: 'Logo',
|
||||
|
Loading…
x
Reference in New Issue
Block a user