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() {
308
308
themeManager . initialize ( ) ;
309
309
const manualServiceTypeSelect = document . getElementById ( 'manual_service_type' ) ;
310
310
const noTlsVerifyDiv = document . getElementById ( 'manual_no_tls_verify_div' ) ;
311
+ const manualPathDisplay = document . getElementById ( 'manual_path_display' ) ;
312
+ const manualPathHidden = document . getElementById ( 'manual_path' ) ;
311
313
312
314
if ( manualServiceTypeSelect && noTlsVerifyDiv ) {
313
315
function toggleNoTlsVerifyVisibility ( ) {
@@ -321,6 +323,17 @@ document.addEventListener('DOMContentLoaded', function() {
321
323
manualServiceTypeSelect . addEventListener ( 'change' , toggleNoTlsVerifyVisibility ) ;
322
324
toggleNoTlsVerifyVisibility ( ) ;
323
325
}
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
+ }
324
337
document . querySelectorAll ( 'form.protocol-aware-form' ) . forEach ( form => {
325
338
if ( form . getAttribute ( 'action' ) ) {
326
339
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>
453
453
< div class ="text-xs opacity-60 mt-1 "> This will be combined with the subdomain to form the full hostname.</ div >
454
454
</ div >
455
455
< 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 >
457
457
< div class ="join w-full ">
458
458
< 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 " />
460
460
</ 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 >
462
463
</ div >
463
464
</ div >
464
465
</ div >
You can’t perform that action at this time.
0 commit comments