Made shared events more obvious.
This commit is contained in:
parent
c498349c35
commit
84a6cf6c96
3 changed files with 16 additions and 7 deletions
|
@ -67,6 +67,8 @@ function render_event(model, ev, opts={}) {
|
|||
if (!opts.is_composing)
|
||||
classes += " bottom-border";
|
||||
return html`<div id="ev${ev.id}" class="${classes}">
|
||||
$${render_shared_by(ev, opts)}
|
||||
<div class="flex">
|
||||
<div class="userpic">
|
||||
$${render_profile_img(profile)}</div>
|
||||
<div class="event-content">
|
||||
|
@ -78,6 +80,7 @@ function render_event(model, ev, opts={}) {
|
|||
$${render_event_body(model, ev, opts)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`
|
||||
}
|
||||
|
||||
|
@ -116,6 +119,7 @@ function render_event_nointeract(model, ev, opts={}) {
|
|||
const profile = model_get_profile(model, ev.pubkey);
|
||||
const delta = fmt_since_str(new Date().getTime(), ev.created_at*1000)
|
||||
return html`<div class="event border-bottom">
|
||||
<div class="flex">
|
||||
<div class="userpic">
|
||||
$${render_profile_img(profile)}
|
||||
</div>
|
||||
|
@ -128,6 +132,7 @@ function render_event_nointeract(model, ev, opts={}) {
|
|||
$${render_event_body(model, ev, opts)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`
|
||||
}
|
||||
|
||||
|
@ -143,7 +148,7 @@ function render_event_body(model, ev, opts) {
|
|||
show_media = model.contacts.friends.has(ev.pubkey);
|
||||
}
|
||||
let str = "<div>";
|
||||
str += shared ? render_shared_by(ev, opts) : render_replying_to(model, ev);
|
||||
str += render_replying_to(model, ev);
|
||||
str += `</div><p>
|
||||
${format_content(model, ev, show_media)}
|
||||
</p>`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue