FEAT: Add EndStream functionality;
PATCH: Fix category field input on `StreamDashboard`; REFACTOR: Remove focused-input scaling on `StreamDashboard`;
This commit is contained in:
@@ -277,7 +277,7 @@ const StreamDashboardPage: React.FC = () => {
|
|||||||
value={streamData.title}
|
value={streamData.title}
|
||||||
onChange={handleInputChange}
|
onChange={handleInputChange}
|
||||||
placeholder="Enter your stream title"
|
placeholder="Enter your stream title"
|
||||||
extraClasses="w-[70%] focus:w-[100%]"
|
extraClasses="w-[70%] focus:w-[70%]"
|
||||||
maxLength={50}
|
maxLength={50}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -285,6 +285,7 @@ const StreamDashboardPage: React.FC = () => {
|
|||||||
<div className="relative">
|
<div className="relative">
|
||||||
<label className="block text-white mb-2">Category</label>
|
<label className="block text-white mb-2">Category</label>
|
||||||
<Input
|
<Input
|
||||||
|
name="category_name"
|
||||||
value={streamData.category_name}
|
value={streamData.category_name}
|
||||||
onChange={handleInputChange}
|
onChange={handleInputChange}
|
||||||
onFocus={() => setIsCategoryFocused(true)}
|
onFocus={() => setIsCategoryFocused(true)}
|
||||||
@@ -292,7 +293,7 @@ const StreamDashboardPage: React.FC = () => {
|
|||||||
setTimeout(() => setIsCategoryFocused(false), 200)
|
setTimeout(() => setIsCategoryFocused(false), 200)
|
||||||
}
|
}
|
||||||
placeholder="Select or type a category"
|
placeholder="Select or type a category"
|
||||||
extraClasses="w-[70%] focus:w-[100%]"
|
extraClasses="w-[70%] focus:w-[70%]"
|
||||||
maxLength={50}
|
maxLength={50}
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
type="search"
|
type="search"
|
||||||
@@ -388,13 +389,25 @@ const StreamDashboardPage: React.FC = () => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex flex-col w-fit mx-auto items-center justify-center pt-6 gap-6">
|
<div className="flex flex-col w-fit mx-auto items-center justify-center pt-6 gap-6">
|
||||||
|
<div className="flex gap-8">
|
||||||
<Button
|
<Button
|
||||||
onClick={isStreaming ? handleUpdateStream : handleStartStream}
|
onClick={
|
||||||
|
isStreaming ? handleUpdateStream : handleStartStream
|
||||||
|
}
|
||||||
disabled={!isFormValid()}
|
disabled={!isFormValid()}
|
||||||
extraClasses="text-2xl px-8 py-4 disabled:opacity-50 disabled:cursor-not-allowed"
|
extraClasses="text-2xl px-8 py-4 disabled:opacity-50 disabled:cursor-not-allowed"
|
||||||
>
|
>
|
||||||
{isStreaming ? "Update Stream" : "Start Streaming"}
|
{isStreaming ? "Update Stream" : "Start Streaming"}
|
||||||
</Button>
|
</Button>
|
||||||
|
{isStreaming && (
|
||||||
|
<Button
|
||||||
|
onClick={handleEndStream}
|
||||||
|
extraClasses="text-2xl px-8 py-4 hover:text-red-500 hover:border-red-500"
|
||||||
|
>
|
||||||
|
End Stream
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
{!streamDetected && (
|
{!streamDetected && (
|
||||||
<p className="text-red-500 text-sm">
|
<p className="text-red-500 text-sm">
|
||||||
No stream input detected. Please start streaming using your
|
No stream input detected. Please start streaming using your
|
||||||
|
|||||||
Reference in New Issue
Block a user