diff --git a/web/NodesView.tsx b/web/NodesView.tsx index 8ccc1c2..fc5df7b 100644 --- a/web/NodesView.tsx +++ b/web/NodesView.tsx @@ -103,6 +103,12 @@ const Ownership = ({ node, busy, onError }: OwnershipProps) => { } }; + const applyTags = (ev?: React.FormEvent) => { + ev?.preventDefault(); + if (!tagsDirty) return; + void run(() => setTags.mutateAsync({ id: node.id, tags: nextTags })); + }; + return (
Tags are what the access policy targets. A tag no rule mentions does nothing; removing one a rule depends on
cuts the node off from it. The tag: prefix is added for you.
@@ -204,7 +206,8 @@ const NodeCard = ({ node, onError }: NodeCardProps) => {
}
};
- const submitRename = async () => {
+ const submitRename = async (ev?: React.FormEvent) => {
+ ev?.preventDefault();
const name = draftName.trim();
setRenaming(false);
if (!name || name === node.name) return;
@@ -218,29 +221,24 @@ const NodeCard = ({ node, onError }: NodeCardProps) => {