| … | … | @@ -598,6 +598,10 @@ details.post>summary{cursor:pointer;color:#888;font-style:italic;list-style:reve |
| 598 | 598 | .cc{flex:none} |
| 599 | 599 | #img-controls{flex:none} |
| 600 | 600 | .composerhint{font-size:.78rem;color:var(--fg-faint,#6b7480);margin:.4rem 0 0} |
| 601 | /* Which identity this form writes as. Above the textarea because it has to be read BEFORE typing, not |
| 602 | discovered after posting; strong enough to be seen, quiet enough not to shout on every page. */ |
| 603 | .composerwho{font-size:.8rem;color:var(--fg-faint,#6b7480);margin:0 0 .4rem} |
| 604 | .composerwho strong{color:var(--fg);font-weight:600} |
| 601 | 605 | @media(max-width:640px){ |
| 602 | 606 | /* On a phone the labels alone fill a line, so give the selects room and let each pair own its width. */ |
| 603 | 607 | .controls{gap:.35rem .5rem} |
| … | … | @@ -877,15 +881,27 @@ const LANGS = [ |
| 877 | 881 | ['pl', 'Polski'], ['sv', 'Svenska'], ['da', 'Dansk'], ['fi', 'Suomi'], ['cs', 'Čeština'] |
| 878 | 882 | ] |
| 879 | 883 | |
| 880 | | function composer (canWrite, quoting = null, lists = []) { |
| 884 | function composer (canWrite, quoting = null, lists = [], viewer = null) { |
| 881 | 885 | if (!canWrite) return '' |
| 886 | // ⛔ SAY WHICH IDENTITY THIS WRITES AS. A favela node hosts MANY DIDs — your own plus every co-owned |
| 887 | // community — and this form named none of them, so "post" meant "post as whichever DID the session |
| 888 | // happens to be bound to". On 2026-08-18 that sent a post intended for a community out as a personal |
| 889 | // identity, to bsky, where it cannot be recalled. The page header's `whoami` is not this: it answers |
| 890 | // "who is signed in" in the opposite corner, and with no handle resolved it prints 32 characters of |
| 891 | // raw DID, which reads as decoration. |
| 892 | // |
| 893 | // Rendered only when the identity is actually KNOWN. `canWrite` is also true for the node's own relay |
| 894 | // writer, where this page holds no DID — and a composer that says "posting as this node" when it has |
| 895 | // not established that would be the same lie one step quieter. |
| 896 | const who = viewer && viewer.did ? (viewer.handle || shortDid(viewer.did)) : null |
| 897 | const whoLine = who ? `<p class="composerwho">posting as <strong>${esc(who)}</strong></p>` : '' |
| 882 | 898 | // Quoting: a hidden quoteOf plus a PREVIEW of what is being quoted. Without the preview the composer |
| 883 | 899 | // looks identical to a normal one and you cannot tell what (or whether) you are quoting. |
| 884 | 900 | const q = quoting |
| 885 | 901 | ? `<input type="hidden" name="quoteOf" value="${esc(quoting.uri)}"> |
| 886 | 902 | <div class="qpreview">❝ quoting <strong>${esc(quoting.who || shortDid(quoting.did || ''))}</strong>${quoting.text ? `: <span class="qptext">${esc(String(quoting.text).slice(0, 140))}</span>` : ''} <a class="qcancel" href="/">cancel</a></div>` |
| 887 | 903 | : '' |
| 888 | | return `<form class="composer" method="POST" action="/api/post">${q} |
| 904 | return `<form class="composer" method="POST" action="/api/post">${whoLine}${q} |
| 889 | 905 | <label class="sr-only" for="composer-text">what do you want to post?</label><textarea id="composer-text" name="text" rows="2" placeholder="post (relays to your hpp, which signs)… — a line with only --- starts a new post in a thread" style="width:100%;box-sizing:border-box;font:inherit;padding:.5rem" required></textarea> |
| 890 | 906 | <div class="controls"><label>scope <select name="scope"> |
| 891 | 907 | <option value="public">public</option> |
| … | … | @@ -1104,7 +1120,7 @@ export function page ({ title = 'favela', heading, viewer = null, active = 'time |
| 1104 | 1120 | ${nav(active, viewer)} |
| 1105 | 1121 | </header> |
| 1106 | 1122 | <main id="main" tabindex="-1"> |
| 1107 | | ${composer(canWrite, quoting, composerLists)} |
| 1123 | ${composer(canWrite, quoting, composerLists, viewer)} |
| 1108 | 1124 | ${body} |
| 1109 | 1125 | </main> |
| 1110 | 1126 | ${clientScript} |