v0.3.4: Comment edit/delete, native notifications, forward-compatible protocol, UI fixes
Comment edit & delete: - EditComment/DeleteComment BlobHeaderDiffOps with upstream+downstream propagation - Trust-based: comment author can edit/delete, post author can delete - Storage: edit_comment(), delete_comment() methods - Frontend: inline edit (Enter/Escape), delete with confirm Native notifications: - tauri-plugin-notification for system notifications on all platforms - Triggers for messages, new posts, reactions, and comments - notif_reacts setting added, button-group toggles replace dropdowns - _notifReady flag prevents startup spam Protocol hardening: - BlobHeaderDiffOp::Unknown variant with #[serde(other)] for forward compatibility - Old nodes silently skip unknown ops instead of crashing UI fixes: - Self removed from Following list - Offline follows in lightbox popup (auto-show if no one online) - Sent DMs filtered from My Posts - Comment threading scoped to closest .post (fixes duplicate ID issue) - Select dropdown text legible in WebKitGTK (black on white options) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ce176a2299
commit
0abc244ee9
18 changed files with 1616 additions and 67 deletions
230
frontend/app.js
230
frontend/app.js
|
|
@ -357,16 +357,30 @@ function toast(msg) {
|
|||
setTimeout(() => toastEl.classList.add('hidden'), 3000);
|
||||
}
|
||||
|
||||
// --- Notifications ---
|
||||
// --- Notifications (Tauri plugin) ---
|
||||
let _notifiedMessages = new Set();
|
||||
let _notifiedReacts = new Set();
|
||||
let _notifiedComments = new Set();
|
||||
let _notifiedPosts = new Set();
|
||||
let _notifReady = false;
|
||||
async function maybeNotify(title, body, tag) {
|
||||
if (!('Notification' in window)) return;
|
||||
if (Notification.permission === 'default') {
|
||||
await Notification.requestPermission();
|
||||
}
|
||||
if (Notification.permission === 'granted') {
|
||||
new Notification(title, { body, tag, silent: false });
|
||||
}
|
||||
try {
|
||||
if (window.__TAURI__?.notification) {
|
||||
const { isPermissionGranted, requestPermission, sendNotification } = window.__TAURI__.notification;
|
||||
let granted = await isPermissionGranted();
|
||||
if (!granted) {
|
||||
const perm = await requestPermission();
|
||||
granted = perm === 'granted';
|
||||
}
|
||||
if (granted) {
|
||||
sendNotification({ title, body, channelId: 'default' });
|
||||
}
|
||||
} else if ('Notification' in window) {
|
||||
// Fallback for browsers
|
||||
if (Notification.permission === 'default') await Notification.requestPermission();
|
||||
if (Notification.permission === 'granted') new Notification(title, { body, tag, silent: false });
|
||||
}
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
// --- Popover helpers ---
|
||||
|
|
@ -618,7 +632,48 @@ async function loadFeed(force) {
|
|||
// Fingerprint: post IDs + reaction counts + comment counts
|
||||
const fp = posts.map(p => `${p.id}:${(p.reactionCounts||[]).map(r=>r.emoji+r.count).join(',')}:${p.commentCount||0}`).join('|');
|
||||
if (!force && fp === _feedFingerprint) return;
|
||||
const oldFp = _feedFingerprint;
|
||||
_feedFingerprint = fp;
|
||||
|
||||
// Notify on new posts and engagement (skip first load)
|
||||
if (_notifReady && oldFp) {
|
||||
try {
|
||||
const notifPosts = await invoke('get_setting', { key: 'notif_posts' }).catch(() => null) || 'off';
|
||||
const notifReacts = await invoke('get_setting', { key: 'notif_reacts' }).catch(() => null) || 'on';
|
||||
for (const p of posts) {
|
||||
// New post notifications
|
||||
if (!p.isMe && notifPosts !== 'off' && !_notifiedPosts.has(p.id)) {
|
||||
_notifiedPosts.add(p.id);
|
||||
if (_notifiedPosts.size > posts.length) { // skip initial bulk
|
||||
maybeNotify(`New post from ${p.authorName || p.author.slice(0,8)}`, (p.content || '').slice(0, 80), `post-${p.id}`);
|
||||
}
|
||||
}
|
||||
// Reaction notifications on our posts
|
||||
if (p.isMe && notifReacts !== 'off' && p.reactionCounts) {
|
||||
for (const r of p.reactionCounts) {
|
||||
const key = `${p.id}-${r.emoji}-${r.count}`;
|
||||
if (!_notifiedReacts.has(key)) {
|
||||
_notifiedReacts.add(key);
|
||||
if (_notifiedReacts.size > 1) {
|
||||
maybeNotify(`${r.emoji} on your post`, `${r.count} ${r.emoji} reactions`, `react-${key}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Comment notifications on our posts
|
||||
if (p.isMe && notifReacts !== 'off' && p.commentCount > 0) {
|
||||
const key = `${p.id}-comments-${p.commentCount}`;
|
||||
if (!_notifiedComments.has(key)) {
|
||||
_notifiedComments.add(key);
|
||||
if (_notifiedComments.size > 1) {
|
||||
maybeNotify('New comment on your post', (p.content || '').slice(0, 40), `comment-${p.id}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
// Preserve expanded comment threads
|
||||
const expandedComments = new Set();
|
||||
feedList.querySelectorAll('.comment-thread:not(.hidden)').forEach(el => {
|
||||
|
|
@ -650,7 +705,7 @@ async function loadFeed(force) {
|
|||
async function loadMyPosts(force) {
|
||||
try {
|
||||
const posts = await invoke('get_all_posts');
|
||||
const mine = posts.filter(p => p.isMe && p.visibility !== 'encrypted-for-me');
|
||||
const mine = posts.filter(p => p.isMe && p.visibility !== 'encrypted-for-me' && !(p.recipients && p.recipients.length > 0));
|
||||
const fp = mine.map(p => `${p.id}:${(p.reactionCounts||[]).map(r=>r.emoji+r.count).join(',')}:${p.commentCount||0}`).join('|');
|
||||
if (!force && fp === _myPostsFingerprint) return;
|
||||
_myPostsFingerprint = fp;
|
||||
|
|
@ -993,7 +1048,9 @@ async function loadFollows() {
|
|||
const approvedSet = new Set(outbound.filter(r => r.status === 'approved').map(r => r.nodeId));
|
||||
const inboundApprovedSet = new Set(inbound.filter(r => r.status === 'approved').map(r => r.nodeId));
|
||||
|
||||
if (follows.length === 0) {
|
||||
// Filter out self before rendering
|
||||
const others = follows.filter(f => f.nodeId !== myNodeId);
|
||||
if (others.length === 0) {
|
||||
followsList.innerHTML = `<div>${renderEmptyState('Not following anyone', 'Follow suggested peers or connect manually.')}</div>`;
|
||||
} else {
|
||||
const now = Date.now();
|
||||
|
|
@ -1037,8 +1094,14 @@ async function loadFollows() {
|
|||
</div>`;
|
||||
};
|
||||
|
||||
const online = follows.filter(f => f.isOnline || (f.lastActivityMs > 0 && (now - f.lastActivityMs) < ONLINE_THRESHOLD));
|
||||
const offline = follows.filter(f => !online.includes(f));
|
||||
// If isOnline field isn't available (old build), show all as online
|
||||
const hasOnlineField = others.some(f => f.isOnline !== undefined);
|
||||
const online = hasOnlineField
|
||||
? others.filter(f => f.isOnline || (f.lastActivityMs > 0 && (now - f.lastActivityMs) < ONLINE_THRESHOLD))
|
||||
: others;
|
||||
const offline = hasOnlineField
|
||||
? others.filter(f => !online.includes(f))
|
||||
: [];
|
||||
|
||||
let html = '';
|
||||
if (online.length > 0) {
|
||||
|
|
@ -1046,11 +1109,36 @@ async function loadFollows() {
|
|||
html += online.map(renderFollowCard).join('');
|
||||
}
|
||||
if (offline.length > 0) {
|
||||
html += `<div class="follows-section-header">Following: Offline (${offline.length})</div>`;
|
||||
html += offline.map(renderFollowCard).join('');
|
||||
html += `<div class="follows-section-header follows-offline-header" style="cursor:pointer">Following: Offline (${offline.length})</div>`;
|
||||
}
|
||||
followsList.innerHTML = html;
|
||||
|
||||
// Open offline follows in lightbox
|
||||
if (offline.length > 0) {
|
||||
followsList.querySelectorAll('.follows-offline-header').forEach(hdr => {
|
||||
hdr.addEventListener('click', () => {
|
||||
const existing = document.querySelector('.offline-lightbox');
|
||||
if (existing) existing.remove();
|
||||
const overlay = document.createElement('div');
|
||||
overlay.className = 'offline-lightbox';
|
||||
overlay.innerHTML = `
|
||||
<div class="offline-lightbox-content">
|
||||
<div class="offline-lightbox-header">
|
||||
<h3>Following: Offline (${offline.length})</h3>
|
||||
<button class="offline-lightbox-close">x</button>
|
||||
</div>
|
||||
<div class="offline-lightbox-list">${offline.map(renderFollowCard).join('')}</div>
|
||||
</div>`;
|
||||
document.body.appendChild(overlay);
|
||||
overlay.querySelector('.offline-lightbox-close').onclick = () => overlay.remove();
|
||||
overlay.addEventListener('click', (e) => { if (e.target === overlay) overlay.remove(); });
|
||||
|
||||
// Wire up buttons inside the lightbox
|
||||
attachFollowHandlers(overlay);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Attach unfollow handlers
|
||||
followsList.querySelectorAll('.unfollow-btn').forEach(btn => {
|
||||
btn.addEventListener('click', async () => {
|
||||
|
|
@ -1924,7 +2012,8 @@ document.addEventListener('click', async (e) => {
|
|||
// Comment toggle → expand/collapse thread
|
||||
if (e.target.classList.contains('comment-toggle-btn')) {
|
||||
const postId = e.target.dataset.postId;
|
||||
const threadEl = document.getElementById('comments-' + postId);
|
||||
const postEl = e.target.closest('.post');
|
||||
const threadEl = postEl ? postEl.querySelector('.comment-thread') : document.getElementById('comments-' + postId);
|
||||
if (!threadEl) return;
|
||||
if (threadEl.classList.contains('hidden')) {
|
||||
threadEl.classList.remove('hidden');
|
||||
|
|
@ -1945,7 +2034,8 @@ document.addEventListener('click', async (e) => {
|
|||
try {
|
||||
await invoke('comment_on_post', { postId, content });
|
||||
input.value = '';
|
||||
const threadEl = document.getElementById('comments-' + postId);
|
||||
const postEl = e.target.closest('.post');
|
||||
const threadEl = postEl ? postEl.querySelector('.comment-thread') : document.getElementById('comments-' + postId);
|
||||
if (threadEl) await loadCommentThread(postId, threadEl);
|
||||
refreshPostEngagement(postId);
|
||||
} catch (err) { toast('Error: ' + err); }
|
||||
|
|
@ -1953,6 +2043,56 @@ document.addEventListener('click', async (e) => {
|
|||
return;
|
||||
}
|
||||
|
||||
// Edit comment
|
||||
if (e.target.classList.contains('comment-edit-btn')) {
|
||||
const postId = e.target.dataset.postId;
|
||||
const ts = parseInt(e.target.dataset.ts);
|
||||
const bubble = e.target.closest('.comment-bubble');
|
||||
const textEl = bubble.querySelector('.comment-text');
|
||||
const oldContent = textEl.textContent;
|
||||
textEl.innerHTML = `<input class="comment-edit-input" value="${escapeHtml(oldContent)}" style="width:100%;background:#1a1a2e;color:#e0e0e0;border:1px solid #444;border-radius:3px;padding:0.2rem;font-size:0.8rem" />`;
|
||||
const input = textEl.querySelector('.comment-edit-input');
|
||||
input.focus();
|
||||
input.addEventListener('keydown', async (ev) => {
|
||||
if (ev.key === 'Enter') {
|
||||
const newContent = input.value.trim();
|
||||
if (newContent && newContent !== oldContent) {
|
||||
try {
|
||||
await invoke('edit_comment', { postId, timestampMs: ts, newContent });
|
||||
const postEl = bubble.closest('.post');
|
||||
const threadEl = postEl ? postEl.querySelector('.comment-thread') : null;
|
||||
if (threadEl) await loadCommentThread(postId, threadEl);
|
||||
toast('Comment edited');
|
||||
} catch (err) { toast('Error: ' + err); }
|
||||
} else {
|
||||
textEl.textContent = oldContent;
|
||||
}
|
||||
} else if (ev.key === 'Escape') {
|
||||
textEl.textContent = oldContent;
|
||||
}
|
||||
});
|
||||
input.addEventListener('blur', () => {
|
||||
if (textEl.querySelector('.comment-edit-input')) textEl.textContent = oldContent;
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// Delete comment
|
||||
if (e.target.classList.contains('comment-delete-btn')) {
|
||||
const postId = e.target.dataset.postId;
|
||||
const ts = parseInt(e.target.dataset.ts);
|
||||
if (!confirm('Delete this comment?')) return;
|
||||
try {
|
||||
await invoke('delete_comment', { postId, timestampMs: ts });
|
||||
const postEl = e.target.closest('.post');
|
||||
const threadEl = postEl ? postEl.querySelector('.comment-thread') : null;
|
||||
if (threadEl) await loadCommentThread(postId, threadEl);
|
||||
refreshPostEngagement(postId);
|
||||
toast('Comment deleted');
|
||||
} catch (err) { toast('Error: ' + err); }
|
||||
return;
|
||||
}
|
||||
|
||||
// Close emoji picker on outside click
|
||||
closeEmojiPicker();
|
||||
});
|
||||
|
|
@ -1968,10 +2108,15 @@ async function loadCommentThread(postId, container) {
|
|||
for (const c of comments) {
|
||||
const name = c.authorName || c.author.substring(0, 12);
|
||||
const time = relativeTime(c.timestampMs);
|
||||
html += `<div class="comment-bubble">
|
||||
const isMyComment = c.author === myNodeId;
|
||||
const editDeleteBtns = isMyComment
|
||||
? `<button class="comment-edit-btn" data-post-id="${c.postId}" data-ts="${c.timestampMs}" title="Edit">edit</button>
|
||||
<button class="comment-delete-btn" data-post-id="${c.postId}" data-ts="${c.timestampMs}" title="Delete">del</button>`
|
||||
: '';
|
||||
html += `<div class="comment-bubble" data-post-id="${c.postId}" data-ts="${c.timestampMs}">
|
||||
<span class="comment-author">${escapeHtml(name)}</span>
|
||||
<span class="comment-text">${escapeHtml(c.content)}</span>
|
||||
<span class="comment-time">${time}</span>
|
||||
<span class="comment-time">${time} ${editDeleteBtns}</span>
|
||||
</div>`;
|
||||
}
|
||||
html += `<div class="comment-compose">
|
||||
|
|
@ -2593,38 +2738,36 @@ $('#notifications-btn').addEventListener('click', async () => {
|
|||
// Load current settings
|
||||
const msgVal = await invoke('get_setting', { key: 'notif_messages' }).catch(() => null) || 'on';
|
||||
const postVal = await invoke('get_setting', { key: 'notif_posts' }).catch(() => null) || 'off';
|
||||
const reactVal = await invoke('get_setting', { key: 'notif_reacts' }).catch(() => null) || 'on';
|
||||
const nearbyVal = await invoke('get_setting', { key: 'notif_nearby' }).catch(() => null) || 'on';
|
||||
|
||||
function btnGroup(label, key, value, options) {
|
||||
const btns = options.map(([v, text]) =>
|
||||
`<button class="notif-opt${v === value ? ' active' : ''}" data-key="${key}" data-value="${v}">${text}</button>`
|
||||
).join('');
|
||||
return `<div class="notif-row"><span class="notif-label">${label}</span><div class="notif-opts">${btns}</div></div>`;
|
||||
}
|
||||
|
||||
const html = `
|
||||
<label for="notif-messages">Messages</label>
|
||||
<select id="notif-messages">
|
||||
<option value="off"${msgVal === 'off' ? ' selected' : ''}>Off</option>
|
||||
<option value="on"${msgVal === 'on' ? ' selected' : ''}>On (no preview)</option>
|
||||
<option value="preview"${msgVal === 'preview' ? ' selected' : ''}>On (with preview)</option>
|
||||
</select>
|
||||
<label for="notif-posts">Posts</label>
|
||||
<select id="notif-posts">
|
||||
<option value="off"${postVal === 'off' ? ' selected' : ''}>Off</option>
|
||||
<option value="follows"${postVal === 'follows' ? ' selected' : ''}>From follows & audience</option>
|
||||
<option value="recommended"${postVal === 'recommended' ? ' selected' : ''}>Recommended by follows</option>
|
||||
<option value="popular"${postVal === 'popular' ? ' selected' : ''}>Popular (100+)</option>
|
||||
</select>
|
||||
<label for="notif-nearby">Nearby Users</label>
|
||||
<select id="notif-nearby">
|
||||
<option value="off"${nearbyVal === 'off' ? ' selected' : ''}>Off</option>
|
||||
<option value="on"${nearbyVal === 'on' ? ' selected' : ''}>On</option>
|
||||
</select>
|
||||
<p class="empty-hint" style="margin-top:0.5rem">Changes are saved automatically.</p>`;
|
||||
${btnGroup('Messages', 'notif_messages', msgVal, [['off','Off'],['on','On'],['preview','Preview']])}
|
||||
${btnGroup('Posts', 'notif_posts', postVal, [['off','Off'],['follows','Follows'],['recommended','Recommended'],['popular','Popular']])}
|
||||
${btnGroup('Reactions & Comments', 'notif_reacts', reactVal, [['off','Off'],['on','On']])}
|
||||
${btnGroup('Nearby Users', 'notif_nearby', nearbyVal, [['off','Off'],['on','On']])}
|
||||
<p class="empty-hint" style="margin-top:0.75rem">Changes are saved automatically.</p>`;
|
||||
|
||||
openPopover('Notifications', html, {
|
||||
onOpen() {
|
||||
for (const id of ['notif-messages', 'notif-posts', 'notif-nearby']) {
|
||||
$(`#${id}`).addEventListener('change', async (e) => {
|
||||
const key = id.replace('-', '_');
|
||||
await invoke('set_setting', { key, value: e.target.value });
|
||||
document.querySelectorAll('.notif-opt').forEach(btn => {
|
||||
btn.addEventListener('click', async () => {
|
||||
const key = btn.dataset.key;
|
||||
const value = btn.dataset.value;
|
||||
// Update active state
|
||||
btn.closest('.notif-opts').querySelectorAll('.notif-opt').forEach(b => b.classList.remove('active'));
|
||||
btn.classList.add('active');
|
||||
await invoke('set_setting', { key, value });
|
||||
toast('Setting saved');
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
@ -2665,6 +2808,9 @@ async function init() {
|
|||
const info = await loadNodeInfo();
|
||||
await loadStats();
|
||||
await loadFeed();
|
||||
await loadMessages();
|
||||
// Now safe to fire notifications (initial data loaded, won't spam)
|
||||
_notifReady = true;
|
||||
|
||||
// Show setup overlay if no profile exists
|
||||
if (info && !info.hasProfile) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
body { font-family: system-ui, sans-serif; max-width: 640px; margin: 0 auto; padding: 1rem; background: #1a1a2e; color: #e0e0e0; }
|
||||
select option { color: #000 !important; }
|
||||
body { font-family: system-ui, sans-serif; max-width: 640px; margin: 0 auto; padding: 1rem; background: #1a1a2e; color: #e0e0e0; color-scheme: dark; }
|
||||
header { border-bottom: 1px solid #333; padding-bottom: 0.5rem; margin-bottom: 1rem; }
|
||||
header h1 { font-size: 1.4rem; color: #7fdbca; }
|
||||
#stats-bar { font-size: 0.8rem; color: #bbc; margin-top: 0.25rem; }
|
||||
|
|
@ -21,8 +22,15 @@ header h1 { font-size: 1.4rem; color: #7fdbca; }
|
|||
.overlay-close { background: none; border: none; color: #889; font-size: 1.4rem; cursor: pointer; padding: 0 0.3rem; line-height: 1; transition: color 0.15s; }
|
||||
.overlay-close:hover { color: #e74c3c; }
|
||||
.overlay-body { padding: 1rem; max-height: 70vh; overflow-y: auto; }
|
||||
.overlay-body select { width: 100%; background: #1a1a2e; color: #e0e0e0; border: 1px solid #444; border-radius: 4px; padding: 0.4rem; font-size: 0.85rem; font-family: inherit; margin-bottom: 0.75rem; }
|
||||
.overlay-body select { width: 100%; background: #1a1a2e; border: 1px solid #444; border-radius: 4px; padding: 0.4rem; font-size: 0.85rem; font-family: inherit; margin-bottom: 0.75rem; }
|
||||
.overlay-body select:focus { outline: none; border-color: #7fdbca; }
|
||||
.overlay-body select option { background: #fff; color: #000; }
|
||||
.notif-row { margin-bottom: 0.6rem; }
|
||||
.notif-label { display: block; font-size: 0.8rem; color: #bbc; margin-bottom: 0.3rem; }
|
||||
.notif-opts { display: flex; gap: 0.3rem; flex-wrap: wrap; }
|
||||
.notif-opt { background: #1a1a2e; color: #999; border: 1px solid #333; border-radius: 4px; padding: 0.25rem 0.6rem; font-size: 0.75rem; cursor: pointer; transition: all 0.15s; }
|
||||
.notif-opt:hover { border-color: #555; color: #ccc; }
|
||||
.notif-opt.active { background: #3b82f6; color: #fff; border-color: #3b82f6; }
|
||||
.overlay-body label { display: block; font-size: 0.8rem; color: #bbc; margin-bottom: 0.25rem; }
|
||||
|
||||
/* Clickable activity peer IDs */
|
||||
|
|
@ -189,9 +197,9 @@ header h1 { font-size: 1.4rem; color: #7fdbca; }
|
|||
|
||||
/* Visibility selector */
|
||||
#visibility-row { display: flex; gap: 0.4rem; margin-top: 0.35rem; align-items: center; }
|
||||
#visibility-select, #circle-select { background: #1a1a2e; color: #fff; border: 1px solid #444; border-radius: 3px; padding: 0.2rem 0.4rem; font-size: 0.75rem; font-family: inherit; -webkit-appearance: none; appearance: none; color-scheme: dark; }
|
||||
#visibility-select, #circle-select { background: #1a1a2e; border: 1px solid #444; border-radius: 3px; padding: 0.2rem 0.4rem; font-size: 0.75rem; font-family: inherit; -webkit-appearance: none; appearance: none; }
|
||||
#visibility-select:focus, #circle-select:focus { outline: none; border-color: #7fdbca; }
|
||||
#visibility-select option, #circle-select option { background: #1a1a2e; color: #fff; }
|
||||
#visibility-select option, #circle-select option { background: #fff; color: #000; }
|
||||
|
||||
/* Visibility badges on posts */
|
||||
.vis-badge { font-size: 0.6rem; padding: 0.1rem 0.35rem; border-radius: 3px; margin-left: 0.4rem; font-family: system-ui, sans-serif; vertical-align: middle; }
|
||||
|
|
@ -237,7 +245,8 @@ header h1 { font-size: 1.4rem; color: #7fdbca; }
|
|||
.circle-members { font-size: 0.75rem; font-family: monospace; color: #bbc; display: flex; flex-wrap: wrap; gap: 0.3rem; }
|
||||
.circle-member { background: #1e2040; padding: 0.2rem 0.5rem; border-radius: 3px; display: inline-flex; align-items: center; gap: 0.35rem; }
|
||||
.circle-add-row { display: flex; gap: 0.3rem; margin-top: 0.4rem; }
|
||||
.add-member-select { flex: 1; background: #1a1a2e; color: #e0e0e0; border: 1px solid #444; border-radius: 3px; padding: 0.2rem; font-size: 0.75rem; }
|
||||
.add-member-select { flex: 1; background: #1a1a2e; border: 1px solid #444; border-radius: 3px; padding: 0.2rem; font-size: 0.75rem; }
|
||||
.add-member-select option { background: #fff; color: #000; }
|
||||
.empty-hint { color: #667; font-size: 0.8rem; font-style: italic; }
|
||||
.hidden { display: none !important; }
|
||||
|
||||
|
|
@ -246,14 +255,16 @@ header h1 { font-size: 1.4rem; color: #7fdbca; }
|
|||
.anchor-item { display: flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0; border-bottom: 1px solid #1e2040; }
|
||||
.anchor-item:last-child { border-bottom: none; }
|
||||
.anchor-item .peer-label { flex: 1; display: flex; align-items: center; gap: 0.35rem; }
|
||||
#anchor-add-select { flex: 1; background: #1a1a2e; color: #e0e0e0; border: 1px solid #444; border-radius: 3px; padding: 0.2rem; font-size: 0.75rem; }
|
||||
#anchor-add-select { flex: 1; background: #1a1a2e; border: 1px solid #444; border-radius: 3px; padding: 0.2rem; font-size: 0.75rem; }
|
||||
#anchor-add-select option { background: #fff; color: #000; }
|
||||
|
||||
/* DM compose */
|
||||
#dm-compose textarea { width: 100%; padding: 0.5rem; background: #1a1a2e; color: #e0e0e0; border: 1px solid #333; border-radius: 4px; resize: none; font-family: inherit; font-size: 0.9rem; min-height: 60px; line-height: 1.5; transition: border-color 0.15s; margin-top: 0.5rem; }
|
||||
#dm-compose textarea:focus { outline: none; border-color: #7fdbca; }
|
||||
#dm-compose textarea::placeholder { color: #778; }
|
||||
.dm-compose-row { margin-bottom: 0; }
|
||||
#dm-recipient-select { width: 100%; background: #1a1a2e; color: #e0e0e0; border: 1px solid #444; border-radius: 4px; padding: 0.4rem; font-size: 0.85rem; font-family: inherit; }
|
||||
#dm-recipient-select { width: 100%; background: #1a1a2e; border: 1px solid #444; border-radius: 4px; padding: 0.4rem; font-size: 0.85rem; font-family: inherit; }
|
||||
#dm-recipient-select option { background: #fff; color: #000; }
|
||||
#dm-recipient-select:focus { outline: none; border-color: #7fdbca; }
|
||||
.dm-compose-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid #2a2a40; }
|
||||
|
||||
|
|
@ -294,6 +305,14 @@ header h1 { font-size: 1.4rem; color: #7fdbca; }
|
|||
.last-seen { color: #666; }
|
||||
.follows-section-header { font-size: 0.8rem; font-weight: 600; color: #888; padding: 0.5rem 0 0.25rem; border-bottom: 1px solid #2a2a40; margin-bottom: 0.3rem; margin-top: 0.5rem; }
|
||||
.follows-section-header:first-child { margin-top: 0; }
|
||||
.follows-offline-header { cursor: pointer; color: #5b8def !important; }
|
||||
.follows-offline-header:hover { color: #7fdbca !important; }
|
||||
.offline-lightbox { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 999999; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; }
|
||||
.offline-lightbox-content { background: #1a1a2e; border: 1px solid #333; border-radius: 12px; padding: 1rem; max-width: 500px; width: 90%; max-height: 80vh; overflow-y: auto; }
|
||||
.offline-lightbox-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
|
||||
.offline-lightbox-header h3 { color: #e0e0e0; font-size: 1rem; margin: 0; }
|
||||
.offline-lightbox-close { background: none; border: none; color: #889; font-size: 1.4rem; cursor: pointer; }
|
||||
.offline-lightbox-close:hover { color: #e74c3c; }
|
||||
.peer-card-actions { display: flex; gap: 0.3rem; margin-top: 0.35rem; }
|
||||
.peer-card-highlight { border-color: #7fdbca; animation: peerHighlight 2s ease-out; }
|
||||
@keyframes peerHighlight { 0% { border-color: #7fdbca; box-shadow: 0 0 8px rgba(127, 219, 202, 0.3); } 100% { border-color: #2a2a40; box-shadow: none; } }
|
||||
|
|
@ -390,7 +409,10 @@ header h1 { font-size: 1.4rem; color: #7fdbca; }
|
|||
.comment-bubble { display: flex; gap: 0.35rem; align-items: baseline; padding: 0.2rem 0; font-size: 0.82rem; }
|
||||
.comment-author { color: #7fdbca; font-weight: 600; white-space: nowrap; font-size: 0.78rem; }
|
||||
.comment-text { color: #ddd; }
|
||||
.comment-time { color: #777; font-size: 0.7rem; white-space: nowrap; }
|
||||
.comment-time { color: #777; font-size: 0.7rem; white-space: nowrap; display: flex; align-items: center; gap: 0.3rem; }
|
||||
.comment-edit-btn, .comment-delete-btn { background: none; border: none; color: #556; font-size: 0.65rem; cursor: pointer; padding: 0; }
|
||||
.comment-edit-btn:hover { color: #5b8def; }
|
||||
.comment-delete-btn:hover { color: #e74c3c; }
|
||||
.comment-compose { display: flex; gap: 0.35rem; margin-top: 0.4rem; align-items: center; }
|
||||
.comment-input { flex: 1; background: #1a1a2e; border: 1px solid #3a3a5a; border-radius: 0.35rem; padding: 0.3rem 0.5rem; color: #e0e0e0; font-size: 0.82rem; }
|
||||
.comment-input:focus { border-color: #7fdbca; outline: none; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue