Package Anidev Skill and standalone API panel integration
This commit is contained in:
1 parent
8e4e8e6ef0
commit
61b05abe44
43 files changed
+1859
-57
No files matched your search
+6
-19
@@ -4,6 +4,7 @@ import {
|
||||
environmentOptions,
|
||||
} from "../components/search-select.js";
|
||||
import { createNotifier } from "../components/toast.js";
|
||||
import { mountCopyField } from "../components/copy-field.js";
|
||||
import { sshScreen, mountSsh } from "../components/ssh-console.js";
|
||||
import { logsScreen, mountLogs } from "../components/log-reader.js";
|
||||
import { iconSvg } from "../icons/icons.js";
|
||||
@@ -430,6 +431,11 @@ function render({ preserveDock = false } = {}) {
|
||||
bindDockHover();
|
||||
if (dockWasOpen) setDockOpen(true, false);
|
||||
bindCharts();
|
||||
document
|
||||
.querySelectorAll(".copy-input")
|
||||
.forEach((root) =>
|
||||
selectCleanups.push(mountCopyField(root, { notify: toast, t })),
|
||||
);
|
||||
document
|
||||
.querySelectorAll("[data-search-select]")
|
||||
.forEach((root) =>
|
||||
@@ -916,25 +922,6 @@ function contextMenu(x, y) {
|
||||
}
|
||||
document.addEventListener("click", async (e) => {
|
||||
if (await accountUI.handleClick(e)) return;
|
||||
const copyButton = e.target.closest("[data-copy-input]");
|
||||
if (copyButton) {
|
||||
const field = copyButton.closest(".copy-input").querySelector("input");
|
||||
try {
|
||||
await navigator.clipboard.writeText(field.value);
|
||||
toast(t("Значение поля скопировано.", "Field value copied."), {
|
||||
type: "success",
|
||||
});
|
||||
} catch {
|
||||
toast(
|
||||
t(
|
||||
"Не удалось скопировать значение.",
|
||||
"Could not copy the field value.",
|
||||
),
|
||||
{ type: "error" },
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
const pageButton = e.target.closest("[data-page]");
|
||||
if (pageButton) {
|
||||
const fromDock = Boolean(pageButton.closest(".navigation"));
|
||||
|
||||
Reference in new issue
Block a user