Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2856d1f107 | ||
|
|
6ed5417ba1 | ||
|
|
43212d3cdc | ||
|
|
ff3bcd91f1 | ||
|
|
7a1ff2e11d | ||
|
|
d0802e96d9 | ||
|
|
04caae7725 | ||
|
|
230418ca76 | ||
|
|
0270e46f4b | ||
|
|
a4593f723b | ||
|
|
58926a4a05 | ||
|
|
a831c0612b | ||
|
|
04798614fb | ||
|
|
fc12cb3467 |
@@ -83,7 +83,10 @@ jobs:
|
|||||||
java-version: '21'
|
java-version: '21'
|
||||||
|
|
||||||
- name: Setup Android SDK
|
- name: Setup Android SDK
|
||||||
uses: android-actions/setup-android@v3
|
uses: android-actions/setup-android@v4
|
||||||
|
with:
|
||||||
|
# Google removed the legacy `tools` package; v3 still tries to install it.
|
||||||
|
packages: platform-tools
|
||||||
|
|
||||||
- name: Install dependencies (root)
|
- name: Install dependencies (root)
|
||||||
run: npm ci --prefer-offline
|
run: npm ci --prefer-offline
|
||||||
|
|||||||
@@ -7,6 +7,9 @@
|
|||||||
"LocalNotifications": {
|
"LocalNotifications": {
|
||||||
"smallIcon": "ic_stat_paarrot",
|
"smallIcon": "ic_stat_paarrot",
|
||||||
"iconColor": "#FF8A00"
|
"iconColor": "#FF8A00"
|
||||||
|
},
|
||||||
|
"CapacitorHttp": {
|
||||||
|
"enabled": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
Submodule cinny updated: 87c9f59826...47979718eb
@@ -14,7 +14,8 @@ import { RoomTimeline } from './RoomTimeline';
|
|||||||
import { RoomViewTyping } from './RoomViewTyping';
|
import { RoomViewTyping } from './RoomViewTyping';
|
||||||
import { RoomTombstone } from './RoomTombstone';
|
import { RoomTombstone } from './RoomTombstone';
|
||||||
import { RoomInput } from './RoomInput';
|
import { RoomInput } from './RoomInput';
|
||||||
import { RoomViewFollowing, RoomViewFollowingPlaceholder } from './RoomViewFollowing';
|
import { RoomViewFollowing } from './RoomViewFollowing';
|
||||||
|
import * as roomViewCss from './RoomViewFollowing.css';
|
||||||
import { Page } from '../../components/page';
|
import { Page } from '../../components/page';
|
||||||
import { RoomViewHeader } from './RoomViewHeader';
|
import { RoomViewHeader } from './RoomViewHeader';
|
||||||
import { useKeyDown } from '../../hooks/useKeyDown';
|
import { useKeyDown } from '../../hooks/useKeyDown';
|
||||||
@@ -116,7 +117,7 @@ export function RoomView({ room, eventId }: { room: Room; eventId?: string }) {
|
|||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<MobileSwipeToReplyLayer room={room} editor={editor}>
|
<MobileSwipeToReplyLayer room={room} editor={editor}>
|
||||||
<Box grow="Yes" direction="Column">
|
<Box grow="Yes" direction="Column" style={{ position: 'relative', minHeight: 0 }}>
|
||||||
<RoomTimeline
|
<RoomTimeline
|
||||||
key={roomId}
|
key={roomId}
|
||||||
room={room}
|
room={room}
|
||||||
@@ -124,7 +125,10 @@ export function RoomView({ room, eventId }: { room: Room; eventId?: string }) {
|
|||||||
roomInputRef={roomInputRef}
|
roomInputRef={roomInputRef}
|
||||||
editor={editor}
|
editor={editor}
|
||||||
/>
|
/>
|
||||||
<RoomViewTyping room={room} />
|
<div className={roomViewCss.RoomViewBottomFloat}>
|
||||||
|
<RoomViewTyping room={room} />
|
||||||
|
{!hideActivity && <RoomViewFollowing room={room} />}
|
||||||
|
</div>
|
||||||
</Box>
|
</Box>
|
||||||
</MobileSwipeToReplyLayer>
|
</MobileSwipeToReplyLayer>
|
||||||
<Box
|
<Box
|
||||||
@@ -134,13 +138,6 @@ export function RoomView({ room, eventId }: { room: Room; eventId?: string }) {
|
|||||||
data-composer-flush={flushComposer ? 'true' : undefined}
|
data-composer-flush={flushComposer ? 'true' : undefined}
|
||||||
className={composerCss.ComposerDock}
|
className={composerCss.ComposerDock}
|
||||||
>
|
>
|
||||||
{immersive && !hideActivity && (
|
|
||||||
<div className={composerCss.FollowingFloat}>
|
|
||||||
<div className={composerCss.FollowingFloatHit}>
|
|
||||||
<RoomViewFollowing room={room} />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
<div style={{ padding: composerPadding }}>
|
<div style={{ padding: composerPadding }}>
|
||||||
{tombstoneEvent ? (
|
{tombstoneEvent ? (
|
||||||
<RoomTombstone
|
<RoomTombstone
|
||||||
@@ -171,12 +168,6 @@ export function RoomView({ room, eventId }: { room: Room; eventId?: string }) {
|
|||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{!immersive &&
|
|
||||||
(hideActivity ? (
|
|
||||||
<RoomViewFollowingPlaceholder />
|
|
||||||
) : (
|
|
||||||
<RoomViewFollowing room={room} />
|
|
||||||
))}
|
|
||||||
</Box>
|
</Box>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -2,6 +2,20 @@ import { style } from '@vanilla-extract/css';
|
|||||||
import { recipe } from '@vanilla-extract/recipes';
|
import { recipe } from '@vanilla-extract/recipes';
|
||||||
import { DefaultReset, color, config, toRem } from 'folds';
|
import { DefaultReset, color, config, toRem } from 'folds';
|
||||||
|
|
||||||
|
/** Floats typing + read receipts over the bottom of the timeline. */
|
||||||
|
export const RoomViewBottomFloat = style({
|
||||||
|
position: 'absolute',
|
||||||
|
bottom: 0,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
zIndex: 1,
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'row',
|
||||||
|
alignItems: 'center',
|
||||||
|
gap: config.space.S200,
|
||||||
|
pointerEvents: 'none',
|
||||||
|
});
|
||||||
|
|
||||||
export const RoomViewFollowingPlaceholder = style([
|
export const RoomViewFollowingPlaceholder = style([
|
||||||
DefaultReset,
|
DefaultReset,
|
||||||
{
|
{
|
||||||
@@ -15,20 +29,12 @@ export const RoomViewFollowing = recipe({
|
|||||||
{
|
{
|
||||||
minHeight: toRem(28),
|
minHeight: toRem(28),
|
||||||
padding: `0 ${config.space.S400}`,
|
padding: `0 ${config.space.S400}`,
|
||||||
width: '100%',
|
marginLeft: 'auto',
|
||||||
backgroundColor: color.Surface.Container,
|
maxWidth: '50%',
|
||||||
|
backgroundColor: 'transparent',
|
||||||
color: color.Surface.OnContainer,
|
color: color.Surface.OnContainer,
|
||||||
outline: 'none',
|
outline: 'none',
|
||||||
selectors: {
|
pointerEvents: 'auto',
|
||||||
// Compact floating chip while the keyboard is open.
|
|
||||||
'[data-composer-flush="true"] &': {
|
|
||||||
minHeight: 0,
|
|
||||||
width: 'auto',
|
|
||||||
maxWidth: '100%',
|
|
||||||
padding: `${config.space.S100} ${config.space.S200}`,
|
|
||||||
backgroundColor: 'transparent',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
variants: {
|
variants: {
|
||||||
|
|||||||
@@ -62,6 +62,10 @@ import colorMXID from '../../../../util/colorMXID';
|
|||||||
import { getPowerTagIconSrc } from '../../../hooks/useMemberPowerTag';
|
import { getPowerTagIconSrc } from '../../../hooks/useMemberPowerTag';
|
||||||
import { Presence, useUserPresence } from '../../../hooks/useUserPresence';
|
import { Presence, useUserPresence } from '../../../hooks/useUserPresence';
|
||||||
import { useOtherUserColor } from '../../../hooks/useUserColor';
|
import { useOtherUserColor } from '../../../hooks/useUserColor';
|
||||||
|
import { useIsDirectRoom } from '../../../hooks/useRoom';
|
||||||
|
import { useOtherUserCollectibles } from '../../../hooks/useUserCollectibles';
|
||||||
|
import { pickAvatarDecorationUrl, pickNameplateUrl } from '../../../utils/collectibleAssets';
|
||||||
|
import * as avatarDecorationCss from '../../../styles/AvatarDecoration.css';
|
||||||
|
|
||||||
export type ReactionHandler = (keyOrMxc: string, shortcode: string) => void;
|
export type ReactionHandler = (keyOrMxc: string, shortcode: string) => void;
|
||||||
|
|
||||||
@@ -754,8 +758,15 @@ export const Message = as<'div', MessageProps>(
|
|||||||
) => {
|
) => {
|
||||||
const mx = useMatrixClient();
|
const mx = useMatrixClient();
|
||||||
const useAuthentication = useMediaAuthentication();
|
const useAuthentication = useMediaAuthentication();
|
||||||
|
const direct = useIsDirectRoom();
|
||||||
const senderId = mEvent.getSender() ?? '';
|
const senderId = mEvent.getSender() ?? '';
|
||||||
const senderPresence = useUserPresence(senderId);
|
const senderPresence = useUserPresence(senderId);
|
||||||
|
const { assetUrls } = useOtherUserCollectibles(senderId);
|
||||||
|
const nameplateUrl = pickNameplateUrl(assetUrls);
|
||||||
|
const nameplateIsVideo = Boolean(
|
||||||
|
assetUrls['nameplate:animated'] || assetUrls['nameplate:asset.webm']
|
||||||
|
);
|
||||||
|
const avatarDecorationUrl = pickAvatarDecorationUrl(assetUrls);
|
||||||
|
|
||||||
const [hover, setHover] = useState(false);
|
const [hover, setHover] = useState(false);
|
||||||
const { hoverProps } = useHover({ onHoverChange: setHover });
|
const { hoverProps } = useHover({ onHoverChange: setHover });
|
||||||
@@ -796,6 +807,7 @@ export const Message = as<'div', MessageProps>(
|
|||||||
|
|
||||||
// Priority: custom user color > tag color (non-legacy) > colorMXID (legacy)
|
// Priority: custom user color > tag color (non-legacy) > colorMXID (legacy)
|
||||||
const usernameColor = customUserColor ?? (legacyUsernameColor ? colorMXID(senderId) : tagColor);
|
const usernameColor = customUserColor ?? (legacyUsernameColor ? colorMXID(senderId) : tagColor);
|
||||||
|
const showNameplate = direct && hover && Boolean(nameplateUrl);
|
||||||
|
|
||||||
const headerJSX = !collapse && (
|
const headerJSX = !collapse && (
|
||||||
<Box
|
<Box
|
||||||
@@ -824,23 +836,41 @@ export const Message = as<'div', MessageProps>(
|
|||||||
</Username>
|
</Username>
|
||||||
{tagIconSrc && <PowerIcon size="100" iconSrc={tagIconSrc} />}
|
{tagIconSrc && <PowerIcon size="100" iconSrc={tagIconSrc} />}
|
||||||
</Box>
|
</Box>
|
||||||
<Box shrink="No" gap="100">
|
<Box shrink="No" className={css.MessageNameplateAnchor}>
|
||||||
{messageLayout === MessageLayout.Modern && hover && (
|
<Box shrink="No" gap="100" alignItems="Center">
|
||||||
<>
|
{messageLayout === MessageLayout.Modern && hover && (
|
||||||
<Text as="span" size="T200" priority="300">
|
<>
|
||||||
{senderId}
|
<Text as="span" size="T200" priority="300">
|
||||||
</Text>
|
{senderId}
|
||||||
<Text as="span" size="T200" priority="300">
|
</Text>
|
||||||
|
|
<Text as="span" size="T200" priority="300">
|
||||||
</Text>
|
|
|
||||||
</>
|
</Text>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
<Time
|
||||||
|
ts={mEvent.getTs()}
|
||||||
|
compact={messageLayout === MessageLayout.Compact}
|
||||||
|
hour24Clock={hour24Clock}
|
||||||
|
dateFormatString={dateFormatString}
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
{showNameplate && (
|
||||||
|
<div className={css.MessageNameplateWrap}>
|
||||||
|
{nameplateIsVideo ? (
|
||||||
|
<video
|
||||||
|
className={css.MessageNameplateOverlay}
|
||||||
|
src={nameplateUrl}
|
||||||
|
autoPlay
|
||||||
|
loop
|
||||||
|
muted
|
||||||
|
playsInline
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<img className={css.MessageNameplateOverlay} src={nameplateUrl} alt="" draggable={false} />
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
<Time
|
|
||||||
ts={mEvent.getTs()}
|
|
||||||
compact={messageLayout === MessageLayout.Compact}
|
|
||||||
hour24Clock={hour24Clock}
|
|
||||||
dateFormatString={dateFormatString}
|
|
||||||
/>
|
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
@@ -857,24 +887,38 @@ export const Message = as<'div', MessageProps>(
|
|||||||
<AvatarBase
|
<AvatarBase
|
||||||
className={messageLayout === MessageLayout.Bubble ? css.BubbleAvatarBase : undefined}
|
className={messageLayout === MessageLayout.Bubble ? css.BubbleAvatarBase : undefined}
|
||||||
>
|
>
|
||||||
<Avatar
|
<div className={css.MessageAvatarStack}>
|
||||||
className={classNames(css.MessageAvatar, presenceClass)}
|
<Avatar
|
||||||
as="button"
|
className={classNames(
|
||||||
size="300"
|
avatarDecorationUrl ? css.MessageAvatarCircular : css.MessageAvatar,
|
||||||
data-user-id={senderId}
|
!avatarDecorationUrl && presenceClass
|
||||||
onClick={onUserClick}
|
)}
|
||||||
>
|
radii={avatarDecorationUrl ? 'Pill' : undefined}
|
||||||
<UserAvatar
|
as="button"
|
||||||
userId={senderId}
|
size="300"
|
||||||
src={
|
data-user-id={senderId}
|
||||||
senderAvatarMxc
|
onClick={onUserClick}
|
||||||
? mxcUrlToHttp(mx, senderAvatarMxc, useAuthentication, 48, 48, 'crop') ?? undefined
|
>
|
||||||
: undefined
|
<UserAvatar
|
||||||
}
|
userId={senderId}
|
||||||
alt={senderDisplayName}
|
src={
|
||||||
renderFallback={() => <Icon size="200" src={Icons.User} filled />}
|
senderAvatarMxc
|
||||||
/>
|
? mxcUrlToHttp(mx, senderAvatarMxc, useAuthentication, 48, 48, 'crop') ?? undefined
|
||||||
</Avatar>
|
: undefined
|
||||||
|
}
|
||||||
|
alt={senderDisplayName}
|
||||||
|
renderFallback={() => <Icon size="200" src={Icons.User} filled />}
|
||||||
|
/>
|
||||||
|
</Avatar>
|
||||||
|
{avatarDecorationUrl && (
|
||||||
|
<img
|
||||||
|
className={avatarDecorationCss.AvatarDecorationOverlay}
|
||||||
|
src={avatarDecorationUrl}
|
||||||
|
alt=""
|
||||||
|
draggable={false}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</AvatarBase>
|
</AvatarBase>
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -959,6 +1003,10 @@ export const Message = as<'div', MessageProps>(
|
|||||||
{...focusWithinProps}
|
{...focusWithinProps}
|
||||||
ref={ref}
|
ref={ref}
|
||||||
>
|
>
|
||||||
|
<div
|
||||||
|
className={css.MessageContentLayer}
|
||||||
|
data-message-nameplate-readable={showNameplate ? '' : undefined}
|
||||||
|
>
|
||||||
{!edit && (hover || !!menuAnchor || !!emojiBoardAnchor) && (
|
{!edit && (hover || !!menuAnchor || !!emojiBoardAnchor) && (
|
||||||
<div className={css.MessageOptionsBase}>
|
<div className={css.MessageOptionsBase}>
|
||||||
<Menu className={css.MessageOptionsBar} variant="SurfaceVariant">
|
<Menu className={css.MessageOptionsBar} variant="SurfaceVariant">
|
||||||
@@ -1247,6 +1295,7 @@ export const Message = as<'div', MessageProps>(
|
|||||||
{msgContentJSX}
|
{msgContentJSX}
|
||||||
</ModernLayout>
|
</ModernLayout>
|
||||||
)}
|
)}
|
||||||
|
</div>
|
||||||
</MessageBase>
|
</MessageBase>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,63 +1,5 @@
|
|||||||
import { style } from '@vanilla-extract/css';
|
import { style } from '@vanilla-extract/css';
|
||||||
import { recipe } from '@vanilla-extract/recipes';
|
|
||||||
import { DefaultReset, color, config } from 'folds';
|
|
||||||
|
|
||||||
export const ComposerDock = style({
|
export const ComposerDock = style({
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
});
|
});
|
||||||
|
|
||||||
/** Read receipts float above the input so they don't reserve layout height. */
|
|
||||||
export const FollowingFloat = style({
|
|
||||||
position: 'absolute',
|
|
||||||
bottom: '100%',
|
|
||||||
left: 0,
|
|
||||||
right: 0,
|
|
||||||
zIndex: 2,
|
|
||||||
display: 'flex',
|
|
||||||
justifyContent: 'flex-end',
|
|
||||||
pointerEvents: 'none',
|
|
||||||
padding: `0 ${config.space.S200}`,
|
|
||||||
});
|
|
||||||
|
|
||||||
export const FollowingFloatHit = style({
|
|
||||||
pointerEvents: 'auto',
|
|
||||||
maxWidth: '100%',
|
|
||||||
});
|
|
||||||
|
|
||||||
export const RoomViewFollowingPlaceholder = style([
|
|
||||||
DefaultReset,
|
|
||||||
{
|
|
||||||
display: 'none',
|
|
||||||
height: 0,
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
export const RoomViewFollowing = recipe({
|
|
||||||
base: [
|
|
||||||
DefaultReset,
|
|
||||||
{
|
|
||||||
minHeight: 0,
|
|
||||||
padding: `${config.space.S100} ${config.space.S200}`,
|
|
||||||
width: 'auto',
|
|
||||||
maxWidth: '100%',
|
|
||||||
backgroundColor: 'transparent',
|
|
||||||
color: color.Surface.OnContainer,
|
|
||||||
outline: 'none',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
variants: {
|
|
||||||
clickable: {
|
|
||||||
true: {
|
|
||||||
cursor: 'pointer',
|
|
||||||
selectors: {
|
|
||||||
'&:hover, &:focus-visible': {
|
|
||||||
color: color.Primary.Main,
|
|
||||||
},
|
|
||||||
'&:active': {
|
|
||||||
color: color.Primary.Main,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "paarrot",
|
"name": "paarrot",
|
||||||
"version": "4.11.163",
|
"version": "4.11.170",
|
||||||
"description": "Paarrot - A Matrix client based on Cinny",
|
"description": "Paarrot - A Matrix client based on Cinny",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.0.0"
|
"node": ">=18.0.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user