Style quotes like replies

pull/1296/head
Lim Chee Aun 2025-09-28 18:16:13 +08:00
rodzic 056d86947b
commit 53d33ead0d
5 zmienionych plików z 48 dodań i 36 usunięć

Wyświetl plik

@ -253,7 +253,6 @@ const contentText = {
}
/>
),
quote: ({ account }) => <Trans>{account} quoted your post.</Trans>,
quoted_update: ({ account }) => (
<Trans>{account} edited a post you have quoted.</Trans>
),
@ -342,7 +341,7 @@ function Notification({
} = notification;
let { type } = notification;
if (type === 'mention' && !status) {
if ((type === 'mention' || type === 'quote') && !status) {
// Could be deleted
return null;
}
@ -527,7 +526,7 @@ function Notification({
</mark>
</>
)} */}
{type !== 'mention' && (
{type !== 'mention' && type !== 'quote' && (
<>
<p>{text}</p>
{type === 'follow_request' && (

Wyświetl plik

@ -80,6 +80,7 @@
--reblog-color: var(--purple-color);
--reblog-faded-color: #892be220;
--quote-color: var(--violet-red-color);
--quote-faded-color: #c7158520;
--group-color: var(--green-color);
--group-faded-color: #00640020;
--reply-to-color: var(--orange-color);

56
src/locales/en.po wygenerowano
Wyświetl plik

@ -817,7 +817,7 @@ msgid "Rejected"
msgstr ""
#: src/components/generic-accounts.jsx:154
#: src/components/notification.jsx:468
#: src/components/notification.jsx:467
#: src/pages/accounts.jsx:50
#: src/pages/search.jsx:335
#: src/pages/search.jsx:368
@ -1481,106 +1481,102 @@ msgstr ""
msgid "{count, plural, =1 {{postsCount, plural, =1 {{postType, select, reply {{account} boosted & liked your reply.} other {{account} boosted & liked your post.}}} other {{account} boosted & liked {postsCount} of your posts.}}} other {{postType, select, reply {<0><1>{0}</1> people</0> boosted & liked your reply.} other {<2><3>{1}</3> people</2> boosted & liked your post.}}}}"
msgstr ""
#: src/components/notification.jsx:256
msgid "{account} quoted your post."
msgstr "{account} quoted your post."
#: src/components/notification.jsx:258
#: src/components/notification.jsx:257
msgid "{account} edited a post you have quoted."
msgstr "{account} edited a post you have quoted."
#: src/components/notification.jsx:260
#: src/components/notification.jsx:259
msgid "{account} signed up."
msgstr ""
#: src/components/notification.jsx:262
#: src/components/notification.jsx:261
msgid "{account} reported {targetAccount}"
msgstr ""
#: src/components/notification.jsx:267
#: src/components/notification.jsx:266
msgid "Lost connections with <0>{name}</0>."
msgstr ""
#: src/components/notification.jsx:273
#: src/components/notification.jsx:272
msgid "Moderation warning"
msgstr ""
#: src/components/notification.jsx:278
#: src/components/notification.jsx:277
msgid "Your {year} #Wrapstodon is here!"
msgstr "Your {year} #Wrapstodon is here!"
#: src/components/notification.jsx:284
#: src/components/notification.jsx:283
msgid "An admin from <0>{from}</0> has suspended <1>{targetName}</1>, which means you can no longer receive updates from them or interact with them."
msgstr ""
#: src/components/notification.jsx:290
#: src/components/notification.jsx:289
msgid "An admin from <0>{from}</0> has blocked <1>{targetName}</1>. Affected followers: {followersCount}, followings: {followingCount}."
msgstr ""
#: src/components/notification.jsx:296
#: src/components/notification.jsx:295
msgid "You have blocked <0>{targetName}</0>. Removed followers: {followersCount}, followings: {followingCount}."
msgstr ""
#: src/components/notification.jsx:304
#: src/components/notification.jsx:303
msgid "Your account has received a moderation warning."
msgstr ""
#: src/components/notification.jsx:305
#: src/components/notification.jsx:304
msgid "Your account has been disabled."
msgstr ""
#: src/components/notification.jsx:306
#: src/components/notification.jsx:305
msgid "Some of your posts have been marked as sensitive."
msgstr ""
#: src/components/notification.jsx:307
#: src/components/notification.jsx:306
msgid "Some of your posts have been deleted."
msgstr ""
#: src/components/notification.jsx:308
#: src/components/notification.jsx:307
msgid "Your posts will be marked as sensitive from now on."
msgstr ""
#: src/components/notification.jsx:309
#: src/components/notification.jsx:308
msgid "Your account has been limited."
msgstr ""
#: src/components/notification.jsx:310
#: src/components/notification.jsx:309
msgid "Your account has been suspended."
msgstr ""
#: src/components/notification.jsx:387
#: src/components/notification.jsx:386
msgid "[Unknown notification type: {type}]"
msgstr ""
#: src/components/notification.jsx:512
#: src/components/notification.jsx:463
#: src/components/status.jsx:1177
#: src/components/status.jsx:1187
msgid "Boosted/Liked by…"
msgstr ""
#: src/components/notification.jsx:465
#: src/components/notification.jsx:464
msgid "Liked by…"
msgstr ""
#: src/components/notification.jsx:466
#: src/components/notification.jsx:465
msgid "Boosted by…"
msgstr ""
#: src/components/notification.jsx:467
#: src/components/notification.jsx:466
msgid "Followed by…"
msgstr ""
#: src/components/notification.jsx:548
#: src/components/notification.jsx:564
#: src/components/notification.jsx:547
#: src/components/notification.jsx:563
msgid "Learn more <0/>"
msgstr ""
#: src/components/notification.jsx:573
#: src/components/notification.jsx:572
msgid "View #Wrapstodon"
msgstr "View #Wrapstodon"
#: src/components/notification.jsx:862
#: src/components/notification.jsx:813
#: src/components/status.jsx:275
msgid "Read more →"
msgstr ""

Wyświetl plik

@ -51,7 +51,7 @@
cursor: pointer;
}
}
.notification-type.notification-mention {
.notification-type:is(.notification-mention, .notification-quote) {
padding-top: 16px;
}
.only-mentions .notification:not(.notification-mention),
@ -141,10 +141,14 @@
overflow: hidden;
filter: saturate(0.25);
}
.notification .status-link:not(.status-type-mention) > .status {
.notification
.status-link:not(.status-type-mention, .status-type-quote)
> .status {
font-size: calc(var(--text-size) * 0.9);
}
.notification .status-link.truncated:not(.status-type-mention) > .status {
.notification
.status-link.truncated:not(.status-type-mention, .status-type-quote)
> .status {
/* fade out mask gradient bottom */
mask-image: linear-gradient(
rgba(0, 0, 0, 1) 130px,
@ -189,6 +193,13 @@
border-color: var(--reply-to-color);
box-shadow: 0 0 0 3px var(--reply-to-faded-color);
}
.notification .status-link.status-type-quote {
max-height: 320px;
filter: none;
background-color: var(--bg-color);
border-color: var(--quote-color);
box-shadow: 0 0 0 3px var(--quote-faded-color);
}
.notification:focus-visible .status-link,
.notification .status-link:is(:hover, :focus) {
background-color: var(--bg-blur-color);
@ -199,6 +210,10 @@
border-color: var(--reply-to-color);
box-shadow: 0 0 5px var(--reply-to-color);
}
.notification .status-link.status-type-quote:is(:hover, :focus) {
border-color: var(--quote-color);
box-shadow: 0 0 5px var(--quote-color);
}
.notification .status-link:active {
filter: brightness(0.95);
}

Wyświetl plik

@ -1,6 +1,7 @@
// This is like very lame "type-checking" lol
const notificationTypeKeys = {
mention: ['account', 'status'],
quote: ['account', 'status'],
status: ['account', 'status'],
reblog: ['account', 'status'],
follow: ['account'],