Treat posts from groups differently from boosts
This commit is contained in:
parent
e53f0efde9
commit
a8c7e08f3f
|
@ -7,6 +7,13 @@
|
||||||
transparent min(160px, 50%)
|
transparent min(160px, 50%)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
.status-group {
|
||||||
|
background: linear-gradient(
|
||||||
|
160deg,
|
||||||
|
var(--group-faded-color),
|
||||||
|
transparent min(160px, 50%)
|
||||||
|
);
|
||||||
|
}
|
||||||
.status-reply-to {
|
.status-reply-to {
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
160deg,
|
160deg,
|
||||||
|
@ -14,7 +21,7 @@
|
||||||
transparent min(160px, 50%)
|
transparent min(160px, 50%)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
.status-reblog .status-reply-to {
|
:is(.status-reblog, .status-group) .status-reply-to {
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
-20deg,
|
-20deg,
|
||||||
var(--reply-to-faded-color),
|
var(--reply-to-faded-color),
|
||||||
|
@ -51,6 +58,11 @@
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
vertical-align: text-bottom;
|
vertical-align: text-bottom;
|
||||||
}
|
}
|
||||||
|
.status-group .status-pre-meta .icon {
|
||||||
|
color: var(--group-color);
|
||||||
|
margin-right: 4px;
|
||||||
|
vertical-align: text-bottom;
|
||||||
|
}
|
||||||
|
|
||||||
/* STATUS */
|
/* STATUS */
|
||||||
|
|
||||||
|
|
|
@ -136,6 +136,7 @@ function Status({
|
||||||
username,
|
username,
|
||||||
emojis: accountEmojis,
|
emojis: accountEmojis,
|
||||||
bot,
|
bot,
|
||||||
|
group,
|
||||||
},
|
},
|
||||||
id,
|
id,
|
||||||
repliesCount,
|
repliesCount,
|
||||||
|
@ -230,6 +231,25 @@ function Status({
|
||||||
|
|
||||||
if (reblog) {
|
if (reblog) {
|
||||||
// If has statusID, means useItemID (cached in states)
|
// If has statusID, means useItemID (cached in states)
|
||||||
|
|
||||||
|
if (group) {
|
||||||
|
return (
|
||||||
|
<div class="status-group" onMouseEnter={debugHover}>
|
||||||
|
<div class="status-pre-meta">
|
||||||
|
<Icon icon="group" size="l" alt="Group" />{' '}
|
||||||
|
<NameText account={status.account} instance={instance} showAvatar />
|
||||||
|
</div>
|
||||||
|
<Status
|
||||||
|
status={statusID ? null : reblog}
|
||||||
|
statusID={statusID ? reblog.id : null}
|
||||||
|
instance={instance}
|
||||||
|
size={size}
|
||||||
|
contentTextWeight={contentTextWeight}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class="status-reblog" onMouseEnter={debugHover}>
|
<div class="status-reblog" onMouseEnter={debugHover}>
|
||||||
<div class="status-pre-meta">
|
<div class="status-pre-meta">
|
||||||
|
|
|
@ -35,6 +35,8 @@
|
||||||
--button-plain-bg-hover-color: rgba(128, 128, 128, 0.1);
|
--button-plain-bg-hover-color: rgba(128, 128, 128, 0.1);
|
||||||
--reblog-color: var(--purple-color);
|
--reblog-color: var(--purple-color);
|
||||||
--reblog-faded-color: #892be220;
|
--reblog-faded-color: #892be220;
|
||||||
|
--group-color: var(--green-color);
|
||||||
|
--group-faded-color: #00640020;
|
||||||
--reply-to-color: var(--orange-color);
|
--reply-to-color: var(--orange-color);
|
||||||
--reply-to-text-color: #b36200;
|
--reply-to-text-color: #b36200;
|
||||||
--favourite-color: var(--red-color);
|
--favourite-color: var(--red-color);
|
||||||
|
|
|
@ -6,7 +6,7 @@ export function groupBoosts(values) {
|
||||||
let serialBoosts = 0;
|
let serialBoosts = 0;
|
||||||
for (let i = 0; i < values.length; i++) {
|
for (let i = 0; i < values.length; i++) {
|
||||||
const item = values[i];
|
const item = values[i];
|
||||||
if (item.reblog) {
|
if (item.reblog && !item.account?.group) {
|
||||||
boostStash.push(item);
|
boostStash.push(item);
|
||||||
serialBoosts++;
|
serialBoosts++;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue