🌴 Sync 2026-10-12 12:02:15

This commit is contained in:
github-actions[bot] committed 2026-10-12 12:02:15 +08:00
1 parent 1b64546588
commit 887e5ac8e3
261 files changed
+52646 -35012

No files matched your search

@@ -401,11 +401,12 @@ function networksPanel(section) {
}, [ _('Delete') ]);
var members = E('div', { 'style': 'margin-top:6px; padding-left:12px;' });
var mToggle = E('button', { 'class': 'cbi-button' }, [ _('Members') ]);
mToggle.addEventListener('click', function() {
function toggleMembers() {
if (members.firstChild) { while (members.firstChild) members.removeChild(members.firstChild); return; }
loadMembers(nw.nwid, members);
});
}
var mToggle = E('button', { 'class': 'cbi-button' }, [ _('Members') ]);
mToggle.addEventListener('click', toggleMembers);
var cfg = E('div', { 'style': 'margin-top:8px; padding-left:12px;' }, [
E('div', { 'style': 'display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:6px;' }, [
@@ -450,7 +451,9 @@ function networksPanel(section) {
* character. Fixed layout honours the column widths below. */
'style': 'table-layout:fixed; width:100%;'
}, [ E('tr', {}, [
E('td', { 'style': 'width:170px; font-family:monospace; white-space:nowrap;' }, [ nw.nwid ]),
E('td', { 'style': 'width:170px; font-family:monospace; white-space:nowrap;' }, [
E('a', { 'href': '#', 'title': _('Members'), 'click': function(ev) { ev.preventDefault(); toggleMembers(); } }, [ nw.nwid ])
]),
E('td', { 'style': 'width:auto;' }, [ nameWrap ]),
E('td', { 'style': 'width:90px; text-align:center; white-space:nowrap;' }, [ bcast ]),
E('td', { 'style': 'width:280px; text-align:right;' }, [
@@ -1151,14 +1154,16 @@ return view.extend({
var isOpen = detail.style.display === 'block';
detail.style.display = isOpen ? 'none' : 'block';
toggle.textContent = isOpen ? _('Manage') : _('Hide');
if (!isOpen && !detail.firstChild) {
detail.appendChild(E('h4', {}, [_('Diagnostics')]));
detail.appendChild(diagnostics(h.section, h));
detail.appendChild(E('h4', {}, [_('Networks')]));
detail.appendChild(networksPanel(h.section));
detail.appendChild(E('h4', {}, [_('Moon')]));
detail.appendChild(moonPanel(h.section));
}
if (!isOpen && !detail.firstChild) {
/* Member viewing is the daily task on a configured
* network; diagnostics come last. */
detail.appendChild(E('h4', {}, [_('Networks')]));
detail.appendChild(networksPanel(h.section));
detail.appendChild(E('h4', {}, [_('Moon')]));
detail.appendChild(moonPanel(h.section));
detail.appendChild(E('h4', {}, [_('Diagnostics')]));
detail.appendChild(diagnostics(h.section, h));
}
});
var edit = E('button', { 'class': 'cbi-button' }, [ _('Edit') ]);
@@ -1197,6 +1202,13 @@ return view.extend({
return E('div', { 'class': 'cbi-map' }, [
E('h2', {}, [ _('ZeroTier'), ' - ', _('Remote Controller') ]),
E('div', { 'class': 'cbi-section' }, [
E('h3', {}, [_('Configured hosts')]),
listBox,
E('div', { 'style': 'margin-top:10px;' }, [ addBtn ])
]),
/* Explanatory text, not daily tooling: it sits at the bottom so the
* working parts of the page come first. */
E('div', { 'class': 'cbi-section' }, [
E('h3', {}, [_('How remote management works')]),
E('div', { 'style': 'margin-bottom:8px;' }, [
@@ -1209,12 +1221,7 @@ return view.extend({
'style': 'border-left:3px solid #888; padding:6px 10px; opacity:0.85; font-size:13px;'
}, [
_('Requirements: a fixed public IP · SSH access · a keypair whose public key is in the remote authorized_keys · passwordless sudo · ZeroTier built with the controller (1.14.2, or a 1.16 nonfree build)')
])
]),
E('div', { 'class': 'cbi-section' }, [
E('h3', {}, [_('Configured hosts')]),
listBox,
E('div', { 'style': 'margin-top:10px;' }, [ addBtn ])
])
])
]);
}