File tree Expand file tree Collapse file tree
MCPForUnity/Editor/Windows/Components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 437437 margin-bottom: 4px;
438438}
439439
440+ .help-text.error {
441+ color: rgba(255, 80, 80, 1);
442+ -unity-font-style: bold;
443+ }
444+
440445.path-override-controls {
441446 flex-direction: row;
442447 align-items: center;
Original file line number Diff line number Diff line change @@ -435,16 +435,24 @@ public void UpdateHttpServerCommandDisplay()
435435
436436 if ( ! isLocalHttpUrl )
437437 {
438- httpServerCommandField . value = string . Empty ;
439- httpServerCommandField . tooltip = string . Empty ;
438+ httpServerCommandField . value = "<Invalid Localhost URL>" ;
439+ httpServerCommandField . tooltip = "The command cannot be generated because the URL is not a local address." ;
440+ httpServerCommandSection . EnableInClassList ( "invalid-url" , true ) ;
440441 if ( httpServerCommandHint != null )
441442 {
442- httpServerCommandHint . text = "HTTP Local requires a localhost URL (localhost/127.0.0.1/0.0.0.0/::1)." ;
443+ httpServerCommandHint . text = "⚠ HTTP Local requires a localhost URL (localhost/127.0.0.1/0.0.0.0/::1)." ;
444+ httpServerCommandHint . AddToClassList ( "error" ) ;
443445 }
444446 copyHttpServerCommandButton ? . SetEnabled ( false ) ;
445447 return ;
446448 }
447449
450+ httpServerCommandSection . EnableInClassList ( "invalid-url" , false ) ;
451+ if ( httpServerCommandHint != null )
452+ {
453+ httpServerCommandHint . RemoveFromClassList ( "error" ) ;
454+ }
455+
448456 if ( MCPServiceLocator . Server . TryGetLocalHttpServerCommand ( out var command , out var error ) )
449457 {
450458 httpServerCommandField . value = command ;
You can’t perform that action at this time.
0 commit comments