a proof of concept realtime collaborative text editor using atproto as a sync server jake.tngl.io/y-pds/
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Only show share button for owner

+5 -2
+5 -2
app.js
··· 150 150 } 151 151 152 152 render() { 153 + const ownerDid = this.props.atUri.slice("at://".length).split("/")[0]; 154 + const isOwner = ownerDid === this.props.did; 153 155 return html` 154 156 <div id="editor" ref=${this.editorRef}></div> 155 - <button id="share" onClick=${() => this.shareDialogRef.current.open(this.provider)}> 157 + ${isOwner && 158 + html`<button id="share" onClick=${() => this.shareDialogRef.current.open(this.provider)}> 156 159 Share 157 - </button> 160 + </button>`} 158 161 <${ShareDialog} ref=${this.shareDialogRef} /> 159 162 `; 160 163 }