File tree Expand file tree Collapse file tree 4 files changed +24
-17
lines changed
packages/app/src/app/pages/Sandbox/Editor/Workspace/screens Expand file tree Collapse file tree 4 files changed +24
-17
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ export const LiveNow = () => {
4646 live : {
4747 notificationsHidden,
4848 isOwner,
49+ reconnecting,
4950 roomInfo : {
5051 startTime,
5152 roomId,
@@ -76,8 +77,14 @@ export const LiveNow = () => {
7677 < Stack justify = "space-between" align = "center" marginBottom = { 2 } >
7778 < Text variant = "danger" >
7879 < Stack align = "center" gap = { 2 } >
79- < LiveIcon />
80- < span > You're live!</ span >
80+ { reconnecting ? (
81+ 'Reconnecting...'
82+ ) : (
83+ < >
84+ < LiveIcon />
85+ < span > You're live!</ span >
86+ </ >
87+ ) }
8188 </ Stack >
8289 </ Text >
8390 < Timer startTime = { startTime } />
Original file line number Diff line number Diff line change @@ -60,7 +60,8 @@ export const Summary = () => {
6060 }
6161 } , [ customTemplate , frozenUpdated ] ) ;
6262
63- const updateFrozenState = ( ) => {
63+ const updateFrozenState = e => {
64+ e . preventDefault ( ) ;
6465 if ( customTemplate ) {
6566 return sessionFreezeOverride ( { frozen : ! sessionFrozen } ) ;
6667 }
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import { DeleteIcon, EditIcon } from './Icons';
1313import { VarForm } from './VarForm' ;
1414
1515export const EnvVars = ( ) => {
16- const [ editMode , setEditMode ] = useState ( false ) ;
16+ const [ editMode , setEditMode ] = useState ( null ) ;
1717 const {
1818 actions : { editor } ,
1919 state : {
@@ -39,35 +39,34 @@ export const EnvVars = () => {
3939 </ Text >
4040 </ Element >
4141 { envVars ? (
42- < List marginTop = { 4 } >
42+ < List paddingTop = { 4 } >
4343 { Object . keys ( envVars ) . map ( keyName => (
4444 < >
45- { editMode ? (
45+ { editMode === keyName || ! envVars [ keyName ] ? (
4646 < VarForm
4747 name = { keyName }
4848 value = { envVars [ keyName ] }
49- onCancel = { ( ) => setEditMode ( false ) }
49+ onCancel = { ( ) => setEditMode ( null ) }
5050 onSubmit = { ( { name, value } ) => {
5151 editor . updateEnvironmentVariables ( { name, value } ) ;
52- setEditMode ( false ) ;
52+ setEditMode ( null ) ;
5353 } }
5454 />
55- ) : null }
56- < ListItem justify = "space-between" marginTop = { editMode ? 4 : 0 } >
57- < Text > { keyName } </ Text >
58- { ! editMode ? (
55+ ) : (
56+ < ListItem justify = "space-between" marginTop = { editMode ? 4 : 0 } >
57+ < Text > { keyName } </ Text >
5958 < Stack gap = { 2 } >
6059 < EditIcon
6160 style = { { cursor : 'pointer' } }
62- onClick = { ( ) => setEditMode ( true ) }
61+ onClick = { ( ) => setEditMode ( keyName ) }
6362 />
6463 < DeleteIcon
6564 style = { { cursor : 'pointer' } }
6665 onClick = { ( ) => deleteEnv ( keyName ) }
6766 />
6867 </ Stack >
69- ) : null }
70- </ ListItem >
68+ </ ListItem >
69+ ) }
7170 </ >
7271 ) ) }
7372 </ List >
Original file line number Diff line number Diff line change @@ -63,11 +63,11 @@ export const VarForm = props => {
6363 </ FormField >
6464 < Stack paddingX = { 2 } marginTop = { 2 } >
6565 { props . name && props . value ? (
66- < Button variant = "link" onClick = { onCancel } >
66+ < Button variant = "link" onClick = { ( ) => props . onCancel ( ) } >
6767 Cancel
6868 </ Button >
6969 ) : null }
70- < Button variant = "secondary" >
70+ < Button variant = "secondary" type = "submit" disabled = { ! name || ! value } >
7171 { props . name && props . value ? 'Save' : 'Add Secret' }
7272 </ Button >
7373 </ Stack >
You can’t perform that action at this time.
0 commit comments