feat: text gate protected mode — frontend toggle + hidden stored_text

Adds a '🔒 Protected (text node)' toggle. When on, the DOM editor is a free text
box whose value mirrors into the hidden stored_text widget; the node outputs that
text and ignores upstream (no pause, socket events ignored). Persists via the
protected + stored_text widgets; restored on configure. stored_text is single-line
so it hides cleanly (pool_id trick).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-01 13:48:33 +02:00
parent b4639a73d3
commit d0dafa1d39
2 changed files with 76 additions and 2 deletions
+3 -1
View File
@@ -30,7 +30,9 @@ class TextGate:
"text": ("STRING", {"forceInput": True}),
"signal": (ANY, {}),
"protected": ("BOOLEAN", {"default": False}),
"stored_text": ("STRING", {"default": "", "multiline": True}),
# single-line so the frontend can fully hide it (the DOM editor
# is the real text box); the value still holds arbitrary text.
"stored_text": ("STRING", {"default": ""}),
},
"hidden": {"unique_id": "UNIQUE_ID"},
}