File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,24 @@ function App() {
120120 newClient . registerMcpPackage ( McpAwnsPing ) ;
121121 newClient . connect ( ) ;
122122 newClient . requestNotificationPermission ( ) ;
123+
124+ // Check for URL parameters for auto-login (useful for testing/e2e)
125+ const urlParams = new URLSearchParams ( window . location . search ) ;
126+ const username = urlParams . get ( 'username' ) ;
127+ const password = urlParams . get ( 'password' ) ;
128+
129+ if ( username && password ) {
130+ // Auto-login when connected
131+ newClient . once ( 'connect' , ( ) => {
132+ console . log ( 'Auto-logging in with URL params...' ) ;
133+ setTimeout ( ( ) => {
134+ newClient . sendCommand ( username ) ;
135+ setTimeout ( ( ) => {
136+ newClient . sendCommand ( password ) ;
137+ } , 500 ) ;
138+ } , 1000 ) ;
139+ } ) ;
140+ }
123141 setClient ( newClient ) ;
124142 setShowSidebar ( ! isMobile ) ;
125143 window . mudClient = newClient ;
You can’t perform that action at this time.
0 commit comments