merge from ui

This commit is contained in:
florian 2023-04-27 21:36:30 +02:00
commit d8b7db167e
No known key found for this signature in database
GPG Key ID: 3D80806F12602A7C
18 changed files with 1160 additions and 293 deletions

View File

@ -485,12 +485,6 @@ def services():
print(variables, flush=True)
if len(variables) <= 1:
flash(
f"{variables['SERVER_NAME'].split(' ')[0]} was not edited because no values were changed."
)
return redirect(url_for("loading", next=url_for("services")))
error = app.config["CONFIG"].check_variables(variables)
if error:

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +0,0 @@
define("ace/theme/cloud9_day.css",["require","exports","module"],function(e,t,n){n.exports='.ace-cloud9-day .ace_gutter {\n background: #ECECEC;\n color: #333;\n}\n\n.ace-cloud9-day .ace_print-margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-cloud9-day .ace_fold {\n background-color: #6B72E6;\n}\n\n.ace-cloud9-day {\n background-color: #FBFBFB;\n color: black;\n}\n\n.ace-cloud9-day .ace_cursor {\n color: black;\n}\n\n.ace-cloud9-day .ace_invisible {\n color: rgb(191, 191, 191);\n}\n\n.ace-cloud9-day .ace_storage,\n.ace-cloud9-day .ace_keyword {\n color: rgb(24, 122, 234);\n}\n\n.ace-cloud9-day .ace_constant {\n color: rgb(197, 6, 11);\n}\n\n.ace-cloud9-day .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-cloud9-day .ace_constant.ace_language {\n color: rgb(88, 92, 246);\n}\n\n.ace-cloud9-day .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-cloud9-day .ace_invalid {\n background-color: rgba(255, 0, 0, 0.1);\n color: red;\n}\n\n.ace-cloud9-day .ace_support.ace_function {\n color: rgb(60, 76, 114);\n}\n\n.ace-cloud9-day .ace_support.ace_constant {\n color: rgb(6, 150, 14);\n}\n\n.ace-cloud9-day .ace_support.ace_type,\n.ace-cloud9-day .ace_support.ace_class {\n color: rgb(109, 121, 222);\n}\n\n.ace-cloud9-day .ace_keyword.ace_operator {\n color: rgb(104, 118, 135);\n}\n\n.ace-cloud9-day .ace_string {\n color: rgb(3, 106, 7);\n}\n\n.ace-cloud9-day .ace_comment {\n color: rgb(76, 136, 107);\n}\n\n.ace-cloud9-day .ace_comment.ace_doc {\n color: rgb(0, 102, 255);\n}\n\n.ace-cloud9-day .ace_comment.ace_doc.ace_tag {\n color: rgb(128, 159, 191);\n}\n\n.ace-cloud9-day .ace_constant.ace_numeric {\n color: rgb(0, 0, 205);\n}\n\n.ace-cloud9-day .ace_variable {\n color: rgb(49, 132, 149);\n}\n\n.ace-cloud9-day .ace_xml-pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-cloud9-day .ace_entity.ace_name.ace_function {\n color: #0000A2;\n}\n\n\n.ace-cloud9-day .ace_heading {\n color: rgb(12, 7, 255);\n}\n\n.ace-cloud9-day .ace_list {\n color: rgb(185, 6, 144);\n}\n\n.ace-cloud9-day .ace_meta.ace_tag {\n color: rgb(0, 22, 142);\n}\n\n.ace-cloud9-day .ace_string.ace_regex {\n color: rgb(255, 0, 0)\n}\n\n.ace-cloud9-day .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n\n.ace-cloud9-day.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px white;\n}\n\n.ace-cloud9-day .ace_marker-layer .ace_step {\n background: rgb(247, 237, 137);\n}\n\n.ace-cloud9-day .ace_marker-layer .ace_stack {\n background: #BAE0A0;\n}\n\n.ace-cloud9-day .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-cloud9-day .ace_marker-layer .ace_active-line {\n background: rgba(0, 0, 0, 0.07);\n}\n\n.ace-cloud9-day .ace_gutter-active-line {\n background-color: #E5E5E5;\n}\n\n.ace-cloud9-day .ace_marker-layer .ace_selected-word {\n background: rgb(250, 250, 255);\n border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-cloud9-day .ace_indent-guide {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;\n}\n\n.ace-cloud9-day .ace_indent-guide-active {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;\n} \n'}),define("ace/theme/cloud9_day",["require","exports","module","ace/theme/cloud9_day.css","ace/lib/dom"],function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-cloud9-day",t.cssText=e("./cloud9_day.css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}); (function() {
window.require(["ace/theme/cloud9_day"], function(m) {
if (typeof module == "object" && typeof exports == "object" && module) {
module.exports = m;
}
});
})();

View File

@ -0,0 +1,18 @@
define("ace/theme/dawn.css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-dawn .ace_gutter {\n background: #ebebeb;\n color: #333\n}\n\n.ace-dawn .ace_print-margin {\n width: 1px;\n background: #e8e8e8\n}\n\n.ace-dawn {\n background-color: #F9F9F9;\n color: #080808\n}\n\n.ace-dawn .ace_cursor {\n color: #000000\n}\n\n.ace-dawn .ace_marker-layer .ace_selection {\n background: rgba(39, 95, 255, 0.30)\n}\n\n.ace-dawn.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #F9F9F9;\n}\n\n.ace-dawn .ace_marker-layer .ace_step {\n background: rgb(255, 255, 0)\n}\n\n.ace-dawn .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(75, 75, 126, 0.50)\n}\n\n.ace-dawn .ace_marker-layer .ace_active-line {\n background: rgba(36, 99, 180, 0.12)\n}\n\n.ace-dawn .ace_gutter-active-line {\n background-color : #dcdcdc\n}\n\n.ace-dawn .ace_marker-layer .ace_selected-word {\n border: 1px solid rgba(39, 95, 255, 0.30)\n}\n\n.ace-dawn .ace_invisible {\n color: rgba(75, 75, 126, 0.50)\n}\n\n.ace-dawn .ace_keyword,\n.ace-dawn .ace_meta {\n color: #794938\n}\n\n.ace-dawn .ace_constant,\n.ace-dawn .ace_constant.ace_character,\n.ace-dawn .ace_constant.ace_character.ace_escape,\n.ace-dawn .ace_constant.ace_other {\n color: #811F24\n}\n\n.ace-dawn .ace_invalid.ace_illegal {\n text-decoration: underline;\n font-style: italic;\n color: #F8F8F8;\n background-color: #B52A1D\n}\n\n.ace-dawn .ace_invalid.ace_deprecated {\n text-decoration: underline;\n font-style: italic;\n color: #B52A1D\n}\n\n.ace-dawn .ace_support {\n color: #691C97\n}\n\n.ace-dawn .ace_support.ace_constant {\n color: #B4371F\n}\n\n.ace-dawn .ace_fold {\n background-color: #794938;\n border-color: #080808\n}\n\n.ace-dawn .ace_list,\n.ace-dawn .ace_markup.ace_list,\n.ace-dawn .ace_support.ace_function {\n color: #693A17\n}\n\n.ace-dawn .ace_storage {\n font-style: italic;\n color: #A71D5D\n}\n\n.ace-dawn .ace_string {\n color: #0B6125\n}\n\n.ace-dawn .ace_string.ace_regexp {\n color: #CF5628\n}\n\n.ace-dawn .ace_comment {\n font-style: italic;\n color: #5A525F\n}\n\n.ace-dawn .ace_heading,\n.ace-dawn .ace_markup.ace_heading {\n color: #19356D\n}\n\n.ace-dawn .ace_variable {\n color: #234A97\n}\n\n.ace-dawn .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYLh/5+x/AAizA4hxNNsZAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-dawn .ace_indent-guide-active {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC\") right repeat-y;\n} \n";
});
define("ace/theme/dawn",["require","exports","module","ace/theme/dawn.css","ace/lib/dom"], function(require, exports, module){exports.isDark = false;
exports.cssClass = "ace-dawn";
exports.cssText = require("./dawn.css");
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass, false);
}); (function() {
window.require(["ace/theme/dawn"], function(m) {
if (typeof module == "object" && typeof exports == "object" && module) {
module.exports = m;
}
});
})();

View File

@ -0,0 +1,19 @@
define("ace/theme/dracula.css",["require","exports","module"], function(require, exports, module){module.exports = "/*\n * Copyright \u00A9 2017 Zeno Rocha <hi@zenorocha.com>\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \u201CSoftware\u201D), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \u201CAS IS\u201D, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n.ace-dracula .ace_gutter {\n background: #282a36;\n color: rgb(144,145,148)\n}\n\n.ace-dracula .ace_print-margin {\n width: 1px;\n background: #44475a\n}\n\n.ace-dracula {\n background-color: #282a36;\n color: #f8f8f2\n}\n\n.ace-dracula .ace_cursor {\n color: #f8f8f0\n}\n\n.ace-dracula .ace_marker-layer .ace_selection {\n background: #44475a\n}\n\n.ace-dracula.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #282a36;\n border-radius: 2px\n}\n\n.ace-dracula .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174)\n}\n\n.ace-dracula .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #a29709\n}\n\n.ace-dracula .ace_marker-layer .ace_active-line {\n background: #44475a\n}\n\n.ace-dracula .ace_gutter-active-line {\n background-color: #44475a\n}\n\n.ace-dracula .ace_marker-layer .ace_selected-word {\n box-shadow: 0px 0px 0px 1px #a29709;\n border-radius: 3px;\n}\n\n.ace-dracula .ace_fold {\n background-color: #50fa7b;\n border-color: #f8f8f2\n}\n\n.ace-dracula .ace_keyword {\n color: #ff79c6\n}\n\n.ace-dracula .ace_constant.ace_language {\n color: #bd93f9\n}\n\n.ace-dracula .ace_constant.ace_numeric {\n color: #bd93f9\n}\n\n.ace-dracula .ace_constant.ace_character {\n color: #bd93f9\n}\n\n.ace-dracula .ace_constant.ace_character.ace_escape {\n color: #ff79c6\n}\n\n.ace-dracula .ace_constant.ace_other {\n color: #bd93f9\n}\n\n.ace-dracula .ace_support.ace_function {\n color: #8be9fd\n}\n\n.ace-dracula .ace_support.ace_constant {\n color: #6be5fd\n}\n\n.ace-dracula .ace_support.ace_class {\n font-style: italic;\n color: #66d9ef\n}\n\n.ace-dracula .ace_support.ace_type {\n font-style: italic;\n color: #66d9ef\n}\n\n.ace-dracula .ace_storage {\n color: #ff79c6\n}\n\n.ace-dracula .ace_storage.ace_type {\n font-style: italic;\n color: #8be9fd\n}\n\n.ace-dracula .ace_invalid {\n color: #F8F8F0;\n background-color: #ff79c6\n}\n\n.ace-dracula .ace_invalid.ace_deprecated {\n color: #F8F8F0;\n background-color: #bd93f9\n}\n\n.ace-dracula .ace_string {\n color: #f1fa8c\n}\n\n.ace-dracula .ace_comment {\n color: #6272a4\n}\n\n.ace-dracula .ace_variable {\n color: #50fa7b\n}\n\n.ace-dracula .ace_variable.ace_parameter {\n font-style: italic;\n color: #ffb86c\n}\n\n.ace-dracula .ace_entity.ace_other.ace_attribute-name {\n color: #50fa7b\n}\n\n.ace-dracula .ace_entity.ace_name.ace_function {\n color: #50fa7b\n}\n\n.ace-dracula .ace_entity.ace_name.ace_tag {\n color: #ff79c6\n}\n.ace-dracula .ace_invisible {\n color: #626680;\n}\n\n.ace-dracula .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-dracula .ace_indent-guide-active {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACAQMAAACjTyRkAAAABlBMVEUAAADCwsK76u2xAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjYGBoAAAAhACBGFbxzQAAAABJRU5ErkJggg==\") right repeat-y;\n}\n";
});
define("ace/theme/dracula",["require","exports","module","ace/theme/dracula.css","ace/lib/dom"], function(require, exports, module){exports.isDark = true;
exports.cssClass = "ace-dracula";
exports.cssText = require("./dracula.css");
exports.$selectionColorConflict = true;
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass, false);
}); (function() {
window.require(["ace/theme/dracula"], function(m) {
if (typeof module == "object" && typeof exports == "object" && module) {
module.exports = m;
}
});
})();

View File

@ -1,8 +0,0 @@
define("ace/theme/twilight.css",["require","exports","module"],function(e,t,n){n.exports='.ace-twilight .ace_gutter {\n background: #232323;\n color: #E2E2E2\n}\n\n.ace-twilight .ace_print-margin {\n width: 1px;\n background: #232323\n}\n\n.ace-twilight {\n background-color: #141414;\n color: #F8F8F8\n}\n\n.ace-twilight .ace_cursor {\n color: #A7A7A7\n}\n\n.ace-twilight .ace_marker-layer .ace_selection {\n background: rgba(221, 240, 255, 0.20)\n}\n\n.ace-twilight.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #141414;\n}\n\n.ace-twilight .ace_marker-layer .ace_step {\n background: rgb(102, 82, 0)\n}\n\n.ace-twilight .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(255, 255, 255, 0.25)\n}\n\n.ace-twilight .ace_marker-layer .ace_active-line {\n background: rgba(255, 255, 255, 0.031)\n}\n\n.ace-twilight .ace_gutter-active-line {\n background-color: rgba(255, 255, 255, 0.031)\n}\n\n.ace-twilight .ace_marker-layer .ace_selected-word {\n border: 1px solid rgba(221, 240, 255, 0.20)\n}\n\n.ace-twilight .ace_invisible {\n color: rgba(255, 255, 255, 0.25)\n}\n\n.ace-twilight .ace_keyword,\n.ace-twilight .ace_meta {\n color: #CDA869\n}\n\n.ace-twilight .ace_constant,\n.ace-twilight .ace_constant.ace_character,\n.ace-twilight .ace_constant.ace_character.ace_escape,\n.ace-twilight .ace_constant.ace_other,\n.ace-twilight .ace_heading,\n.ace-twilight .ace_markup.ace_heading,\n.ace-twilight .ace_support.ace_constant {\n color: #CF6A4C\n}\n\n.ace-twilight .ace_invalid.ace_illegal {\n color: #F8F8F8;\n background-color: rgba(86, 45, 86, 0.75)\n}\n\n.ace-twilight .ace_invalid.ace_deprecated {\n text-decoration: underline;\n font-style: italic;\n color: #D2A8A1\n}\n\n.ace-twilight .ace_support {\n color: #9B859D\n}\n\n.ace-twilight .ace_fold {\n background-color: #AC885B;\n border-color: #F8F8F8\n}\n\n.ace-twilight .ace_support.ace_function {\n color: #DAD085\n}\n\n.ace-twilight .ace_list,\n.ace-twilight .ace_markup.ace_list,\n.ace-twilight .ace_storage {\n color: #F9EE98\n}\n\n.ace-twilight .ace_entity.ace_name.ace_function,\n.ace-twilight .ace_meta.ace_tag {\n color: #AC885B\n}\n\n.ace-twilight .ace_string {\n color: #8F9D6A\n}\n\n.ace-twilight .ace_string.ace_regexp {\n color: #E9C062\n}\n\n.ace-twilight .ace_comment {\n font-style: italic;\n color: #5F5A60\n}\n\n.ace-twilight .ace_variable {\n color: #7587A6\n}\n\n.ace-twilight .ace_xml-pe {\n color: #494949\n}\n\n.ace-twilight .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-twilight .ace_indent-guide-active {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;\n}\n'}),define("ace/theme/twilight",["require","exports","module","ace/theme/twilight.css","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-twilight",t.cssText=e("./twilight.css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (function() {
window.require(["ace/theme/twilight"], function(m) {
if (typeof module == "object" && typeof exports == "object" && module) {
module.exports = m;
}
});
})();

View File

@ -1,15 +1,21 @@
class FolderNav {
constructor(prefix) {
this.prefix = prefix;
this.breadContainer = document.querySelector(`[data-${this.prefix}-breadcrumb]`);
this.breadContainer = document.querySelector(
`[data-${this.prefix}-breadcrumb]`
);
this.container = document.querySelector(`[data-${this.prefix}-container]`);
this.listContainer = document.querySelector(`[data-${this.prefix}-folders]`);
this.listContainer = document.querySelector(
`[data-${this.prefix}-folders]`
);
this.els = document.querySelectorAll(`div[data-${this.prefix}-element]`);
this.files = document.querySelectorAll(
`div[data-${this.prefix}-element][data-_type='file']`
);
this.addFileEl = document.querySelector(`[data-${this.prefix}-add-file]`);
this.addFolderEl = document.querySelector(`[data-${this.prefix}-add-folder]`);
this.addFolderEl = document.querySelector(
`[data-${this.prefix}-add-folder]`
);
this.initSorted();
this.initNav();
}
@ -81,7 +87,9 @@ class FolderNav {
//remove useless bread
this.removeBreadElByLvl(+prevLvl);
const folder = document.querySelector(
`div[data-${this.prefix}-element][data-path='${item.getAttribute("data-path")}']`
`div[data-${this.prefix}-element][data-path='${item.getAttribute(
"data-path"
)}']`
);
this.updateActions(folder);
}
@ -120,7 +128,10 @@ class FolderNav {
`[data-${this.prefix}-breadcrumb-item]`
);
breadcrumbItem.forEach((item) => {
if (item.hasAttribute("data-level") && +item.getAttribute("data-level") > lvl)
if (
item.hasAttribute("data-level") &&
+item.getAttribute("data-level") > lvl
)
item.remove();
});
}
@ -160,7 +171,7 @@ class FolderNav {
//create nested btn el
const nestedBtnEl = document.createElement("button");
nestedBtnEl.className =
"ml-2 dark:text-white dark:opacity-50 text-gray-700 opacity-50 after:float-right after:pl-2 after:text-gray-600 after:content-['/']";
"ml-2 dark:text-gray-500 text-gray-600 after:float-right after:pl-2 after:text-gray-600 dark:after:text-gray-500 after:content-['/']";
itemEl.appendChild(nestedBtnEl);
nestedBtnEl.setAttribute("type", "button");
nestedBtnEl.textContent = name;
@ -184,7 +195,9 @@ class FolderDropdown {
//remove when none click
try {
if (
!e.target.closest("div").hasAttribute(`data-${this.prefix}-action-button`)
!e.target
.closest("div")
.hasAttribute(`data-${this.prefix}-action-button`)
) {
this.hideDropEls();
}
@ -192,7 +205,9 @@ class FolderDropdown {
//show dropdown actions for folders
try {
if (
e.target.closest("div").hasAttribute(`data-${this.prefix}-action-button`)
e.target
.closest("div")
.hasAttribute(`data-${this.prefix}-action-button`)
) {
const dropEl = e.target
.closest(`div[data-${this.prefix}-element]`)
@ -267,15 +282,15 @@ class FolderEditor {
setDarkMode() {
document.querySelector("html").className.includes("dark")
? this.editor.setTheme("ace/theme/twilight")
: this.editor.setTheme("ace/theme/cloud9_day");
? this.editor.setTheme("ace/theme/dracula")
: this.editor.setTheme("ace/theme/dawn");
}
//change theme according to mode
changeDarkMode(bool) {
bool
? this.editor.setTheme("ace/theme/twilight")
: this.editor.setTheme("ace/theme/cloud9_day");
? this.editor.setTheme("ace/theme/dracula")
: this.editor.setTheme("ace/theme/dawn");
}
readOnlyBool(bool) {
@ -289,7 +304,9 @@ class FolderModal {
//container
this.container = document.querySelector(`[data-${this.prefix}-container]`);
//add service/file elements
this.breadContainer = document.querySelector(`[data-${this.prefix}-breadcrumb]`);
this.breadContainer = document.querySelector(
`[data-${this.prefix}-breadcrumb]`
);
this.addConfContainer = document.querySelector(
`[data-${this.prefix}-add-container]`
);
@ -299,7 +316,9 @@ class FolderModal {
this.modalTitle = this.modalEl.querySelector(
`[data-${this.prefix}-modal-title]`
);
this.modalPath = this.modalEl.querySelector(`[data-${this.prefix}-modal-path]`);
this.modalPath = this.modalEl.querySelector(
`[data-${this.prefix}-modal-path]`
);
this.modalEditor = this.modalEl.querySelector(
`[data-${this.prefix}-modal-editor]`
);
@ -336,7 +355,9 @@ class FolderModal {
this.addConfContainer.addEventListener("click", (e) => {
//add folder
try {
if (e.target.closest("li").hasAttribute(`data-${this.prefix}-add-folder`)) {
if (
e.target.closest("li").hasAttribute(`data-${this.prefix}-add-folder`)
) {
this.setModal(
"new",
this.getPathFromBread(),
@ -349,7 +370,9 @@ class FolderModal {
} catch (err) {}
//add file
try {
if (e.target.closest("li").hasAttribute(`data-${this.prefix}-add-file`)) {
if (
e.target.closest("li").hasAttribute(`data-${this.prefix}-add-file`)
) {
this.setModal(
"new",
this.getPathFromBread(),
@ -368,9 +391,7 @@ class FolderModal {
//click on file logic
try {
if (e.target.closest("div").getAttribute("data-_type") == "file") {
const btnEl = e.target
.closest("div")
.querySelector('button[value]');
const btnEl = e.target.closest("div").querySelector("button[value]");
const [action, path, type, content, name, level] =
this.getInfoFromActionBtn(btnEl);
this.setModal(action, path, type, content, name, level);
@ -414,7 +435,9 @@ class FolderModal {
//close modal logic
try {
if (
e.target.closest("button").hasAttribute(`data-${this.prefix}-modal-close`)
e.target
.closest("button")
.hasAttribute(`data-${this.prefix}-modal-close`)
) {
this.closeModal();
}
@ -472,7 +495,8 @@ class FolderModal {
}
getLevelFromBread() {
const level = this.breadContainer.lastElementChild.getAttribute("data-level");
const level =
this.breadContainer.lastElementChild.getAttribute("data-level");
return level;
}
//set all needed data from btn action and folder info

View File

@ -109,20 +109,10 @@ class Select {
const btnEls = dropdownEl.querySelectorAll("button");
btnEls.forEach((btn) => {
btn.classList.remove(
"dark:bg-primary",
"bg-primary",
"text-gray-300"
);
btn.classList.add("bg-white", "dark:bg-slate-700", "text-gray-700");
btn.classList.remove("active");
});
//highlight clicked btn
btn.classList.remove(
"bg-white",
"dark:bg-slate-700",
"text-gray-700"
);
btn.classList.add("dark:bg-primary", "bg-primary", "text-gray-300");
btn.classList.add("active");
//close dropdown
const dropdownChevron = selectCustom.querySelector(

View File

@ -82,25 +82,14 @@ class Tabs {
//reset desktop style
const tabsDesktop = container.querySelectorAll("button[data-tab-handler]");
tabsDesktop.forEach((tab) => {
tab.classList.remove("brightness-90", "z-[1001]");
tab.classList.add("z-1000");
tab.classList.remove("active");
});
//reset mobile style
const tabsMobile = container.querySelectorAll("button[data-tab-handler-mobile]");
const tabsMobile = container.querySelectorAll(
"button[data-tab-handler-mobile]"
);
tabsMobile.forEach((tab) => {
tab.classList.add(
"bg-white",
"dark:bg-slate-700",
"text-gray-700",
"z-1000"
);
tab.classList.remove(
"dark:bg-primary",
"bg-primary",
"bg-primary",
"text-gray-300",
"text-gray-300"
);
tab.classList.remove("active");
});
}
@ -109,18 +98,13 @@ class Tabs {
const tabDesktop = container.querySelector(
`button[data-tab-handler='${tabAtt}']`
);
tabDesktop.classList.add("brightness-90", "z-[1001]");
tabDesktop.classList.add("active");
//mobile case
const tabMobile = container.querySelector(
`button[data-tab-handler-mobile='${tabAtt}']`
);
tabMobile.classList.add("dark:bg-primary", "bg-primary", "text-gray-300");
tabMobile.classList.remove(
"bg-white",
"dark:bg-slate-700",
"text-gray-700"
);
tabMobile.classList.add("active");
}
hideAllSettings(container) {
@ -215,7 +199,6 @@ class FilterSettings {
this.container
.querySelector(`[data-plugin-item=${tabName}]`)
.querySelector("[data-setting-header]")
.classList.add("hidden");
}
});
@ -246,7 +229,9 @@ class FilterSettings {
const settingContainer = this.container
.querySelector(`[data-plugin-item="${tabName}"]`)
.querySelector(`[data-plugin-settings]`);
const settings = settingContainer.querySelectorAll("[data-setting-container]");
const settings = settingContainer.querySelectorAll(
"[data-setting-container]"
);
return settings;
}
}

View File

@ -1,3 +1,105 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
.checkbox {
@apply cursor-pointer disabled:cursor-default
relative dark:border-slate-600 dark:bg-slate-700 z-10 aria-checked:z-0 w-5 h-5
text-base rounded-1.4 aria-checked:bg-primary aria-checked:border-primary
dark:aria-checked:bg-primary dark:aria-checked:border-primary duration-250 float-left
mt-1 appearance-none border border-gray-300 bg-white bg-contain bg-center
bg-no-repeat align-top transition-all disabled:bg-gray-400
disabled:border-gray-400 dark:disabled:bg-gray-800
dark:disabled:border-gray-800 disabled:text-gray-700
dark:disabled:text-gray-300
aria-checked:disabled:bg-gray-400
aria-checked:disabled:border-gray-400 dark:aria-checked:disabled:bg-gray-800
dark:aria-checked:disabled:border-gray-800 aria-checked:disabled:text-gray-700
dark:aria-checked:disabled:text-gray-300;
}
/*----------------------------------------------*/
/*---------------SETTINGS_PLUGINS---------------*/
/*----------------------------------------------*/
.custom-select-btn {
@apply disabled:opacity-75 dark:disabled:text-gray-300 disabled:text-gray-700 disabled:bg-gray-400 disabled:border-gray-400 dark:disabled:bg-gray-800 dark:disabled:border-gray-800 duration-300 ease-in-out dark:opacity-90 dark:border-slate-600 dark:bg-slate-700 dark:text-gray-300 focus:border-primary flex justify-between align-middle items-center text-left text-sm leading-5.6 w-full rounded-lg border border-solid border-gray-300 bg-white bg-clip-padding px-1.5 py-1 md:px-3 md:py-2 font-normal text-gray-700 transition-all placeholder:text-gray-500;
}
.custom-dropdown-btn {
@apply min-h-[38px] border-b border-l border-r border-gray-300 hover:brightness-90 bg-white text-gray-700 my-0 relative px-6 py-2 text-center align-middle transition-all rounded-none cursor-pointer leading-normal text-sm ease-in tracking-tight-rem dark:border-slate-600 dark:bg-slate-700 dark:text-gray-300;
}
.active.custom-dropdown-btn {
@apply min-h-[38px] border-b border-l border-r border-gray-300 hover:brightness-90 bg-primary my-0 relative px-6 py-2 text-center align-middle transition-all rounded-none cursor-pointer leading-normal text-sm ease-in tracking-tight-rem dark:border-slate-600 dark:bg-primary text-gray-300 dark:text-gray-300;
}
.regular-input {
@apply outline-none dark:opacity-90 dark:border-slate-600 dark:bg-slate-700 dark:text-gray-300 disabled:opacity-75 focus:border-gray-300/0 focus:ring-1 focus:valid:ring-green-500 focus:invalid:ring-red-500 text-sm leading-5.6 ease-in block w-full appearance-none rounded-lg border border-solid border-gray-300 bg-white bg-clip-padding px-1.5 py-1 md:px-3 md:py-2 font-normal text-gray-700 transition-all placeholder:text-gray-500 disabled:bg-gray-400 dark:disabled:bg-gray-800 dark:disabled:border-gray-800 dark:disabled:text-gray-300 disabled:text-gray-700;
}
.input-title {
@apply transition duration-300 ease-in-out dark:opacity-90 text-sm font-bold m-0 dark:text-gray-300;
}
.popover-settings-container {
@apply dark:brightness-90 transition z-50 rounded-md p-3 left-0 -translate-y-7 bottom-0 absolute bg-blue-500;
}
.popover-settings-text {
@apply transition duration-300 ease-in-out dark:opacity-90 font-bold text-sm text-white dark:text-gray-100 m-0;
}
.popover-settings-svg {
@apply cursor-pointer fill-blue-500 h-5 w-5 ml-2 hover:brightness-75;
}
/*--------------------------------------------*/
/*---------------END SETTINGS_PLUGINS---------*/
/*---------------------------------------------*/
/*---------------------------------------------*/
/*---------------SETTINGS_TABS-----------------*/
/*---------------------------------------------*/
.active.settings-tabs-tab-btn {
@apply border-primary dark:hover:bg-slate-800 dark:border-slate-600 dark:bg-slate-700 border my-1 relative px-3 py-3 font-bold text-center uppercase align-middle transition-all rounded-none cursor-pointer bg-white hover:bg-gray-100 leading-normal text-sm ease-in tracking-tight-rem shadow-xs hover:shadow-md brightness-90 z-10;
}
.settings-tabs-tab-btn {
@apply border-primary dark:hover:bg-slate-800 dark:border-slate-600 dark:bg-slate-700 border my-1 relative px-3 py-3 font-bold text-center uppercase align-middle transition-all rounded-none cursor-pointer bg-white hover:bg-gray-100 leading-normal text-sm ease-in tracking-tight-rem shadow-xs hover:shadow-md;
}
.settings-tabs-name {
@apply text-primary transition duration-300 ease-in-out dark:opacity-90 pl-3 pr-2 dark:text-gray-300;
}
.settings-tabs-popover-container {
@apply top-[60px] min-w-[150px] dark:brightness-90 bg-blue-500 transition z-50 rounded-md p-3 left-0 absolute;
}
.settings-tabs-popover-text {
@apply font-bold text-sm text-white m-0;
}
.settings-tabs-mobile-btn {
@apply dark:hover:brightness-95 dark:border-slate-600 dark:bg-slate-700 border-primary border w-full flex items-center justify-between rounded-lg hover:-translate-y-px my-1 px-6 py-3 font-bold text-center uppercase align-middle transition-all cursor-pointer bg-white hover:bg-gray-50 leading-normal text-sm ease-in tracking-tight-rem shadow-xs hover:shadow-md;
}
.settings-tabs-mobile-btn-text {
@apply transition duration-300 ease-in-out dark:opacity-90 dark:text-gray-300 text-primary;
}
.active.settings-tabs-mobile-dropdown-btn {
@apply border-gray-300 dark:hover:brightness-90 hover:brightness-90 my-0 relative px-6 py-2 text-center align-middle transition-all rounded-none cursor-pointer leading-normal text-sm ease-in tracking-tight-rem dark:border-slate-600 dark:text-gray-300 z-[1000] dark:bg-primary bg-primary text-gray-300;
}
.first.settings-tabs-mobile-dropdown-btn {
@apply border-t rounded-t border-b border-l border-r;
}
.settings-tabs-mobile-dropdown-btn {
@apply flex justify-between border-b border-l border-r border-gray-300 dark:hover:brightness-90 hover:brightness-90 bg-white text-gray-700 my-0 relative px-6 py-2 text-center align-middle transition-all rounded-none cursor-pointer leading-normal text-sm ease-in tracking-tight-rem dark:border-slate-600 dark:bg-slate-700 dark:text-gray-300;
}
/*---------------------------------------------*/
/*---------------END SETTINGS_TABS-------------*/
/*---------------------------------------------*/

View File

@ -16,7 +16,7 @@
<img
data-loader-img
src="images/logo-menu-2.png"
class="duration-300 w-40 h-12 sm:w-50 sm:h-14 md:w-60 md:h-16 lg:w-80 lg:h-24 inline transition-all"
class="-translate-x-1.5 lg:-transalte-x-3 duration-300 w-50 h-14 md:w-60 md:h-16 lg:w-80 lg:h-24 inline transition-all"
alt="main logo"
/>
</div>

View File

@ -19,17 +19,16 @@ url_for(request.endpoint)[1:].split("/")[-1].strip().replace('_', '-') %}
<li
data-{{current_endpoint}}-breadcrumb-item
data-{{current_endpoint}}-back
class="mr-2 cursor-pointer text-sm capitalize leading-normal text-gray-700"
class="mr-3 cursor-pointer text-sm capitalize leading-normal dark:text-gray-500 text-gray-600"
aria-current="page"
>
<svg
class="w-4 hover:brigthness-80"
class="w-4.5 h-4.5 hover:brigthness-80"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-6 h-6"
>
<path
stroke-linecap="round"
@ -47,7 +46,7 @@ url_for(request.endpoint)[1:].split("/")[-1].strip().replace('_', '-') %}
>
<button
type="button"
class="dark:text-white dark:opacity-50 text-gray-700 opacity-50 after:float-right after:pl-2 after:text-gray-600 after:content-['/']"
class="dark:text-gray-500 text-gray-600 after:float-right after:pl-2 after:text-gray-600 dark:after:text-gray-500 after:content-['/']"
>
{{current_endpoint}}
</button>
@ -398,7 +397,7 @@ data-{{current_endpoint}}-modal
>
<p
data-{{current_endpoint}}-modal-path-prefix
class="mb-0 dark:text-white dark:opacity-75 text-gray-700 opacity-50 text-sm"
class="mb-0 dark:text-white/80 text-gray-700/80 text-sm"
></p>
<input
type="text"
@ -410,7 +409,7 @@ data-{{current_endpoint}}-modal
/>
<p
data-{{current_endpoint}}-modal-path-suffix
class="mb-0 dark:text-white dark:opacity-75 text-gray-700 opacity-50 text-sm"
class="ml-1 mb-0 dark:text-white/80 text-gray-700/80 text-sm"
>
suffix
</p>

View File

@ -1,7 +1,7 @@
<!-- float button-->
{% with messages = get_flashed_messages(with_categories=true) %}
<div
class="group group-hover hover:brightness-75 dark:hover:brightness-105 fixed top-2 sm:top-3 right-19 sm:right-24 xl:right-24 z-990"
class="group group-hover hover:brightness-75 dark:hover:brightness-105 fixed top-2 sm:top-3 right-20 sm:right-24 xl:right-24 z-990"
>
<button
type="button"
@ -19,7 +19,7 @@
</svg>
</button>
<div
class="px-2 translate-x-2 bottom-0 right-0 absolute rounded-full bg-white"
class="dark:brightness-95 px-2 translate-x-2 bottom-0 right-0 absolute rounded-full bg-white"
>
<p data-flash-count class="mb-0 text-sm text-bold text-red-500">
{%if messages %} {{messages|length}}{%else%} 0 {%endif%}

View File

@ -18,7 +18,7 @@
<div>
<img
src="images/logo-menu-2.png"
class="duration-300 w-40 h-12 sm:w-50 sm:h-14 md:w-60 md:h-16 lg:w-80 lg:h-24 inline transition-all"
class="-translate-x-1.5 lg:-transalte-x-3 duration-300 w-50 h-14 md:w-60 md:h-16 lg:w-80 lg:h-24 inline transition-all"
alt="main logo"
/>
{%if message %}

View File

@ -22,14 +22,14 @@
<!-- left sidebar -->
<aside
data-sidebar-menu
data-sidebar-menu
class="fixed flex inset-y-0 flex-wrap justify-between w-full p-0 my-4 overflow-y-auto antialiased transition-transform duration-200 -translate-x-full bg-white border-0 shadow-xl dark:shadow-none dark:bg-slate-850 dark:brightness-110 max-w-64 z-[1000] xl:ml-6 rounded-2xl xl:left-0 xl:translate-x-0"
aria-expanded="false"
>
<!-- close btn-->
<svg
data-sidebar-menu-close
class="sm:hidden cursor-pointer fill-gray-600 dark:fill-gray-300 dark:opacity-80 absolute h-6 w-6 top-4 right-4"
data-sidebar-menu-close
class="xl:hidden cursor-pointer fill-gray-600 dark:fill-gray-300 dark:opacity-80 absolute h-6 w-6 top-4 right-4"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 320 512"
>
@ -378,9 +378,9 @@ data-sidebar-menu
{% else %}
<li class="w-full mt-8">
<h6
class="text-center pl-6 pr-8 ml-2 text-xs leading-tight uppercase dark:text-white opacity-60"
class="text-center pl-6 pr-8 ml-2 text-xs leading-tight uppercase text-gray-600/90 dark:text-white/80"
>
Want your own plugin ? <br />
Want your own plugins ? <br />
<a
class="leading-8 font-bold hover:brightness-75"
target="_blank"
@ -473,7 +473,7 @@ data-sidebar-menu
<a href="https://www.linkedin.com/company/bunkerity/" target="_blank"
><svg
fill="#0A63BC"
class="hover:opacity-80"
class="hover:opacity-80 dark:brightness-110"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 448 512"
>
@ -498,7 +498,7 @@ data-sidebar-menu
<li class="mx-2.5 w-6">
<a href="https://github.com/bunkerity" target="_blank"
><svg
class="hover:opacity-80 dark:fill-gray-700"
class="hover:opacity-80 dark:fill-gray-600"
fill="#171A1F"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 496 512"

View File

@ -1,16 +1,16 @@
<!-- modal -->
<div
data-service-content="settings"
data-services-modal
data-service-content="settings"
data-services-modal
class="dark:brightness-110 hidden w-screen h-screen fixed bg-gray-600/50 z-[1001] top-0 left-0 justify-center items-center"
>
<div
data-services-modal-card
data-services-modal-card
class="overflow-y-auto mx-3 ml-2 mr-6 sm:mx-6 lg:mx-8 my-3 px-4 pt-4 pb-8 w-full min-w-[500px] h-[90vh] flex flex-col break-words bg-white shadow-xl dark:bg-slate-850 dark:shadow-dark-xl rounded-2xl bg-clip-border"
>
<div class="w-full flex justify-between mb-2">
<p
data-services-modal-title
data-services-modal-title
class="transition duration-300 ease-in-out dark:opacity-90 dark:text-gray-200 mb-2 font-sans font-semibold leading-normal uppercase text-md"
>
SERVICE MODAL
@ -28,7 +28,7 @@ data-services-modal
</button>
</div>
<div
data-services-tabs-header
data-services-tabs-header
class="flex justify-start items-center gap-x-4 gap-y-2 my-3"
>
<h5
@ -55,7 +55,7 @@ data-services-modal
{% include "settings_tabs.html" %}
<!-- new and edit form -->
<form
data-services-modal-form
data-services-modal-form
class="w-full h-full flex flex-col justify-between"
id="form-new"
method="POST"
@ -69,14 +69,14 @@ data-services-modal
<!-- action button -->
<div class="w-full justify-center flex mt-10">
<button
data-services-modal-close
data-services-modal-close
type="button"
class="dark:brightness-90 mb-4 mr-3 inline-block px-6 py-3 font-bold text-center text-white uppercase align-middle transition-all rounded-lg cursor-pointer bg-sky-500 hover:bg-sky-500/80 focus:bg-sky-500/80 leading-normal text-md ease-in tracking-tight-rem shadow-xs bg-150 bg-x-25 hover:-translate-y-px active:opacity-85 hover:shadow-md"
>
Close
</button>
<button
data-services-modal-submit
data-services-modal-submit
type="submit"
class="dark:brightness-90 mb-4 inline-block px-6 py-3 font-bold text-center text-white uppercase align-middle transition-all rounded-lg cursor-pointer bg-green-500 hover:bg-green-500/80 focus:bg-green-500/80 leading-normal text-md ease-in tracking-tight-rem shadow-xs bg-150 bg-x-25 hover:-translate-y-px active:opacity-85 hover:shadow-md"
>
@ -88,7 +88,7 @@ data-services-modal
<!-- end new and edit form -->
<!-- delete form-->
<form
data-services-modal-form-delete
data-services-modal-form-delete
class="w-full h-full flex flex-col justify-between"
id="form-delete-server_name"
method="POST"
@ -99,14 +99,14 @@ data-services-modal
<div class="flex justify-center">
<p
data-services-modal-text
class="mx-2 mb-2 mt-8 font-semibold font-sans leading-normal uppercase text-sm"
data-services-modal-text
class="text-gray-700 dark:text-gray-500 mx-2 mb-2 mt-8 font-semibold font-sans leading-normal uppercase text-sm"
></p>
</div>
<!-- action button -->
<div class="w-full justify-center flex mt-10">
<button
data-services-modal-close
data-services-modal-close
type="button"
class="dark:brightness-90 mr-3 inline-block px-6 py-3 font-bold text-center text-white uppercase align-middle transition-all rounded-lg cursor-pointer bg-sky-500 hover:bg-sky-500/80 focus:bg-sky-500/80 leading-normal text-md ease-in tracking-tight-rem shadow-xs bg-150 bg-x-25 hover:-translate-y-px active:opacity-85 hover:shadow-md"
>

View File

@ -35,13 +35,13 @@ data-plugin-item="{{plugin['id']}}"
<!-- title and info -->
<div class="flex items-center my-1 relative z-10">
<h5
class="transition duration-300 ease-in-out dark:opacity-90 text-sm sm:text-md font-bold m-0 dark:text-gray-300"
class="input-title"
>
{{value["label"]}}
</h5>
<svg
data-popover-btn="{{ value["label"] }}"
class="cursor-pointer fill-blue-500 h-5 w-5 ml-2 hover:brightness-75"
class="popover-settings-svg"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 512 512"
>
@ -50,10 +50,10 @@ data-plugin-item="{{plugin['id']}}"
/>
</svg>
<!-- popover -->
<div class="dark:brightness-90 hidden transition z-50 rounded-md p-3 left-0 -translate-y-7 bottom-0 absolute bg-blue-500"
<div class="popover-settings-container hidden"
data-popover-content="{{ value["label"] }}"
>
<p class="transition duration-300 ease-in-out dark:opacity-90 font-bold text-sm text-white dark:text-gray-100 m-0" >{{value['help']}}
<p class="popover-settings-text" >{{value['help']}}
</p>
</div>
<!-- end popover -->
@ -67,7 +67,7 @@ data-plugin-item="{{plugin['id']}}"
{% if setting == "SERVER_NAME" %}required{%endif%}
data-default-value="{{global_config[setting]['value']}}" data-default-method="{{global_config[setting]['method']}}"
{% if global_config[setting]['method'] != 'ui' and global_config[setting]['method'] != 'default' %} disabled {% endif %} id="{{setting}}" name="{{setting}}"
class="outline-none dark:opacity-90 dark:border-slate-600 dark:bg-slate-700 dark:text-gray-300 disabled:opacity-75 focus:border-gray-300/0 focus:ring-1 focus:valid:ring-green-500 focus:invalid:ring-red-500 text-sm leading-5.6 ease block w-full appearance-none rounded-lg border border-solid border-gray-300 bg-white bg-clip-padding px-1.5 py-1 md:px-3 md:py-2 font-normal text-gray-700 transition-all placeholder:text-gray-500 disabled:bg-gray-400 dark:disabled:bg-gray-800 dark:disabled:border-gray-800 dark:disabled:text-gray-300 disabled:text-gray-700"
class="regular-input"
value="{% if global_config[setting]['value'] %} {{global_config[setting]['value']}} {% else %} {{value['default']}} {% endif %}" type="{{value['type']}}" pattern="{{value['regex']|safe}}" />
{% if value['type'] == "password" %}
@ -104,7 +104,7 @@ data-plugin-item="{{plugin['id']}}"
data-default-value="{{global_config[setting]['value']}}"
data-default-method="{{global_config[setting]['method']}}"
type="button"
class="disabled:opacity-75 dark:disabled:text-gray-300 disabled:text-gray-700 disabled:bg-gray-400 disabled:border-gray-400 dark:disabled:bg-gray-800 dark:disabled:border-gray-800 duration-300 ease-in-out dark:opacity-90 dark:border-slate-600 dark:bg-slate-700 dark:text-gray-300 focus:border-primary flex justify-between align-middle items-center text-left text-sm leading-5.6 ease w-full rounded-lg border border-solid border-gray-300 bg-white bg-clip-padding px-1.5 py-1 md:px-3 md:py-2 font-normal text-gray-700 transition-all placeholder:text-gray-500"
class="custom-select-btn"
>
{% for item in value['select'] %} {% if global_config[setting]['value'] and
global_config[setting]['value'] == item %}
@ -146,7 +146,7 @@ data-plugin-item="{{plugin['id']}}"
value="{{item}}"
data-setting-select-dropdown-btn="{{value['id']}}"
type="button"
class="min-h-[38px] {% if loop.index == 1 %} border-t rounded-t {% endif %} {% if loop.index == loop.length %}rounded-b {% endif %} border-b border-l border-r border-gray-300 hover:brightness-90 bg-primary my-0 relative px-6 py-2 text-center align-middle transition-all rounded-none cursor-pointer leading-normal text-sm ease-in tracking-tight-rem dark:border-slate-600 dark:bg-slate-700 dark:text-gray-300"
class="active custom-dropdown-btn {% if loop.index == 1 %} border-t rounded-t {% endif %} {% if loop.index == loop.length %}rounded-b {% endif %} "
>
{{item}}
</button>
@ -156,7 +156,7 @@ data-plugin-item="{{plugin['id']}}"
value="{{item}}"
data-setting-select-dropdown-btn="{{value['id']}}"
type="button"
class="min-h-[38px] {% if loop.index == 1 %} border-t rounded-t {% endif %} {% if loop.index == loop.length %}rounded-b {% endif %} border-b border-l border-r border-gray-300 hover:brightness-90 bg-white text-gray-700 my-0 relative px-6 py-2 text-center align-middle transition-all rounded-none cursor-pointer leading-normal text-sm ease-in tracking-tight-rem dark:border-slate-600 dark:bg-slate-700 dark:text-gray-300"
class="custom-dropdown-btn {% if loop.index == 1 %} border-t rounded-t {% endif %} {% if loop.index == loop.length %}rounded-b {% endif %} "
>
{{item}}
</button>
@ -172,28 +172,17 @@ data-plugin-item="{{plugin['id']}}"
<div data-checkbox-handler="{{value['id']}}" class="relative mb-7 md:mb-0 z-10 ">
<input id="{{setting}}" name="{{setting}}"
data-default-method="{% if setting in ["AUTOCONF_MODE", "SWARM_MODE", "KUBERNETES_MODE"] %}mode{% else %}{{global_config[setting]['method']}}{% endif %}"
data-default-value="{{global_config[setting]['value']}}" {% if
data-default-value="{{global_config[setting]['value']}}"
{% if
setting in ["AUTOCONF_MODE", "SWARM_MODE", "KUBERNETES_MODE"] or global_config[setting]['method'] != 'ui' and global_config[setting]['method']
!= 'default' %} disabled {% endif %}
aria-checked="{% if global_config[setting]['value'] == "yes" %}true{% else %}false{% endif %}"
checked
id="checkbox-{{value['id']}}"
class="cursor-pointer disabled:cursor-default
relative dark:border-slate-600 dark:bg-slate-700 z-10 aria-checked:z-0 w-5 h-5 ease
text-base rounded-1.4 aria-checked:bg-primary aria-checked:border-primary
dark:aria-checked:bg-primary dark:aria-checked:border-primary duration-250 float-left
mt-1 appearance-none border border-gray-300 bg-white bg-contain bg-center
bg-no-repeat align-top transition-all disabled:bg-gray-400
disabled:border-gray-400 dark:disabled:bg-gray-800
dark:disabled:border-gray-800 disabled:text-gray-700
dark:disabled:text-gray-300
aria-checked:disabled:bg-gray-400
aria-checked:disabled:border-gray-400 dark:aria-checked:disabled:bg-gray-800
dark:aria-checked:disabled:border-gray-800 aria-checked:disabled:text-gray-700
dark:aria-checked:disabled:text-gray-300
" type="checkbox" data-pattern="{{value['regex']|safe}}"
class="checkbox" type="checkbox" data-pattern="{{value['regex']|safe}}"
value="{{global_config[setting]['value']}}" />
<svg
@ -236,7 +225,7 @@ data-plugin-item="{{plugin['id']}}"
<!-- plugin multiple handler -->
<div data-multiple-handler class="flex items-center mx-0 sm:mx-4 md:mx-6 md:my-3 my-2 2xl:mx-6 2xl:my-3 col-span-12 ">
<h5
class="transition duration-300 ease-in-out dark:opacity-90 text-sm sm:text-md font-bold m-0 dark:text-gray-300"
class="input-title"
>
{{multiple}}
</h5>
@ -257,19 +246,18 @@ data-plugin-item="{{plugin['id']}}"
== "global-config" and value['context'] == "global" and value['multiple'] == multiple or current_endpoint ==
"services" and value['context'] == "multisite" and value['multiple'] == multiple %}
<div data-setting-container="{{setting}}_SCHEMA"
class="
mx-0 sm:mx-4 my-2 col-span-12 md:mx-6 md:my-3 md:col-span-6 2xl:mx-6 2xl:my-3 2xl:col-span-4"
class="mx-0 sm:mx-4 my-2 col-span-12 md:mx-6 md:my-3 md:col-span-6 2xl:mx-6 2xl:my-3 2xl:col-span-4"
id="form-edit-{{current_endpoint}}-{{ value["id"] }}_SCHEMA">
<!-- title and info -->
<div class="flex items-center my-1 relative z-10">
<h5
class="transition duration-300 ease-in-out dark:opacity-90 text-sm sm:text-md font-bold m-0 dark:text-gray-300"
class="input-title"
>
{{value["label"]}}
</h5>
<svg
data-popover-btn="{{ value["label"] }}"
class="cursor-pointer fill-blue-500 h-5 w-5 ml-2 hover:brightness-75"
class="popover-settings-svg"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 512 512"
>
@ -278,10 +266,10 @@ data-plugin-item="{{plugin['id']}}"
/>
</svg>
<!-- popover -->
<div class="dark:brightness-80 hidden transition z-50 rounded-md p-3 left-0 -translate-y-7 bottom-0 absolute bg-blue-500"
<div class="popover-settings-container hidden"
data-popover-content="{{ value["label"] }}"
>
<p class="transition duration-300 ease-in-out dark:opacity-90 font-bold text-sm text-white dark:text-gray-100 m-0" >{{value['help']}}
<p class="popover-settings-text" >{{value['help']}}
</p>
</div>
<!-- end popover -->
@ -293,7 +281,7 @@ data-plugin-item="{{plugin['id']}}"
<div class="relative flex items-center">
<input
data-default-value="{{value['default']}}" data-default-method="default" id="{{setting}}_SCHEMA" name="{{setting}}_SCHEMA"
class="outline-none dark:opacity-90 dark:border-slate-600 dark:bg-slate-700 dark:text-gray-300 disabled:opacity-75 focus:border-gray-300/0 focus:ring-1 focus:valid:ring-green-500 focus:invalid:ring-red-500 text-sm leading-5.6 ease block w-full appearance-none rounded-lg border border-solid border-gray-300 bg-white bg-clip-padding px-1.5 py-1 md:px-3 md:py-2 font-normal text-gray-700 transition-all placeholder:text-gray-500 disabled:bg-gray-400 dark:disabled:bg-gray-800 dark:disabled:border-gray-800 dark:disabled:text-gray-300 disabled:text-gray-700"
class="regular-input"
value="{{value['default']}}" type="{{value['type']}}" pattern="{{value['regex']|safe}}" />
{% if value['type'] == "password" %}
@ -328,7 +316,7 @@ data-plugin-item="{{plugin['id']}}"
data-setting-select="{{value['id']}}"
data-default-value="{{value['default']}}"
type="button"
class="disabled:opacity-75 dark:disabled:text-gray-300 disabled:text-gray-700 disabled:bg-gray-400 disabled:border-gray-400 dark:disabled:bg-gray-800 dark:disabled:border-gray-800 duration-300 ease-in-out dark:opacity-90 dark:border-slate-600 dark:bg-slate-700 dark:text-gray-300 focus:border-primary flex justify-between align-middle items-center text-left text-sm leading-5.6 ease w-full rounded-lg border border-solid border-gray-300 bg-white bg-clip-padding px-1.5 py-1 md:px-3 md:py-2 font-normal text-gray-700 transition-all placeholder:text-gray-500"
class="custom-select-btn"
>
{% for item in value['select'] %} {% if value['default'] == item %}
<span
@ -361,7 +349,7 @@ data-plugin-item="{{plugin['id']}}"
value="{{item}}"
data-setting-select-dropdown-btn="{{value['id']}}"
type="button"
class="min-h-[38px] {% if loop.index == 1 %} border-t rounded-t {% endif %} {% if loop.index == loop.length %}rounded-b {% endif %} border-b border-l border-r border-gray-300 hover:brightness-90 bg-primary my-0 relative px-6 py-2 text-center align-middle transition-all rounded-none cursor-pointer leading-normal text-sm ease-in tracking-tight-rem dark:border-slate-600 dark:bg-slate-700 dark:text-gray-300"
class="active custom-dropdown-btn {% if loop.index == 1 %} border-t rounded-t {% endif %} {% if loop.index == loop.length %}rounded-b {% endif %}"
>
{{item}}
</button>
@ -371,7 +359,7 @@ data-plugin-item="{{plugin['id']}}"
value="{{item}}"
data-setting-select-dropdown-btn="{{value['id']}}"
type="button"
class="min-h-[38px] {% if loop.index == 1 %} border-t rounded-t {% endif %} {% if loop.index == loop.length %}rounded-b {% endif %} border-b border-l border-r border-gray-300 hover:brightness-90 bg-white text-gray-700 my-0 relative px-6 py-2 text-center align-middle transition-all rounded-none cursor-pointer leading-normal text-sm ease-in tracking-tight-rem dark:border-slate-600 dark:bg-slate-700 dark:text-gray-300"
class="custom-dropdown-btn {% if loop.index == 1 %} border-t rounded-t {% endif %} {% if loop.index == loop.length %}rounded-b {% endif %}"
>
{{item}}
</button>
@ -388,15 +376,8 @@ data-plugin-item="{{plugin['id']}}"
<input id="{{setting}}_SCHEMA" name="{{setting}}_SCHEMA"
data-default-method="default"
data-default-value="{{value['default']}}" {% if value['default'] == 'yes' %} checked {%
endif %} id="checkbox-{{value['id']}}" class="relative cursor-pointer disabled:cursor-default
dark:border-slate-600 dark:bg-slate-700 z-10 checked:z-0 w-5 h-5 ease
text-base rounded-1.4 checked:bg-primary checked:border-primary
dark:checked:bg-primary dark:checked:border-primary duration-250 float-left
mt-1 appearance-none border border-gray-300 bg-white bg-contain bg-center
bg-no-repeat align-top transition-all disabled:bg-gray-400
disabled:border-gray-400 dark:disabled:bg-gray-800
dark:disabled:border-gray-800 disabled:text-gray-700
dark:disabled:text-gray-300" type="checkbox" data-pattern="{{value['regex']|safe}}"
endif %} id="checkbox-{{value['id']}}"
class="checkbox" type="checkbox" data-pattern="{{value['regex']|safe}}"
value="{{value['default']}}" />
<svg
data-checkbox-handler="{{value['id']}}"

View File

@ -12,11 +12,11 @@
<button role="tab"
data-tab-handler="{{ plugin['id'] }}"
type="button"
class="{% if loop.first %} brightness-90 z-[1001]{%else %} {% endif %} border-primary dark:hover:bg-slate-800 dark:border-slate-600 dark:bg-slate-700 border my-1 relative inline-block px-3 py-3 font-bold text-center uppercase align-middle transition-all rounded-none cursor-pointer bg-white hover:bg-gray-100 leading-normal text-sm ease-in tracking-tight-rem shadow-xs hover:shadow-md"
class="{% if loop.first %}active{% endif %} settings-tabs-tab-btn"
>
<span class="w-full flex justify-between items-center">
<!-- text and icon -->
<span class="text-primary transition duration-300 ease-in-out dark:opacity-90 pl-3 pr-2 dark:text-gray-300"> {{ plugin["name"] }} </span>
<span class="settings-tabs-name"> {{ plugin["name"] }} </span>
<svg
data-popover-btn="{{ plugin["name"] }}"
class=" fill-blue-500 h-5 w-5 mr-2 hover:brightness-95"
@ -31,9 +31,9 @@
<!-- popover -->
<span
data-popover-content="{{ plugin["name"] }}"
class="top-[60px] min-w-[150px] dark:brightness-90 bg-blue-500 hidden transition z-50 rounded-md p-3 left-0 absolute"
class="settings-tabs-popover-container hidden"
>
<span class="font-bold text-sm text-white m-0">{{ plugin['description'] }}</span>
<span class="settings-tabs-popover-text">{{ plugin['description'] }}</span>
</span>
<!-- end popover -->
</span>
@ -47,9 +47,9 @@
<button
data-tab-dropdown-btn
type="button"
class="dark:hover:brightness-95 dark:border-slate-600 dark:bg-slate-700 border-primary border w-full flex items-center justify-between rounded-lg hover:-translate-y-px my-1 px-6 py-3 font-bold text-center uppercase align-middle transition-all cursor-pointer bg-white hover:bg-gray-50 leading-normal text-sm ease-in tracking-tight-rem shadow-xs hover:shadow-md"
class="settings-tabs-mobile-btn"
>
<span class="transition duration-300 ease-in-out dark:opacity-90 dark:text-gray-300 text-primary">{% if current_endpoint == "global-config" %}general {% endif %} </span>
<span class="settings-tabs-mobile-btn-text">{% if current_endpoint == "global-config" %}general {% endif %} </span>
<!-- chevron -->
<svg
@ -66,7 +66,7 @@
<!-- dropdown-->
<div
data-tab-dropdown
class="hidden z-100 absolute flex-col w-full overflow-hidden overflow-y-auto max-h-90"
class="hidden z-100 absolute flex-col w-full overflow-hidden overflow-y-auto max-h-90"
>
{% set first_el = "True" %}
{% for plugin in plugins %} {% if current_endpoint == "services" and plugin["settings"]
@ -79,7 +79,7 @@
type="button"
data-select="false"
id="edit-{{current_endpoint}}-{{ plugin['id'] }}-tab"
class="flex justify-between border-t rounded-t border-b border-l border-r border-gray-300 dark:hover:brightness-90 hover:brightness-90 my-0 relative px-6 py-2 text-center align-middle transition-all rounded-none cursor-pointer leading-normal text-sm ease-in tracking-tight-rem dark:border-slate-600 dark:text-gray-300 z-1000 dark:bg-primary bg-primary text-gray-300">
class="active first settings-tabs-mobile-dropdown-btn">
{{ plugin["name"] }}
</button>
{% else %}
@ -88,7 +88,7 @@
type="button"
data-select="false"
id="edit-{{current_endpoint}}-{{ plugin['id'] }}-tab"
class="flex justify-between {% if loop.index == loop.length %}rounded-b {% endif %} border-b border-l border-r border-gray-300 dark:hover:brightness-90 hover:brightness-90 bg-white text-gray-700 my-0 relative px-6 py-2 text-center align-middle transition-all rounded-none cursor-pointer leading-normal text-sm ease-in tracking-tight-rem dark:border-slate-600 dark:bg-slate-700 dark:text-gray-300">
class="settings-tabs-mobile-dropdown-btn {% if loop.index == loop.length %}rounded-b {% endif %}">
{{ plugin["name"] }}
</button>