- `);
-
- $('.authProviderPicker .ui.checkbox').checkbox();
- } else if (datatype == "ratelimit"){
-
- column.empty().append(`
-
-
-
-
-
-
-
- `);
-
- }else if (datatype == 'action'){
- column.empty().append(`
-
-
-
- `);
- }else if (datatype == "inbound"){
- let originalContent = $(column).html();
-
- //Check if this host is covered within one of the certificates. If not, show the icon
- let enableQuickRequestButton = true;
- let domains = [payload.RootOrMatchingDomain]; //Domain for getting certificate if needed
- for (var i = 0; i < payload.MatchingDomainAlias.length; i++){
- let thisAliasName = payload.MatchingDomainAlias[i];
- domains.push(thisAliasName);
- }
-
- //Check if the domain or alias contains wildcard, if yes, disabled the get certificate button
- if (payload.RootOrMatchingDomain.indexOf("*") > -1){
- enableQuickRequestButton = false;
- }
-
- if (payload.MatchingDomainAlias != undefined){
- for (var i = 0; i < payload.MatchingDomainAlias.length; i++){
- if (payload.MatchingDomainAlias[i].indexOf("*") > -1){
- enableQuickRequestButton = false;
- break;
- }
- }
- }
-
- //encode the domain to DOM
- let certificateDomains = encodeURIComponent(JSON.stringify(domains));
-
- column.empty().append(`${originalContent}
-
-
-
-
-
-
-
-
- `);
-
- $(".hostAccessRuleSelector").dropdown();
- }else{
- //Unknown field. Leave it untouched
- }
- });
-
- $(".endpointAdvanceConfig").accordion();
- $("#httpProxyList").find(".editBtn").addClass("disabled");
- */
}
//handleToggleRateLimitInput will get trigger if the "require rate limit" checkbox
@@ -1127,6 +949,8 @@
});
function closeHttpRuleEditor(){
+ // Fixing a bug in semantic ui that when an element fade in/out on top of checkbox
+ // the checkbox suddently flash on top of the fading element
$(".ui.toggle.tiny.fitted.checkbox").css("z-index", 0);
$("#httprpEditModalWrapper").fadeOut("fast", function(){
$(".ui.toggle.tiny.fitted.checkbox").css("z-index", "auto");
@@ -1316,6 +1140,10 @@
break;
}
+ editor.find(".authProviderPicker input[type='radio']").off("change").on("change", function() {
+ saveProxyInlineEdit(uuid);
+ });
+
editor.find(".editBasicAuthCredentialsBtn").off("click").on("click", function(){
editBasicAuthCredentials(uuid);
});
@@ -1416,7 +1244,10 @@
}
function hideEditorSideWrapper(){
- $("#httprpEditModal .editor_side_wrapper").fadeOut("fast");
+ $("#httprpEditModal .editor_side_wrapper").fadeOut("fast", function(){
+ // Reset the side wrapper frame URL to prevent stale content
+ $("#httprpEditModal .editor_side_wrapper .wrapper_frame").attr('src', 'snippet/placeholder.html');
+ });
}
diff --git a/src/web/darktheme.css b/src/web/darktheme.css
index ca8bc75..f1b9925 100644
--- a/src/web/darktheme.css
+++ b/src/web/darktheme.css
@@ -184,7 +184,8 @@ body.darkTheme .ui.input input::placeholder {
body.darkTheme .ui.label,
body.darkTheme .ui.label .detail,
body.darkTheme .ui.label .icon {
- color: #ffffff !important;
+ background-color: var(--buttom_toggle_disabled);
+ color: var(--text_color) !important;
}
body.darkTheme .advanceoptions .title {
diff --git a/src/web/snippet/aliasEditor.html b/src/web/snippet/aliasEditor.html
index ec8b092..3da1bcf 100644
--- a/src/web/snippet/aliasEditor.html
+++ b/src/web/snippet/aliasEditor.html
@@ -25,7 +25,7 @@
Enter alias hostname or wildcard matching keywords for
-
+
Alias Hostname |
@@ -161,7 +161,7 @@
}
$("#inlineEditTable").append(`
${domainLink} |
- |
+ |
`);
});
diff --git a/src/web/snippet/basicAuthEditor.html b/src/web/snippet/basicAuthEditor.html
index 88be65b..6ac2f0a 100644
--- a/src/web/snippet/basicAuthEditor.html
+++ b/src/web/snippet/basicAuthEditor.html
@@ -14,18 +14,11 @@
-
-
Enter the username and password for allowing them to access this proxy endpoint
-
+
Username |
@@ -56,7 +49,7 @@
Exclude specific directories / paths which contains the following subpath prefix from authentication. Useful if you are hosting services require remote API access.
-
+
Path Prefix |
@@ -86,10 +79,6 @@
/public/res/far/boo/
-
-
-
-
@@ -232,7 +221,7 @@
data.forEach(function(rule){
$("#exclusionPaths").append(`
${rule.PathPrefix} |
- |
+ |
`);
})
}
@@ -261,7 +250,7 @@
var row = '' +
'' + username + ' | ' +
'' + password + ' | ' +
- ' | ' +
+ ' | ' +
'
';
tableBody.append(row);
diff --git a/src/web/snippet/customHeaders.html b/src/web/snippet/customHeaders.html
index fe2af1e..79df202 100644
--- a/src/web/snippet/customHeaders.html
+++ b/src/web/snippet/customHeaders.html
@@ -44,7 +44,7 @@
Security Headers
-
+
Key |
diff --git a/src/web/snippet/tagEditor.html b/src/web/snippet/tagEditor.html
index d5801fb..25b8a44 100644
--- a/src/web/snippet/tagEditor.html
+++ b/src/web/snippet/tagEditor.html
@@ -155,6 +155,10 @@
function addSelectedTags() {
let tags = $('#tagsInput').val().split(',').map(tag => tag.trim());
+ if (tags.length == 0 || (tags.length == 1 && tags[0] == "")){
+ parent.msgbox("Please enter at least one tag", false);
+ return;
+ }
tags.forEach(tag => {
if (tag && !tagAlreadyExistsInTable(tag)) {
addTagRow(tag);
@@ -201,8 +205,8 @@
const row = `
${tag} |
- |
`;