CI / Build & Quality Checks (pull_request) Successful in 1m50s
CI / Trigger Desktop Build (pull_request) Skipped
CI / Docker image build & smoke test (pull_request) Skipped
CI / Secret scan (gitleaks) (pull_request) Successful in 13s
CI / Playwright smoke (e2e) (pull_request) Successful in 12m29s
#279: Room Settings → Soundboard said clips are "inherited by every room under this space" for plain rooms too; the wording now follows room.isSpaceRoom(). The Push to Deafen description only mentions Escape while rebinding. "can pin a messages" → "can pin a message". #280: the tracking stripper removed Reddit's context=, which is what makes a comment permalink show its parent comments. Only share_id and rdt are stripped now. Fixes #279 Fixes #280 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
66 lines
2.6 KiB
TypeScript
66 lines
2.6 KiB
TypeScript
import React from 'react';
|
|
import { Box, Icon, IconButton, Icons, Scroll, Text } from 'folds';
|
|
import { Page, PageContent, PageHeader } from '../../../components/page';
|
|
import { useRoom } from '../../../hooks/useRoom';
|
|
import { RoomSoundboardPack, UserSoundboardPack } from '../../../components/soundboard-pack-view';
|
|
|
|
type SoundboardProps = {
|
|
requestClose: () => void;
|
|
};
|
|
|
|
/**
|
|
* Soundboard management page (Room/Space settings). Mirrors the Emojis &
|
|
* Stickers page: a shared room/space pack (admin-editable, inherited by child
|
|
* rooms like emoji packs) plus the user's personal pack. A single default room
|
|
* pack (state key "") is used per room/space.
|
|
*/
|
|
export function Soundboard({ requestClose }: SoundboardProps) {
|
|
const room = useRoom();
|
|
|
|
return (
|
|
<Page>
|
|
<PageHeader outlined={false}>
|
|
<Box grow="Yes" gap="200">
|
|
<Box grow="Yes" alignItems="Center" gap="200">
|
|
<Text as="h2" size="H3" truncate>
|
|
Soundboard
|
|
</Text>
|
|
</Box>
|
|
<Box shrink="No">
|
|
<IconButton onClick={requestClose} variant="Surface" aria-label="Close">
|
|
<Icon src={Icons.Cross} />
|
|
</IconButton>
|
|
</Box>
|
|
</Box>
|
|
</PageHeader>
|
|
<Box grow="Yes">
|
|
<Scroll hideTrack visibility="Hover">
|
|
<PageContent>
|
|
<Box direction="Column" gap="700">
|
|
<Box direction="Column" gap="200">
|
|
<Text size="L400">
|
|
{room?.isSpaceRoom() ? 'This space (shared)' : 'This room (shared)'}
|
|
</Text>
|
|
<Text size="T200" priority="300">
|
|
{/* [Gitea #279] Only a space's clips are inherited by rooms under it. */}
|
|
{room?.isSpaceRoom()
|
|
? 'Clips here are shared with everyone, and inherited by every room under this space — just like emoji/sticker packs. Only members with permission can edit.'
|
|
: 'Clips here are shared with everyone in this room — just like emoji/sticker packs. Only members with permission can edit.'}
|
|
</Text>
|
|
{room && <RoomSoundboardPack room={room} stateKey="" />}
|
|
</Box>
|
|
<Box direction="Column" gap="200">
|
|
<Text size="L400">Personal</Text>
|
|
<Text size="T200" priority="300">
|
|
Your own clips, available in every call and synced across your devices.
|
|
</Text>
|
|
<UserSoundboardPack />
|
|
</Box>
|
|
</Box>
|
|
</PageContent>
|
|
</Scroll>
|
|
</Box>
|
|
</Page>
|
|
);
|
|
}
|