magpie
magpie copied to clipboard
gui: residual horizontal borders rendered under Share on local network when off
magpie version
v0.1.3853
Where
GUI
OS
Windows 11
Steps to reproduce
- Open Magpie GUI, navigate to Settings → Network and sharing (设置 → 网络与共享).
- Under Local network (局域网), turn Share on local network (局域网共享) On (开启) to see the child cards (Address, Join password, Allowed addresses, Require client certificates, HTTPS).
- Switch Share on local network back to Off (关闭).
- Inspect the area immediately below the "Share on local network" toggle card.
What happened, and what you expected
What happened: Multiple residual horizontal border lines (around 4-5 lines) remain tightly stacked immediately underneath the "Share on local network" toggle card.
| Share on local network: On (开启) | Share on local network: Off (关闭,出现残余线条) |
|---|---|
![]() |
![]() |
Expected: When LAN sharing is turned off, all dependent rows and empty card containers should be completely hidden, leaving no residual borders or lines.
Error text or logs
Root cause analysis:
- In
internal/gui/assets/app.css,.listhas a border:.list { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; flex: none; } - When LAN sharing is toggled off (
!s.lan), the subsequent sub-sections (e.g.#allowList, client certificates, HTTPS list containers) are emptied (e.g. viabox.replaceChildren()), but the empty.listcontainers remain in the DOM withouthiddenordisplay: none. - Because there is no
.list:empty { display: none; }rule, each 0-height empty.listcontainer still paints its top and bottom borders, collapsing into multiple horizontal lines.
Suggested fix:
Either add a CSS rule in app.css to collapse/hide empty lists:
.list:empty {
display: none;
}
Or set the hidden attribute on the empty list container elements when !s.lan.
Fixed in commit \

