fix(navbar): add error handling for proxy status check to improve user feedback
This commit is contained in:
		@@ -154,8 +154,13 @@
 | 
				
			|||||||
                @script
 | 
					                @script
 | 
				
			||||||
                    <script>
 | 
					                    <script>
 | 
				
			||||||
                        $wire.$on('checkProxyEvent', () => {
 | 
					                        $wire.$on('checkProxyEvent', () => {
 | 
				
			||||||
 | 
					                            try {
 | 
				
			||||||
                                $wire.$dispatch('info', 'Checking if the required ports are not used by other services.');
 | 
					                                $wire.$dispatch('info', 'Checking if the required ports are not used by other services.');
 | 
				
			||||||
                                $wire.$call('checkProxy');
 | 
					                                $wire.$call('checkProxy');
 | 
				
			||||||
 | 
					                            } catch (error) {
 | 
				
			||||||
 | 
					                                console.error(error);
 | 
				
			||||||
 | 
					                                $wire.$dispatch('error', 'Failed to check proxy status. Please try again.');
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
                        });
 | 
					                        });
 | 
				
			||||||
                        $wire.$on('restartEvent', () => {
 | 
					                        $wire.$on('restartEvent', () => {
 | 
				
			||||||
                            $wire.$dispatch('info', 'Initiating proxy restart.');
 | 
					                            $wire.$dispatch('info', 'Initiating proxy restart.');
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user