| 1 | <div class="auth-interact">
|
|---|
| 2 | <h1 class="auth-interact-title"><%= t('fedi.remote_title') %></h1>
|
|---|
| 3 |
|
|---|
| 4 | <% if (!target) { %>
|
|---|
| 5 | <p class="auth-interact-note"><%= t('fedi.remote_notfound') %></p>
|
|---|
| 6 | <form method="get" action="/authorize_interaction" class="auth-interact-form">
|
|---|
| 7 | <input type="url" name="uri" placeholder="https://…/een-post" value="<%= uri || '' %>" required>
|
|---|
| 8 | <button type="submit" class="btn btn-primary"><%= t('fedi.remote_load') %></button>
|
|---|
| 9 | </form>
|
|---|
| 10 | <% } else { %>
|
|---|
| 11 | <p class="auth-interact-meta">
|
|---|
| 12 | <%= t('fedi.remote_replying_to') %>
|
|---|
| 13 | <a href="<%= target.actor_url %>" rel="nofollow noopener" target="_blank"><strong><%= target.actor_name %></strong></a>
|
|---|
| 14 | <span class="fedi-handle"><%= target.actor_handle %></span>
|
|---|
| 15 | </p>
|
|---|
| 16 | <blockquote class="auth-interact-preview">
|
|---|
| 17 | <% if (target.content) { %><div class="auth-interact-content"><%- target.content %></div>
|
|---|
| 18 | <% } else if (target.preview) { %><%= target.preview %><% } %>
|
|---|
| 19 | <% (target.images || []).forEach(function(im){ %>
|
|---|
| 20 | <img class="auth-interact-img" src="<%= im %>" alt="" loading="lazy">
|
|---|
| 21 | <% }); %>
|
|---|
| 22 | <% if (target.url || uri) { %>
|
|---|
| 23 | <p class="auth-interact-orig"><a href="<%= target.url || uri %>" target="_blank" rel="nofollow noopener"><%= t('fedi.remote_view_original') %></a></p>
|
|---|
| 24 | <% } %>
|
|---|
| 25 | </blockquote>
|
|---|
| 26 | <form method="post" action="/authorize_interaction" class="auth-interact-form">
|
|---|
| 27 | <input type="hidden" name="uri" value="<%= uri %>">
|
|---|
| 28 | <textarea name="text" rows="4" required placeholder="<%= t('fedi.reply_ph') %>"></textarea>
|
|---|
| 29 | <div class="auth-interact-actions">
|
|---|
| 30 | <button type="submit" class="btn btn-primary"><%= t('fedi.send') %></button>
|
|---|
| 31 | <a href="<%= uri %>" class="btn"><%= t('comments.cancel') %></a>
|
|---|
| 32 | </div>
|
|---|
| 33 | </form>
|
|---|
| 34 | <p class="auth-interact-note"><%= t('fedi.remote_as', { site: siteTitle }) %></p>
|
|---|
| 35 | <% } %>
|
|---|
| 36 | </div>
|
|---|
| 37 |
|
|---|
| 38 | <style>
|
|---|
| 39 | .auth-interact { max-width: 580px; margin: 2rem auto; padding: 0 1rem; }
|
|---|
| 40 | .auth-interact-title { margin: 0 0 1rem; }
|
|---|
| 41 | .auth-interact-meta { color: var(--ink-soft, #888); margin: 0 0 .75rem; }
|
|---|
| 42 | .auth-interact-preview {
|
|---|
| 43 | margin: 0 0 1rem; padding: .75rem 1rem; border-left: 3px solid var(--accent, #888);
|
|---|
| 44 | background: color-mix(in srgb, var(--ink, #000) 4%, transparent); border-radius: 0 12px 12px 0;
|
|---|
| 45 | color: var(--ink, inherit);
|
|---|
| 46 | }
|
|---|
| 47 | .auth-interact-form { display: flex; flex-direction: column; gap: .75rem; }
|
|---|
| 48 | .auth-interact-form textarea, .auth-interact-form input[type=url] {
|
|---|
| 49 | width: 100%; box-sizing: border-box; padding: .6rem .8rem; font: inherit; resize: vertical;
|
|---|
| 50 | border-radius: 12px; border: 1px solid color-mix(in srgb, var(--ink, #000) 18%, transparent);
|
|---|
| 51 | background: var(--paper, #fff); color: var(--ink, #000);
|
|---|
| 52 | }
|
|---|
| 53 | .auth-interact-actions { display: flex; gap: .5rem; align-items: center; }
|
|---|
| 54 | .auth-interact-note { color: var(--ink-soft, #999); font-size: .85rem; margin-top: 1rem; }
|
|---|
| 55 | .auth-interact-content { line-height: 1.55; }
|
|---|
| 56 | .auth-interact-content p { margin: .35rem 0; }
|
|---|
| 57 | .auth-interact-content p:first-child { margin-top: 0; }
|
|---|
| 58 | .auth-interact-img { max-width: 100%; height: auto; border-radius: 10px; margin: .5rem 0 0; display: block; }
|
|---|
| 59 | .auth-interact-orig { margin: .75rem 0 0; font-size: .85rem; }
|
|---|
| 60 | .auth-interact-orig a { color: var(--accent, #06c); }
|
|---|
| 61 | </style>
|
|---|