changes
=> plugin modal display fix => add entity card service => remove rename form
This commit is contained in:
parent
5263be27d5
commit
016a8cd6d7
|
@ -903,6 +903,11 @@ h6 {
|
|||
margin-right: auto;
|
||||
}
|
||||
|
||||
.my-3 {
|
||||
margin-top: 0.75rem;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
.mx-6 {
|
||||
margin-left: 1.5rem;
|
||||
margin-right: 1.5rem;
|
||||
|
@ -933,11 +938,6 @@ h6 {
|
|||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.my-3 {
|
||||
margin-top: 0.75rem;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
.mx-2\.5 {
|
||||
margin-left: 0.625rem;
|
||||
margin-right: 0.625rem;
|
||||
|
@ -1334,10 +1334,6 @@ h6 {
|
|||
min-width: 900px;
|
||||
}
|
||||
|
||||
.min-w-\[400px\] {
|
||||
min-width: 400px;
|
||||
}
|
||||
|
||||
.min-w-\[500px\] {
|
||||
min-width: 500px;
|
||||
}
|
||||
|
@ -1370,6 +1366,10 @@ h6 {
|
|||
max-width: 100%;
|
||||
}
|
||||
|
||||
.max-w-\[350px\] {
|
||||
max-width: 350px;
|
||||
}
|
||||
|
||||
.max-w-screen-sm {
|
||||
max-width: 576px;
|
||||
}
|
||||
|
@ -1378,10 +1378,6 @@ h6 {
|
|||
max-width: 32rem;
|
||||
}
|
||||
|
||||
.max-w-\[350px\] {
|
||||
max-width: 350px;
|
||||
}
|
||||
|
||||
.flex-auto {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
@ -2408,6 +2404,11 @@ h6 {
|
|||
color: rgb(5 17 57 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.text-gray-600 {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(108 117 125 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.antialiased {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
|
|
@ -320,9 +320,17 @@ class Download {
|
|||
}
|
||||
|
||||
async sendFileToDL(jobName, fileName) {
|
||||
window.open(
|
||||
`${location.href}/download?job_name=${jobName}&file_name=${fileName}`
|
||||
const response = await fetch(
|
||||
`${location.href}/jobs/download?job_name=${jobName}&file_name=${fileName}`
|
||||
);
|
||||
|
||||
if (response.status === 200) {
|
||||
const res = await response.json();
|
||||
//last update
|
||||
return;
|
||||
} else {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@ class ServiceModal {
|
|||
//modal forms
|
||||
this.formNewEdit = this.modal.querySelector("[services-modal-form]");
|
||||
this.formDelete = this.modal.querySelector("[services-modal-form-delete]");
|
||||
this.formRename = this.modal.querySelector("[services-modal-form-rename]");
|
||||
//container
|
||||
this.container = document.querySelector("main");
|
||||
//general inputs
|
||||
|
@ -56,7 +55,6 @@ class ServiceModal {
|
|||
let form;
|
||||
if (action === "edit" || action === "new") form = this.formNewEdit;
|
||||
if (action === "delete") form = this.formDelete;
|
||||
if (action === "rename") form = this.formRename;
|
||||
this.setForm(action, serviceName, form);
|
||||
//reset settings value
|
||||
if (action === "edit" || action === "new") this.setDefaultValue();
|
||||
|
@ -160,16 +158,6 @@ class ServiceModal {
|
|||
.setAttribute("value", serviceName);
|
||||
}
|
||||
|
||||
if (action === "rename") {
|
||||
this.showRenameForm();
|
||||
formEl
|
||||
.querySelector(`input[name="OLD_SERVER_NAME"]`)
|
||||
.setAttribute("value", serviceName);
|
||||
formEl
|
||||
.querySelector(`input[name="SERVER_NAME"]`)
|
||||
.setAttribute("value", serviceName);
|
||||
}
|
||||
|
||||
if (action === "delete") {
|
||||
this.showDeleteForm();
|
||||
formEl.setAttribute("id", `form-${action}-${serviceName}`);
|
||||
|
@ -197,13 +185,6 @@ class ServiceModal {
|
|||
this.formDelete.classList.remove("hidden");
|
||||
}
|
||||
|
||||
showRenameForm() {
|
||||
this.cardNoViewport();
|
||||
this.hideTabs();
|
||||
this.hideForms();
|
||||
this.formRename.classList.remove("hidden");
|
||||
}
|
||||
|
||||
cardViewport() {
|
||||
this.modalCard.classList.add("h-[90vh]");
|
||||
this.modalCard.classList.add("w-full");
|
||||
|
@ -217,7 +198,6 @@ class ServiceModal {
|
|||
hideForms() {
|
||||
this.formNewEdit.classList.add("hidden");
|
||||
this.formDelete.classList.add("hidden");
|
||||
this.formRename.classList.add("hidden");
|
||||
}
|
||||
|
||||
hideTabs() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!-- modal -->
|
||||
<div
|
||||
plugins-modal
|
||||
class="dark:brightness-110 w-screen h-screen fixed bg-gray-600/50 z-[1001] top-0 left-0 flex justify-center items-center"
|
||||
class="dark:brightness-110 w-screen h-screen fixed bg-gray-600/50 z-[1001] top-0 left-0 hidden justify-center items-center"
|
||||
>
|
||||
<div
|
||||
plugins-modal-card
|
||||
|
|
|
@ -119,48 +119,6 @@
|
|||
<!-- end action button-->
|
||||
</form>
|
||||
<!-- end delete form-->
|
||||
<!-- rename form-->
|
||||
<form
|
||||
services-modal-form-rename
|
||||
class="w-full h-full flex flex-col justify-between"
|
||||
id="form-rename-server_name"
|
||||
method="POST"
|
||||
>
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||
<input type="hidden" value="OLD_SERVER_NAME" name="OLD_SERVER_NAME" />
|
||||
<input type="hidden" value="rename" name="operation" />
|
||||
<div
|
||||
class="my-2 flex flex-row justify-center align-middle items-center"
|
||||
{{current_endpoint}}-modal-path
|
||||
>
|
||||
<input
|
||||
type="text"
|
||||
name="SERVER_NAME"
|
||||
id="SERVER_NAME"
|
||||
class="dark:border-slate-600 dark:bg-slate-700 dark:text-gray-300 sm:ml-1 max-w-[350px] disabled:opacity-75 focus:valid:border-green-500 focus:file: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 font-normal text-gray-700 transition-all placeholder:text-gray-500"
|
||||
placeholder="path"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<!-- action button -->
|
||||
<div class="w-full justify-center flex mt-10">
|
||||
<button
|
||||
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-red-500 hover:bg-red-500/80 focus:bg-red-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
|
||||
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-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"
|
||||
>
|
||||
Rename
|
||||
</button>
|
||||
</div>
|
||||
<!-- end action button-->
|
||||
</form>
|
||||
<!-- end rename form-->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end modal -->
|
||||
|
|
|
@ -34,6 +34,9 @@
|
|||
<h5 class="transition duration-300 ease-in-out dark:opacity-90 text-center sm:text-left mb-1 font-bold dark:text-white">
|
||||
{{ service["SERVER_NAME"]['value'] }}
|
||||
</h5>
|
||||
<h6 class="mb-2 font-semibold text-gray-600 dark:text-white">{{ service["SERVER_NAME"]['method'] }}</h5>
|
||||
|
||||
|
||||
|
||||
<!-- detail list -->
|
||||
<div
|
||||
|
@ -333,23 +336,7 @@
|
|||
</svg>
|
||||
</a>
|
||||
|
||||
<button
|
||||
services-action="rename"
|
||||
type="button"
|
||||
services-name="{{service["SERVER_NAME"]['value']}}"
|
||||
|
||||
class="dark:brightness-90 z-20 mx-1 bg-yellow-500 hover:bg-yellow-500/80 focus:bg-yellow-500/80 inline-block p-3 font-bold text-center text-white uppercase align-middle transition-all rounded-lg cursor-pointer leading-normal text-xs ease-in tracking-tight-rem shadow-xs bg-150 bg-x-25 hover:-translate-y-px active:opacity-85 hover:shadow-md"
|
||||
>
|
||||
<svg
|
||||
class="h-6 w-6 fill-white"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 512 512"
|
||||
>
|
||||
<path
|
||||
d="M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.8 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160V416c0 53 43 96 96 96H352c53 0 96-43 96-96V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H96z"
|
||||
/>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<button
|
||||
services-action="edit"
|
||||
type="button"
|
||||
|
|
Loading…
Reference in New Issue