This commit is contained in:
Martino Ferrari
2026-04-25 23:10:51 +02:00
parent 986f6cd6d8
commit 91b42027c9
6 changed files with 525 additions and 136 deletions
+7 -2
View File
@@ -4,6 +4,7 @@ import type { Widget, Interface } from './lib/types';
interface Props {
selected: Widget | null;
multiCount: number; // >0 when multiple widgets are selected
iface: Interface;
onChange: (updated: Widget) => void;
onIfaceChange: (updated: Interface) => void;
@@ -30,7 +31,7 @@ function TextInput({ value, onCommit }: { value: string; onCommit: (v: string) =
);
}
export default function PropertiesPane({ selected, iface, onChange, onIfaceChange }: Props) {
export default function PropertiesPane({ selected, multiCount, iface, onChange, onIfaceChange }: Props) {
const [collapsed, setCollapsed] = useState(false);
function setOpt(key: string, value: string) {
@@ -189,7 +190,11 @@ export default function PropertiesPane({ selected, iface, onChange, onIfaceChang
</div>
)}
{!selected && (
{!selected && multiCount > 1 && (
<p class="hint" style="padding:0.75rem;">{multiCount} widgets selected.<br/>Use align/distribute tools in the toolbar.</p>
)}
{!selected && multiCount === 0 && (
<p class="hint" style="padding:0.75rem;">Select a widget to edit its properties.</p>
)}
</div>