| 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 | <% if (target.preview) { %>
|
|---|
| 17 | <blockquote class="auth-interact-preview"><%= target.preview %></blockquote>
|
|---|
| 18 | <% } %>
|
|---|
| 19 | <form method="post" action="/authorize_interaction" class="auth-interact-form">
|
|---|
| 20 | <input type="hidden" name="uri" value="<%= uri %>">
|
|---|
| 21 | <textarea name="text" rows="4" required placeholder="<%= t('fedi.reply_ph') %>"></textarea>
|
|---|
| 22 | <div class="auth-interact-actions">
|
|---|
| 23 | <button type="submit" class="btn btn-primary"><%= t('fedi.send') %></button>
|
|---|
| 24 | <a href="<%= uri %>" class="btn"><%= t('comments.cancel') %></a>
|
|---|
| 25 | </div>
|
|---|
| 26 | </form>
|
|---|
| 27 | <p class="auth-interact-note"><%= t('fedi.remote_as', { site: siteTitle }) %></p>
|
|---|
| 28 | <% } %>
|
|---|
| 29 | </div>
|
|---|
| 30 |
|
|---|
| 31 | <style>
|
|---|
| 32 | .auth-interact { max-width: 580px; margin: 2rem auto; padding: 0 1rem; }
|
|---|
| 33 | .auth-interact-title { margin: 0 0 1rem; }
|
|---|
| 34 | .auth-interact-meta { color: var(--ink-soft, #888); margin: 0 0 .75rem; }
|
|---|
| 35 | .auth-interact-preview {
|
|---|
| 36 | margin: 0 0 1rem; padding: .75rem 1rem; border-left: 3px solid var(--accent, #888);
|
|---|
| 37 | background: color-mix(in srgb, var(--ink, #000) 4%, transparent); border-radius: 0 12px 12px 0;
|
|---|
| 38 | color: var(--ink, inherit);
|
|---|
| 39 | }
|
|---|
| 40 | .auth-interact-form { display: flex; flex-direction: column; gap: .75rem; }
|
|---|
| 41 | .auth-interact-form textarea, .auth-interact-form input[type=url] {
|
|---|
| 42 | width: 100%; box-sizing: border-box; padding: .6rem .8rem; font: inherit; resize: vertical;
|
|---|
| 43 | border-radius: 12px; border: 1px solid color-mix(in srgb, var(--ink, #000) 18%, transparent);
|
|---|
| 44 | background: var(--paper, #fff); color: var(--ink, #000);
|
|---|
| 45 | }
|
|---|
| 46 | .auth-interact-actions { display: flex; gap: .5rem; align-items: center; }
|
|---|
| 47 | .auth-interact-note { color: var(--ink-soft, #999); font-size: .85rem; margin-top: 1rem; }
|
|---|
| 48 | </style>
|
|---|