@@ -160,16 +160,32 @@ export function StreamDetailClient({
160160 </ div >
161161 < div className = "dash-actions" >
162162 { stream . status === "active" && (
163- < button
164- className = "dash-btn"
165- disabled = { pausing === "loading" }
166- onClick = { ( ) => setPausing ( "confirm" ) }
167- >
168- < span className = "btn-icon" >
169- < svg width = "14" height = "14" viewBox = "0 0 16 16" fill = "currentColor" > < rect x = "4" y = "3" width = "3" height = "10" rx = "0.5" /> < rect x = "9" y = "3" width = "3" height = "10" rx = "0.5" /> </ svg >
170- </ span >
171- Pause
172- </ button >
163+ pausing !== "idle" ? (
164+ < >
165+ < button
166+ className = "dash-btn danger"
167+ onClick = { handlePause }
168+ >
169+ { pausing === "loading" ? "Pausing..." : "Pause" }
170+ </ button >
171+ < button
172+ className = "dash-btn"
173+ onClick = { ( ) => setPausing ( "idle" ) }
174+ >
175+ Cancel
176+ </ button >
177+ </ >
178+ ) : (
179+ < button
180+ className = "dash-btn"
181+ onClick = { ( ) => setPausing ( "confirm" ) }
182+ >
183+ < span className = "btn-icon" >
184+ < svg width = "14" height = "14" viewBox = "0 0 16 16" fill = "currentColor" > < rect x = "4" y = "3" width = "3" height = "10" rx = "0.5" /> < rect x = "9" y = "3" width = "3" height = "10" rx = "0.5" /> </ svg >
185+ </ span >
186+ Pause
187+ </ button >
188+ )
173189 ) }
174190 { ( stream . status === "paused" || stream . status === "inactive" ) && (
175191 < button
@@ -208,21 +224,6 @@ export function StreamDetailClient({
208224 </ div >
209225 </ div >
210226
211- { /* Pause confirmation */ }
212- { pausing === "confirm" && (
213- < div className = "dash-confirm-inline" >
214- < span > Pause this stream? Events will be buffered until resumed.</ span >
215- < div style = { { display : "flex" , gap : 8 } } >
216- < button className = "dash-btn danger" style = { { fontSize : 12 , padding : "4px 12px" } } onClick = { handlePause } >
217- Pause
218- </ button >
219- < button className = "dash-btn" style = { { fontSize : 12 , padding : "4px 12px" } } onClick = { ( ) => setPausing ( "idle" ) } >
220- Cancel
221- </ button >
222- </ div >
223- </ div >
224- ) }
225-
226227 { /* Stats */ }
227228 < div className = "dash-stats" >
228229 < div className = "dash-stat" >
0 commit comments