diff --git a/public/assets/boot/ctrl_boot_frontoffice.js b/public/assets/boot/ctrl_boot_frontoffice.js index 8ca2b088..fa60bf05 100644 --- a/public/assets/boot/ctrl_boot_frontoffice.js +++ b/public/assets/boot/ctrl_boot_frontoffice.js @@ -1,10 +1,8 @@ import rxjs, { ajax } from "../lib/rx.js"; -import { loadJS } from "../helpers/loader.js"; // import { setup_cache } from "../helpers/cache.js"; -import { init as setup_loader } from "../helpers/loader.js"; +import { init as setup_loader, loadJS } from "../helpers/loader.js"; import { report } from "../helpers/log.js"; - export default async function main() { try { await Promise.all([ // procedure with no outside dependencies diff --git a/public/assets/components/breadcrumb.js b/public/assets/components/breadcrumb.js index 98997af6..369e7e18 100644 --- a/public/assets/components/breadcrumb.js +++ b/public/assets/components/breadcrumb.js @@ -1,8 +1,7 @@ -import { animate, slideYOut, slideYIn, slideXIn, opacityOut } from "../lib/animate.js"; +import { animate, slideYOut, slideYIn, opacityOut } from "../lib/animate.js"; import { loadCSS } from "../helpers/loader.js"; class ComponentBreadcrumb extends window.HTMLDivElement { - constructor() { super(); if (new window.URL(location.href).searchParams.get("nav") === "false") { @@ -30,12 +29,12 @@ class ComponentBreadcrumb extends window.HTMLDivElement { switch (name) { case "path": - if (newValue == "") return; + if (newValue === "") return; return this.renderPath({ path: newValue, previous: oldValue || null }); case "indicator": - return this.renderIndicator() + return this.renderIndicator(); } - throw new Error("component::breadcrumb.js unknow attribute name: "+ name) + throw new Error("component::breadcrumb.js unknow attribute name: "+ name); } static get observedAttributes() { @@ -45,7 +44,7 @@ class ComponentBreadcrumb extends window.HTMLDivElement { async renderPath({ path = "", previous }) { path = this.__normalised(path); previous = this.__normalised(previous); - let pathChunks = path.split("/"); + const pathChunks = path.split("/"); // STEP1: leaving animation on elements that will be removed if (previous !== null && previous.indexOf(path) >= 0) { @@ -97,7 +96,7 @@ class ComponentBreadcrumb extends window.HTMLDivElement { ${limitSize(label, true)} `; - return `
${limitSize(label)}
` + return `
${limitSize(label)}
`; })(); return ` @@ -133,17 +132,21 @@ class ComponentBreadcrumb extends window.HTMLDivElement { if (state && this.getAttribute("indicator") !== "false") state = true; const $indicator = this.querySelector(`[data-bind="path"]`) - .lastChild - .querySelector("span"); + .lastChild + .querySelector("span"); if (state) { $indicator.style.opacity = 1; $indicator.innerHTML = `
*
`; - await animate($indicator, { time: 500, keyframes: [ - { transform: "scale(0)", offset: 0 }, - { transform: "scale(1.5)", offset: 0.3 }, - { transform: "scale(1)", offset: 1 }, - ], fill: "none"}); + await animate($indicator, { + time: 500, + keyframes: [ + { transform: "scale(0)", offset: 0 }, + { transform: "scale(1.5)", offset: 0.3 }, + { transform: "scale(1)", offset: 1 }, + ], + fill: "none" + }); } else { $indicator.style.opacity = 0; await animate($indicator, { time: 200, keyframes: opacityOut(), fill: "none" }); diff --git a/public/assets/components/decorator_shell_filemanager.js b/public/assets/components/decorator_shell_filemanager.js index e264923a..bd65f972 100644 --- a/public/assets/components/decorator_shell_filemanager.js +++ b/public/assets/components/decorator_shell_filemanager.js @@ -29,13 +29,13 @@ export default function(ctrl) { ctrl(createRender($main)); ctrlSidebar(createRender(qs($page, `[data-bind="sidebar"]`))); - onDestroy(async () => { + onDestroy(async() => { if ((history.state.previous || "").startsWith("/view/") && location.pathname.startsWith("/files/")) { await animate($main, { time: 100, keyframes: slideYOut(20), fill: "none" }); $main.classList.add("hidden"); } }); - } + }; } async function ctrlSidebar(render) { diff --git a/public/assets/components/dropdown.js b/public/assets/components/dropdown.js index 8a8ad836..5e384987 100644 --- a/public/assets/components/dropdown.js +++ b/public/assets/components/dropdown.js @@ -15,7 +15,7 @@ export default class ComponentDropdown extends HTMLDivElement { } render() { - this.classList.add("component_dropdown", "view", "sort") + this.classList.add("component_dropdown", "view", "sort"); this.appendChild(createFragment(`