Added basic settings support.

You can edit relays, embed options, and sign out. This moves the signout
button from the nav to the settings area.
This commit is contained in:
Thomas Mathews 2022-12-29 21:56:06 -08:00
parent 9a3361750e
commit e3b31af127
12 changed files with 198 additions and 40 deletions

View file

@ -102,8 +102,12 @@ function render_event_body(model, ev, opts) {
const can_delete = model.pubkey === ev.pubkey ||
(opts.shared && model.pubkey == opts.shared.pubkey);
// Only show media for content that is by friends.
const show_media = !opts.is_composing &&
model.contacts.friends.has(ev.pubkey);
let show_media = true;
if (opts.is_composing) {
show_media = false;
} else if (model.embeds == "friends") {
show_media = model.contacts.friends.has(ev.pubkey);
}
let str = "<div>";
str += shared ? render_shared_by(ev, opts) : render_replying_to(model, ev);
str += `</div><p>