Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Changing server url was resetting other updated fields (#86)

Gabe Kangasea1ed11e7225
diff --git a/web/components/config/edit-instance-details.tsx b/web/components/config/edit-instance-details.tsx
index 70e1dbac14..1be3cc901a 100644
--- a/web/components/config/edit-instance-details.tsx
+++ b/web/components/config/edit-instance-details.tsx
@@ -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
diff --git a/web/styles/globals.scss b/web/styles/globals.scss
index 9d822f741a..83703f58a6 100644
--- a/web/styles/globals.scss
+++ b/web/styles/globals.scss
@@ -50,6 +50,9 @@ code {
font-size: .88em;
}
+strong {
+ font-weight: 600;
+}
.logo-svg {
height: 2rem;
diff --git a/web/utils/config-constants.tsx b/web/utils/config-constants.tsx
index af04be30fc..1412ed204d 100644
--- a/web/utils/config-constants.tsx
+++ b/web/utils/config-constants.tsx
@@ -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',