| [3d7312a] | 1 | <div class="auth-interact">
|
|---|
| [7d932ce] | 2 | <% if (typeof manage !== 'undefined' && manage) { %>
|
|---|
| 3 | <h1 class="auth-interact-title"><%= t('fedi.manage_title') %></h1>
|
|---|
| [5b47619] | 4 | <% if (!manage.length) { %>
|
|---|
| 5 | <p class="auth-interact-note"><%= t('fedi.manage_empty') %></p>
|
|---|
| 6 | <% } else { %>
|
|---|
| 7 | <ul class="fedi-manage">
|
|---|
| 8 | <% manage.forEach(function(m){ %>
|
|---|
| 9 | <li class="fedi-manage-item">
|
|---|
| 10 | <div class="fedi-manage-content"><%- m.content %></div>
|
|---|
| 11 | <div class="fedi-manage-foot">
|
|---|
| 12 | <span class="fedi-manage-meta"><% if (m.to_handle) { %>→ <%= m.to_handle %><% } %><% if (m.created_at && typeof formatDateTime === 'function') { %> · <%= formatDateTime(m.created_at) %><% } %></span>
|
|---|
| [7d932ce] | 13 | <form method="post" action="/fediverse/<%= m.id %>/delete" onsubmit="return confirm('<%= t('fedi.delete_confirm') %>')">
|
|---|
| [5b47619] | 14 | <button type="submit" class="fedi-del-btn"><%= t('comments.delete') %></button>
|
|---|
| [7d932ce] | 15 | </form>
|
|---|
| 16 | </div>
|
|---|
| [5b47619] | 17 | </li>
|
|---|
| 18 | <% }); %>
|
|---|
| 19 | </ul>
|
|---|
| 20 | <% } %>
|
|---|
| 21 | <p class="auth-interact-note"><a href="/"><%= t('fedi.remote_back') %></a></p>
|
|---|
| [0aa23cf] | 22 | <% } else if (typeof liked !== 'undefined' && liked) { %>
|
|---|
| 23 | <h1 class="auth-interact-title">★ <%= t('fedi.liked_title') %></h1>
|
|---|
| 24 | <p class="auth-interact-note"><%= t('fedi.liked_done') %></p>
|
|---|
| 25 | <p class="auth-interact-actions">
|
|---|
| [2279f80] | 26 | <% if (uri) { %><a class="btn" href="<%= uri %>" rel="nofollow noopener"><%= t('fedi.remote_view_original') %></a><% } %>
|
|---|
| [0aa23cf] | 27 | <a class="btn btn-primary" href="/"><%= t('fedi.remote_back') %></a>
|
|---|
| 28 | </p>
|
|---|
| [8ad1784] | 29 | <% } else if (typeof followed !== 'undefined' && followed) { %>
|
|---|
| 30 | <h1 class="auth-interact-title"><%= t('fedi.followed_title') %></h1>
|
|---|
| 31 | <p class="auth-interact-note"><%= t('fedi.followed_done') %></p>
|
|---|
| 32 | <p class="auth-interact-actions">
|
|---|
| 33 | <% if (uri) { %><a class="btn" href="<%= uri %>" rel="nofollow noopener"><%= t('fedi.view_profile') %></a><% } %>
|
|---|
| 34 | <a class="btn btn-primary" href="/"><%= t('fedi.remote_back') %></a>
|
|---|
| 35 | </p>
|
|---|
| [7d932ce] | 36 | <% } else if (typeof sent !== 'undefined' && sent) { %>
|
|---|
| [41a7637] | 37 | <h1 class="auth-interact-title"><%= t('fedi.remote_sent_title') %></h1>
|
|---|
| 38 | <p class="auth-interact-note"><%= t('fedi.remote_sent') %></p>
|
|---|
| 39 | <p class="auth-interact-actions">
|
|---|
| [2902320] | 40 | <% if (uri) { %><a class="btn btn-primary" href="<%= uri %>" rel="nofollow noopener"><%= t('fedi.remote_view_original') %></a><% } %>
|
|---|
| 41 | <a class="btn" href="/"><%= t('fedi.remote_back') %></a>
|
|---|
| [41a7637] | 42 | </p>
|
|---|
| [8ad1784] | 43 | <% } else if (typeof followTarget !== 'undefined' && followTarget) { %>
|
|---|
| 44 | <h1 class="auth-interact-title"><%= t('fedi.follow_heading') %></h1>
|
|---|
| 45 | <p class="auth-interact-meta">
|
|---|
| 46 | <%= t('fedi.follow_intro') %>
|
|---|
| 47 | <a href="<%= followTarget.actor_url %>" rel="nofollow noopener" target="_blank"><strong><%= followTarget.actor_name %></strong></a>
|
|---|
| 48 | <span class="fedi-handle"><%= followTarget.actor_handle %></span>
|
|---|
| 49 | </p>
|
|---|
| 50 | <form method="post" action="/authorize_interaction/follow" class="auth-interact-form">
|
|---|
| 51 | <input type="hidden" name="uri" value="<%= followTarget.actor_uri %>">
|
|---|
| 52 | <div class="auth-interact-actions">
|
|---|
| 53 | <button type="submit" class="btn btn-primary"><%= t('fedi.follow_btn') %></button>
|
|---|
| 54 | <a href="/" class="btn"><%= t('comments.cancel') %></a>
|
|---|
| 55 | </div>
|
|---|
| 56 | </form>
|
|---|
| 57 | <p class="auth-interact-note"><%= t('fedi.remote_as', { site: siteTitle }) %></p>
|
|---|
| [41a7637] | 58 | <% } else { %>
|
|---|
| [3d7312a] | 59 | <h1 class="auth-interact-title"><%= t('fedi.remote_title') %></h1>
|
|---|
| 60 |
|
|---|
| 61 | <% if (!target) { %>
|
|---|
| 62 | <p class="auth-interact-note"><%= t('fedi.remote_notfound') %></p>
|
|---|
| 63 | <form method="get" action="/authorize_interaction" class="auth-interact-form">
|
|---|
| 64 | <input type="url" name="uri" placeholder="https://…/een-post" value="<%= uri || '' %>" required>
|
|---|
| 65 | <button type="submit" class="btn btn-primary"><%= t('fedi.remote_load') %></button>
|
|---|
| 66 | </form>
|
|---|
| 67 | <% } else { %>
|
|---|
| 68 | <p class="auth-interact-meta">
|
|---|
| 69 | <%= t('fedi.remote_replying_to') %>
|
|---|
| 70 | <a href="<%= target.actor_url %>" rel="nofollow noopener" target="_blank"><strong><%= target.actor_name %></strong></a>
|
|---|
| 71 | <span class="fedi-handle"><%= target.actor_handle %></span>
|
|---|
| 72 | </p>
|
|---|
| [2826bb97] | 73 | <blockquote class="auth-interact-preview">
|
|---|
| 74 | <% if (target.content) { %><div class="auth-interact-content"><%- target.content %></div>
|
|---|
| 75 | <% } else if (target.preview) { %><%= target.preview %><% } %>
|
|---|
| 76 | <% (target.images || []).forEach(function(im){ %>
|
|---|
| 77 | <img class="auth-interact-img" src="<%= im %>" alt="" loading="lazy">
|
|---|
| 78 | <% }); %>
|
|---|
| 79 | <% if (target.url || uri) { %>
|
|---|
| 80 | <p class="auth-interact-orig"><a href="<%= target.url || uri %>" target="_blank" rel="nofollow noopener"><%= t('fedi.remote_view_original') %></a></p>
|
|---|
| 81 | <% } %>
|
|---|
| 82 | </blockquote>
|
|---|
| [0aa23cf] | 83 | <form method="post" action="/authorize_interaction/like" class="auth-interact-like">
|
|---|
| 84 | <input type="hidden" name="uri" value="<%= uri %>">
|
|---|
| 85 | <button type="submit" class="btn btn-primary auth-like-btn">★ <%= t('fedi.like_btn') %></button>
|
|---|
| 86 | </form>
|
|---|
| 87 | <p class="auth-interact-or"><%= t('fedi.or_reply') %></p>
|
|---|
| [2902320] | 88 | <p class="auth-interact-where">💬 <%= t('fedi.reply_where') %></p>
|
|---|
| [3d7312a] | 89 | <form method="post" action="/authorize_interaction" class="auth-interact-form">
|
|---|
| 90 | <input type="hidden" name="uri" value="<%= uri %>">
|
|---|
| 91 | <textarea name="text" rows="4" required placeholder="<%= t('fedi.reply_ph') %>"></textarea>
|
|---|
| 92 | <div class="auth-interact-actions">
|
|---|
| [0aa23cf] | 93 | <button type="submit" class="btn"><%= t('fedi.send') %></button>
|
|---|
| [3d7312a] | 94 | <a href="<%= uri %>" class="btn"><%= t('comments.cancel') %></a>
|
|---|
| 95 | </div>
|
|---|
| 96 | </form>
|
|---|
| 97 | <p class="auth-interact-note"><%= t('fedi.remote_as', { site: siteTitle }) %></p>
|
|---|
| 98 | <% } %>
|
|---|
| [41a7637] | 99 | <% } %>
|
|---|
| [3d7312a] | 100 | </div>
|
|---|
| 101 |
|
|---|
| 102 | <style>
|
|---|
| 103 | .auth-interact { max-width: 580px; margin: 2rem auto; padding: 0 1rem; }
|
|---|
| 104 | .auth-interact-title { margin: 0 0 1rem; }
|
|---|
| 105 | .auth-interact-meta { color: var(--ink-soft, #888); margin: 0 0 .75rem; }
|
|---|
| 106 | .auth-interact-preview {
|
|---|
| 107 | margin: 0 0 1rem; padding: .75rem 1rem; border-left: 3px solid var(--accent, #888);
|
|---|
| 108 | background: color-mix(in srgb, var(--ink, #000) 4%, transparent); border-radius: 0 12px 12px 0;
|
|---|
| 109 | color: var(--ink, inherit);
|
|---|
| 110 | }
|
|---|
| 111 | .auth-interact-form { display: flex; flex-direction: column; gap: .75rem; }
|
|---|
| 112 | .auth-interact-form textarea, .auth-interact-form input[type=url] {
|
|---|
| 113 | width: 100%; box-sizing: border-box; padding: .6rem .8rem; font: inherit; resize: vertical;
|
|---|
| 114 | border-radius: 12px; border: 1px solid color-mix(in srgb, var(--ink, #000) 18%, transparent);
|
|---|
| 115 | background: var(--paper, #fff); color: var(--ink, #000);
|
|---|
| 116 | }
|
|---|
| 117 | .auth-interact-actions { display: flex; gap: .5rem; align-items: center; }
|
|---|
| 118 | .auth-interact-note { color: var(--ink-soft, #999); font-size: .85rem; margin-top: 1rem; }
|
|---|
| [2902320] | 119 | .auth-interact-where { margin: .25rem 0 .85rem; padding: .6rem .8rem; font-size: .85rem; line-height: 1.5; border-radius: 10px; background: color-mix(in srgb, var(--accent, #888) 12%, transparent); color: var(--ink, inherit); }
|
|---|
| [2826bb97] | 120 | .auth-interact-content { line-height: 1.55; }
|
|---|
| 121 | .auth-interact-content p { margin: .35rem 0; }
|
|---|
| 122 | .auth-interact-content p:first-child { margin-top: 0; }
|
|---|
| 123 | .auth-interact-img { max-width: 100%; height: auto; border-radius: 10px; margin: .5rem 0 0; display: block; }
|
|---|
| 124 | .auth-interact-orig { margin: .75rem 0 0; font-size: .85rem; }
|
|---|
| 125 | .auth-interact-orig a { color: var(--accent, #06c); }
|
|---|
| [5b47619] | 126 | .fedi-manage { list-style: none; padding: 0; margin: 1.25rem 0 1rem; display: flex; flex-direction: column; gap: .7rem; }
|
|---|
| 127 | .fedi-manage-item { padding: .85rem 1rem; border-radius: 14px; background: color-mix(in srgb, var(--ink, #000) 4%, transparent); border: 1px solid color-mix(in srgb, var(--ink, #000) 9%, transparent); }
|
|---|
| 128 | .fedi-manage-content { line-height: 1.5; overflow-wrap: anywhere; }
|
|---|
| 129 | .fedi-manage-content p { margin: .15rem 0; }
|
|---|
| 130 | .fedi-manage-content p:first-child { margin-top: 0; }
|
|---|
| 131 | .fedi-manage-content p:last-child { margin-bottom: 0; }
|
|---|
| 132 | .fedi-manage-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .6rem; flex-wrap: wrap; }
|
|---|
| 133 | .fedi-manage-meta { color: var(--ink-soft, #999); font-size: .8rem; }
|
|---|
| 134 | .fedi-del-btn { border: 1px solid color-mix(in srgb, #d9534f 50%, transparent); background: color-mix(in srgb, #d9534f 12%, transparent); color: #e06b66; border-radius: 8px; padding: .3rem .75rem; font-size: .82rem; cursor: pointer; transition: background .15s ease; }
|
|---|
| 135 | .fedi-del-btn:hover { background: color-mix(in srgb, #d9534f 24%, transparent); }
|
|---|
| [3d7312a] | 136 | </style>
|
|---|