@@ -65,7 +65,6 @@ export default function Connection() {
6565 const accountHasExpired = accountInfo !== null && accountIsExpired ( accountInfo ) ;
6666
6767 const getTitle = ( ) => {
68- if ( vpnConnected ) return t ( 'connectedToObscura' ) ;
6968 if ( accountHasExpired ) return t ( 'account-Expired' ) ;
7069 if ( connectionTransition ) {
7170 switch ( connectionInProgress ) {
@@ -78,16 +77,17 @@ export default function Connection() {
7877 return t ( 'Disconnecting' ) ;
7978 }
8079 }
80+ if ( vpnConnected ) return t ( 'connectedToObscura' ) ;
8181 if ( ! internetAvailable ) return t ( 'disconnected' ) ;
8282 if ( accountInfo === null ) return t ( 'validatingAccount' )
8383 return t ( 'notConnected' ) ;
8484 }
8585
8686 const Subtitle = ( ) => {
87- if ( vpnConnected ) return t ( 'enjoyObscura' ) ;
87+ if ( vpnConnected && ! connectionTransition ) return t ( 'enjoyObscura' ) ;
8888 if ( accountHasExpired ) return t ( 'continueUsingObscura' ) ;
89- if ( ! internetAvailable ) return t ( 'connectToInternet' ) ;
9089 if ( connectionTransition ) return t ( 'pleaseWaitAMoment' ) ;
90+ if ( ! internetAvailable ) return t ( 'connectToInternet' ) ;
9191 if ( accountInfo === null ) return '' ;
9292 return t ( 'connectToEnjoy' ) ;
9393 }
@@ -162,7 +162,6 @@ function ConnectionProgressBar() {
162162
163163 const connectingProgressBars = usePulsingProgress ( { activated : isConnecting ( connectionInProgress ) , bars : 2 , inactiveColor : progressBg , w : 50 } ) ;
164164 const isOffline = ! internetAvailable && ! vpnConnected && ! isConnecting ( connectionInProgress ) ;
165-
166165 return (
167166 < Paper shadow = 'xl' withBorder w = '80%' maw = { 600 } bg = { bg } p = 'md' pt = { 5 } pb = 'xs' mb = 'lg' radius = 'lg' >
168167 < Group mih = { 50 } className = { classes . connectionProgressBarGroup } align = 'center' >
@@ -186,15 +185,16 @@ function ConnectionProgressBar() {
186185 </ >
187186 }
188187 {
189- internetAvailable && ! vpnConnected && ! isConnecting ( connectionInProgress ) &&
188+ internetAvailable && ( connectionInProgress === ConnectionInProgress . Disconnecting || ( ! vpnConnected && connectionInProgress === ConnectionInProgress . UNSET ) ) &&
190189 < Stack gap = 'xs' align = 'center' justify = 'flex-end' h = { 50 } >
191190 < Progress className = { classes . trafficVulnerableProgressBar } value = { 100 } color = 'red.6' h = { 2 } bg = { progressBg } />
192191 < Text size = 'xs' c = 'red.6' >
193192 { t ( 'trafficVulnerable' ) }
194193 </ Text >
195194 </ Stack >
196195 }
197- { ( vpnConnected || isConnecting ( connectionInProgress ) ) && < >
196+ {
197+ ( ( vpnConnected && connectionInProgress === ConnectionInProgress . UNSET ) || isConnecting ( connectionInProgress ) ) && < >
198198 { connectingProgressBars [ 0 ] }
199199 < Stack gap = '0' align = 'center' >
200200 < ThemeIcon variant = 'transparent' c = 'white' >
@@ -538,7 +538,7 @@ function LocationSelect({ cityConnectingTo, setCityConnectingTo }: LocationSelec
538538function LocationConnectTopCaption ( { cityConnectingTo } : { cityConnectingTo : string | null } ) {
539539 const { t } = useTranslation ( ) ;
540540 const { vpnConnected, connectionInProgress } = useContext ( AppContext ) ;
541- if ( vpnConnected && connectionInProgress !== ConnectionInProgress . ChangingLocations )
541+ if ( vpnConnected && connectionInProgress === ConnectionInProgress . UNSET )
542542 return < Text c = 'green.8' fw = { 550 } > { t ( 'connectedTo' ) } </ Text > ;
543543
544544 if ( connectionInProgress === ConnectionInProgress . UNSET && ! vpnConnected )
0 commit comments