plugins done + add name to settings
This commit is contained in:
parent
6b5d6e07ee
commit
08e7c2104b
|
@ -807,10 +807,6 @@ h6 {
|
|||
z-index: 50;
|
||||
}
|
||||
|
||||
.-z-10 {
|
||||
z-index: -10;
|
||||
}
|
||||
|
||||
.order-2 {
|
||||
order: 2;
|
||||
}
|
||||
|
@ -1167,10 +1163,6 @@ h6 {
|
|||
height: 7.5rem;
|
||||
}
|
||||
|
||||
.h-60 {
|
||||
height: 15rem;
|
||||
}
|
||||
|
||||
.h-\[90vh\] {
|
||||
height: 90vh;
|
||||
}
|
||||
|
@ -1187,14 +1179,6 @@ h6 {
|
|||
height: 33.333333%;
|
||||
}
|
||||
|
||||
.h-20 {
|
||||
height: 5rem;
|
||||
}
|
||||
|
||||
.\!h-full {
|
||||
height: 100% !important;
|
||||
}
|
||||
|
||||
.max-h-screen {
|
||||
max-height: 100vh;
|
||||
}
|
||||
|
@ -1203,6 +1187,10 @@ h6 {
|
|||
max-height: 25rem;
|
||||
}
|
||||
|
||||
.max-h-16 {
|
||||
max-height: 4rem;
|
||||
}
|
||||
|
||||
.max-h-90 {
|
||||
max-height: 22.5rem;
|
||||
}
|
||||
|
@ -1211,20 +1199,12 @@ h6 {
|
|||
max-height: 2rem;
|
||||
}
|
||||
|
||||
.max-h-20 {
|
||||
max-height: 5rem;
|
||||
.max-h-116 {
|
||||
max-height: 29rem;
|
||||
}
|
||||
|
||||
.max-h-16 {
|
||||
max-height: 4rem;
|
||||
}
|
||||
|
||||
.max-h-10 {
|
||||
max-height: 2.5rem;
|
||||
}
|
||||
|
||||
.\!max-h-10 {
|
||||
max-height: 2.5rem !important;
|
||||
.max-h-80 {
|
||||
max-height: 20rem;
|
||||
}
|
||||
|
||||
.min-h-20 {
|
||||
|
@ -1259,6 +1239,18 @@ h6 {
|
|||
min-height: 85vh;
|
||||
}
|
||||
|
||||
.min-h-\[40vh\] {
|
||||
min-height: 40vh;
|
||||
}
|
||||
|
||||
.min-h-\[45vh\] {
|
||||
min-height: 45vh;
|
||||
}
|
||||
|
||||
.min-h-\[55vh\] {
|
||||
min-height: 55vh;
|
||||
}
|
||||
|
||||
.w-full {
|
||||
width: 100%;
|
||||
}
|
||||
|
@ -1359,14 +1351,6 @@ h6 {
|
|||
max-width: 300px;
|
||||
}
|
||||
|
||||
.max-w-\[500px\] {
|
||||
max-width: 500px;
|
||||
}
|
||||
|
||||
.max-w-\[400px\] {
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
.flex-auto {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
@ -1383,10 +1367,6 @@ h6 {
|
|||
flex-basis: 100%;
|
||||
}
|
||||
|
||||
.border-separate {
|
||||
border-collapse: separate;
|
||||
}
|
||||
|
||||
.translate-y-2 {
|
||||
--tw-translate-y: 0.5rem;
|
||||
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
||||
|
@ -1545,6 +1525,10 @@ h6 {
|
|||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.flex-row {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.flex-col {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
@ -1577,10 +1561,6 @@ h6 {
|
|||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.justify-evenly {
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
|
||||
.justify-items-center {
|
||||
justify-items: center;
|
||||
}
|
||||
|
@ -1622,10 +1602,6 @@ h6 {
|
|||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.overflow-y-hidden {
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.whitespace-nowrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
@ -1714,10 +1690,6 @@ h6 {
|
|||
border-width: 0px;
|
||||
}
|
||||
|
||||
.border-4 {
|
||||
border-width: 4px;
|
||||
}
|
||||
|
||||
.border-t {
|
||||
border-top-width: 1px;
|
||||
}
|
||||
|
@ -1742,14 +1714,6 @@ h6 {
|
|||
border-style: solid;
|
||||
}
|
||||
|
||||
.border-dashed {
|
||||
border-style: dashed;
|
||||
}
|
||||
|
||||
.border-dotted {
|
||||
border-style: dotted;
|
||||
}
|
||||
|
||||
.border-white {
|
||||
--tw-border-opacity: 1;
|
||||
border-color: rgb(255 255 255 / var(--tw-border-opacity));
|
||||
|
@ -3116,18 +3080,6 @@ h6 {
|
|||
grid-column: span 1 / span 1;
|
||||
}
|
||||
|
||||
.sm\:col-span-8 {
|
||||
grid-column: span 8 / span 8;
|
||||
}
|
||||
|
||||
.sm\:col-span-5 {
|
||||
grid-column: span 5 / span 5;
|
||||
}
|
||||
|
||||
.sm\:col-span-7 {
|
||||
grid-column: span 7 / span 7;
|
||||
}
|
||||
|
||||
.sm\:col-start-5 {
|
||||
grid-column-start: 5;
|
||||
}
|
||||
|
@ -3142,6 +3094,11 @@ h6 {
|
|||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
.sm\:my-0 {
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.sm\:ml-1 {
|
||||
margin-left: 0.25rem;
|
||||
}
|
||||
|
@ -3431,10 +3388,6 @@ h6 {
|
|||
top: 0.75rem;
|
||||
}
|
||||
|
||||
.xl\:col-span-4 {
|
||||
grid-column: span 4 / span 4;
|
||||
}
|
||||
|
||||
.xl\:mx-4 {
|
||||
margin-left: 1rem;
|
||||
margin-right: 1rem;
|
||||
|
|
|
@ -6,7 +6,6 @@ class LogsDropdown {
|
|||
this.prefix = prefix;
|
||||
this.container = document.querySelector("main");
|
||||
this.initDropdown();
|
||||
this.logListContainer = document.querySelector(`[${this.prefix}-list]`);
|
||||
}
|
||||
|
||||
initDropdown() {
|
||||
|
@ -297,7 +296,7 @@ class FilterLogs {
|
|||
this.prefix = prefix;
|
||||
this.container = document.querySelector(`[${this.prefix}-filter]`);
|
||||
this.keyInp = document.querySelector("input#keyword");
|
||||
this.lastType = "";
|
||||
this.lastType = "all";
|
||||
this.initHandler();
|
||||
}
|
||||
|
||||
|
@ -340,7 +339,6 @@ class FilterLogs {
|
|||
//filter type
|
||||
this.setFilterType(logs);
|
||||
this.setFilterKeyword(logs);
|
||||
this.setFilterDate(logs);
|
||||
}
|
||||
|
||||
setFilterType(logs) {
|
||||
|
@ -361,11 +359,14 @@ class FilterLogs {
|
|||
}
|
||||
|
||||
setFilterKeyword(logs) {
|
||||
const keyword = this.keyInp.value;
|
||||
const keyword = this.keyInp.value.trim().toLowerCase();
|
||||
if (!keyword) return;
|
||||
for (let i = 0; i < logs.length; i++) {
|
||||
const el = logs[i];
|
||||
const content = el.querySelector("[logs-content]").textContent;
|
||||
const content = el
|
||||
.querySelector("[logs-content]")
|
||||
.textContent.trim()
|
||||
.toLowerCase();
|
||||
if (!content.includes(keyword)) el.classList.add("hidden");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,46 +1,247 @@
|
|||
class Upload {
|
||||
constructor(prefix) {
|
||||
this.prefix = prefix;
|
||||
this.uploadDOM = document.querySelector(`[${this.prefix}-upload-button]`);
|
||||
this.uploadTxt = document.querySelector(`[${this.prefix}-upload-text]`);
|
||||
this.uploadInp = document.querySelector(`[${this.prefix}-upload-input]`);
|
||||
this.dragNdrop = document.querySelector(`[${this.prefix}-drag-and-drop]`);
|
||||
constructor() {
|
||||
this.dropEl = document.querySelector("#dropzone");
|
||||
this.drop = new Dropzone(this.dropEl, {
|
||||
paramName: "file",
|
||||
method: "post",
|
||||
maxFiles: 100,
|
||||
autoProcessQueue: false,
|
||||
uploadMultiple: true,
|
||||
parallelUploads: 100,
|
||||
url: "#",
|
||||
});
|
||||
this.submitBtn = this.dropEl.querySelector('button[type="submit"]');
|
||||
this.init();
|
||||
}
|
||||
|
||||
init() {
|
||||
this.uploadDOM.addEventListener("click", (e) => {
|
||||
this.uploadInp.click();
|
||||
});
|
||||
|
||||
this.uploadInp.addEventListener("change", (e) => {
|
||||
this.uploadTxt.textContent = "FILES : ";
|
||||
const files = this.uploadInp.files;
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
const file = files[i];
|
||||
const spanEl = document.createElement("span");
|
||||
spanEl.textContent =
|
||||
i == files.length - 1 ? `${file.name};` : `${file.name}, `;
|
||||
this.uploadTxt.append(spanEl);
|
||||
}
|
||||
this.submitBtn.addEventListener("click", (e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
drop.processQueue();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const dropEl = document.querySelector("#dropzone");
|
||||
const drop = new Dropzone(dropEl, {
|
||||
paramName: "file",
|
||||
method: "post",
|
||||
maxFiles: 100,
|
||||
autoProcessQueue: false,
|
||||
uploadMultiple: true,
|
||||
parallelUploads: 100,
|
||||
url: "#",
|
||||
});
|
||||
class PluginsDropdown {
|
||||
constructor(prefix = "plugins") {
|
||||
this.prefix = prefix;
|
||||
this.container = document.querySelector("main");
|
||||
this.initDropdown();
|
||||
}
|
||||
|
||||
const submit = dropEl.querySelector('button[type="submit"]');
|
||||
submit.addEventListener("click", (e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
drop.processQueue();
|
||||
});
|
||||
initDropdown() {
|
||||
this.container.addEventListener("click", (e) => {
|
||||
//SELECT BTN LOGIC
|
||||
try {
|
||||
if (
|
||||
e.target
|
||||
.closest("button")
|
||||
.hasAttribute(`${this.prefix}-setting-select`) &&
|
||||
!e.target.closest("button").hasAttribute(`disabled`)
|
||||
) {
|
||||
this.toggleSelectBtn(e);
|
||||
}
|
||||
} catch (err) {}
|
||||
//SELECT DROPDOWN BTN LOGIC
|
||||
try {
|
||||
if (
|
||||
e.target
|
||||
.closest("button")
|
||||
.hasAttribute(`${this.prefix}-setting-select-dropdown-btn`)
|
||||
) {
|
||||
const btn = e.target.closest("button");
|
||||
const btnValue = btn.getAttribute("value");
|
||||
const btnSetting = btn.getAttribute(
|
||||
`${this.prefix}-setting-select-dropdown-btn`
|
||||
);
|
||||
//stop if same value to avoid new fetching
|
||||
const isSameVal = this.isSameValue(btnSetting, btnValue);
|
||||
if (isSameVal) return this.hideDropdown(btnSetting);
|
||||
//else, add new value to custom
|
||||
this.setSelectNewValue(btnSetting, btnValue);
|
||||
//close dropdown and change style
|
||||
this.hideDropdown(btnSetting);
|
||||
this.changeDropBtnStyle(btnSetting, btn);
|
||||
//show / hide filter
|
||||
if (btnSetting === "instances") {
|
||||
this.hideFilterOnLocal(btn.getAttribute("_type"));
|
||||
}
|
||||
}
|
||||
} catch (err) {}
|
||||
});
|
||||
}
|
||||
|
||||
isSameValue(btnSetting, value) {
|
||||
const selectCustom = document.querySelector(
|
||||
`[${this.prefix}-setting-select-text="${btnSetting}"]`
|
||||
);
|
||||
const currVal = selectCustom.textContent;
|
||||
return currVal === value ? true : false;
|
||||
}
|
||||
|
||||
setSelectNewValue(btnSetting, value) {
|
||||
const selectCustom = document.querySelector(
|
||||
`[${this.prefix}-setting-select="${btnSetting}"]`
|
||||
);
|
||||
selectCustom.querySelector(
|
||||
`[${this.prefix}-setting-select-text]`
|
||||
).textContent = value;
|
||||
}
|
||||
|
||||
hideDropdown(btnSetting) {
|
||||
//hide dropdown
|
||||
const dropdownEl = document.querySelector(
|
||||
`[${this.prefix}-setting-select-dropdown="${btnSetting}"]`
|
||||
);
|
||||
dropdownEl.classList.add("hidden");
|
||||
dropdownEl.classList.remove("flex");
|
||||
//svg effect
|
||||
const dropdownChevron = document.querySelector(
|
||||
`svg[${this.prefix}-setting-select="${btnSetting}"]`
|
||||
);
|
||||
dropdownChevron.classList.remove("rotate-180");
|
||||
}
|
||||
|
||||
changeDropBtnStyle(btnSetting, selectedBtn) {
|
||||
const dropdownEl = document.querySelector(
|
||||
`[${this.prefix}-setting-select-dropdown="${btnSetting}"]`
|
||||
);
|
||||
//reset dropdown btns
|
||||
const btnEls = dropdownEl.querySelectorAll("button");
|
||||
|
||||
btnEls.forEach((btn) => {
|
||||
btn.classList.remove(
|
||||
"dark:bg-primary",
|
||||
"bg-primary",
|
||||
"bg-primary",
|
||||
"text-gray-300",
|
||||
"text-gray-300"
|
||||
);
|
||||
btn.classList.add("bg-white", "dark:bg-slate-700", "text-gray-700");
|
||||
});
|
||||
//highlight clicked btn
|
||||
selectedBtn.classList.remove(
|
||||
"bg-white",
|
||||
"dark:bg-slate-700",
|
||||
"text-gray-700"
|
||||
);
|
||||
selectedBtn.classList.add("dark:bg-primary", "bg-primary", "text-gray-300");
|
||||
}
|
||||
|
||||
toggleSelectBtn(e) {
|
||||
const attribut = e.target
|
||||
.closest("button")
|
||||
.getAttribute(`${this.prefix}-setting-select`);
|
||||
//toggle dropdown
|
||||
const dropdownEl = document.querySelector(
|
||||
`[${this.prefix}-setting-select-dropdown="${attribut}"]`
|
||||
);
|
||||
const dropdownChevron = document.querySelector(
|
||||
`svg[${this.prefix}-setting-select="${attribut}"]`
|
||||
);
|
||||
dropdownEl.classList.toggle("hidden");
|
||||
dropdownEl.classList.toggle("flex");
|
||||
dropdownChevron.classList.toggle("rotate-180");
|
||||
}
|
||||
|
||||
//hide date filter on local
|
||||
hideFilterOnLocal(type) {
|
||||
console.log(type);
|
||||
if (type === "local") {
|
||||
this.hideInp(`input#from-date`);
|
||||
this.hideInp(`input#to-date`);
|
||||
}
|
||||
|
||||
if (type !== "local") {
|
||||
this.showInp(`input#from-date`);
|
||||
this.showInp(`input#to-date`);
|
||||
}
|
||||
}
|
||||
|
||||
showInp(selector) {
|
||||
document.querySelector(selector).closest("div").classList.add("flex");
|
||||
document.querySelector(selector).closest("div").classList.remove("hidden");
|
||||
}
|
||||
|
||||
hideInp(selector) {
|
||||
document.querySelector(selector).closest("div").classList.add("hidden");
|
||||
document.querySelector(selector).closest("div").classList.remove("flex");
|
||||
}
|
||||
}
|
||||
|
||||
class FilterPlugins {
|
||||
constructor(prefix = "plugins") {
|
||||
this.prefix = prefix;
|
||||
this.container = document.querySelector(`[${this.prefix}-filter]`);
|
||||
this.keyInp = document.querySelector("input#keyword");
|
||||
this.lastType = "all";
|
||||
this.initHandler();
|
||||
}
|
||||
|
||||
initHandler() {
|
||||
//TYPE HANDLER
|
||||
this.container.addEventListener("click", (e) => {
|
||||
try {
|
||||
if (
|
||||
e.target
|
||||
.closest("button")
|
||||
.getAttribute(`${this.prefix}-setting-select-dropdown-btn`) ===
|
||||
"types"
|
||||
) {
|
||||
const btn = e.target.closest("button");
|
||||
const btnValue = btn.getAttribute("value");
|
||||
|
||||
this.lastType = btnValue;
|
||||
console.log(this.lastType);
|
||||
//run filter
|
||||
this.filter();
|
||||
}
|
||||
} catch (err) {}
|
||||
});
|
||||
//KEYWORD HANDLER
|
||||
this.keyInp.addEventListener("input", (e) => {
|
||||
this.filter();
|
||||
});
|
||||
}
|
||||
|
||||
filter() {
|
||||
const logs = document.querySelector(`[${this.prefix}-list]`).children;
|
||||
if (logs.length === 0) return;
|
||||
//reset
|
||||
for (let i = 0; i < logs.length; i++) {
|
||||
const el = logs[i];
|
||||
el.classList.remove("hidden");
|
||||
}
|
||||
//filter type
|
||||
this.setFilterType(logs);
|
||||
this.setFilterKeyword(logs);
|
||||
}
|
||||
|
||||
setFilterType(logs) {
|
||||
if (this.lastType === "all") return;
|
||||
for (let i = 0; i < logs.length; i++) {
|
||||
const el = logs[i];
|
||||
const type = el.getAttribute(`${this.prefix}-external`).trim();
|
||||
if (type !== this.lastType) el.classList.add("hidden");
|
||||
}
|
||||
}
|
||||
|
||||
setFilterKeyword(logs) {
|
||||
const keyword = this.keyInp.value.trim().toLowerCase();
|
||||
if (!keyword) return;
|
||||
for (let i = 0; i < logs.length; i++) {
|
||||
const el = logs[i];
|
||||
const content = el
|
||||
.querySelector(`[${this.prefix}-content]`)
|
||||
.textContent.trim()
|
||||
.toLowerCase();
|
||||
|
||||
if (!content.includes(keyword)) el.classList.add("hidden");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const setUpload = new Upload();
|
||||
const setDropdown = new PluginsDropdown();
|
||||
const setFilter = new FilterPlugins();
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{% extends "base.html" %} {% block content %} {% set current_endpoint =
|
||||
url_for(request.endpoint)[1:].split("/")[-1].strip() %}
|
||||
<div value="{{jobs}}">t</div>
|
||||
<!-- filter -->
|
||||
<div
|
||||
{{current_endpoint}}-filter
|
||||
|
|
|
@ -302,7 +302,7 @@
|
|||
|
||||
<!-- plugin list -->
|
||||
<div>
|
||||
{% set plugs = config["CONFIG"].get_plugins() %}
|
||||
{% set plugins = config["CONFIG"].get_plugins() %}
|
||||
<ul>
|
||||
<li class="w-full mt-4">
|
||||
<h6
|
||||
|
@ -311,12 +311,12 @@
|
|||
PLUGINS PAGE
|
||||
</h6>
|
||||
</li>
|
||||
{% if not plugs %}
|
||||
{% if not plugins %}
|
||||
<li
|
||||
class="hover:rounded-lg dark:text-white dark:opacity-80 py-1 text-sm ease-nav-brand my-0 mx-2 flex items-center whitespace-nowrap px-6 transition"
|
||||
>no plugins to display</span
|
||||
>
|
||||
{% else %} {% for plugin in plugs %} {% if plugin['page'] %}
|
||||
{% else %} {% for plugin in plugins %} {% if plugin['page'] %}
|
||||
<li class="mt-0.5 w-full">
|
||||
<a
|
||||
target="_blank"
|
||||
|
|
|
@ -1,10 +1,59 @@
|
|||
{% extends "base.html" %} {% block content %}{% set current_endpoint =
|
||||
url_for(request.endpoint)[1:].split("/")[-1].strip().replace('_', '-') %}
|
||||
url_for(request.endpoint)[1:].split("/")[-1].strip().replace('_', '-') %} {% set
|
||||
plugins = config["CONFIG"].get_plugins() %}
|
||||
<!-- info -->
|
||||
<div
|
||||
class="p-4 col-span-12 md:col-span-5 2xl:col-span-4 grid grid-cols-12 relative min-w-0 break-words bg-white shadow-xl dark:bg-slate-850 dark:shadow-dark-xl rounded-2xl bg-clip-border"
|
||||
class="p-4 col-span-12 md:col-span-5 2xl:col-span-4 relative min-w-0 break-words bg-white shadow-xl dark:bg-slate-850 dark:shadow-dark-xl rounded-2xl bg-clip-border"
|
||||
>
|
||||
<h5 class="col-span-12 mb-2 font-bold dark:text-white">INFO</h5>
|
||||
<h5 class="col-span-12 mb-4 font-bold dark:text-white">INFO</h5>
|
||||
<div class="flex items-center my-4">
|
||||
<p
|
||||
class="transition duration-300 ease-in-out font-bold mb-0 font-sans text-md leading-normal uppercase dark:text-gray-500 dark:opacity-80"
|
||||
>
|
||||
TOTAL PLUGINS
|
||||
</p>
|
||||
<p
|
||||
class="transition duration-300 ease-in-out pl-2 col-span-1 mb-0 font-sans text-md font-semibold leading-normal uppercase dark:text-white dark:opacity-80"
|
||||
>
|
||||
{{plugins_total}}
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex items-center my-4">
|
||||
<p
|
||||
class="transition duration-300 ease-in-out font-bold mb-0 font-sans text-md leading-normal uppercase dark:text-gray-500 dark:opacity-80"
|
||||
>
|
||||
INTERNAL PLUGINS
|
||||
</p>
|
||||
<p
|
||||
class="transition duration-300 ease-in-out pl-2 col-span-1 mb-0 font-sans text-md font-semibold leading-normal uppercase dark:text-white dark:opacity-80"
|
||||
>
|
||||
{{plugins_internal}}
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex items-center my-4">
|
||||
<p
|
||||
class="transition duration-300 ease-in-out font-bold mb-0 font-sans text-md leading-normal uppercase dark:text-gray-500 dark:opacity-80"
|
||||
>
|
||||
EXTERNAL PLUGINS
|
||||
</p>
|
||||
<p
|
||||
class="transition duration-300 ease-in-out pl-2 col-span-1 mb-0 font-sans text-md font-semibold leading-normal uppercase dark:text-white dark:opacity-80"
|
||||
>
|
||||
{{plugins_external}}
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex items-center my-4">
|
||||
<p
|
||||
class="transition duration-300 ease-in-out font-bold mb-0 font-sans text-md leading-normal uppercase dark:text-gray-500 dark:opacity-80"
|
||||
>
|
||||
PLUGINS ERRORS
|
||||
</p>
|
||||
<p
|
||||
class="transition duration-300 ease-in-out pl-2 col-span-1 mb-0 font-sans text-md font-semibold leading-normal uppercase dark:text-white dark:opacity-80"
|
||||
>
|
||||
{{plugins_errors}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end info -->
|
||||
|
||||
|
@ -12,7 +61,7 @@ url_for(request.endpoint)[1:].split("/")[-1].strip().replace('_', '-') %}
|
|||
<div
|
||||
class="p-4 col-span-12 md:col-span-7 2xl:col-span-4 grid grid-cols-12 relative min-w-0 break-words bg-white shadow-xl dark:bg-slate-850 dark:shadow-dark-xl rounded-2xl bg-clip-border"
|
||||
>
|
||||
<h5 class="col-span-12 mb-2 font-bold dark:text-white">UPLOAD PLUGIN</h5>
|
||||
<h5 class="col-span-12 mb-4 font-bold dark:text-white">UPLOAD PLUGIN</h5>
|
||||
|
||||
<div class="p-0 col-span-12 grid">
|
||||
<form id="dropzone" class="col-span-12 dropzone max-h-16 overflow-y-auto">
|
||||
|
@ -27,54 +76,145 @@ url_for(request.endpoint)[1:].split("/")[-1].strip().replace('_', '-') %}
|
|||
Submit data and files!
|
||||
</button>
|
||||
</form>
|
||||
<div class="col-span-12 flex justify-center mt-3">
|
||||
<div
|
||||
class="col-span-12 flex flex-col sm:flex-row justify-center items-center mt-3"
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
class="dark:brightness-90 inline-block px-6 py-3 font-bold text-center text-white uppercase align-middle transition-all rounded-lg cursor-pointer bg-primary hover:bg-primary/80 focus:bg-primary/80 leading-normal text-sm ease-in tracking-tight-rem shadow-xs bg-150 bg-x-25 hover:-translate-y-px active:opacity-85 hover:shadow-md"
|
||||
>
|
||||
Upload
|
||||
</button>
|
||||
</div>
|
||||
<form
|
||||
method="post"
|
||||
class="mt-2 col-span-12 flex flex-col justify-center align-middle items-center"
|
||||
>
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||
<p class="mb-0 font-sans font-semibold leading-normal uppercase text-sm">
|
||||
<p
|
||||
class="mx-4 my-3 sm:my-0 font-sans font-semibold leading-normal uppercase text-sm"
|
||||
>
|
||||
or
|
||||
</p>
|
||||
<button
|
||||
type="submit"
|
||||
class="mt-2 dark:brightness-90 inline-block px-6 py-3 font-bold text-center text-white uppercase align-middle transition-all rounded-lg cursor-pointer bg-primary hover:bg-primary/80 focus:bg-primary/80 leading-normal text-sm ease-in tracking-tight-rem shadow-xs bg-150 bg-x-25 hover:-translate-y-px active:opacity-85 hover:shadow-md"
|
||||
<form
|
||||
method="post"
|
||||
class="col-span-12 flex flex-col justify-center align-middle items-center"
|
||||
>
|
||||
Reload plugins
|
||||
</button>
|
||||
</form>
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
class="dark:brightness-90 inline-block px-6 py-3 font-bold text-center text-white uppercase align-middle transition-all rounded-lg cursor-pointer bg-primary hover:bg-primary/80 focus:bg-primary/80 leading-normal text-sm ease-in tracking-tight-rem shadow-xs bg-150 bg-x-25 hover:-translate-y-px active:opacity-85 hover:shadow-md"
|
||||
>
|
||||
Reload
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end upload layout -->
|
||||
|
||||
<!-- filter -->
|
||||
<div
|
||||
class="p-4 col-span-12 2xl:col-span-4 grid grid-cols-12 relative min-w-0 break-words bg-white shadow-xl dark:bg-slate-850 dark:shadow-dark-xl rounded-2xl bg-clip-border"
|
||||
{{current_endpoint}}-filter
|
||||
class="p-4 col-span-12 2xl:col-span-4 relative min-w-0 break-words bg-white shadow-xl dark:bg-slate-850 dark:shadow-dark-xl rounded-2xl bg-clip-border"
|
||||
>
|
||||
<h5 class="col-span-12 mb-2 font-bold dark:text-white">FILTER</h5>
|
||||
<h5 class="mb-2 font-bold dark:text-white">FILTER</h5>
|
||||
<div class="grid grid-cols-12 gap-x-4 gap-y-2">
|
||||
<!-- search inpt-->
|
||||
<div class="flex flex-col relative col-span-12">
|
||||
<h5
|
||||
class="my-1 transition duration-300 ease-in-out dark:opacity-90 text-sm sm:text-md font-bold m-0 dark:text-gray-300"
|
||||
>
|
||||
Search
|
||||
</h5>
|
||||
<input
|
||||
type="text"
|
||||
id="keyword"
|
||||
name="keyword"
|
||||
class="col-span-12 dark:border-slate-600 dark:bg-slate-700 dark:text-gray-300 disabled:opacity-75 focus:valid:border-green-500 focus:invalid:border-red-500 outline-none focus:border-primary 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-3 py-1 font-normal text-gray-700 transition-all placeholder:text-gray-500"
|
||||
placeholder="key words"
|
||||
pattern="(.*?)"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<!-- end search inpt-->
|
||||
<!-- select types -->
|
||||
<div class="flex flex-col relative col-span-12">
|
||||
<h5
|
||||
class="my-1 transition duration-300 ease-in-out dark:opacity-90 text-sm sm:text-md font-bold m-0 dark:text-gray-300"
|
||||
>
|
||||
Select types
|
||||
</h5>
|
||||
<button
|
||||
{{current_endpoint}}-setting-select="types"
|
||||
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-green-500 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 font-normal text-gray-700 transition-all placeholder:text-gray-500"
|
||||
>
|
||||
<span
|
||||
id="types"
|
||||
name="types"
|
||||
{{current_endpoint}}-setting-select-text="types"
|
||||
>all</span
|
||||
>
|
||||
<!-- chevron -->
|
||||
<svg
|
||||
{{current_endpoint}}-setting-select="types"
|
||||
class="transition-transform h-4 w-4 fill-gray-500"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 512 512"
|
||||
>
|
||||
<path
|
||||
d="M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"
|
||||
/>
|
||||
</svg>
|
||||
</button>
|
||||
<!-- end chevron -->
|
||||
<!-- dropdown-->
|
||||
<div
|
||||
{{current_endpoint}}-setting-select-dropdown="types"
|
||||
class="hidden z-100 absolute h-full flex-col w-full translate-y-12"
|
||||
>
|
||||
<button
|
||||
{{current_endpoint}}-setting-select-dropdown-btn="types"
|
||||
type="button"
|
||||
value="all"
|
||||
class="border-t rounded-t border-b border-l border-r border-gray-300 dark:hover:brightness-90 hover:brightness-90 my-0 relative py-2 px-3 text-left 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 dark:bg-primary bg-primary text-gray-300"
|
||||
>
|
||||
all
|
||||
</button>
|
||||
<button
|
||||
{{current_endpoint}}-setting-select-dropdown-btn="types"
|
||||
type="button"
|
||||
value="internal"
|
||||
class="border-b border-l border-r border-gray-300 dark:hover:brightness-90 hover:brightness-90 bg-white text-gray-700 my-0 relative py-2 px-3 text-left 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"
|
||||
>
|
||||
internal
|
||||
</button>
|
||||
<button
|
||||
{{current_endpoint}}-setting-select-dropdown-btn="types"
|
||||
type="button"
|
||||
value="external"
|
||||
class="border-b border-l border-r border-gray-300 dark:hover:brightness-90 hover:brightness-90 bg-white text-gray-700 my-0 relative py-2 px-3 text-left 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"
|
||||
>
|
||||
external
|
||||
</button>
|
||||
</div>
|
||||
<!-- end dropdown-->
|
||||
</div>
|
||||
<!-- end select types -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end filter -->
|
||||
|
||||
<div
|
||||
class="min-h-50-screen max-h-100 p-4 col-span-12 relative min-w-0 break-words bg-white shadow-xl dark:bg-slate-850 dark:shadow-dark-xl rounded-2xl bg-clip-border"
|
||||
class="min-h-[55vh] max-h-80 overflow-hidden overflow-y-auto p-4 col-span-12 relative min-w-0 break-words bg-white shadow-xl dark:bg-slate-850 dark:shadow-dark-xl rounded-2xl bg-clip-border"
|
||||
>
|
||||
<h5 class="col-mb-2 font-bold dark:text-white">LIST</h5>
|
||||
|
||||
<div class="grid grid-cols-12 gap-3">
|
||||
<div {{current_endpoint}}-list class="grid grid-cols-12 gap-3">
|
||||
{% for plugin in plugins %} {% if plugin['page'] %}
|
||||
<a
|
||||
{{current_endpoint}}-external="{{plugin['external']}}"
|
||||
{{current_endpoint}}-external="{% if plugin['external'] %} external {%else%} internal {%endif%}"
|
||||
href="/plugins?{{plugin['id']}}"
|
||||
class="py-3 cursor-pointer min-h-12 relative col-span-12 sm:col-span-6 md:col-span-4 lg:col-span-3 3xl:col-span-2 p-1 flex justify-between items-center transition rounded bg-gray-100 hover:bg-gray-300 dark:bg-slate-700 dark:hover:bg-slate-800"
|
||||
>
|
||||
<p
|
||||
{{current_endpoint}}-content
|
||||
class="ml-3 mb-0 transition duration-300 ease-in-out dark:opacity-90 text-center text-sm md:text-base text-slate-700 dark:text-gray-300"
|
||||
>
|
||||
{{plugin['name']}}
|
||||
|
@ -91,10 +231,11 @@ url_for(request.endpoint)[1:].split("/")[-1].strip().replace('_', '-') %}
|
|||
</a>
|
||||
{% else %}
|
||||
<div
|
||||
{{current_endpoint}}-external="{{plugin['external']}}"
|
||||
{{current_endpoint}}-external="{% if plugin['external'] %} external {%else%} internal {%endif%}"
|
||||
class="py-3 cursor-pointer min-h-12 relative col-span-12 sm:col-span-6 md:col-span-4 lg:col-span-3 3xl:col-span-2 p-1 flex justify-start items-center transition rounded bg-gray-100 hover:bg-gray-300 dark:bg-slate-700 dark:hover:bg-slate-800"
|
||||
>
|
||||
<p
|
||||
{{current_endpoint}}-content
|
||||
class="ml-3 mb-0 transition duration-300 ease-in-out dark:opacity-90 text-center text-sm md:text-base text-slate-700 dark:text-gray-300"
|
||||
>
|
||||
{{plugin['name']}}
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
<!-- end title and info -->
|
||||
<!-- input -->
|
||||
{% if value["type"] != "select" and value["type"] != "check" %}
|
||||
<input default-value="{{value['default']}}" {% if global_config[setting]['method'] != 'ui' and global_config[setting]['method'] != 'default' %} disabled {% endif %} id="{{setting}}"
|
||||
<input default-value="{{value['default']}}" {% if global_config[setting]['method'] != 'ui' and global_config[setting]['method'] != 'default' %} disabled {% endif %} id="{{setting}}" name="{{setting}}"
|
||||
class="duration-300 ease-in-out dark:opacity-90 dark:border-slate-600 dark:bg-slate-700 dark:text-gray-300 disabled:opacity-75 focus:valid:border-green-500 focus:invalid:border-red-500 outline-none focus:border-primary 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"
|
||||
value="{% if global_config[setting]['value'] %} {{global_config[setting]['value']}} {% else %} {{value['default']}} {% endif %}" type="{{value['type']}}" pattern="{{value['regex']|safe}}" />
|
||||
{% endif %}
|
||||
|
@ -57,7 +57,7 @@
|
|||
<!-- select -->
|
||||
{% if value["type"] == "select" %}
|
||||
<!-- default hidden-->
|
||||
<select id="{{setting}}" {{current_endpoint}}-setting-select-default="{{value['id']}}" type="form-select" id="{{setting}}"
|
||||
<select id="{{setting}}" name="{{setting}}" {{current_endpoint}}-setting-select-default="{{value['id']}}" type="form-select" id="{{setting}}" name="{{setting}}"
|
||||
class="hidden">
|
||||
{% for item in value['select'] %}
|
||||
<option value="{{item}}" {% if global_config[setting]['value'] and global_config[setting]['value'] == item or not global_config[setting]['value'] and value['default'] == item %} selected{% endif %}>{{item}}</option>
|
||||
|
@ -138,7 +138,7 @@
|
|||
<!-- checkbox -->
|
||||
{% if value["type"] == "check" %}
|
||||
<div checkbox-handler="{{value['id']}}" class="relative mb-7 md:mb-0">
|
||||
<input id="{{setting}}"
|
||||
<input id="{{setting}}" name="{{setting}}"
|
||||
default-method="{{global_config[setting]['method']}}" default-value="{{value['default']}}"
|
||||
{% if global_config[setting]['method'] != 'ui' or global_config[setting]['method'] != 'default' %} disabled {% endif %}
|
||||
{% if global_config[setting]['value'] and global_config[setting]['value'] == 'yes' or not global_config[setting]['value'] and value['default'] == 'yes' %} checked {% endif %} id="checkbox-{{value['id']}}"
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
{% if value["type"] != "select" and value["type"] != "check" %}
|
||||
<input
|
||||
default-value="{{global_config[setting]['value']}}" default-method="{{global_config[setting]['method']}}"
|
||||
{% if global_config[setting]['method'] != 'ui' and global_config[setting]['method'] != 'default' %} disabled {% endif %} id="{{setting}}"
|
||||
{% if global_config[setting]['method'] != 'ui' and global_config[setting]['method'] != 'default' %} disabled {% endif %} id="{{setting}}" name="{{setting}}"
|
||||
class="duration-300 ease-in-out dark:opacity-90 dark:border-slate-600 dark:bg-slate-700 dark:text-gray-300 disabled:opacity-75 focus:valid:border-green-500 focus:invalid:border-red-500 outline-none focus:border-primary 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"
|
||||
value="{% if global_config[setting]['value'] %} {{global_config[setting]['value']}} {% else %} {{value['default']}} {% endif %}" type="{{value['type']}}" pattern="{{value['regex']|safe}}" />
|
||||
{% endif %}
|
||||
|
@ -62,7 +62,7 @@
|
|||
{% if value["type"] == "select" %}
|
||||
<!-- default hidden-->
|
||||
<select default-method="{{global_config[setting]['method']}}" default-value="{{value['default']}}"
|
||||
id="{{setting}}" {{current_endpoint}}-setting-select-default="{{value['id']}}" type="form-select" id="{{setting}}"
|
||||
id="{{setting}}" name="{{setting}}" {{current_endpoint}}-setting-select-default="{{value['id']}}" type="form-select" id="{{setting}}" name="{{setting}}"
|
||||
class="hidden">
|
||||
{% for item in value['select'] %}
|
||||
<option value="{{item}}" {% if global_config[setting]['value'] and global_config[setting]['value'] == item or not global_config[setting]['value'] and value['default'] == item %} selected{% endif %}>{{item}}</option>
|
||||
|
@ -124,7 +124,7 @@
|
|||
<!-- checkbox -->
|
||||
{% if value["type"] == "check" %}
|
||||
<div checkbox-handler="{{value['id']}}" class="relative mb-7 md:mb-0">
|
||||
<input id="{{setting}}"
|
||||
<input id="{{setting}}" name="{{setting}}"
|
||||
default-method="{{global_config[setting]['method']}}" default-value="{{global_config[setting]['value']}}"
|
||||
{% if global_config[setting]['method'] != 'ui' or global_config[setting]['method'] != 'default' %} disabled {% endif %}
|
||||
{% if global_config[setting]['value'] and global_config[setting]['value'] == 'yes' or not global_config[setting]['value'] and value['default'] == 'yes' %} checked {% endif %} id="checkbox-{{value['id']}}"
|
||||
|
|
Loading…
Reference in New Issue