File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed
Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -308,6 +308,8 @@ document.addEventListener('DOMContentLoaded', function() {
308308 themeManager . initialize ( ) ;
309309 const manualServiceTypeSelect = document . getElementById ( 'manual_service_type' ) ;
310310 const noTlsVerifyDiv = document . getElementById ( 'manual_no_tls_verify_div' ) ;
311+ const manualPathDisplay = document . getElementById ( 'manual_path_display' ) ;
312+ const manualPathHidden = document . getElementById ( 'manual_path' ) ;
311313
312314 if ( manualServiceTypeSelect && noTlsVerifyDiv ) {
313315 function toggleNoTlsVerifyVisibility ( ) {
@@ -321,6 +323,17 @@ document.addEventListener('DOMContentLoaded', function() {
321323 manualServiceTypeSelect . addEventListener ( 'change' , toggleNoTlsVerifyVisibility ) ;
322324 toggleNoTlsVerifyVisibility ( ) ;
323325 }
326+ if ( manualPathDisplay && manualPathHidden ) {
327+ manualPathDisplay . addEventListener ( 'input' , function ( ) {
328+ let displayValue = this . value . trim ( ) ;
329+ if ( displayValue ) {
330+ let pathSegment = displayValue . replace ( / ^ \/ + / , '' ) ;
331+ manualPathHidden . value = '/' + pathSegment ;
332+ } else {
333+ manualPathHidden . value = '' ;
334+ }
335+ } ) ;
336+ }
324337 document . querySelectorAll ( 'form.protocol-aware-form' ) . forEach ( form => {
325338 if ( form . getAttribute ( 'action' ) ) {
326339 let actionUrl = form . getAttribute ( 'action' ) ;
Original file line number Diff line number Diff line change @@ -453,12 +453,13 @@ <h4 class="text-md font-semibold mb-2">Public Hostname</h4>
453453 < div class ="text-xs opacity-60 mt-1 "> This will be combined with the subdomain to form the full hostname.</ div >
454454 </ div >
455455 < div class ="md:col-span-2 ">
456- < label class ="label " for ="manual_path "> < span class ="label-text "> Path</ span > </ label >
456+ < label class ="label " for ="manual_path_display "> < span class ="label-text "> Path</ span > </ label >
457457 < div class ="join w-full ">
458458 < span class ="join-item btn btn-disabled normal-case pointer-events-none bg-base-200 border-base-300 !min-h-[3rem] !h-[3rem] px-3 "> /</ span >
459- < input type ="text " id ="manual_path " name =" manual_path " placeholder ="(optional) path " class ="input input-bordered join-item w-full " />
459+ < input type ="text " id ="manual_path_display " placeholder ="(optional) path " class ="input input-bordered join-item w-full " />
460460 </ div >
461- < div class ="text-xs opacity-60 mt-1 "> If blank, rule applies to the root. Must start with '/' if specified.</ div >
461+ < input type ="hidden " id ="manual_path " name ="manual_path " />
462+ < div class ="text-xs opacity-60 mt-1 "> If blank, rule applies to the root. User types "app", submitted as "/app".</ div >
462463 </ div >
463464 </ div >
464465 </ div >
You can’t perform that action at this time.
0 commit comments