Fix xray panel
This commit is contained in:
@@ -210,12 +210,29 @@ function renderWzInbounds() {
|
||||
});
|
||||
}
|
||||
|
||||
function wzToggleAddInbound() {
|
||||
function mountWzInboundEditor() {
|
||||
const form = document.getElementById("wzAddInboundForm");
|
||||
const anchor = document.getElementById("wzInboundEditorAnchor");
|
||||
if (form && anchor && form.previousElementSibling !== anchor) {
|
||||
anchor.insertAdjacentElement("afterend", form);
|
||||
}
|
||||
return form;
|
||||
}
|
||||
|
||||
function openWzInboundEditor(scrollBlock = "nearest") {
|
||||
const form = mountWzInboundEditor();
|
||||
if (!form) return null;
|
||||
form.classList.remove("hidden");
|
||||
requestAnimationFrame(() => form.scrollIntoView({ behavior:"smooth", block:scrollBlock }));
|
||||
return form;
|
||||
}
|
||||
|
||||
function wzToggleAddInbound() {
|
||||
const form = mountWzInboundEditor();
|
||||
if (!form) return;
|
||||
if (!form.classList.contains("hidden") && wzEditingIndex < 0) return wzCancelInbound();
|
||||
resetWzInboundForm();
|
||||
form.classList.remove("hidden");
|
||||
form.scrollIntoView({ behavior:"smooth", block:"nearest" });
|
||||
openWzInboundEditor("nearest");
|
||||
}
|
||||
|
||||
function setWzValue(id, value) {
|
||||
@@ -306,9 +323,7 @@ function editWzInbound(index) {
|
||||
document.getElementById("wzInboundFormKicker").textContent = "Editar inbound existente";
|
||||
document.getElementById("wzSaveInboundBtn").textContent = "Salvar alterações";
|
||||
document.getElementById("wzEditingBadge").classList.remove("hidden");
|
||||
const form = document.getElementById("wzAddInboundForm");
|
||||
form.classList.remove("hidden");
|
||||
form.scrollIntoView({ behavior:"smooth", block:"start" });
|
||||
openWzInboundEditor("start");
|
||||
}
|
||||
|
||||
function duplicateWzInbound(index) {
|
||||
|
||||
+4
-1
@@ -502,6 +502,9 @@
|
||||
<span id="wzAzionDefaultStatus" class="hint">O padrão cria o certificado autoassinado, habilita TLS e salva/reinicia o Xray automaticamente.</span>
|
||||
</section>
|
||||
|
||||
<!-- The shared add/edit editor is mounted here when opened. -->
|
||||
<div id="wzInboundEditorAnchor"></div>
|
||||
|
||||
<aside class="legacy-xhttp-migration" aria-label="Migração de configuração XHTTP antiga">
|
||||
<span class="legacy-xhttp-icon" aria-hidden="true">SSH+</span>
|
||||
<div>
|
||||
@@ -1581,7 +1584,7 @@
|
||||
<script defer src="assets/js/06-servers.js?v=20260714pamfix1"></script>
|
||||
<script defer src="assets/js/07-stats-logs.js?v=20260714pamfix1"></script>
|
||||
<script defer src="assets/js/08-server-config.js?v=20260724xrayinboundsr3"></script>
|
||||
<script defer src="assets/js/09-xray-wizard.js?v=20260724xrayinboundsr3"></script>
|
||||
<script defer src="assets/js/09-xray-wizard.js?v=20260724xrayinboundsr4"></script>
|
||||
<script defer src="assets/js/11-update-status.js?v=20260714pamfix1"></script>
|
||||
<script defer src="assets/js/12-bot.js?v=20260714pamfix1"></script>
|
||||
<script defer src="assets/js/10-boot.js?v=20260714pamfix1"></script>
|
||||
|
||||
Reference in New Issue
Block a user