Fix admin plugin UI not rendering (class-based mount point) #6
Loading…
Reference in a new issue
No description provided.
Delete branch "mount-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PeerTube's html-type plugin settings are sanitized client-side: the
idattribute is stripped from injected markup (verified live: the placeholder renders as<div><p>...with no id). The client script usedgetElementById('peertube-plugin-peeryou-admin')which returned null, so render() bailed and the settings page only showed the 'Loading peeryou controls…' placeholder.Fix: use a
class-based mount point (.peertube-plugin-peeryou-admin) in the html setting and query viadocument.querySelector(...), matching the canonical peerTube plugin pattern (peertube-plugin-livechat uses classes for the same reason).Changes: main.js html setting id→class; client script getElementById→querySelector; tests updated. Version bumped 0.1.3→0.1.4. All 112 tests pass.