diff --git a/apps/web/src/app/(ui)/(protected)/settings/channel/[channelName]/page.client.tsx b/apps/web/src/app/(ui)/(protected)/settings/channel/[channelName]/page.client.tsx
index 8940a33..a42536b 100644
--- a/apps/web/src/app/(ui)/(protected)/settings/channel/[channelName]/page.client.tsx
+++ b/apps/web/src/app/(ui)/(protected)/settings/channel/[channelName]/page.client.tsx
@@ -61,6 +61,7 @@ interface ChannelSettingsClientProps {
streamKey: StreamKey | null;
followers: (Follow & { user: { id: string; slack_id: string } })[];
followerPersonalChannels: (Channel | null)[];
+ is247: boolean;
};
isOwner: boolean;
currentUser: User;
@@ -306,6 +307,27 @@ export default function ChannelSettingsClient({
),
},
+ {
+ name: 'is247',
+ value: channel.is247,
+ component: ({ field }) => (
+
+
+
+
+ Mark this channel as always live. It will disable notifications on #hctv-streams.
+
+
+
{
+ field.onChange(checked);
+ }}
+ />
+
+
+ ),
+ }
]}
schemaName="updateChannelSettings"
action={updateChannelSettings}
diff --git a/apps/web/src/components/app/UniversalForm/UniversalForm.tsx b/apps/web/src/components/app/UniversalForm/UniversalForm.tsx
index ebe55df..e01230f 100644
--- a/apps/web/src/components/app/UniversalForm/UniversalForm.tsx
+++ b/apps/web/src/components/app/UniversalForm/UniversalForm.tsx
@@ -82,7 +82,7 @@ export function UniversalForm({
name={field.name as Path}
render={({ field: formField }) => (
- {field.type !== 'hidden' && {field.label}}
+ {(field.type !== 'hidden' || field.label) && {field.label}}
{field.component ? (
field.component({ field: formField, ...field.componentProps })
diff --git a/apps/web/src/components/app/UniversalForm/types.ts b/apps/web/src/components/app/UniversalForm/types.ts
index 4cf4de9..5bafbf0 100644
--- a/apps/web/src/components/app/UniversalForm/types.ts
+++ b/apps/web/src/components/app/UniversalForm/types.ts
@@ -5,7 +5,7 @@ import { schemaDb } from './UniversalForm';
export type FormFieldConfig = {
name: string;
- label: string;
+ label?: string;
type?: HTMLInputTypeAttribute;
placeholder?: string;
description?: string;
diff --git a/apps/web/src/lib/form/actions.ts b/apps/web/src/lib/form/actions.ts
index f54fc29..3bcde2b 100644
--- a/apps/web/src/lib/form/actions.ts
+++ b/apps/web/src/lib/form/actions.ts
@@ -202,6 +202,7 @@ export async function updateChannelSettings(prev: any, formData: FormData) {
data: {
description: zod.data.description || undefined,
pfpUrl: zod.data.pfpUrl,
+ is247: zod.data.is247,
},
});
diff --git a/apps/web/src/lib/form/zod.ts b/apps/web/src/lib/form/zod.ts
index 7a72682..548ff9e 100644
--- a/apps/web/src/lib/form/zod.ts
+++ b/apps/web/src/lib/form/zod.ts
@@ -24,4 +24,5 @@ export const updateChannelSettingsSchema = z.object({
channelId: z.string().min(1),
pfpUrl: z.string(),
description: z.string().min(1).max(500),
+ is247: z.boolean(),
});
\ No newline at end of file