bar: hide tray when no items

This commit is contained in:
2 * r + 2 * t 2025-01-29 15:44:51 +11:00
parent 6fd9336522
commit 5823a43aaf

View file

@ -220,7 +220,11 @@ const TrayItem = (item: AstalTray.TrayItem) => {
);
};
const Tray = () => <box className="module tray">{bind(AstalTray.get_default(), "items").as(i => i.map(TrayItem))}</box>;
const Tray = () => (
<box className="module tray" visible={bind(AstalTray.get_default(), "items").as(i => i.length > 0)}>
{bind(AstalTray.get_default(), "items").as(i => i.map(TrayItem))}
</box>
);
const Network = () => (
<button