Fix: Session icon alignment.

Fix: i18n blocked messages / users.
This commit is contained in:
Paul 2021-07-10 18:06:21 +01:00
parent 5b5ca47cb0
commit 93ee98717d
4 changed files with 15 additions and 6 deletions

2
external/lang vendored

@ -1 +1 @@
Subproject commit 2054052c791ff2396dcbde68ae257fa13a93ab6c
Subproject commit 3931bf87e94264d92556a2f3ee96c6051be75b02

View file

@ -6,7 +6,7 @@ import { Users } from "revolt.js/dist/api/objects";
import styled, { css } from "styled-components";
import { Text } from "preact-i18n";
import { useEffect, useLayoutEffect, useState } from "preact/hooks";
import { useLayoutEffect, useState } from "preact/hooks";
import { useRenderState } from "../../../../lib/renderer/Singleton";
@ -157,7 +157,9 @@ export function MessageReply({ index, channel, id }: Props) {
<ReplyBase head={index === 0}>
<Reply size={16} />
{user?.relationship === Users.Relationship.Blocked ? (
<>Blocked User</>
<>
<Text id="app.main.channel.misc.blocked_user" />
</>
) : (
<>
{message.author === SYSTEM_USER_ID ? (

View file

@ -3,6 +3,7 @@ import { Users } from "revolt.js/dist/api/objects";
import styled from "styled-components";
import { decodeTime } from "ulid";
import { Text } from "preact-i18n";
import { memo } from "preact/compat";
import { useContext, useEffect, useState } from "preact/hooks";
@ -116,7 +117,11 @@ function MessageRenderer({ id, state, queue, highlight }: Props) {
function pushBlocked() {
render.push(
<BlockedMessage>
<X size={16} /> {blocked} blocked messages
<X size={16} />{" "}
<Text
id="app.main.channel.misc.blocked_messages"
fields={{ count: blocked }}
/>
</BlockedMessage>,
);
blocked = 0;

View file

@ -354,9 +354,11 @@
display: flex;
gap: 12px;
flex-grow: 1;
svg {
vertical-align: auto;
}
}
}
.entry {