Made shared events more obvious.
This commit is contained in:
parent
c498349c35
commit
84a6cf6c96
3 changed files with 16 additions and 7 deletions
|
@ -231,8 +231,6 @@ button.nav > img.icon {
|
|||
flex-direction: column-reverse;
|
||||
}
|
||||
.event {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
padding: 15px;
|
||||
transition: background-color 0.2s linear;
|
||||
}
|
||||
|
@ -328,7 +326,12 @@ button.nav > img.icon {
|
|||
border-top: 1px solid var(--clrBorder);
|
||||
}
|
||||
|
||||
.timestamp, .replying-to, .shared-by {
|
||||
.shared-by {
|
||||
font-size: var(--fsReduced);
|
||||
color: var(--clrTextLight);
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.timestamp, .replying-to {
|
||||
font-size: var(--fsSmall);
|
||||
color: var(--clrTextLight);
|
||||
}
|
||||
|
@ -586,6 +589,7 @@ code {
|
|||
}
|
||||
.event.dm {
|
||||
padding-bottom: 0;
|
||||
display: flex;
|
||||
}
|
||||
.event.dm:hover {
|
||||
background: transparent;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
.flex-fill {
|
||||
flex: auto;
|
||||
}
|
||||
|
@ -80,9 +83,6 @@ img.icon.small {
|
|||
border-radius: 12px;
|
||||
color: var(--clrTextEvMsg);
|
||||
}
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
/* Icon */
|
||||
|
||||
|
|
|
@ -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